﻿:root {
      /* Fonts */
      --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
      --font-mono: Consolas, Monaco, "SFMono-Regular", "Liberation Mono", monospace;

      /* Surface */
      --bg: #f8f8f8;
      --surface: #ffffff;
      --surface-muted: #fafafa;
      --surface-soft: #f5f5f5;

      /* Text */
      --text: #1a1a1a;
      --text-muted: #666666;
      --text-subtle: #888888;
      --text-secondary: #555555;
      --text-tertiary: #444444;

      /* Borders */
      --border: #ececec;
      --border-strong: #dddddd;
      --border-light: #d4d4d4;
      --border-kbd: #c7c7c7;

      /* Primary */
      --primary: #f8bb10;
      --primary-hover: #e9ad09;
      --primary-soft: rgba(248, 187, 16, 0.13);
      --focus: rgba(248, 187, 16, 0.22);

      /* Semantic */
      --success: #3f7d48;
      --success-soft: #edf7ef;
      --danger: #b94f43;
      --danger-soft: #fff0ed;
      --info: #2f718a;
      --info-soft: #eef6f8;
      --warning: #936a00;
      --warning-soft: #fff5d6;
      --purple: #881391;

      /* Shape */
      --radius: 6px;
      --radius-sm: 4px;

      /* Shadow */
      --shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
      --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.05);

      /* Spacing */
      --space-xs: 4px;
      --space-sm: 8px;
      --space-md: 12px;
      --space-lg: 16px;
      --space-xl: 24px;

      /* Typography scale */
      --text-xs: 11px;
      --text-sm: 12px;
      --text-base: 13px;
      --text-md: 14px;
      --text-lg: 15px;
      --text-xl: 16px;

      /* Font weights */
      --fw-normal: 400;
      --fw-medium: 500;
      --fw-semibold: 600;
      --fw-bold: 700;

      /* Transitions */
      --transition-fast: 0.18s ease;

      /* Z-index */
      --z-dropdown: 20;
      --z-tooltip: 25;
      --z-modal: 100;
      --z-toast: 150;

      color-scheme: light;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      min-height: 100vh;
      background: var(--bg);
      color: var(--text);
      font-family: var(--font-sans);
      font-size: 14px;
      line-height: 1.55;
    }

    button,
    input,
    textarea,
    select {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    a {
      color: inherit;
    }

    :focus-visible {
      outline: 2px solid var(--primary);
      outline-offset: 2px;
    }

    ::selection {
      background: var(--primary-soft);
    }

    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    ::-webkit-scrollbar-track {
      background: transparent;
    }

    ::-webkit-scrollbar-thumb {
      background: rgba(0, 0, 0, 0.13);
      border-radius: 3px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: rgba(0, 0, 0, 0.25);
    }

    .service-nav {
      position: sticky;
      top: 0;
      z-index: 50;
      display: flex;
      justify-content: center;
      gap: 8px;
      padding: 12px 20px;
      background: rgba(250, 250, 250, 0.94);
      border-bottom: 1px solid var(--border);
      backdrop-filter: blur(10px);
    }

    .nav-link {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 34px;
      padding: 8px 14px;
      color: var(--text-secondary);
      text-decoration: none;
      border-radius: var(--radius);
      font-size: var(--text-md);
      font-weight: var(--fw-medium);
      transition: color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
    }

    .nav-link:hover {
      background: var(--primary-soft);
      color: var(--text);
    }

    .nav-link.active {
      background: var(--primary);
      color: var(--text);
      box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    }

    .app-header {
      padding: 18px 25px;
      background: var(--surface-soft);
      border-bottom: 1px solid var(--border-strong);
    }

    .header-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      max-width: 1380px;
      margin: 0 auto;
    }

    .title-block h1 {
      margin: 0;
      font-size: 19px;
      line-height: 1.25;
      font-weight: 600;
    }

    .subtitle {
      margin: 3px 0 0;
      color: var(--text-subtle);
      font-size: 13px;
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .layout {
      display: grid;
      grid-template-columns: 244px minmax(0, 1fr);
      gap: 0;
      max-width: 1480px;
      margin: 0 auto;
    }

    .side-nav {
      position: sticky;
      top: 59px;
      align-self: start;
      height: calc(100vh - 59px);
      padding: 20px;
      overflow: auto;
      border-right: 1px solid var(--border);
      background: var(--bg);
    }

    .side-title {
      margin: 0 0 10px;
      color: var(--text-subtle);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    .toc {
      display: grid;
      gap: 4px;
      margin: 0 0 22px;
      padding: 0;
      list-style: none;
    }

    .toc a {
      position: relative;
      display: flex;
      align-items: center;
      min-height: 32px;
      padding: 7px 9px;
      color: var(--text-secondary);
      border-radius: var(--radius);
      text-decoration: none;
      font-size: var(--text-base);
      font-weight: var(--fw-medium);
    }

    .toc a:hover,
    .toc a.is-current {
      background: var(--surface);
      color: var(--text);
    }

    .toc a.is-current::before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: var(--primary);
    }

    .content {
      min-width: 0;
      padding: 24px;
    }

    .section {
      margin: 0 0 34px;
      padding-bottom: 28px;
      border-bottom: 1px solid var(--border);
      scroll-margin-top: 92px;
    }

    .section:last-child {
      border-bottom: 0;
    }

    .section-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 16px;
    }

    .section h2 {
      margin: 0;
      font-size: 20px;
      line-height: 1.25;
      font-weight: 600;
    }

    .section-note {
      margin: 4px 0 0;
      color: var(--text-muted);
      font-size: 13px;
    }

    .surface {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow-soft);
    }

    .demo-grid {
      display: grid;
      gap: 14px;
    }

    .demo-grid.cols-2 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demo-grid.cols-3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .demo-grid.cols-4 {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .demo-panel {
      padding: 16px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
    }

    .demo-panel.compact {
      padding: 12px;
    }

    .demo-title {
      margin: 0 0 12px;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    .row {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .row.between {
      justify-content: space-between;
    }

    .stack {
      display: grid;
      gap: 10px;
    }

    .cluster {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .swatch-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .swatch {
      min-height: 96px;
      padding: 10px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
    }

    .swatch-color {
      height: 36px;
      margin-bottom: 10px;
      border-radius: 4px;
      border: 1px solid rgba(0, 0, 0, 0.06);
    }

    .swatch strong,
    .token strong {
      display: block;
      font-size: 13px;
      font-weight: 600;
    }

    .swatch span,
    .token span {
      display: block;
      margin-top: 2px;
      color: var(--text-subtle);
      font-family: var(--font-mono);
      font-size: 12px;
    }

    .token-list {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    .token {
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
    }

    .type-sample h1,
    .type-sample h2,
    .type-sample h3,
    .type-sample p {
      margin: 0;
    }

    .type-sample h1 {
      font-size: 28px;
      line-height: 1.18;
      font-weight: 650;
    }

    .type-sample h2 {
      font-size: 20px;
      line-height: 1.25;
      font-weight: 600;
    }

    .type-sample h3 {
      font-size: 16px;
      line-height: 1.35;
      font-weight: 600;
    }

    .type-sample p {
      color: var(--text-muted);
      font-size: 14px;
    }

    .mono-sample {
      padding: 12px;
      color: var(--text-tertiary);
      background: var(--surface-muted);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      font-family: var(--font-mono);
      font-size: var(--text-sm);
      line-height: 1.55;
      overflow: auto;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      min-height: 34px;
      padding: 8px 13px;
      border: 1px solid transparent;
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--text);
      text-decoration: none;
      font-size: var(--text-md);
      font-weight: var(--fw-semibold);
      line-height: 1;
      transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
      white-space: nowrap;
    }

    .btn svg,
    .nav-link svg,
    .icon-btn svg,
    .menu-item svg {
      width: 16px;
      height: 16px;
      flex: 0 0 auto;
      stroke-width: 2;
    }

    .btn-primary {
      background: var(--primary);
      border-color: var(--primary);
      color: var(--text);
    }

    .btn-primary:hover {
      background: var(--primary-hover);
      border-color: var(--primary-hover);
    }

    .btn-secondary {
      border-color: var(--border-strong);
      background: var(--surface);
    }

    .btn-secondary:hover {
      background: var(--surface-muted);
      border-color: var(--border-light);
    }

    .btn-ghost {
      background: transparent;
      color: var(--text-secondary);
    }

    .btn-ghost:hover {
      background: var(--primary-soft);
      color: var(--text);
    }

    .btn-soft {
      background: var(--primary-soft);
      border-color: rgba(248, 187, 16, 0.34);
      color: #6f5100;
    }

    .btn-soft:hover {
      background: rgba(248, 187, 16, 0.2);
      border-color: rgba(248, 187, 16, 0.5);
      color: var(--text);
    }

    .btn-outline {
      background: transparent;
      border-color: var(--border-light);
      color: var(--text-tertiary);
    }

    .btn-outline:hover {
      background: var(--surface);
      border-color: var(--primary);
      color: var(--text);
    }

    .btn-soft-success {
      background: var(--success-soft);
      border-color: #cfe6d4;
      color: var(--success);
    }

    .btn-soft-success:hover {
      background: #e1f0e4;
    }

    .btn-soft-info {
      background: var(--info-soft);
      border-color: #cde5ec;
      color: var(--info);
    }

    .btn-soft-info:hover {
      background: #dff0f4;
    }

    .btn-soft-danger {
      background: var(--danger-soft);
      border-color: #f1d0ca;
      color: var(--danger);
    }

    .btn-soft-danger:hover {
      background: #ffe4df;
    }

    .btn-danger {
      background: var(--danger);
      border-color: var(--danger);
      color: #ffffff;
    }

    .btn-danger:hover {
      background: #c62d2a;
      border-color: #c62d2a;
    }

    .btn-success {
      background: var(--success);
      border-color: var(--success);
      color: #ffffff;
    }

    .btn[disabled],
    .icon-btn[disabled] {
      cursor: not-allowed;
      opacity: 0.48;
    }

    .btn-sm {
      min-height: 28px;
      padding: 6px 10px;
      font-size: 12px;
    }

    .btn-lg {
      min-height: 42px;
      padding: 11px 16px;
      font-size: 15px;
    }

    .icon-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 34px;
      height: 34px;
      border: 1px solid var(--border-strong);
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--text);
      transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    }

    .icon-btn:hover {
      background: var(--surface-muted);
      border-color: var(--border-light);
    }

    .icon-btn.primary {
      background: var(--primary);
      border-color: var(--primary);
    }

    .split-button {
      display: inline-flex;
    }

    .split-button .btn {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }

    .split-button .icon-btn {
      width: 34px;
      border-left: 0;
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }

    .field {
      display: grid;
      gap: 6px;
    }

    .field label,
    .label {
      color: var(--text-tertiary);
      font-size: var(--text-base);
      font-weight: var(--fw-semibold);
    }

    .hint {
      color: var(--text-subtle);
      font-size: var(--text-sm);
    }

    .control,
    .select,
    .textarea {
      width: 100%;
      min-height: 36px;
      padding: 8px 10px;
      border: 2px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--text);
      transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    }

    .control:hover,
    .select:hover,
    .textarea:hover {
      border-color: #dedede;
    }

    .control:focus,
    .select:focus,
    .textarea:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px var(--focus);
      outline: none;
    }

    .control.is-invalid {
      border-color: var(--danger);
      box-shadow: 0 0 0 3px rgba(220, 50, 47, 0.1);
    }

    .control.is-valid {
      border-color: var(--success);
      box-shadow: 0 0 0 3px rgba(36, 138, 61, 0.1);
    }

    .textarea {
      min-height: 104px;
      resize: vertical;
    }

    .input-icon {
      position: relative;
    }

    .input-icon svg {
      position: absolute;
      left: 10px;
      top: 50%;
      width: 16px;
      height: 16px;
      transform: translateY(-50%);
      color: var(--text-subtle);
      pointer-events: none;
    }

    .input-icon .control {
      padding-left: 34px;
    }

    .check-row {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 28px;
      color: var(--text-tertiary);
      font-size: var(--text-base);
      font-weight: var(--fw-medium);
    }

    .check-row input {
      width: 16px;
      height: 16px;
      accent-color: var(--primary);
    }

    .switch {
      position: relative;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      font-size: var(--text-base);
      font-weight: var(--fw-semibold);
    }

    .switch input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    .switch-track {
      position: relative;
      width: 38px;
      height: 22px;
      border-radius: 999px;
      background: #d8d8d8;
      transition: background var(--transition-fast);
    }

    .switch-track::after {
      content: "";
      position: absolute;
      top: 3px;
      left: 3px;
      width: 16px;
      height: 16px;
      border-radius: 999px;
      background: #ffffff;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
      transition: transform var(--transition-fast);
    }

    .switch input:checked + .switch-track {
      background: var(--primary);
    }

    .switch input:checked + .switch-track::after {
      transform: translateX(16px);
    }

    .range-field {
      display: grid;
      gap: 8px;
    }

    input[type="range"] {
      width: 100%;
      accent-color: var(--primary);
    }

    .segmented {
      display: inline-grid;
      grid-auto-flow: column;
      padding: 3px;
      background: var(--surface-soft);
      border: 1px solid var(--border);
      border-radius: var(--radius);
    }

    .segmented button {
      min-height: 30px;
      padding: 6px 11px;
      border: 0;
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--text-secondary);
      font-size: var(--text-base);
      font-weight: var(--fw-semibold);
    }

    .segmented button[aria-selected="true"] {
      background: var(--surface);
      color: var(--text);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      min-height: 22px;
      padding: 3px 8px;
      border: 1px solid transparent;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 600;
      line-height: 1;
      white-space: nowrap;
    }

    .badge.neutral {
      background: var(--surface-soft);
      border-color: var(--border);
      color: var(--text-secondary);
    }

    .badge.primary {
      background: var(--primary-soft);
      color: #7a5900;
    }

    .badge.success {
      background: var(--success-soft);
      color: var(--success);
    }

    .badge.info {
      background: var(--info-soft);
      color: var(--info);
    }

    .badge.warning {
      background: var(--warning-soft);
      color: var(--warning);
    }

    .badge.danger {
      background: var(--danger-soft);
      color: var(--danger);
    }

    .status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: currentColor;
    }

    .alert {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      gap: 10px;
      align-items: start;
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
    }

    .alert svg {
      width: 17px;
      height: 17px;
      margin-top: 1px;
    }

    .alert-title {
      margin: 0;
      font-size: 13px;
      font-weight: 600;
    }

    .alert-text {
      margin: 2px 0 0;
      color: var(--text-muted);
      font-size: 13px;
    }

    .alert.info {
      border-color: #cce7f8;
      background: var(--info-soft);
      color: var(--info);
    }

    .alert.success {
      border-color: #ccead5;
      background: var(--success-soft);
      color: var(--success);
    }

    .alert.warning {
      border-color: #f3df92;
      background: var(--warning-soft);
      color: var(--warning);
    }

    .alert.danger {
      border-color: #f5cbca;
      background: var(--danger-soft);
      color: var(--danger);
    }

    .alert .alert-text {
      color: var(--text-secondary);
    }

    .toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
    }

    .toolbar-group {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .tabs {
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      overflow: hidden;
    }

    .tab-list {
      display: flex;
      gap: 2px;
      padding: 6px 6px 0;
      border-bottom: 1px solid var(--border);
      background: var(--surface-muted);
      overflow-x: auto;
    }

    .tab-button {
      min-height: 34px;
      padding: 8px 12px;
      border: 0;
      border-radius: 5px 5px 0 0;
      background: transparent;
      color: var(--text-secondary);
      font-size: var(--text-base);
      font-weight: var(--fw-semibold);
      white-space: nowrap;
    }

    .tab-button[aria-selected="true"] {
      background: var(--surface);
      color: var(--text);
      box-shadow: inset 0 3px 0 var(--primary);
    }

    .tab-panel {
      display: none;
      padding: 14px;
    }

    .tab-panel.is-active {
      display: block;
    }

    .breadcrumbs {
      display: flex;
      align-items: center;
      gap: 7px;
      flex-wrap: wrap;
      color: var(--text-muted);
      font-size: var(--text-base);
    }

    .breadcrumbs a {
      color: var(--text-secondary);
      text-decoration: none;
    }

    .breadcrumbs a:hover {
      color: var(--text);
      text-decoration: underline;
    }

    .pagination {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .page-btn {
      min-width: 32px;
      height: 32px;
      padding: 0 8px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--text-secondary);
      font-size: var(--text-base);
      font-weight: var(--fw-semibold);
    }

    .page-btn:hover,
    .page-btn.active {
      background: var(--primary);
      border-color: var(--primary);
      color: var(--text);
    }

    .card {
      padding: 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow-soft);
    }

    .card-head {
      display: flex;
      align-items: start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }

    .card-title {
      margin: 0;
      font-size: 15px;
      font-weight: 600;
      line-height: 1.3;
    }

    .card-text {
      margin: 0;
      color: var(--text-muted);
      font-size: 13px;
    }

    .card-text code {
      padding: 1px 6px;
      border-radius: var(--radius-sm);
      background: var(--surface-muted);
      font-family: var(--font-mono);
      font-size: var(--text-sm);
      color: var(--text-secondary);
    }

    .metric {
      display: grid;
      gap: 6px;
    }

    .metric-label {
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
    }

    .metric-value {
      font-size: 28px;
      line-height: 1;
      font-weight: 650;
    }

    .metric-delta {
      color: var(--success);
      font-size: 12px;
      font-weight: 600;
    }

    .avatar-row {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .avatar {
      display: inline-grid;
      place-items: center;
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: var(--primary);
      color: var(--text);
      font-size: 13px;
      font-weight: 800;
    }

    .avatar.small {
      width: 26px;
      height: 26px;
      font-size: 11px;
    }

    .avatar-group {
      display: flex;
      align-items: center;
      padding-left: 6px;
    }

    .avatar-group .avatar {
      margin-left: -6px;
      border: 2px solid var(--surface);
    }

    .table-wrap {
      overflow: auto;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 720px;
    }

    th,
    td {
      padding: 10px 12px;
      border-bottom: 1px solid var(--border);
      text-align: left;
      vertical-align: middle;
      font-size: 13px;
    }

    th {
      background: var(--surface-muted);
      color: var(--text-secondary);
      font-weight: var(--fw-semibold);
    }

    tr:last-child td {
      border-bottom: 0;
    }

    tbody tr:hover {
      background: #fffdf5;
    }

    .code-window {
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
    }

    .code-titlebar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 9px 12px;
      border-bottom: 1px solid var(--border);
      background: var(--surface-muted);
    }

    .window-dots {
      display: flex;
      gap: 5px;
    }

    .window-dots span {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #d6d6d6;
    }

    .code-title {
      color: var(--text-secondary);
      font-family: var(--font-mono);
      font-size: var(--text-sm);
    }

    pre,
    code {
      font-family: var(--font-mono);
    }

    .code-window pre {
      margin: 0;
      padding: 14px;
      color: var(--text-tertiary);
      font-size: var(--text-sm);
      line-height: 1.55;
      white-space: pre-wrap;
      overflow: auto;
    }

    .json-key {
      color: var(--purple);
    }

    .json-string {
      color: var(--info);
    }

    .json-number {
      color: #697f1d;
    }

    .json-boolean {
      color: var(--warning);
    }

    .json-null {
      color: var(--danger);
    }

    .accordion {
      display: grid;
      gap: 8px;
    }

    .accordion-item {
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      overflow: hidden;
    }

    .accordion-button {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      min-height: 42px;
      padding: 10px 12px;
      border: 0;
      background: transparent;
      color: var(--text);
      font-size: 14px;
      font-weight: 600;
      text-align: left;
    }

    .accordion-panel {
      display: none;
      padding: 0 12px 12px;
      color: var(--text-muted);
      font-size: 13px;
    }

    .accordion-item.is-open .accordion-panel {
      display: block;
    }

    .accordion-item.is-open .accordion-button svg {
      transform: rotate(180deg);
    }

    .progress {
      height: 8px;
      border-radius: 999px;
      background: #e8e8e8;
      overflow: hidden;
    }

    .progress span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: var(--primary);
    }

    .meter {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      align-items: center;
    }

    .stepper {
      display: grid;
      gap: 12px;
    }

    .step {
      display: grid;
      grid-template-columns: 30px minmax(0, 1fr);
      gap: 10px;
      align-items: start;
    }

    .step-index {
      display: grid;
      place-items: center;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: var(--surface-soft);
      color: var(--text-muted);
      border: 1px solid var(--border);
      font-size: 12px;
      font-weight: 800;
    }

    .step.is-active .step-index,
    .step.is-done .step-index {
      background: var(--primary);
      border-color: var(--primary);
      color: var(--text);
    }

    .step-title {
      margin: 0;
      font-size: 14px;
      font-weight: 600;
    }

    .step-text {
      margin: 2px 0 0;
      color: var(--text-muted);
      font-size: 13px;
    }

    .timeline {
      display: grid;
      gap: 12px;
      padding-left: 6px;
    }

    .timeline-item {
      position: relative;
      display: grid;
      grid-template-columns: 16px minmax(0, 1fr);
      gap: 10px;
    }

    .timeline-item::before {
      content: "";
      position: absolute;
      left: 7px;
      top: 18px;
      bottom: -16px;
      width: 1px;
      background: var(--border-strong);
    }

    .timeline-item:last-child::before {
      display: none;
    }

    .timeline-dot {
      width: 14px;
      height: 14px;
      margin-top: 3px;
      border-radius: 50%;
      border: 3px solid var(--surface);
      background: var(--primary);
      box-shadow: 0 0 0 1px var(--primary);
    }

    .timeline-title {
      margin: 0;
      font-size: 13px;
      font-weight: 600;
    }

    .timeline-text {
      margin: 2px 0 0;
      color: var(--text-muted);
      font-size: 12px;
    }

    .skeleton {
      display: block;
      height: 12px;
      border-radius: 999px;
      background: linear-gradient(90deg, #eeeeee, #f7f7f7, #eeeeee);
      background-size: 180% 100%;
      animation: shimmer 1.25s linear infinite;
    }

    @keyframes shimmer {
      to {
        background-position: -180% 0;
      }
    }

    .dropdown {
      position: relative;
      display: inline-block;
    }

    .menu {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      z-index: var(--z-dropdown);
      display: none;
      min-width: 220px;
      padding: 6px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .dropdown.is-open .menu {
      display: grid;
      gap: 2px;
    }

    .menu-item {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-height: 34px;
      padding: 8px;
      border: 0;
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--text-tertiary);
      text-align: left;
      font-size: var(--text-base);
      font-weight: var(--fw-semibold);
    }

    .menu-item:hover {
      background: var(--surface-soft);
      color: var(--text);
    }

    .popover {
      position: relative;
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
    }

    .popover::before {
      content: "";
      position: absolute;
      top: -7px;
      left: 20px;
      width: 12px;
      height: 12px;
      background: var(--surface);
      border-left: 1px solid var(--border);
      border-top: 1px solid var(--border);
      transform: rotate(45deg);
    }

    .tooltip-host {
      position: relative;
      display: inline-flex;
    }

    .tooltip-host:hover::after {
      content: attr(data-tooltip);
      position: absolute;
      left: 50%;
      bottom: calc(100% + 8px);
      z-index: var(--z-tooltip);
      min-width: max-content;
      max-width: 220px;
      padding: 6px 8px;
      border-radius: var(--radius-sm);
      background: #1a1a1a;
      color: #ffffff;
      font-size: var(--text-sm);
      font-weight: var(--fw-semibold);
      transform: translateX(-50%);
      white-space: nowrap;
    }

    .modal-backdrop,
    .drawer-backdrop {
      position: fixed;
      inset: 0;
      z-index: var(--z-modal);
      display: none;
      background: rgba(0, 0, 0, 0.34);
    }

    .modal-backdrop.is-open,
    .drawer-backdrop.is-open {
      display: grid;
    }

    .modal-backdrop {
      place-items: center;
      padding: 20px;
    }

    .modal {
      width: min(520px, 100%);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .modal-head,
    .drawer-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px;
      border-bottom: 1px solid var(--border);
      background: var(--surface-muted);
    }

    .modal-title,
    .drawer-title {
      margin: 0;
      font-size: 16px;
      font-weight: 650;
    }

    .modal-body,
    .drawer-body {
      padding: 14px;
    }

    .modal-foot,
    .drawer-foot {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding: 12px 14px;
      border-top: 1px solid var(--border);
      background: var(--surface-muted);
    }

    .drawer-backdrop {
      justify-items: end;
    }

    .drawer {
      width: min(420px, 100%);
      min-height: 100%;
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .toast-stack {
      position: fixed;
      right: 18px;
      bottom: 18px;
      z-index: 150;
      display: grid;
      gap: 8px;
      width: min(360px, calc(100vw - 36px));
    }

    .toast {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      gap: 10px;
      align-items: start;
      padding: 12px;
      border: 1px solid var(--border);
      border-left: 4px solid var(--primary);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .toast strong {
      display: block;
      font-size: 13px;
    }

    .toast span {
      display: block;
      margin-top: 2px;
      color: var(--text-muted);
      font-size: 12px;
    }

    .split-tool {
      height: 460px;
      padding: 20px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface-soft);
    }

    .split {
      display: flex;
      height: 100%;
      min-height: 0;
    }

    .split-panel {
      flex: 1;
      min-width: 120px;
    }

    .divider {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      flex: 0 0 20px;
      cursor: col-resize;
    }

    .dots {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .dots span {
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: var(--text-muted);
    }

    .editor,
    .viewer {
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 15px;
      border: 2px solid var(--border);
      background: var(--surface);
      color: var(--text-tertiary);
      font-family: var(--font-mono);
      font-size: var(--text-sm);
      line-height: 1.5;
      white-space: pre-wrap;
      overflow: auto;
    }

    .editor {
      resize: none;
      outline: none;
    }

    .editor:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px var(--focus);
    }

    .command {
      display: grid;
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
    }

    .command-search {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 8px;
      align-items: center;
      padding: 10px 12px;
      border-bottom: 1px solid var(--border);
    }

    .command-search svg {
      width: 16px;
      height: 16px;
      color: var(--text-subtle);
    }

    .command-search input {
      width: 100%;
      border: 0;
      outline: 0;
      background: transparent;
    }

    .command-list {
      display: grid;
      gap: 2px;
      padding: 6px;
    }

    .command-item {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      gap: 9px;
      align-items: center;
      min-height: 38px;
      padding: 8px;
      border-radius: var(--radius-sm);
      color: var(--text-tertiary);
    }

    .command-item:hover,
    .command-item.active {
      background: #fff8df;
      color: var(--text);
    }

    .kbd {
      display: inline-flex;
      align-items: center;
      min-height: 20px;
      padding: 2px 6px;
      border: 1px solid var(--border-strong);
      border-bottom-color: var(--border-kbd);
      border-radius: var(--radius-sm);
      background: var(--surface-muted);
      color: var(--text-secondary);
      font-family: var(--font-mono);
      font-size: var(--text-xs);
      font-weight: var(--fw-semibold);
    }

    .chart {
      display: grid;
      gap: 10px;
    }

    .bar-row {
      display: grid;
      grid-template-columns: 82px minmax(0, 1fr) 38px;
      gap: 8px;
      align-items: center;
      font-size: 12px;
      font-weight: 700;
    }

    .bar-track {
      height: 10px;
      overflow: hidden;
      border-radius: 999px;
      background: #eeeeee;
    }

    .bar-track span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: var(--primary);
    }

    .empty-state {
      display: grid;
      place-items: center;
      min-height: 180px;
      padding: 24px;
      border: 1px dashed var(--border-strong);
      border-radius: var(--radius);
      background: var(--surface);
      text-align: center;
    }

    .empty-state svg {
      width: 32px;
      height: 32px;
      color: var(--text-subtle);
      margin-bottom: 8px;
    }

    .empty-state strong {
      display: block;
      font-size: 15px;
    }

    .empty-state span {
      display: block;
      margin-top: 3px;
      color: var(--text-muted);
      font-size: 13px;
    }

    .empty-state.is-actionable {
      cursor: pointer;
      transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
    }

    .empty-state.is-actionable:hover,
    .empty-state.is-actionable.is-hot {
      border-color: var(--primary);
      background: var(--primary-soft);
      color: var(--text);
    }

    .empty-state.is-actionable svg {
      color: #7a5900;
    }

    .media-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
    }

    .gallery-card {
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow-soft);
    }

    .gallery-media,
    .blog-cover,
    .output-frame {
      position: relative;
      overflow: hidden;
      background: linear-gradient(135deg, #f7f7f7, #ececec);
    }

    .gallery-media {
      aspect-ratio: 4 / 3;
    }

    .gallery-media img,
    .blog-cover img,
    .output-frame img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .gallery-body {
      display: grid;
      gap: 8px;
      padding: 12px;
    }

    .gallery-title {
      margin: 0;
      font-size: 14px;
      font-weight: 650;
      line-height: 1.3;
    }

    .gallery-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      color: var(--text-subtle);
      font-size: 12px;
    }

    .blog-post {
      display: grid;
      grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow-soft);
    }

    .blog-cover {
      min-height: 320px;
    }

    .blog-content {
      display: grid;
      align-content: center;
      gap: 12px;
      padding: 22px;
    }

    .blog-content h3 {
      margin: 0;
      font-size: 24px;
      line-height: 1.2;
      font-weight: 650;
    }

    .blog-content p {
      margin: 0;
      color: var(--text-muted);
      font-size: 14px;
    }

    .blog-byline {
      display: flex;
      align-items: center;
      gap: 10px;
      padding-top: 4px;
    }

    .image-output {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 260px;
      gap: 14px;
      padding: 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow-soft);
    }

    .output-preview {
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface-muted);
    }

    .output-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 10px;
      border-bottom: 1px solid var(--border);
      background: var(--surface-muted);
    }

    .output-frame {
      aspect-ratio: 16 / 10;
    }

    .output-frame.is-stage {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 420px;
      aspect-ratio: auto;
      padding: var(--space-xl);
      background:
        repeating-conic-gradient(var(--surface-muted) 0% 25%, var(--surface-soft) 0% 50%) 0/24px 24px;
    }

    .output-frame .empty-state {
      min-height: auto;
      border: 0;
      background: transparent;
      padding: 0;
    }

    .output-frame.is-checkerboard {
      background-color: #fbfbf9;
      background-image:
        linear-gradient(45deg, #dcdcd6 25%, transparent 25%),
        linear-gradient(-45deg, #dcdcd6 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #dcdcd6 75%),
        linear-gradient(-45deg, transparent 75%, #dcdcd6 75%);
      background-size: 18px 18px;
      background-position: 0 0, 0 9px, 9px -9px, -9px 0;
    }

    .output-result {
      display: none;
      max-width: 100%;
      padding: var(--space-md);
      border-radius: var(--radius);
      background: #fbfbf9;
      box-shadow: var(--shadow-soft);
    }

    .output-result.is-visible {
      display: block;
    }

    .output-result svg,
    .output-result img {
      display: block;
      max-width: 100%;
      max-height: 520px;
      width: auto;
      height: auto;
      margin: 0 auto;
    }

    .output-scan {
      position: absolute;
      inset: 0;
      display: none;
      pointer-events: none;
    }

    .output-frame.is-busy .output-scan {
      display: block;
    }

    .output-scan::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--primary), transparent);
      box-shadow: 0 0 12px var(--primary);
      animation: output-scan 1.1s linear infinite;
    }

    @keyframes output-scan {
      0% { top: -2%; }
      100% { top: 102%; }
    }

    .output-side {
      display: grid;
      align-content: start;
      gap: 12px;
    }

    .meta-list {
      display: grid;
      gap: 8px;
      margin: 0;
    }

    .meta-row {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 0;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
    }

    .meta-row dt {
      color: var(--text-muted);
    }

    .meta-row dd {
      margin: 0;
      color: var(--text);
      font-family: var(--font-mono);
      font-size: 12px;
      text-align: right;
    }

    .footer {
      margin-top: 12px;
      padding: 18px 24px 28px;
      color: var(--text-muted);
      text-align: center;
      font-size: 12px;
    }

    @media (max-width: 1120px) {
      .layout {
        grid-template-columns: 1fr;
      }

      .side-nav {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
      }

      .toc {
        display: flex;
        overflow-x: auto;
        padding-bottom: 2px;
      }

      .toc a {
        white-space: nowrap;
      }

      .demo-grid.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 820px) {
      .service-nav {
        justify-content: flex-start;
        overflow-x: auto;
      }

      .header-inner,
      .section-head,
      .toolbar {
        align-items: stretch;
        flex-direction: column;
      }

      .header-actions,
      .toolbar-group {
        justify-content: flex-start;
      }

      .content {
        padding: 18px;
      }

      .demo-grid.cols-2,
      .demo-grid.cols-3,
      .demo-grid.cols-4,
      .media-grid,
      .swatch-grid,
      .token-list {
        grid-template-columns: 1fr;
      }

      .blog-post,
      .image-output {
        grid-template-columns: 1fr;
      }

      .blog-cover {
        min-height: 220px;
      }

      .split-tool {
        height: auto;
        padding: 12px;
      }

      .split {
        display: grid;
        gap: 12px;
      }

      .split-panel {
        min-height: 260px;
      }

      .divider {
        display: none;
      }
    }

    @media (max-width: 520px) {
      .service-nav {
        padding: 10px 12px;
      }

      .app-header {
        padding: 14px 16px;
      }

      .content {
        padding: 14px;
      }

      .section {
        margin-bottom: 26px;
        padding-bottom: 22px;
      }

      .btn,
      .nav-link {
        min-height: 32px;
      }

      .modal-foot,
      .drawer-foot {
        flex-direction: column-reverse;
      }

      .modal-foot .btn,
      .drawer-foot .btn {
        width: 100%;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .output-scan::after {
        animation: none;
        top: 50%;
      }
    }
