@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600&family=Newsreader:ital,opsz,wght@0,6..72,500;0,6..72,600;1,6..72,400&display=swap');


    :root {
  --bg: #0f0e0c;
  --bg-elevated: #161412;
  --surface: #1c1a17;
  --surface2: #24211d;
  --border: rgba(237, 224, 200, 0.09);
  --border-strong: rgba(237, 224, 200, 0.16);
  --text: #ede4d6;
  --text-soft: #cfc4b4;
  --muted: #8a8278;
  /* Antique gold — bronze undertone, avoids UPS-style saturated yellow */
  --gold: #b8956a;
  --gold-light: #d4b88e;
  --gold-deep: #8f7048;
  --accent: var(--gold);
  --accent-hover: var(--gold-light);
  --accent-soft: rgba(184, 149, 106, 0.15);
  --green: #8da882;
  --green-soft: rgba(141, 168, 130, 0.14);
  --yellow: #a8906e;
  --red: #c07062;
  --red-soft: rgba(192, 112, 98, 0.14);
  --radius: 10px;
  --radius-sm: 6px;
  --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 4px 20px rgba(0,0,0,0.22);
  /* Button tokens */
  --btn-radius: 8px;
  --btn-radius-pill: 999px;
  --btn-primary-bg: linear-gradient(180deg, #dcc29a 0%, #b8956a 48%, #a8864f 100%);
  --btn-primary-hover: linear-gradient(180deg, #ead4b0 0%, #c4a574 48%, #b8956a 100%);
  --btn-primary-text: #1a1510;
  --btn-primary-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.16);
  --btn-primary-shadow-hover: 0 4px 16px rgba(184, 149, 106, 0.32), inset 0 1px 0 rgba(255,255,255,0.2);
  --btn-ghost-hover: rgba(237, 224, 200, 0.06);
  --btn-transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: var(--font-ui);
      background: var(--bg);
      background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(184, 149, 106, 0.05), transparent);
      color: var(--text);
      min-height: 100vh;
      line-height: 1.55;
      -webkit-font-smoothing: antialiased;
    }
    header {
      position: sticky;
      top: 0;
      z-index: 200;
      border-bottom: 1px solid var(--border);
      padding: 0.65rem 2rem;
      display: grid;
      grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
      align-items: center;
      gap: 1rem;
      background: rgba(15, 14, 12, 0.9);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
    }
    header h1 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
    .brand-wordmark {
      font-family: var(--font-ui);
      font-size: 1.35rem;
      font-weight: 600;
      letter-spacing: -0.04em;
      color: var(--text);
      line-height: 1;
    }
    .brand-mark {
      font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
      font-size: 0.92em;
      font-weight: 500;
      letter-spacing: -0.06em;
      color: var(--gold-light);
    }
    .brand-home {
      display: inline-flex;
      align-items: center;
      padding: 0.15rem 0.2rem;
      margin: -0.15rem -0.2rem;
      border: 0;
      border-radius: var(--radius-sm);
      background: transparent;
      color: inherit;
      cursor: pointer;
      transition: background 0.15s ease, opacity 0.15s ease;
    }
    .brand-home:hover {
      background: var(--btn-ghost-hover);
    }
    .brand-home:focus-visible {
      outline: 2px solid var(--gold);
      outline-offset: 3px;
    }
    header .status-badge { color: var(--muted); font-size: 0.8rem; display: flex; align-items: center; gap: 0.4rem; }
    header .status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
    header .status-badge.ok::before { background: var(--green); box-shadow: 0 0 8px var(--green-soft); }
    header .status-badge.warn::before { background: var(--yellow); box-shadow: 0 0 6px rgba(168, 144, 110, 0.35); }
    .brand-wrap { display: flex; align-items: center; min-width: 0; }
    .header-right { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; min-width: 0; }
    .auth-area { display: flex; align-items: center; gap: 0.45rem; }
    .auth-btn {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--text-soft);
      border-radius: var(--btn-radius-pill);
      padding: 0.42rem 0.95rem;
      font: inherit;
      font-size: 0.8125rem;
      font-weight: 500;
      cursor: pointer;
      transition: var(--btn-transition);
      letter-spacing: 0.01em;
    }
    .auth-btn:hover {
      border-color: var(--border-strong);
      color: var(--text);
      background: var(--btn-ghost-hover);
    }
    .auth-btn-primary {
      background: var(--btn-primary-bg);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: var(--btn-primary-text);
      font-weight: 600;
      box-shadow: var(--btn-primary-shadow);
    }
    .auth-btn-primary:hover {
      background: var(--btn-primary-hover);
      border-color: rgba(255, 255, 255, 0.14);
      color: var(--btn-primary-text);
      box-shadow: var(--btn-primary-shadow-hover);
      transform: translateY(-1px);
    }
    .auth-btn:active, .auth-btn-primary:active { transform: translateY(0) scale(0.98); }
    .auth-user-menu { position: relative; display: flex; align-items: center; gap: 0.5rem; }
    .auth-user-label { font-size: 0.82rem; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .auth-user-label-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.28rem;
      min-width: 0;
      max-width: 180px;
      padding: 0.36rem 0.56rem;
      border-radius: var(--btn-radius-pill);
    }
    .auth-user-label-btn::after {
      content: '';
      width: 0.36rem;
      height: 0.36rem;
      border-right: 1px solid currentColor;
      border-bottom: 1px solid currentColor;
      transform: translateY(-1px) rotate(45deg);
      opacity: 0.75;
      flex: 0 0 auto;
    }
    .auth-user-label-btn:hover,
    .auth-user-label-btn[aria-expanded="true"] {
      color: var(--text);
      background: var(--btn-ghost-hover);
      text-decoration: none;
    }
    .auth-menu-popover {
      position: absolute;
      top: calc(100% + 0.55rem);
      right: 0;
      z-index: 260;
      min-width: 170px;
      padding: 0.35rem;
      border: 1px solid var(--border-strong);
      border-radius: var(--radius);
      background: rgba(28, 26, 23, 0.98);
      box-shadow: var(--shadow);
    }
    .auth-menu-popover[hidden] { display: none; }
    .auth-menu-item {
      width: 100%;
      display: flex;
      align-items: center;
      min-height: 2rem;
      padding: 0.48rem 0.65rem;
      border: 0;
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--text-soft);
      font: 600 0.8125rem/1 var(--font-ui);
      text-align: left;
      cursor: pointer;
    }
    .auth-menu-item:hover {
      background: var(--btn-ghost-hover);
      color: var(--text);
    }
    .auth-menu-item-muted {
      color: var(--muted);
      font-weight: 500;
    }
    .auth-link-btn {
      background: none;
      border: none;
      color: var(--gold);
      font: inherit;
      font-size: 0.85rem;
      cursor: pointer;
      padding: 0;
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    .auth-link-btn:hover { color: var(--gold-light); }
    .auth-switch { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); text-align: center; }
    .auth-modal .modal-actions { margin-top: 0.5rem; }
    .auth-modal label { margin-top: 0.15rem; }
    .auth-modal .auth-link-btn { margin-bottom: 0.85rem; display: inline-block; }
    .container { max-width: 880px; margin: 0 auto; padding: 0.9rem 2rem 3rem; }
    .container.wide { max-width: 1280px; }
    .container.has-results { max-width: 960px; padding-top: 0.75rem; }
    .view-nav {
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 0;
    }
    .input-method-toggle {
      display: inline-flex;
      gap: 0;
      padding: 0;
      background: transparent;
      border: none;
      border-radius: 0;
    }
    .method-pill {
      padding: 0.45rem 0.7rem 0.6rem;
      margin-bottom: -1px;
      border: none;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font-size: 0.8125rem;
      font-weight: 500;
      border-radius: 0;
      border-bottom: 2px solid transparent;
      transition: color 0.15s, border-color 0.15s;
      white-space: nowrap;
    }
    .method-pill:hover { color: var(--text-soft); }
    .method-pill.active {
      color: var(--gold-light);
      border-bottom-color: var(--gold);
    }
    .utility-nav {
      display: flex;
      gap: 0.2rem;
      align-items: center;
      padding: 0.18rem;
      border: 1px solid var(--border);
      border-radius: var(--btn-radius-pill);
      background: rgba(255, 255, 255, 0.025);
      box-shadow: var(--shadow-sm);
    }
    .utility-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 2rem;
      padding: 0.38rem 0.72rem;
      border: none;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font-family: var(--font-ui);
      font-size: 0.8125rem;
      font-weight: 600;
      line-height: 1;
      letter-spacing: -0.005em;
      border-radius: var(--btn-radius-pill);
      transition: color 0.15s, background 0.15s;
      white-space: nowrap;
    }
    a.utility-link {
      text-decoration: none;
      display: inline-flex;
      align-items: center;
    }
    header .view-nav .utility-link {
      font: 600 0.8125rem/1 var(--font-ui);
    }
    .utility-link:hover { color: var(--text-soft); background: var(--btn-ghost-hover); }
    .utility-link.active {
      color: var(--gold-light);
      background: var(--accent-soft);
    }
    @media (max-width: 900px) {
      header {
        grid-template-columns: 1fr auto;
        row-gap: 0.6rem;
      }
      header .view-nav {
        grid-column: 1 / -1;
        grid-row: 2;
      }
      .utility-nav {
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        scrollbar-width: none;
      }
      .utility-nav::-webkit-scrollbar { display: none; }
    }
    .panel { display: none; }
    .panel.active { display: block; }
    label { display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.35rem; font-weight: 500; letter-spacing: 0.01em; }
    input[type=text], input[type=url], input[type=email], input[type=password], input[type=search], textarea {
      width: 100%;
      padding: 0.85rem 1rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--text);
      font-size: 1rem;
      font-family: inherit;
      margin-bottom: 1rem;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    input[type=email], input[type=password] {
      font-size: 0.9375rem;
    }
    .auth-modal input[type=text],
    .auth-modal input[type=email],
    .auth-modal input[type=password] {
      background: var(--surface2);
      border-color: var(--border);
      border-radius: var(--btn-radius);
      padding: 0.72rem 0.95rem;
      margin-bottom: 0.85rem;
    }
    .auth-modal input:focus {
      border-color: rgba(184, 149, 106, 0.55);
      box-shadow: 0 0 0 3px var(--accent-soft);
    }
    input:focus, textarea:focus { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--accent-soft); }
    input.input-error, textarea.input-error { border-color: var(--red); }
    input.input-error:focus { border-color: var(--red); box-shadow: 0 0 0 2px rgba(248,113,113,0.15); }
    textarea { resize: vertical; min-height: 56px; font-family: inherit; }
    .field-error {
      display: none;
      font-size: 0.8rem;
      color: var(--red);
      margin: -0.65rem 0 0.85rem;
      line-height: 1.4;
    }
    .field-error.visible { display: block; animation: fadeUp 0.2s ease; }
    .eval-error-banner {
      display: none;
      background: var(--red-soft);
      border: 1px solid var(--red);
      border-radius: var(--radius);
      padding: 0.75rem 1rem;
      font-size: 0.85rem;
      color: var(--red);
      margin-top: 1rem;
      line-height: 1.45;
    }
    .eval-error-banner.visible { display: block; animation: fadeUp 0.25s ease; }
    .eval-error-banner strong { color: var(--red); font-weight: 600; }
    .dropzone {
      border: 2px dashed var(--border);
      border-radius: var(--radius);
      padding: 3rem 2rem;
      text-align: center;
      cursor: pointer;
      transition: border-color 0.15s;
      margin-bottom: 1rem;
    }
    .dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--surface); }
    .dropzone img { max-width: 100%; max-height: 280px; border-radius: 8px; margin-top: 1rem; }
    .dropzone p { color: var(--muted); font-size: 0.9rem; }
    .dropzone .filename { color: var(--accent); margin-top: 0.5rem; font-size: 0.85rem; }
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      background: var(--btn-primary-bg);
      color: var(--btn-primary-text);
      border: 1px solid rgba(255, 255, 255, 0.1);
      padding: 0.62rem 1.25rem;
      border-radius: var(--btn-radius);
      font-family: var(--font-ui);
      font-size: 0.875rem;
      font-weight: 600;
      line-height: 1.2;
      cursor: pointer;
      transition: var(--btn-transition);
      letter-spacing: 0.015em;
      box-shadow: var(--btn-primary-shadow);
      white-space: nowrap;
    }
    .btn:hover {
      background: var(--btn-primary-hover);
      box-shadow: var(--btn-primary-shadow-hover);
      transform: translateY(-1px);
    }
    .btn:active { transform: translateY(0) scale(0.98); box-shadow: var(--btn-primary-shadow); }
    .btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
    .banner {
      background: var(--surface2);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius);
      padding: 0.85rem 1rem;
      font-size: 0.85rem;
      color: var(--yellow);
      margin-bottom: 1.5rem;
    }
    .banner.ok { color: var(--green); border-color: var(--green-soft); background: var(--green-soft); }
    #results { margin-top: 1.25rem; display: none; }
    #results.visible { display: block; }
    .score-header {
      display: flex;
      align-items: center;
      gap: 1.5rem;
      margin-bottom: 2rem;
      padding: 1.5rem;
      background: var(--surface);
      border-radius: var(--radius);
      border: 1px solid var(--border);
    }
    .score-circle {
      font-family: var(--font-display);
      width: 80px; height: 80px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.75rem; font-weight: 700;
      flex-shrink: 0;
    }
    .grade-a { background: var(--green-soft); color: var(--green); border: 1px solid rgba(141,168,130,0.25); }
    .grade-b { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border-strong); }
    .grade-c { background: rgba(184, 149, 106, 0.12); color: var(--gold-light); border: 1px solid var(--border-strong); }
    .grade-d, .grade-f { background: var(--red-soft); color: var(--red); border: 1px solid rgba(192,112,98,0.25); }
    .score-meta h2 { font-size: 1.1rem; margin-bottom: 0.25rem; }
    .score-meta p { color: var(--muted); font-size: 0.9rem; }
    .section { margin-bottom: 2rem; }
    .section h3 {
      font-family: var(--font-display);
      font-size: 0.95rem;
      font-weight: 500;
      letter-spacing: -0.01em;
      color: var(--text-soft);
      margin-bottom: 0.65rem;
    }
    .section ul { list-style: none; }
    .section li {
      padding: 0.6rem 0;
      border-bottom: 1px solid var(--border);
      font-size: 0.92rem;
    }
    .section li:last-child { border-bottom: none; }
    .dim-grid { display: grid; gap: 0.75rem; }
    .dim-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 1rem;
    }
    .dim-card .dim-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
    .dim-card .dim-label { font-size: 0.85rem; font-weight: 500; }
    .dim-card .dim-score { font-weight: 700; font-size: 0.9rem; }
    .dim-card .dim-obs { font-size: 0.82rem; color: var(--muted); }
    .visual-card {
      background: var(--surface);
      border-left: 3px solid var(--accent);
      padding: 0.85rem 1rem;
      border-radius: 0 8px 8px 0;
      margin-bottom: 0.5rem;
    }
    .visual-card .area { font-size: 0.7rem; text-transform: uppercase; color: var(--accent); letter-spacing: 0.05em; }
    .visual-card.positive { border-left-color: var(--green); }
    .visual-card.negative { border-left-color: var(--red); }
    .citation {
      font-size: 0.82rem;
      color: var(--muted);
      padding: 0.5rem 0;
      border-bottom: 1px solid var(--border);
    }
    .loading {
      display: none;
      text-align: center;
      padding: 3rem;
      color: var(--muted);
    }
    .loading.visible { display: block; }
    .spinner {
      width: 32px; height: 32px;
      border: 3px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin: 0 auto 1rem;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .strength { color: var(--green); }
    .weakness { color: var(--red); }
    .agent-prompt-section {
      background: var(--surface);
      border: 1px solid var(--accent);
      border-radius: var(--radius);
      padding: 1.25rem;
      margin-top: 2rem;
    }
    .agent-prompt-section h3 {
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--accent);
      margin-bottom: 0.5rem;
    }
    .agent-prompt-section p.hint {
      font-size: 0.82rem;
      color: var(--muted);
      margin-bottom: 1rem;
    }
    .prompt-box {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 1rem;
      font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
      font-size: 0.78rem;
      line-height: 1.55;
      white-space: pre-wrap;
      word-break: break-word;
      max-height: 420px;
      overflow-y: auto;
      color: var(--text);
    }
    .prompt-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
    .btn-secondary {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      background: rgba(255, 255, 255, 0.03);
      color: var(--text-soft);
      border: 1px solid var(--border);
      padding: 0.58rem 1.15rem;
      border-radius: var(--btn-radius);
      font-family: var(--font-ui);
      font-size: 0.875rem;
      font-weight: 500;
      line-height: 1.2;
      cursor: pointer;
      transition: var(--btn-transition);
      letter-spacing: 0.01em;
      white-space: nowrap;
    }
    .btn-secondary:hover {
      background: var(--surface2);
      border-color: rgba(184, 149, 106, 0.45);
      color: var(--text);
      transform: translateY(-1px);
    }
    .btn-secondary:active { transform: translateY(0) scale(0.98); }
    .copied { color: var(--green) !important; }
    .alternatives-section {
      margin-top: 2.5rem;
      padding-top: 2rem;
      border-top: 1px solid var(--border);
    }
    .alternatives-section > h3 {
      font-size: 1rem;
      font-weight: 600;
      margin-bottom: 0.35rem;
    }
    .alternatives-section > .hint {
      font-size: 0.85rem;
      color: var(--muted);
      margin-bottom: 1.25rem;
    }
    .alt-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
    .alt-tab {
      padding: 0.55rem 1rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--muted);
      cursor: pointer;
      font-size: 0.85rem;
    }
    .alt-tab.active { border-color: var(--accent); color: var(--text); background: var(--surface2); }
    .alt-tab .proj { color: var(--green); font-weight: 600; margin-left: 0.35rem; }
    .alt-panel { display: none; }
    .alt-panel.active { display: block; }
    .alt-preview-wrap {
      background: var(--bg-elevated);
      border-radius: var(--radius);
      padding: 1rem;
      margin-bottom: 1.25rem;
      border: 1px solid var(--border);
    }
    .alt-preview-wrap iframe {
      width: 100%;
      min-height: 220px;
      border: none;
      border-radius: 8px;
      background: #fff;
    }
    .alt-style {
      font-size: 0.85rem;
      color: var(--muted);
      margin-bottom: 1rem;
      font-style: italic;
    }
    .changes-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-bottom: 1rem; }
    .changes-table th {
      text-align: left;
      padding: 0.5rem 0.75rem;
      background: var(--surface2);
      color: var(--muted);
      font-weight: 500;
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .changes-table td {
      padding: 0.65rem 0.75rem;
      border-bottom: 1px solid var(--border);
      vertical-align: top;
    }
    .changes-table .field { color: var(--accent); font-weight: 500; white-space: nowrap; }
    .changes-table .before { color: var(--red); opacity: 0.9; }
    .changes-table .after { color: var(--green); }
    .changes-table .why { color: var(--muted); font-size: 0.78rem; }
    .alt-change-list {
      display: grid;
      gap: 0.6rem;
      margin-bottom: 1rem;
    }
    .alt-change-card {
      display: grid;
      grid-template-columns: 118px minmax(0, 1fr);
      gap: 0.75rem;
      padding: 0.75rem;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
    }
    .alt-change-field {
      color: var(--accent);
      font-size: 0.78rem;
      font-weight: 600;
      text-transform: capitalize;
    }
    .alt-change-body {
      display: grid;
      gap: 0.5rem;
      min-width: 0;
    }
    .alt-change-body div {
      color: var(--text-soft);
      font-size: 0.82rem;
      line-height: 1.45;
    }
    .alt-change-body span {
      display: block;
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      margin-bottom: 0.12rem;
    }
    .alt-change-body em {
      display: block;
      color: var(--muted);
      font-size: 0.76rem;
      margin-top: 0.2rem;
    }
    @media (max-width: 640px) {
      .alt-change-card { grid-template-columns: 1fr; }
    }
    .alt-empty {
      color: var(--muted);
      font-size: 0.82rem;
      padding: 0.65rem 0;
    }
    .alt-copy-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
    .alt-loading { text-align: center; padding: 2rem; color: var(--muted); }

    /* Reasoning panel */
    .reasoning-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      margin-top: 1.5rem;
      overflow: hidden;
    }
    .reasoning-panel.active { border-color: var(--accent); }
    .reasoning-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.85rem 1.1rem;
      cursor: pointer;
      user-select: none;
      background: var(--surface2);
    }
    .reasoning-header h3 { font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
    .reasoning-header .pulse {
      width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
      animation: pulse 1.2s ease-in-out infinite;
    }
    @keyframes pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
    .reasoning-body { padding: 0 1.1rem 1.1rem; }
    .reasoning-body.collapsed { display: none; }
    .reasoning-section { margin-top: 0.85rem; }
    .reasoning-section-toggle {
      display: flex; align-items: center; justify-content: space-between;
      font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
      color: var(--muted); cursor: pointer; padding: 0.4rem 0;
    }
    .reasoning-section-toggle:hover { color: var(--text); }
    .reasoning-section-body { margin-top: 0.35rem; }
    .reasoning-section-body.collapsed { display: none; }
    .steps-list { list-style: none; }
    .step-item {
      display: flex; gap: 0.65rem; align-items: flex-start;
      padding: 0.45rem 0; font-size: 0.82rem; border-bottom: 1px solid var(--border);
    }
    .step-item:last-child { border-bottom: none; }
    .step-icon { width: 16px; flex-shrink: 0; text-align: center; margin-top: 1px; }
    .step-icon.running { color: var(--accent); }
    .step-icon.done { color: var(--green); }
    .step-icon.error { color: var(--red); }
    .step-label { font-weight: 500; }
    .step-detail { color: var(--muted); font-size: 0.78rem; margin-top: 0.1rem; }
    .live-reasoning {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.75rem 1rem;
      font-size: 0.82rem;
      line-height: 1.55;
      max-height: 200px;
      overflow-y: auto;
      white-space: pre-wrap;
      color: var(--text);
    }
    .model-output {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.75rem 1rem;
      font-family: 'SF Mono', Monaco, monospace;
      font-size: 0.72rem;
      line-height: 1.5;
      max-height: 280px;
      overflow-y: auto;
      white-space: pre-wrap;
      color: var(--muted);
    }
    .export-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
    .export-actions button { font-size: 0.8rem; padding: 0.5rem 0.9rem; }

    /* Compare tab */
    .prompt-hint { font-size: 0.78rem; color: var(--muted); margin: -0.5rem 0 1rem; }
    .prompt-hint.error { color: var(--red); }
    .prompt-actions-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
    .prompt-actions-row button.link { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.82rem; padding: 0; }
    #compare-prompt { min-height: 88px; font-size: 0.92rem; }
    .char-count { font-size: 0.75rem; color: var(--muted); }
    .char-count.over { color: var(--red); }
    #compare-results { margin-top: 2rem; display: none; }
    #compare-results.visible { display: block; }
    .compare-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
    @media (min-width: 768px) { .compare-grid { grid-template-columns: 1fr 1fr; } }
    .compare-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      display: flex;
      flex-direction: column;
      min-height: 280px;
    }
    .compare-card.grounded { border-color: var(--accent); }
    .compare-card-header {
      padding: 0.85rem 1rem;
      border-bottom: 1px solid var(--border);
      display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem;
    }
    .compare-card-header h4 { font-size: 0.88rem; font-weight: 600; }
    .compare-card-header .meta { font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; }
    .badge {
      font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em;
      padding: 0.2rem 0.45rem; border-radius: 4px; white-space: nowrap;
    }
    .badge.grounded { background: var(--accent-soft); color: var(--accent-hover); }
    .badge.raw { background: var(--surface2); color: var(--muted); }
    .compare-card-body {
      padding: 1rem;
      font-size: 0.84rem;
      line-height: 1.55;
      flex: 1;
      overflow-y: auto;
      max-height: 360px;
      white-space: pre-wrap;
    }
    .compare-card-body.error { color: var(--red); }
    .taste-lens {
      padding: 0.7rem 1rem 0.8rem;
      border-bottom: 1px solid var(--border);
      background: var(--accent-soft);
    }
    .taste-lens-title {
      font-size: 0.66rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--accent-hover);
      font-weight: 600;
      margin-bottom: 0.5rem;
    }
    .taste-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
    .taste-chip {
      font-size: 0.7rem;
      padding: 0.22rem 0.5rem;
      border-radius: 999px;
      background: var(--surface);
      border: 1px solid var(--border-strong);
      color: var(--text);
      white-space: nowrap;
    }
    .taste-chip.score { background: var(--accent); color: #14140f; border-color: var(--accent); font-weight: 600; }
    .taste-sources { margin-top: 0.6rem; }
    .taste-sources-label {
      font-size: 0.66rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
      margin-bottom: 0.3rem;
    }
    .taste-sources ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.22rem; }
    .taste-sources li { font-size: 0.74rem; color: var(--text); line-height: 1.35; }
    .taste-sources .src-type {
      display: inline-block;
      font-size: 0.6rem;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      color: var(--accent-hover);
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 3px;
      padding: 0 0.3rem;
      margin-right: 0.35rem;
    }
    .taste-sources .src-more { color: var(--muted); font-style: italic; }
    .ungrounded-note {
      padding: 0.55rem 1rem;
      border-bottom: 1px solid var(--border);
      font-size: 0.7rem;
      color: var(--muted);
      font-style: italic;
    }
    .compare-card-footer {
      padding: 0.65rem 1rem;
      border-top: 1px solid var(--border);
      display: flex; justify-content: space-between; align-items: center;
    }
    .compare-card-footer .latency { font-size: 0.72rem; color: var(--muted); }
    .superiority-callout {
      background: linear-gradient(135deg, var(--surface2) 0%, #16161f 100%);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius);
      padding: 1rem 1.15rem;
      margin-bottom: 1.25rem;
    }
    .superiority-callout h3 { font-size: 0.92rem; margin-bottom: 0.65rem; color: var(--accent-hover); }
    .superiority-callout ul { margin: 0; padding-left: 1.1rem; font-size: 0.84rem; color: var(--muted); }
    .superiority-callout li { margin-bottom: 0.35rem; }
    .toggle-row {
      display: flex;
      align-items: flex-start;
      gap: 0.65rem;
      margin-bottom: 0.35rem;
      cursor: pointer;
      font-size: 0.9rem;
    }
    .toggle-row input { margin-top: 0.2rem; accent-color: var(--accent); }
    .toggle-hint { font-size: 0.78rem; color: var(--muted); margin: 0 0 1rem 1.55rem; }
    #eval-compare-results { margin-top: 2rem; }

    /* History tab */
    #panel-history { min-height: 400px; }
    .history-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
    @media (min-width: 900px) {
      .history-layout { grid-template-columns: 320px 1fr; }
    }
    .history-list {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      max-height: 70vh;
      overflow-y: auto;
    }
    .history-item {
      padding: 0.85rem 1rem;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      transition: background 0.12s;
    }
    .history-item:hover { background: var(--surface2); }
    .history-item.active { background: var(--surface2); border-left: 3px solid var(--accent); }
    .history-item .hi-subject { font-size: 0.88rem; font-weight: 500; word-break: break-all; }
    .history-item .hi-meta { font-size: 0.72rem; color: var(--muted); margin-top: 0.25rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
    .type-badge {
      font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em;
      padding: 0.15rem 0.4rem; border-radius: 4px; background: var(--surface2); color: var(--muted);
    }
    .history-empty { padding: 2rem; text-align: center; color: var(--muted); font-size: 0.9rem; }
    .history-session-note {
      padding: 0.65rem 0.8rem; margin-bottom: 0.75rem; border-radius: 8px;
      background: var(--surface2); border: 1px solid var(--border);
      color: var(--muted); font-size: 0.82rem; line-height: 1.4;
    }
    .linklike {
      background: none; border: none; padding: 0; font: inherit; cursor: pointer;
      color: var(--accent); text-decoration: underline;
    }
    .history-detail { min-width: 0; }
    .history-detail-placeholder {
      padding: 3rem 2rem; text-align: center; color: var(--muted);
      background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
    }
    .history-trace {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1rem;
      margin-bottom: 1rem;
      font-size: 0.84rem;
      max-height: 200px;
      overflow-y: auto;
    }
    .history-trace li { margin-bottom: 0.35rem; color: var(--muted); }

    /* Agent chat */
    .chat-panel {
      margin-top: 1.5rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      display: flex;
      flex-direction: column;
      max-height: 480px;
    }
    .chat-header {
      padding: 0.85rem 1rem;
      border-bottom: 1px solid var(--border);
      font-size: 0.88rem;
      font-weight: 600;
    }
    .chat-header span { font-weight: 400; color: var(--muted); font-size: 0.78rem; display: block; margin-top: 0.2rem; }
    .chat-messages {
      flex: 1;
      overflow-y: auto;
      padding: 1rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      min-height: 160px;
      max-height: 300px;
    }
    .chat-msg { max-width: 92%; padding: 0.65rem 0.85rem; border-radius: 10px; font-size: 0.86rem; line-height: 1.5; white-space: pre-wrap; }
    .chat-msg.user { align-self: flex-end; background: var(--accent-soft); color: var(--text); }
    .chat-msg.assistant { align-self: flex-start; background: var(--surface2); border: 1px solid var(--border); }
    .chat-input-row {
      display: flex;
      gap: 0.5rem;
      padding: 0.75rem 1rem;
      border-top: 1px solid var(--border);
    }
    .chat-input-row textarea {
      flex: 1;
      margin: 0;
      min-height: 44px;
      max-height: 120px;
      font-size: 0.88rem;
      padding: 0.6rem 0.75rem;
    }
    .chat-input-row .btn { padding: 0.6rem 1rem; font-size: 0.85rem; align-self: flex-end; }
    .chat-suggestions { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1rem 0.75rem; }
    .chat-suggestions button {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--border);
      color: var(--muted);
      font-size: 0.75rem;
      font-weight: 500;
      font-family: var(--font-ui);
      padding: 0.38rem 0.7rem;
      border-radius: var(--btn-radius-pill);
      cursor: pointer;
      transition: var(--btn-transition);
    }
    .chat-suggestions button:hover {
      border-color: rgba(184, 149, 106, 0.45);
      color: var(--gold-light);
      background: var(--accent-soft);
    }

    /* Feedback modal */
    .modal-overlay {
      display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.65);
      z-index: 1000; align-items: center; justify-content: center; padding: 1rem;
    }
    .modal-overlay.open { display: flex; }
    .modal h2 { font-size: 1.05rem; margin-bottom: 0.35rem; }
    .modal {
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
      width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; padding: 1.5rem;
    }
    .modal .modal-hint { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.25rem; }
    .fb-context-banner {
      background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 0.75rem 0.9rem; margin-bottom: 1rem; font-size: 0.8rem;
    }
    .fb-context-banner strong { display: block; font-size: 0.85rem; margin-bottom: 0.25rem; }
    .fb-context-banner .ctx-meta { color: var(--muted); line-height: 1.45; }
    .fb-context-banner .ctx-score { color: var(--accent); font-weight: 600; }
    .media-dropzone {
      border: 1px dashed var(--border); border-radius: var(--radius); padding: 1rem;
      text-align: center; color: var(--muted); font-size: 0.82rem; margin-bottom: 0.75rem;
      cursor: pointer; transition: border-color 0.15s;
    }
    .media-dropzone:hover, .media-dropzone.dragover { border-color: var(--accent); color: var(--text); }
    .media-dropzone input { display: none; }
    .media-preview-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
    .media-thumb {
      position: relative; width: 88px; height: 88px; border-radius: 6px; overflow: hidden;
      border: 1px solid var(--border); background: var(--surface2);
    }
    .media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
    .media-thumb .remove-media {
      position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: none;
      border-radius: 50%; background: rgba(0,0,0,0.7); color: #fff; cursor: pointer; font-size: 0.75rem; line-height: 1;
    }
    .media-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
    .library-card {
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
      overflow: hidden; font-size: 0.72rem;
    }
    .library-card .lib-preview { height: 90px; background: var(--surface2); display: flex; align-items: center; justify-content: center; }
    .library-card .lib-preview img, .library-card .lib-preview video { width: 100%; height: 100%; object-fit: cover; }
    .library-card .lib-meta { padding: 0.45rem 0.55rem; color: var(--muted); }
    .feedback-attachments { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.65rem; }
    .feedback-attachments img, .feedback-attachments video { max-height: 72px; border-radius: 4px; border: 1px solid var(--border); }
    .modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
    .app-dialog-overlay { z-index: 1400; }
    .app-dialog {
      max-width: 460px;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    }
    .app-dialog .modal-hint {
      margin-bottom: 1rem;
      color: var(--text-soft);
      white-space: pre-wrap;
    }
    .app-dialog-input-label,
    .app-dialog-input { display: none; }
    .app-dialog.with-input .app-dialog-input-label { display: block; }
    .app-dialog.with-input .app-dialog-input {
      display: block;
      min-height: 92px;
      background: var(--surface2);
      margin-bottom: 0;
    }
    .feedback-btn-row { margin: 1.5rem 0 0.5rem; }
    select {
      width: 100%; padding: 0.75rem 1rem; background: var(--surface);
      border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
      font-size: 0.95rem; margin-bottom: 1rem;
    }

    /* Admin tab */
    #panel-admin { min-height: 400px; }
    .admin-gate {
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 2rem; max-width: 420px;
    }
    .admin-toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
    .admin-toolbar .filter-btn {
      padding: 0.42rem 0.85rem;
      border-radius: var(--btn-radius-pill);
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font-size: 0.8125rem;
      font-weight: 500;
      font-family: var(--font-ui);
      transition: var(--btn-transition);
    }
    .admin-toolbar .filter-btn:hover {
      color: var(--text-soft);
      border-color: var(--border-strong);
      background: var(--btn-ghost-hover);
    }
    .admin-toolbar .filter-btn.active {
      border-color: rgba(184, 149, 106, 0.5);
      color: var(--gold-light);
      background: var(--accent-soft);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }
    .feedback-card {
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 1rem 1.15rem; margin-bottom: 0.75rem;
    }
    .feedback-card.pending { border-left: 3px solid var(--yellow); }
    .feedback-card.approved { border-left: 3px solid var(--green); }
    .feedback-card.rejected { border-left: 3px solid var(--red); }
    .feedback-card-header { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
    .feedback-card-header h4 { font-size: 0.92rem; }
    .status-pill {
      font-size: 0.65rem; text-transform: uppercase; padding: 0.15rem 0.45rem;
      border-radius: 4px; background: var(--surface2); color: var(--muted); white-space: nowrap;
    }
    .feedback-meta { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.65rem; }
    .feedback-body { font-size: 0.84rem; color: var(--muted); white-space: pre-wrap; margin-bottom: 0.75rem; }
    .feedback-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
    .feedback-actions .btn-approve {
      background: linear-gradient(180deg, rgba(141, 168, 130, 0.35) 0%, rgba(141, 168, 130, 0.22) 100%);
      border: 1px solid rgba(141, 168, 130, 0.45);
      color: #dce8d8;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
    .feedback-actions .btn-approve:hover {
      background: linear-gradient(180deg, rgba(141, 168, 130, 0.45) 0%, rgba(141, 168, 130, 0.3) 100%);
      color: var(--text);
    }
    .feedback-actions .btn-reject {
      background: transparent;
      border: 1px solid rgba(192, 112, 98, 0.55);
      color: var(--red);
      padding: 0.5rem 0.95rem;
      border-radius: var(--btn-radius);
      cursor: pointer;
      font-size: 0.8125rem;
      font-weight: 500;
      font-family: var(--font-ui);
      transition: var(--btn-transition);
    }
    .feedback-actions .btn-reject:hover { background: var(--red-soft); border-color: var(--red); }
    .feedback-actions .btn-defer {
      background: transparent;
      border: 1px solid rgba(184, 149, 106, 0.45);
      color: var(--gold-light);
      padding: 0.5rem 0.95rem;
      border-radius: var(--btn-radius);
      cursor: pointer;
      font-size: 0.8125rem;
      font-weight: 500;
      font-family: var(--font-ui);
      transition: var(--btn-transition);
    }
    .feedback-actions .btn-defer:hover { background: var(--accent-soft); border-color: var(--gold); }
    .feedback-card.deferred { border-left: 3px solid var(--accent); }
    .feedback-card.taste-insight { background: linear-gradient(135deg, var(--surface) 0%, rgba(99, 102, 241, 0.04) 100%); }
    .feedback-insight-block { margin-bottom: 0.75rem; padding: 0.65rem 0.75rem; background: var(--surface2); border-radius: 6px; }
    .feedback-parsed-summary { font-size: 0.84rem; color: var(--text); margin-bottom: 0.45rem; line-height: 1.45; }
    .admin-stats { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
    .admin-stat { font-size: 0.75rem; padding: 0.25rem 0.55rem; border-radius: 4px; background: var(--surface2); color: var(--muted); }
    .admin-stat.pending { color: var(--yellow); }
    .admin-stat.deferred { color: var(--accent); }

    /* Learn tab */
    #panel-learn { min-height: 420px; }
    .learn-hero {
      max-width: 760px;
      margin: 0.75rem auto 1.3rem;
      text-align: center;
    }
    .learn-kicker {
      color: var(--gold-light);
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      margin-bottom: 0.4rem;
    }
    .learn-hero h2 {
      font-family: var(--font-display);
      font-size: clamp(1.8rem, 4vw, 2.7rem);
      font-weight: 500;
      letter-spacing: -0.035em;
      line-height: 1.08;
      margin-bottom: 0.65rem;
    }
    .learn-hero p {
      color: var(--muted);
      font-size: 0.95rem;
      line-height: 1.55;
      max-width: 650px;
      margin: 0 auto;
    }
    .learn-summary {
      max-width: 760px;
      margin: 0 auto 0.9rem;
      padding: 0.7rem 0.85rem;
      border: 1px solid rgba(184, 149, 106, 0.28);
      border-radius: var(--radius);
      background: linear-gradient(135deg, rgba(184, 149, 106, 0.1), rgba(237, 224, 200, 0.025));
      color: var(--text-soft);
      font-size: 0.86rem;
      text-align: center;
    }
    .learn-filter-row {
      display: flex;
      justify-content: center;
      gap: 0.45rem;
      flex-wrap: wrap;
      margin-bottom: 1rem;
    }
    .learn-filter-row .filter-btn {
      padding: 0.42rem 0.85rem;
      border-radius: var(--btn-radius-pill);
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font-size: 0.8125rem;
      font-weight: 500;
      font-family: var(--font-ui);
      transition: var(--btn-transition);
    }
    .learn-filter-row .filter-btn:hover {
      color: var(--text-soft);
      border-color: var(--border-strong);
      background: var(--btn-ghost-hover);
    }
    .learn-filter-row .filter-btn.active {
      border-color: rgba(184, 149, 106, 0.5);
      color: var(--gold-light);
      background: var(--accent-soft);
    }
    .learn-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 0.85rem;
    }
    .learn-card {
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
      min-height: 260px;
      padding: 1rem 1.05rem;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow-sm);
    }
    .learn-card.negative { border-left: 3px solid var(--red); }
    .learn-card-meta {
      color: var(--muted);
      font-size: 0.72rem;
      letter-spacing: 0.02em;
    }
    .learn-card h3 {
      font-family: var(--font-display);
      font-size: 1.12rem;
      font-weight: 600;
      letter-spacing: -0.015em;
      line-height: 1.2;
    }
    .learn-note {
      color: var(--text-soft);
      font-size: 0.9rem;
      line-height: 1.52;
    }
    .learn-detail {
      margin-top: auto;
      padding-top: 0.55rem;
      border-top: 1px solid var(--border);
      color: var(--muted);
      font-size: 0.82rem;
      line-height: 1.48;
    }
    .learn-detail summary {
      cursor: pointer;
      color: var(--gold-light);
      font-weight: 600;
      margin-bottom: 0.45rem;
    }
    .learn-detail p { margin-bottom: 0.45rem; }
    .learn-detail p:last-child { margin-bottom: 0; }
    .learn-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      margin-top: 0.1rem;
    }
    .learn-tag {
      font-size: 0.68rem;
      padding: 0.16rem 0.45rem;
      border-radius: 4px;
      border: 1px solid var(--border);
      background: var(--surface2);
      color: var(--muted);
    }

    /* Taste preferences (per-user soul file) */
    .learn-personalize {
      max-width: 760px;
      margin: 0 auto 0.9rem;
      padding: 0.7rem 0.9rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      flex-wrap: wrap;
      border: 1px solid rgba(184, 149, 106, 0.28);
      border-radius: var(--radius);
      background: linear-gradient(135deg, rgba(184, 149, 106, 0.12), rgba(237, 224, 200, 0.03));
      font-size: 0.85rem;
      color: var(--text-soft);
    }
    .learn-pref-count {
      margin-left: 0.4rem;
      padding: 0.1rem 0.45rem;
      border-radius: 999px;
      background: rgba(184, 149, 106, 0.22);
      color: var(--text);
      font-size: 0.72rem;
    }
    .learn-pref-login {
      border: 1px solid var(--border);
      background: var(--surface2);
      color: var(--text);
      padding: 0.35rem 0.7rem;
      border-radius: 6px;
      cursor: pointer;
      font-size: 0.78rem;
    }
    .learn-pref-login:hover { border-color: rgba(184, 149, 106, 0.5); }
    .learn-card.pref-off { opacity: 0.62; }
    .learn-card.pref-off h3 { text-decoration: line-through; text-decoration-thickness: 1px; }
    .learn-pref-row {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      margin-top: 0.55rem;
      padding-top: 0.6rem;
      border-top: 1px solid var(--border);
    }
    .learn-pref-toggle {
      position: relative;
      flex: 0 0 auto;
      width: 38px;
      height: 22px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--surface2);
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease;
      padding: 0;
    }
    .learn-pref-toggle.on {
      background: rgba(184, 149, 106, 0.55);
      border-color: rgba(184, 149, 106, 0.7);
    }
    .learn-pref-knob {
      position: absolute;
      top: 2px;
      left: 2px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--text);
      transition: transform 0.15s ease;
    }
    .learn-pref-toggle.on .learn-pref-knob { transform: translateX(16px); }
    .learn-pref-label { font-size: 0.74rem; color: var(--muted); }

    /* Contribute tab */
    #panel-contribute { max-width: 640px; }
    .contribute-entry { padding: 0.5rem 0 2rem; }
    .contribute-title { font-size: 1.35rem; margin-bottom: 0.35rem; }
    .contribute-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; line-height: 1.5; }
    .contribute-actions { display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0; }
    .ct-draft-panel {
      margin-top: 1.25rem; padding: 1.15rem; background: var(--surface);
      border: 1px solid var(--border); border-radius: var(--radius);
    }
    .ct-draft-panel h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
    .ct-tags-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0 1rem; }
    .ct-tag {
      font-size: 0.68rem; padding: 0.2rem 0.45rem; border-radius: 4px;
      background: var(--surface2); color: var(--muted); border: 1px solid var(--border);
    }

    /* Insight evidence */
    .insight-list { list-style: none; padding: 0; margin: 0; }
    .insight-item { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
    .insight-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
    .insight-text { margin-bottom: 0.5rem; line-height: 1.45; }
    .insight-item.strength .insight-text { color: var(--green); }
    .insight-item.weakness .insight-text { color: var(--red); }
    .evidence-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
    .evidence-link {
      font-size: 0.75rem; color: var(--accent); text-decoration: none;
      border: 1px solid var(--border); padding: 0.25rem 0.55rem; border-radius: 6px;
    }
    .evidence-link:hover { border-color: var(--accent); background: var(--surface2); }
    .evidence-snippet { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.4rem; font-style: italic; }
    .evidence-preview { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg); }
    .evidence-preview iframe { width: 100%; height: 120px; border: none; display: block; }
    .analysis-sources-wrap {
      margin: 0 0 1rem;
    }
    .analysis-sources-wrap h3 {
      font-size: 0.9rem;
      margin: 0 0 0.65rem;
    }
    .analysis-sources {
      display: grid;
      gap: 0.85rem;
    }
    .analysis-source-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 0.85rem;
    }
    .analysis-source-card {
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--bg);
    }
    .analysis-source-card img {
      display: block;
      width: 100%;
      aspect-ratio: 16 / 10;
      object-fit: cover;
      background: #111;
    }
    .analysis-source-meta {
      display: grid;
      gap: 0.2rem;
      padding: 0.65rem 0.75rem;
      font-size: 0.8rem;
    }
    .analysis-source-meta a {
      color: var(--muted);
      text-decoration: none;
      word-break: break-all;
    }
    .analysis-source-meta a:hover { color: var(--gold-light); }
    .analysis-url-list {
      border: 1px solid var(--border);
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.02);
      padding: 0.75rem 0.85rem;
    }
    .analysis-url-heading {
      margin-bottom: 0.45rem;
      color: var(--text-soft);
      font-size: 0.8rem;
      font-weight: 600;
    }
    .analysis-url-list ol {
      margin: 0;
      padding-left: 1.1rem;
    }
    .analysis-url-list li {
      padding: 0.2rem 0;
      color: var(--muted);
      font-size: 0.8rem;
      word-break: break-all;
    }
    .analysis-url-list a {
      color: var(--gold-light);
      text-decoration: none;
    }
    .analysis-url-list a:hover { text-decoration: underline; }
    .analysis-url-list span {
      display: block;
      color: var(--muted);
      font-size: 0.72rem;
    }

    /* ── UX overhaul ── */
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes scorePop {
      0% { transform: scale(0.85); opacity: 0; }
      60% { transform: scale(1.04); }
      100% { transform: scale(1); opacity: 1; }
    }
    @keyframes barGrow { from { width: 0; } }
    .animate-in { animation: fadeUp 0.45s ease both; }

    #results { margin-top: 1.25rem; }
    .results-shell { display: flex; flex-direction: column; gap: 0; }
    .resource-preview-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(220px, 38%);
      gap: 1rem;
      align-items: stretch;
      padding: 1rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      margin-bottom: 1rem;
      overflow: hidden;
    }
    .resource-preview-card.compact { margin-bottom: 0.6rem; }
    .resource-preview-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
    .resource-preview-kicker {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.45rem;
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.03em;
      text-transform: uppercase;
      margin-bottom: 0.55rem;
    }
    .resource-preview-kicker span:not(.live-dot) {
      padding-right: 0.45rem;
      border-right: 1px solid var(--border);
    }
    .resource-preview-kicker span:last-child { border-right: 0; padding-right: 0; }
    .live-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--green);
      box-shadow: 0 0 0 4px rgba(89, 164, 108, 0.12);
    }
    .resource-preview-card h2 {
      font-family: var(--font-display);
      font-size: clamp(1.2rem, 2vw, 1.65rem);
      font-weight: 500;
      letter-spacing: -0.03em;
      margin: 0 0 0.4rem;
    }
    .resource-preview-card p {
      color: var(--text-soft);
      font-size: 0.9rem;
      line-height: 1.45;
      margin: 0 0 0.55rem;
    }
    .resource-preview-card .resource-preview-headline {
      color: var(--text);
      font-weight: 500;
    }
    .resource-preview-card a {
      color: var(--gold-light);
      font-size: 0.82rem;
      text-decoration: none;
      word-break: break-all;
    }
    .resource-preview-card a:hover { text-decoration: underline; }
    .resource-preview-shot {
      min-height: 170px;
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      background: #0c0b0a;
    }
    .resource-preview-shot img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: top center;
    }
    .resource-preview-shot.empty {
      display: grid;
      place-items: center;
      color: var(--muted);
      font-size: 0.82rem;
      background: repeating-linear-gradient(-45deg, rgba(255,255,255,0.03), rgba(255,255,255,0.03) 8px, transparent 8px, transparent 16px);
    }
    .resource-preview-wait {
      color: var(--muted);
      font-size: 0.82rem;
      text-align: center;
      padding: 0.2rem 0 0.7rem;
    }
    @media (max-width: 760px) {
      .resource-preview-card { grid-template-columns: 1fr; }
      .resource-preview-shot { min-height: 190px; }
    }

    /* Zone system */
    .results-zone { margin-bottom: 1rem; }
    .zone-heading {
      font-family: var(--font-display); font-size: 0.95rem; font-weight: 500; text-transform: none;
      letter-spacing: -0.01em; color: var(--text-soft); color: var(--muted);
      margin-bottom: 0.55rem; display: flex; align-items: center; gap: 0.45rem;
    }
    .zone-heading::after {
      content: ''; flex: 1; height: 1px; background: var(--border);
    }
    .zone-stack { display: flex; flex-direction: column; gap: 0.4rem; }

    /* Verdict card — score + dimensions in one unit */
    .verdict-card, .score-hero {
      padding: 1rem 1.15rem 0.85rem;
      background: var(--surface); box-shadow: var(--shadow);
      border-radius: var(--radius);
      border: 1px solid var(--border);
      position: relative;
      overflow: hidden;
      margin-bottom: 1rem;
    }
    .verdict-card::before, .score-hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse at top right, var(--accent-soft) 0%, transparent 60%);
      pointer-events: none;
    }
    .verdict-main { display: flex; align-items: center; gap: 1rem; position: relative; }
    .verdict-card .score-circle, .score-hero .score-circle {
      animation: scorePop 0.5s ease both; width: 60px; height: 60px; font-size: 1.35rem; flex-shrink: 0;
    }
    .verdict-card .score-meta, .score-hero .score-meta { min-width: 0; flex: 1; }
    .verdict-card .score-meta h2, .score-hero .score-meta h2 {
      font-size: 0.95rem; font-weight: 600; margin-bottom: 0.15rem;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .verdict-card .score-line, .score-hero .score-meta .score-line {
      display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap;
    }
    .verdict-card .score-num, .score-hero .score-num {
      font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em;
      background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }
    .verdict-card .score-summary, .score-hero .score-summary {
      color: var(--muted); font-size: 0.82rem; line-height: 1.4; margin-top: 0.25rem;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .verdict-dims {
      position: relative; margin-top: 0.75rem; padding-top: 0.7rem;
      border-top: 1px solid var(--border);
    }
    .verdict-dims .dim-bars { padding-bottom: 0.05rem; }

    /* Results jump nav */
    .results-nav {
      display: flex; gap: 0.35rem; flex-wrap: wrap;
      margin-bottom: 1rem; padding-bottom: 0.15rem;
    }
    .results-nav-btn {
      background: var(--surface); border: 1px solid var(--border); color: var(--muted);
      font-size: 0.75rem; font-weight: 500; padding: 0.35rem 0.7rem; border-radius: 20px;
      cursor: pointer; transition: all 0.15s;
    }
    .results-nav-btn:hover, .results-nav-btn.active {
      border-color: var(--accent); color: var(--text); background: var(--surface2);
    }

    /* Priority fixes */
    .zone-priority {
      background: var(--surface);
      border: 1px solid var(--border);
      border-left: 3px solid var(--gold-deep);
      border-radius: var(--radius);
      padding: 0.85rem 1rem 0.75rem;
      margin-bottom: 1rem;
      box-shadow: var(--shadow-sm);
    }
    .zone-priority .zone-heading { color: var(--gold-light); margin-bottom: 0.5rem; }
    .zone-priority .zone-heading::after { background: var(--border); }
    .priority-list { list-style: none; counter-reset: pri; }
    .priority-list li {
      counter-increment: pri;
      display: flex; gap: 0.65rem; align-items: flex-start;
      padding: 0.5rem 0; font-size: 0.88rem; line-height: 1.45;
      border-bottom: 1px solid var(--accent-soft);
    }
    .priority-list li:last-child { border-bottom: none; padding-bottom: 0; }
    .priority-list li::before {
      content: counter(pri);
      flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px;
      background: linear-gradient(145deg, var(--gold-deep), var(--gold));
      color: #f5ead8; border: 1px solid rgba(212, 184, 142, 0.35); border-radius: 50%;
      font-size: 0.7rem; font-weight: 700;
      display: flex; align-items: center; justify-content: center;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }

    /* Sticky mini-score bar */
    .mini-score-bar {
      position: fixed;
      top: 53px;
      left: 0; right: 0;
      z-index: 150;
      background: rgba(15, 14, 12, 0.94);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border);
      padding: 0.55rem 2rem;
      display: none;
      align-items: center;
      gap: 1rem;
      font-size: 0.85rem;
      transform: translateY(-100%);
      transition: transform 0.25s ease, opacity 0.25s ease;
      opacity: 0;
    }
    .mini-score-bar.visible { display: flex; transform: translateY(0); opacity: 1; }
    .mini-score-bar .mini-grade {
      width: 32px; height: 32px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.85rem; font-weight: 700; flex-shrink: 0;
    }
    .mini-score-bar .mini-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
    .mini-score-bar .mini-score { color: var(--muted); white-space: nowrap; }
    .mini-score-bar .mini-nav { display: flex; gap: 0.35rem; margin-left: auto; flex-wrap: wrap; }
    .mini-nav-btn {
      background: transparent; border: 1px solid var(--border); color: var(--muted);
      font-size: 0.72rem; padding: 0.25rem 0.55rem; border-radius: 6px; cursor: pointer;
      transition: all 0.15s;
    }
    .mini-nav-btn:hover, .mini-nav-btn.active { border-color: var(--accent); color: var(--text); background: var(--surface2); }

    /* Dimension bars — single scrollable strip */
    .dim-bars {
      display: flex;
      gap: 0.4rem;
      overflow-x: auto;
      padding-bottom: 0.15rem;
      scrollbar-width: thin;
      scrollbar-color: var(--border) transparent;
    }
    .dim-bar-item {
      flex: 0 0 auto;
      width: 118px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.45rem 0.55rem;
    }
    .dim-bar-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; gap: 0.25rem; }
    .dim-bar-label {
      font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 72px;
    }
    .dim-bar-score { font-size: 0.75rem; font-weight: 700; flex-shrink: 0; }
    .dim-bar-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
    .dim-bar-fill {
      height: 100%; border-radius: 2px;
      background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
      animation: barGrow 0.7s ease both;
    }
    .dim-bar-fill.high { background: linear-gradient(90deg, var(--green), var(--green)); }
    .dim-bar-fill.low { background: linear-gradient(90deg, var(--red), var(--red)); }

    /* Results grid — analysis left, preview right */
    .results-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1rem;
      align-items: start;
    }
    @media (min-width: 1024px) {
      .results-grid.has-aside { grid-template-columns: 1fr; }
    }
    .results-main { display: flex; flex-direction: column; gap: 0; min-width: 0; }
    .results-aside {
      position: sticky;
      top: 72px;
      max-height: calc(100vh - 88px);
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: var(--border) transparent;
    }
    .aside-heading { margin-bottom: 0.5rem; }

    /* Tools footer zone */
    .zone-tools {
      margin-top: 0.25rem;
      padding-top: 0.25rem;
    }
    .zone-tools .zone-heading { margin-top: 0.5rem; }
    .zone-tools .collapse-section { opacity: 0.95; }
    .feedback-btn-row {
      margin: 0.65rem 0 0;
      padding-top: 0.65rem;
      border-top: 1px solid var(--border);
    }
    .feedback-learning-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 0.85rem;
      align-items: center;
      padding: 0.85rem 1rem;
      margin: -0.25rem 0 0.9rem;
      background: linear-gradient(135deg, rgba(184, 149, 106, 0.11), rgba(237, 224, 200, 0.03));
      border: 1px solid rgba(184, 149, 106, 0.28);
      border-radius: var(--radius);
      box-shadow: var(--shadow-sm);
    }
    .feedback-learning-kicker {
      color: var(--gold-light);
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 0.2rem;
    }
    .feedback-learning-card h3 {
      font-size: 0.92rem;
      line-height: 1.3;
      margin-bottom: 0.15rem;
    }
    .feedback-learning-card p {
      color: var(--muted);
      font-size: 0.8rem;
      line-height: 1.45;
      margin: 0;
    }
    .feedback-learning-actions {
      display: flex;
      gap: 0.45rem;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: wrap;
    }
    .feedback-learning-example {
      grid-column: 1 / -1;
      color: var(--text-soft);
      font-size: 0.77rem;
      line-height: 1.4;
      padding-top: 0.65rem;
      border-top: 1px solid rgba(184, 149, 106, 0.16);
    }
    @media (max-width: 700px) {
      .feedback-learning-card { grid-template-columns: 1fr; }
      .feedback-learning-actions { justify-content: flex-start; }
    }

    /* At-a-glance findings */
    .quick-summary, .findings-glance {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.55rem;
      margin-bottom: 0.25rem;
    }
    @media (max-width: 600px) { .quick-summary, .findings-glance { grid-template-columns: 1fr; } }
    .quick-col {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 0.6rem 0.8rem;
    }
    .quick-col h4 {
      font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
      margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.35rem;
    }
    .quick-col.strengths h4 { color: var(--green); }
    .quick-col.weaknesses h4 { color: var(--red); }
    .quick-col ul { list-style: none; }
    .quick-col li {
      font-size: 0.82rem; line-height: 1.4; padding: 0.3rem 0;
      border-bottom: 1px solid var(--border);
      color: var(--text);
    }
    .quick-col li:last-child { border-bottom: none; }
    .quick-col .more-link {
      font-size: 0.75rem; color: var(--accent); cursor: pointer; margin-top: 0.4rem;
      background: none; border: none; padding: 0;
    }
    .quick-col .more-link:hover { text-decoration: underline; }

    /* Collapsible sections */
    .collapse-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      transition: border-color 0.2s;
    }
    .collapse-section:hover { border-color: var(--border-strong); }
    .collapse-section.open { border-color: var(--border-strong); }
    .collapse-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 0.6rem 0.9rem; cursor: pointer; user-select: none;
      transition: background 0.15s;
    }
    .collapse-header:hover { background: var(--surface2); }
    .collapse-header-left { display: flex; align-items: center; gap: 0.6rem; }
    .collapse-header h3 {
      font-size: 0.82rem; font-weight: 600; text-transform: none;
      letter-spacing: 0; color: var(--text); margin: 0;
    }
    .collapse-count {
      font-size: 0.68rem; padding: 0.15rem 0.45rem; border-radius: 4px;
      background: var(--surface2); color: var(--muted);
    }
    .collapse-chevron {
      color: var(--muted); font-size: 0.75rem;
      transition: transform 0.2s ease;
    }
    .collapse-section.open .collapse-chevron { transform: rotate(180deg); }
    .collapse-body {
      display: none;
      padding: 0 1rem 1rem;
      border-top: 1px solid var(--border);
    }
    .collapse-section.open .collapse-body { display: block; animation: fadeUp 0.25s ease; }
    .collapse-body .section { margin-bottom: 0; }
    .collapse-body .section h3 { display: none; }

    /* Compact insight cards */
    .insight-card {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.75rem 0.9rem;
      margin-bottom: 0.5rem;
      transition: border-color 0.15s;
    }
    .insight-card:last-child { margin-bottom: 0; }
    .insight-card:hover { border-color: var(--border-strong); }
    .insight-card.strength { border-left: 3px solid var(--green); }
    .insight-card.weakness { border-left: 3px solid var(--red); }
    .insight-card .insight-text {
      font-size: 0.86rem; line-height: 1.45; margin-bottom: 0;
    }
    .insight-card.strength .insight-text { color: var(--green); }
    .insight-card.weakness .insight-text { color: var(--red); }
    .insight-card .insight-meta {
      display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; align-items: center;
    }
    .insight-tag {
      font-size: 0.68rem; padding: 0.15rem 0.45rem; border-radius: 4px;
      background: var(--surface2); color: var(--muted); border: 1px solid var(--border);
      text-decoration: none; transition: all 0.12s;
    }
    a.insight-tag:hover { border-color: var(--accent); color: var(--accent); }
    .evidence-toggle {
      font-size: 0.72rem; color: var(--accent); background: none; border: none;
      cursor: pointer; padding: 0; margin-top: 0.35rem;
    }
    .evidence-toggle:hover { text-decoration: underline; }
    .evidence-detail {
      display: none; margin-top: 0.5rem; padding-top: 0.5rem;
      border-top: 1px solid var(--border);
    }
    .evidence-detail.open { display: block; animation: fadeUp 0.2s ease; }
    .evidence-detail .evidence-snippet { margin-bottom: 0.35rem; }
    .evidence-detail .evidence-preview iframe { height: 90px; }

    /* Alternatives — inline implementation draft */
    .alternatives-section {
      margin-top: 0; padding-top: 0; border-top: none;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1rem;
    }
    .alternatives-section > h3 { font-size: 0.98rem; margin-bottom: 0.25rem; }
    .alternatives-section > .hint { font-size: 0.84rem; margin-bottom: 0.95rem; }
    .alt-tabs { margin-bottom: 0.85rem; }
    .alt-tab { padding: 0.48rem 0.78rem; font-size: 0.8rem; transition: all 0.15s; }
    .alt-tab:hover { border-color: var(--accent); }
    .alt-preview-wrap { padding: 0.75rem; margin-bottom: 0.85rem; }
    .alt-preview-wrap iframe { min-height: 260px; max-height: 360px; }
    .changes-table { font-size: 0.78rem; }
    .changes-table th, .changes-table td { padding: 0.45rem 0.55rem; }
    .alt-style { font-size: 0.82rem; margin-bottom: 0.7rem; }
    .alt-copy-row { margin-top: 0.65rem; gap: 0.5rem; }
    .alt-copy-row button { font-size: 0.78rem; padding: 0.45rem 0.75rem; }

    /* Agent prompt — collapsible */
    .agent-prompt-section {
      margin-top: 0; padding: 0;
      background: transparent; border: none;
    }
    .agent-prompt-section .prompt-box { max-height: 280px; font-size: 0.75rem; }

    /* Compare — collapsible, compact cards */
    .compare-grid { gap: 0.75rem; }
    .compare-card { min-height: 200px; }
    .compare-card-body { max-height: 240px; font-size: 0.8rem; }

    /* Reasoning — compact when done */
    .reasoning-panel.done { border-color: var(--border); }
    .reasoning-panel.done .reasoning-header { background: transparent; }
    .reasoning-panel.done .reasoning-header h3 { color: var(--muted); font-weight: 500; font-size: 0.8rem; }
    .reasoning-panel { margin-top: 0.75rem; margin-bottom: 0.5rem; }
    .reasoning-panel.done { margin-bottom: 0.25rem; }

    /* Visual observations compact */
    .visual-card { margin-bottom: 0.4rem; padding: 0.65rem 0.85rem; }

    /* Section list compact */
    .collapse-body .section li { padding: 0.45rem 0; font-size: 0.86rem; }


    /* Chat panel compact */
    .inline-chat-integrated .chat-panel { margin-top: 0; }
    .chat-placeholder {
      color: var(--muted);
      font-size: 0.82rem;
      padding: 0.85rem 1rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
    }
    .chat-panel { max-height: 400px; }
    .chat-messages { max-height: 240px; }

    /* Input form compact */
    .input-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.35rem 1.4rem;
      margin-bottom: 0.75rem;
      box-shadow: var(--shadow-sm);
    }
    .input-card label:first-child { margin-top: 0; }
    .input-card input[type=url] { margin-bottom: 0.35rem; }
    .input-action-row {
      display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.35rem;
    }
    .input-hint {
      font-size: 0.75rem; color: var(--muted);
    }
    .input-hint kbd {
      display: inline-block; padding: 0.1rem 0.35rem; border-radius: 4px;
      border: 1px solid var(--border); background: var(--surface2);
      font-family: inherit; font-size: 0.7rem; color: var(--text);
    }

    /* Delight: button press */
    .method-pill:active, .utility-link:active { transform: scale(0.98); }
    .method-pill, .utility-link { transition: var(--btn-transition); }

    /* Scroll margin for anchor jumps */
    .collapse-section, .verdict-card, .score-hero, .quick-summary, .results-zone, .results-aside { scroll-margin-top: 88px; }
  

    /* ── Editorial design language extras ── */
    .brand-wrap { display: flex; flex-direction: column; gap: 0; }
    .brand-tag {
      font-family: var(--font-ui);
      font-size: 0.65rem;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 0.15rem;
    }
    .page-intro {
      font-family: var(--font-display);
      font-size: 1.05rem;
      font-style: italic;
      color: var(--text-soft);
      margin-bottom: 1.5rem;
      line-height: 1.5;
    }
    .toggle-row span { color: var(--text-soft); font-size: 0.875rem; line-height: 1.4; }
    .toggle-row input { accent-color: var(--accent); }
    .toggle-hint, .hint, .prompt-hint, .input-hint { color: var(--muted); line-height: 1.45; }
    select {
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8278' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 0.85rem center;
      padding-right: 2.25rem;
    }
    .verdict-card .score-meta h2, .score-hero .score-meta h2 {
      font-family: var(--font-display);
      font-size: 1.05rem;
    }
    .verdict-card .score-num, .score-hero .score-num {
      font-family: var(--font-display);
      background: none;
      -webkit-text-fill-color: var(--text);
      color: var(--text);
    }
    .results-nav-btn, .mini-nav-btn {
      border-radius: var(--radius-sm);
      font-family: var(--font-ui);
    }
    .results-nav-btn.active, .mini-nav-btn.active {
      background: var(--accent-soft);
      border-color: var(--gold-deep);
      color: var(--gold-light);
    }
    .quick-col h4 {
      font-family: var(--font-display);
      text-transform: none;
      letter-spacing: 0;
      font-size: 0.9rem;
    }
    .quick-col.strengths { border-left: 2px solid var(--green); padding-left: 0.9rem; }
    .quick-col.weaknesses { border-left: 2px solid var(--red); padding-left: 0.9rem; }
    .quick-col.strengths h4 { color: var(--green); }
    .quick-col.weaknesses h4 { color: var(--red); }
    .dim-bar-label { text-transform: none; letter-spacing: 0; font-size: 0.68rem; }
    .changes-table th { text-transform: none; letter-spacing: 0.02em; font-size: 0.75rem; }
    .badge { text-transform: none; letter-spacing: 0.02em; border-radius: var(--radius-sm); }
    .badge.grounded { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border-strong); }
    .superiority-callout {
      background: var(--surface);
      border: 1px solid var(--border);
      border-left: 3px solid var(--accent);
    }
    .superiority-callout h3 { color: var(--text); font-family: var(--font-display); }
    .chat-msg.user { background: var(--surface2); color: var(--text); border: 1px solid var(--border-strong); }
    .reasoning-section-toggle { text-transform: none; letter-spacing: 0.02em; font-size: 0.78rem; }
    .type-badge, .status-pill { text-transform: none; letter-spacing: 0.02em; }
    .btn-secondary {
      border-radius: var(--btn-radius);
      background: rgba(255, 255, 255, 0.02);
    }
    .btn-secondary:hover { background: var(--surface2); border-color: rgba(184, 149, 106, 0.4); color: var(--text); }
    .copied { color: var(--green) !important; }
    .compare-card.grounded { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-soft); }
    .agent-prompt-section { border-color: var(--border) !important; }
    .agent-prompt-section h3 { color: var(--text-soft) !important; text-transform: none; font-family: var(--font-display); }
    .visual-card .area { text-transform: none; color: var(--muted); font-size: 0.75rem; }
    .insight-card.strength .insight-text { color: var(--text-soft); }
    .insight-card.weakness .insight-text { color: var(--text-soft); }
    .strength { color: var(--green); }
    .weakness { color: var(--red); }
    .changes-table .field { color: var(--accent); }

    /* ── Hero entry — big, simple, fun ── */
    .hero-entry {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      min-height: 0;
      justify-content: flex-start;
      padding: clamp(1.75rem, 7vh, 4.5rem) 0 1.75rem;
      transition: padding 0.35s ease;
    }
    .hero-entry-title {
      font-family: var(--font-display);
      font-size: clamp(1.65rem, 4.6vw, 2.9rem);
      font-weight: 500;
      line-height: 1.16;
      letter-spacing: -0.03em;
      color: var(--text);
      margin-bottom: 0.9rem;
      max-width: none;
    }
    .hero-entry-title .hero-line {
      display: block;
      white-space: nowrap;
    }
    .hero-entry-sub {
      font-size: clamp(1.02rem, 1.6vw, 1.22rem);
      color: var(--muted);
      max-width: 42rem;
      line-height: 1.45;
      margin-bottom: 1.75rem;
    }
    .hero-input-zone {
      width: 100%;
      max-width: 720px;
    }
    .url-bar {
      display: flex;
      align-items: stretch;
      width: 100%;
      max-width: 720px;
      background: var(--surface);
      border: 1px solid var(--border-strong);
      border-radius: 14px;
      overflow: hidden;
      box-shadow: var(--shadow);
      transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    }
    .url-bar:focus-within {
      border-color: var(--gold);
      box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft);
      transform: translateY(-1px);
    }
    .url-bar-input {
      flex: 1;
      min-width: 0;
      border: none !important;
      background: transparent !important;
      box-shadow: none !important;
      margin: 0 !important;
      padding: 1.25rem 0.75rem 1.25rem 1.35rem !important;
      font-size: 1.18rem !important;
      color: var(--text) !important;
    }
    .url-bar-input:focus { outline: none; }
    .url-bar-input.input-error { color: var(--red) !important; }
    .url-bar:has(.input-error) { border-color: var(--red); }
    .url-upload-btn {
      flex-shrink: 0;
      align-self: center;
      margin-right: 0.15rem;
      padding: 0.65rem 0.9rem;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--text-soft);
      font-family: var(--font-ui);
      font-size: 0.9rem;
      font-weight: 650;
      line-height: 1;
      cursor: pointer;
      transition: var(--btn-transition);
      white-space: nowrap;
    }
    .url-upload-btn:hover:not(:disabled) {
      border-color: var(--gold);
      background: var(--accent-soft);
      color: var(--gold-light);
    }
    .url-upload-btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    .url-bar-btn {
      flex-shrink: 0;
      margin: 0.5rem;
      padding: 1rem 1.95rem !important;
      border-radius: 10px !important;
      font-size: 1.1rem !important;
      background: var(--btn-primary-bg) !important;
      color: var(--btn-primary-text) !important;
      font-weight: 700 !important;
      border: 1px solid rgba(255, 255, 255, 0.12) !important;
      box-shadow: var(--btn-primary-shadow) !important;
      transition: var(--btn-transition) !important;
    }
    .url-bar-btn:hover {
      background: var(--btn-primary-hover) !important;
      color: var(--btn-primary-text) !important;
      box-shadow: var(--btn-primary-shadow-hover) !important;
      transform: translateY(-1px);
    }
    .url-bar-btn:active { transform: translateY(0) scale(0.98) !important; }
    .url-bar-btn:disabled { opacity: 0.45; transform: none !important; box-shadow: none !important; }
    .hero-field-error {
      margin: 0.5rem 0 0;
      text-align: center;
      max-width: 720px;
    }
    .input-detect-banner {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      margin-top: 0.5rem;
      padding: 0.45rem 0.85rem;
      max-width: 720px;
      width: 100%;
      font-size: 0.8rem;
      color: var(--gold-light);
      background: var(--accent-soft);
      border: 1px solid rgba(212, 168, 83, 0.25);
      border-radius: 20px;
      animation: fadeUp 0.2s ease;
    }
    .input-detect-banner[hidden] { display: none !important; }
    .run-status {
      margin-top: 0.45rem;
      padding: 0.4rem 0.85rem;
      max-width: 720px;
      width: 100%;
      text-align: center;
      font-size: 0.88rem;
      color: var(--gold);
      animation: fadeUp 0.2s ease;
    }
    .run-status[hidden] { display: none !important; }
    .saved-note {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      margin: 0.55rem auto 0;
      padding: 0.4rem 0.9rem;
      max-width: 720px;
      font-size: 0.85rem;
      color: var(--gold-light);
      background: var(--accent-soft);
      border: 1px solid rgba(212, 168, 83, 0.25);
      border-radius: 20px;
      animation: fadeUp 0.2s ease;
    }
    .saved-note[hidden] { display: none !important; }
    .saved-note-link {
      border: none;
      background: none;
      padding: 0;
      color: var(--gold);
      font-family: var(--font-ui);
      font-size: 0.85rem;
      font-weight: 650;
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    .saved-note-link:hover { color: var(--gold-light); }
    .hero-progress {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.65rem;
      width: 100%;
      max-width: 720px;
      margin-top: 0.55rem;
      padding: 0.65rem 1rem;
      border-radius: 12px;
      border: 1px solid rgba(212, 168, 83, 0.35);
      background: rgba(212, 168, 83, 0.08);
      color: var(--gold-light);
      font-size: 0.92rem;
      animation: fadeUp 0.2s ease;
    }
    .hero-progress[hidden] { display: none !important; }
    .hero-progress-spinner {
      width: 18px;
      height: 18px;
      border: 2px solid rgba(212, 168, 83, 0.25);
      border-top-color: var(--gold);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      flex-shrink: 0;
    }
    .url-bar.is-running {
      border-color: var(--gold);
      box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft);
    }
    .url-bar.is-running .url-bar-btn {
      opacity: 0.85;
      cursor: wait;
    }
    .hero-entry.is-compact .hero-progress,
    .hero-entry.is-compact .run-status {
      flex-basis: 100%;
      max-width: none;
    }
    #panel-url #eval-error { margin-top: 0.75rem; }
    #panel-url #reasoning-panel { margin-top: 0.75rem; }
    #panel-url #results { margin-top: 0.5rem; }
    .detect-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--gold);
      flex-shrink: 0;
      box-shadow: 0 0 6px rgba(212, 168, 83, 0.5);
    }
    .url-bar.is-figma { border-color: rgba(212, 168, 83, 0.45); }
    .url-bar.is-figma:focus-within {
      border-color: var(--gold);
      box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft);
    }
    .url-bar.is-github { border-color: rgba(120, 180, 255, 0.45); }
    .url-bar.is-github:focus-within {
      border-color: #78b4ff;
      box-shadow: var(--shadow), 0 0 0 4px rgba(120, 180, 255, 0.15);
    }
    .url-bar.is-appflow { border-color: rgba(120, 200, 160, 0.45); }
    .url-bar.is-appflow:focus-within {
      border-color: rgba(120, 200, 160, 0.75);
      box-shadow: var(--shadow), 0 0 0 4px rgba(120, 200, 160, 0.12);
    }
    .hero-input-zone.dragover .url-bar {
      border-color: var(--gold);
      box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft);
    }
    .hero-attachment {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-top: 0.45rem;
      padding: 0.45rem 0.65rem;
      border: 1px solid var(--border);
      border-radius: var(--btn-radius-pill);
      font-size: 0.82rem;
      color: var(--text-soft);
      width: fit-content;
    }
    .hero-attachment[hidden] { display: none !important; }
    .hero-attachment-preview {
      width: 58px;
      height: 42px;
      border-radius: 8px;
      border: 1px solid var(--border-strong);
      background: var(--surface2);
      object-fit: cover;
      flex-shrink: 0;
    }
    .hero-attachment-preview[hidden] { display: none !important; }
    .hero-attachment-clear {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border);
      border-radius: var(--btn-radius-pill);
      color: var(--text-soft);
      cursor: pointer;
      font-size: 0.72rem;
      font-weight: 600;
      line-height: 1.1;
      padding: 0.2rem 0.45rem;
    }
    .hero-attachment-clear:hover {
      background: var(--surface-hover);
      color: var(--text);
    }
    .utility-nav-primary { justify-content: center; }
    .hero-figma-banner {
      margin-top: 0.65rem;
      max-width: 720px;
      width: 100%;
      text-align: left;
    }
    .hero-github-banner {
      margin-top: 0.65rem;
      max-width: 720px;
      width: 100%;
      text-align: left;
    }
    .hero-utility-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      width: 100%;
      max-width: 720px;
      margin-top: 0.7rem;
    }
    .demo-chips {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 0.45rem;
      margin-top: 1.25rem;
      max-width: 720px;
    }
    .demo-label {
      font-size: 0.78rem;
      color: var(--muted);
      margin-right: 0.15rem;
    }
    .demo-chip {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--border);
      color: var(--text-soft);
      font-size: 0.8125rem;
      font-weight: 500;
      padding: 0.42rem 0.9rem;
      border-radius: var(--btn-radius-pill);
      cursor: pointer;
      transition: var(--btn-transition);
      font-family: var(--font-ui);
    }
    .demo-chip:hover {
      border-color: rgba(184, 149, 106, 0.55);
      color: var(--gold-light);
      background: var(--accent-soft);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      transform: translateY(-1px);
    }
    .demo-chip:active { transform: translateY(0) scale(0.98); }
    .label-optional {
      font-weight: 400;
      color: var(--muted);
      font-size: 0.85em;
    }
    .flow-advanced-body {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
    }
    .focus-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem;
      margin: 0.35rem 0 0;
    }
    .focus-chip {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--border);
      color: var(--text-soft);
      font-size: 0.78rem;
      font-weight: 500;
      padding: 0.38rem 0.78rem;
      border-radius: var(--btn-radius-pill);
      cursor: pointer;
      transition: var(--btn-transition);
      font-family: var(--font-ui);
      line-height: 1.3;
    }
    .focus-chip:hover {
      border-color: var(--border-strong);
      color: var(--text);
      background: var(--btn-ghost-hover);
    }
    .focus-chip.active {
      border-color: rgba(184, 149, 106, 0.55);
      color: var(--gold-light);
      background: var(--accent-soft);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }
    .focus-chip-hint {
      display: block;
      font-size: 0.68rem;
      font-weight: 400;
      color: var(--muted);
      margin-top: 0.1rem;
    }
    .option-chips {
      flex-wrap: wrap;
      gap: 0.5rem;
    }
    .option-chip {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--border);
      color: var(--text-soft);
      font-size: 0.8125rem;
      font-weight: 500;
      padding: 0.42rem 0.85rem;
      border-radius: var(--btn-radius-pill);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      flex-shrink: 0;
      transition: var(--btn-transition);
      font-family: var(--font-ui);
    }
    .option-chip[hidden] { display: none; }
    .option-chip:hover {
      border-color: var(--border-strong);
      color: var(--text);
      background: var(--btn-ghost-hover);
    }
    .option-chip .option-chip-icon {
      font-size: 0.85rem;
      line-height: 1;
      opacity: 0.8;
    }
    .option-chip.active {
      border-color: rgba(184, 149, 106, 0.55);
      color: var(--gold-light);
      background: var(--accent-soft);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }
    .option-chip.active .option-chip-icon { opacity: 1; }
    .hero-options {
      display: none;
      flex-direction: column;
      gap: 0.6rem;
      width: 100%;
      max-width: 720px;
      margin-top: 0.6rem;
      text-align: left;
    }
    .hero-options.open { display: flex; }
    .option-panel {
      padding: 0.95rem 1rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      animation: fadeUp 0.2s ease;
    }
    .option-panel[hidden] { display: none; }
    .option-panel label { margin-top: 0.75rem; }
    .option-panel label:first-child { margin-top: 0; }
    .option-panel textarea { min-height: 48px; margin-bottom: 0; }
    .option-panel .toggle-hint { margin-bottom: 0; }
    @media (max-width: 640px) {
      .hero-utility-row {
        flex-direction: column;
        gap: 0.35rem;
      }
      .option-chips { flex-direction: row; }
      .hero-entry-title .hero-line { white-space: normal; }
    }

    /* Compact hero after eval */
    .hero-entry.is-compact {
      min-height: 0;
      padding: 0.5rem 0 1rem;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 0.5rem 0.75rem;
      text-align: left;
    }
    .hero-entry.is-compact .hero-entry-title,
    .hero-entry.is-compact .hero-entry-sub,
    .hero-entry.is-compact .hero-utility-row,
    .hero-entry.is-compact .input-detect-banner,
    .hero-entry.is-compact .hero-figma-banner,
    .hero-entry.is-compact .hero-github-banner,
    .hero-entry.is-compact .hero-attachment,
    .hero-entry.is-compact .demo-chips,
    .hero-entry.is-compact .hero-option-chips,
    .hero-entry.is-compact .hero-options { display: none !important; }
    .hero-entry.is-compact .url-bar {
      max-width: none;
      flex: 1;
      min-width: 280px;
      box-shadow: var(--shadow-sm);
    }
    .hero-entry.is-compact .url-bar:focus-within { transform: none; }
    .hero-entry.is-compact .url-bar-btn { padding: 0.7rem 1.25rem !important; font-size: 0.9rem !important; }
    .hero-entry.is-compact .url-bar-input { padding: 0.75rem 0.5rem 0.75rem 0.85rem !important; font-size: 0.95rem !important; }
    .hero-entry.is-compact .hero-field-error {
      width: 100%;
      flex-basis: 100%;
      margin-top: 0;
    }

    #panel-url.panel.active { margin-top: 0; }

    /* ── Dictation ── */
    .dictation-field { position: relative; }
    .dictation-field input,
    .dictation-field textarea { padding-right: 2.75rem !important; }
    .dictation-mic-btn {
      position: absolute;
      right: 0.55rem;
      bottom: 0.55rem;
      z-index: 2;
      width: 32px;
      height: 32px;
      border: 1px solid var(--border);
      border-radius: 50%;
      background: var(--surface2);
      color: var(--muted);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.85rem;
      transition: all 0.15s;
      padding: 0;
    }
    .dictation-field textarea + .dictation-mic-btn { bottom: 0.65rem; }
    .dictation-mic-btn:hover:not(:disabled) {
      border-color: var(--gold);
      color: var(--gold-light);
      background: var(--accent-soft);
    }
    .dictation-mic-btn.is-active {
      border-color: var(--gold);
      background: var(--accent-soft);
      color: var(--gold);
      box-shadow: 0 0 0 3px var(--accent-soft);
    }
    .dictation-mic-btn:disabled { opacity: 0.35; cursor: not-allowed; }
    .url-bar .dictation-mic-btn {
      position: static;
      flex-shrink: 0;
      align-self: center;
      margin-right: 0.15rem;
      width: 36px;
      height: 36px;
    }
    .url-bar.is-listening { border-color: var(--gold); box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft); }
    .chat-input-row .dictation-mic-btn {
      position: static;
      flex-shrink: 0;
      align-self: flex-end;
      margin-bottom: 0.1rem;
    }
    .dictation-bar {
      position: fixed;
      bottom: 1.25rem;
      left: 50%;
      transform: translateX(-50%);
      z-index: 300;
      display: flex;
      align-items: center;
      gap: 0.65rem;
      padding: 0.55rem 0.85rem 0.55rem 0.7rem;
      background: rgba(28, 26, 23, 0.94);
      border: 1px solid var(--border-strong);
      border-radius: 24px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      max-width: min(92vw, 520px);
    }
    .dictation-bar.hidden { display: none; }
    .dictation-pulse {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--muted);
      flex-shrink: 0;
    }
    .dictation-bar.is-listening .dictation-pulse {
      background: var(--gold);
      animation: dictationPulse 1.2s ease-in-out infinite;
    }
    .dictation-bar.is-paused .dictation-pulse { background: var(--muted); }
    @keyframes dictationPulse {
      0%, 100% { opacity: 0.45; transform: scale(0.9); }
      50% { opacity: 1; transform: scale(1.15); }
    }
    .dictation-status-text {
      font-size: 0.78rem;
      color: var(--text-soft);
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .dictation-bar-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }
    .dictation-bar-btn {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 500;
      padding: 0.3rem 0.65rem;
      border-radius: 14px;
      cursor: pointer;
      font-family: var(--font-ui);
      transition: all 0.12s;
    }
    .dictation-bar-btn:hover { border-color: var(--border-strong); color: var(--text); }
    .dictation-bar-btn-primary {
      border-color: var(--gold-deep);
      color: var(--gold-light);
      background: var(--accent-soft);
    }
    body.dictation-active .container { padding-bottom: 4.5rem; }
    .changes-table .before { color: var(--red); opacity: 1; }
    .changes-table .after { color: var(--green); }

    .flow-screen-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 1rem;
    }
    .flow-screen-card {
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      background: var(--surface);
    }
    .flow-screen-card img {
      display: block;
      width: 100%;
      aspect-ratio: 16 / 10;
      object-fit: cover;
      background: #111;
    }
    .flow-screen-meta {
      padding: 0.75rem 0.85rem;
      display: grid;
      gap: 0.25rem;
      font-size: 0.82rem;
    }
    .flow-screen-meta span { color: var(--muted); word-break: break-all; }
    .flow-score { color: var(--gold-light); font-weight: 600; }

    /* Changelog page */
    .changelog-page header h1 { font-size: 1.4rem; }
    .changelog-container {
      max-width: 680px;
      padding-top: 2.5rem;
      padding-bottom: 4rem;
    }
    .changelog-intro {
      margin-bottom: 2.5rem;
      padding-bottom: 1.5rem;
      border-bottom: 1px solid var(--border);
    }
    .changelog-title {
      font-family: var(--font-display);
      font-size: 2rem;
      font-weight: 600;
      letter-spacing: -0.02em;
      margin-bottom: 0.5rem;
    }
    .changelog-lede {
      color: var(--muted);
      font-size: 0.95rem;
    }
    .changelog-entry {
      margin-bottom: 2.25rem;
      padding-bottom: 2.25rem;
      border-bottom: 1px solid var(--border);
    }
    .changelog-entry:last-child {
      border-bottom: none;
      padding-bottom: 0;
      margin-bottom: 0;
    }
    .changelog-entry-header {
      margin-bottom: 0.85rem;
    }
    .changelog-date {
      display: block;
      font-size: 0.78rem;
      color: var(--gold);
      font-weight: 500;
      letter-spacing: 0.02em;
      text-transform: uppercase;
      margin-bottom: 0.35rem;
    }
    .changelog-entry-title {
      font-family: var(--font-display);
      font-size: 1.35rem;
      font-weight: 600;
      letter-spacing: -0.01em;
    }
    .changelog-list {
      list-style: none;
      display: grid;
      gap: 0.55rem;
    }
    .changelog-list li {
      position: relative;
      padding-left: 1.1rem;
      color: var(--text-soft);
      font-size: 0.92rem;
    }
    .changelog-list li::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0.55em;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: var(--gold-deep);
    }
    .changelog-list strong {
      color: var(--text);
      font-weight: 600;
    }
    /* --- API access modal --- */
    .api-modal { max-width: 640px; }
    .api-usage-summary { margin: 0.75rem 0 1rem; }
    .api-usage-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 0.5rem;
    }
    .api-usage-grid > div {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 0.6rem 0.4rem;
      background: var(--surface-muted, rgba(0,0,0,0.03));
      border: 1px solid var(--border, rgba(0,0,0,0.08));
      border-radius: 10px;
    }
    .api-usage-num { font-size: 1.25rem; font-weight: 700; color: var(--text); }
    .api-usage-lbl { font-size: 0.7rem; color: var(--text-muted, #888); text-transform: uppercase; letter-spacing: 0.04em; }
    .api-usage-note { font-size: 0.8rem; color: var(--text-muted, #888); margin: 0.5rem 0 0; }
    .api-create-row { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
    .api-create-row input { flex: 1; }
    .api-token-reveal {
      background: rgba(212, 175, 55, 0.08);
      border: 1px solid var(--gold-deep, #b8962e);
      border-radius: 10px;
      padding: 0.75rem;
      margin-bottom: 0.75rem;
    }
    .api-reveal-label { margin: 0 0 0.4rem; font-size: 0.8rem; font-weight: 600; }
    .api-reveal-row { display: flex; align-items: center; gap: 0.5rem; }
    .api-reveal-row code {
      flex: 1;
      font-size: 0.78rem;
      word-break: break-all;
      background: rgba(0,0,0,0.05);
      padding: 0.35rem 0.5rem;
      border-radius: 6px;
    }
    .api-token-list { display: flex; flex-direction: column; gap: 0.4rem; }
    .api-token-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.5rem 0.6rem;
      border: 1px solid var(--border, rgba(0,0,0,0.08));
      border-radius: 8px;
    }
    .api-token-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
    .api-token-meta code { font-size: 0.8rem; }
    .api-token-name { font-weight: 600; }
    .api-token-sub { font-size: 0.72rem; color: var(--text-muted, #888); }
    .api-token-revoked { font-size: 0.7rem; color: #c0392b; text-transform: uppercase; }
    .api-empty { font-size: 0.85rem; color: var(--text-muted, #888); }
    .api-example { margin-top: 1rem; }
    .api-example h3 { font-size: 0.85rem; margin: 0 0 0.4rem; }
    .api-example pre {
      background: #1e1e2e;
      color: #e6e6f0;
      padding: 0.75rem;
      border-radius: 8px;
      overflow-x: auto;
      font-size: 0.74rem;
      line-height: 1.5;
    }

    /* Account page */
    .auth-user-label-btn { background: none; border: none; cursor: pointer; font: inherit; }
    #billing-status-pill { cursor: pointer; }
    .account-page { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
    .account-head { margin-bottom: 0.25rem; }
    .account-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin: 0; color: var(--text); }
    .account-sub { color: var(--muted); font-size: 0.9rem; margin: 0.35rem 0 0; }
    .account-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.1rem 1.25rem;
    }
    .account-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
    .account-card-title { font-size: 0.95rem; font-weight: 600; color: var(--text); margin: 0 0 0.75rem; }
    .account-card-head .account-card-title { margin-bottom: 0; }
    .account-card-note { color: var(--text-soft); font-size: 0.85rem; line-height: 1.5; margin: 0.5rem 0 0; }
    .account-grid { display: flex; flex-direction: column; gap: 0.1rem; }
    .account-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
    .account-row:last-child { border-bottom: none; }
    .account-row-key { color: var(--muted); font-size: 0.85rem; }
    .account-row-val { color: var(--text); font-size: 0.85rem; text-align: right; word-break: break-word; }
    .account-badge { font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-soft); white-space: nowrap; }
    .account-badge-pro { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
    .account-badge-free { color: var(--text-soft); }
    .account-badge-soon { color: var(--muted); }
    .account-usage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 1rem; }
    .account-usage:empty { display: none; }
    .account-usage-cell { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.7rem 0.8rem; display: flex; flex-direction: column; gap: 0.2rem; }
    .account-usage-num { font-size: 1.15rem; font-weight: 600; color: var(--text); }
    .account-usage-lbl { font-size: 0.72rem; color: var(--muted); }
    .account-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
    .account-actions:empty { display: none; }
    .account-integrations { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
    .account-integration { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.7rem 0.85rem; }
    .account-integration-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
    .account-integration-name { font-size: 0.88rem; font-weight: 600; color: var(--text); }
    .account-integration-detail { color: var(--text-soft); font-size: 0.82rem; line-height: 1.45; margin: 0.35rem 0 0; }
    .account-integration[open] { padding-bottom: 0.85rem; }
    .account-integration summary { cursor: pointer; list-style: none; }
    .account-integration summary::-webkit-details-marker { display: none; }
    .account-integration-meta { display: flex; align-items: center; gap: 0.5rem; }
    .account-integration-fit { font-size: 0.72rem; color: var(--muted); }
    .account-integration-steps { margin: 0.6rem 0 0; padding-left: 1.1rem; color: var(--text-soft); font-size: 0.82rem; line-height: 1.55; }
    .account-integration-docs { display: inline-block; margin-top: 0.6rem; font-size: 0.78rem; color: var(--accent-hover); text-decoration: none; }
    .account-integration-docs:hover { text-decoration: underline; }
    .account-mcp { margin-top: 1rem; }
    .account-mcp-label { display: block; font-size: 0.72rem; color: var(--muted); margin-bottom: 0.3rem; }
    .account-copy-row { display: flex; align-items: stretch; gap: 0.5rem; }
    .account-copy-row > code, .account-snippet {
      flex: 1; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm);
      padding: 0.5rem 0.65rem; font-size: 0.78rem; color: var(--text); overflow-x: auto; margin: 0; white-space: pre;
    }
    .account-copy-btn { white-space: nowrap; flex-shrink: 0; }
    .account-mcp-tools { margin-top: 0.75rem; }
    .account-mcp-tools summary { cursor: pointer; font-size: 0.8rem; color: var(--text-soft); }
    .account-mcp-tools ul { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--text-soft); font-size: 0.8rem; line-height: 1.6; }
    .account-mcp-tools code, .account-integration code { font-size: 0.78rem; color: var(--accent-hover); }
    .pricing-page {
      max-width: 1080px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }
    .pricing-hero {
      max-width: 820px;
      padding: 0.8rem 0 0.2rem;
    }
    .pricing-kicker {
      color: var(--gold-light);
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      margin-bottom: 0.45rem;
      text-transform: uppercase;
    }
    .pricing-hero h2 {
      font-family: var(--font-display);
      font-size: clamp(2rem, 5vw, 3.35rem);
      line-height: 0.98;
      letter-spacing: -0.045em;
      margin-bottom: 0.75rem;
    }
    .pricing-hero p {
      max-width: 720px;
      color: var(--text-soft);
      font-size: 1rem;
      line-height: 1.6;
    }
    .pricing-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.7rem;
      margin-top: 1rem;
    }
    .pricing-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1rem;
      align-items: stretch;
    }
    .pricing-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 1.1rem 1.15rem;
      box-shadow: var(--shadow-sm);
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }
    .pricing-card-featured {
      border-color: rgba(184, 149, 106, 0.45);
      box-shadow: inset 0 0 0 1px var(--accent-soft), var(--shadow);
      background: linear-gradient(180deg, rgba(184, 149, 106, 0.08), var(--surface) 42%);
    }
    .pricing-plan-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
    }
    .pricing-plan-top h3 {
      font-family: var(--font-display);
      font-size: 1.25rem;
      line-height: 1.1;
      margin: 0;
    }
    .pricing-price {
      font-family: var(--font-display);
      color: var(--text);
      font-size: 2.35rem;
      line-height: 1;
      letter-spacing: -0.045em;
      margin: 0;
    }
    .pricing-price span {
      color: var(--muted);
      font-family: var(--font-ui);
      font-size: 0.92rem;
      letter-spacing: 0;
      margin-left: 0.15rem;
    }
    .pricing-note {
      color: var(--text-soft);
      font-size: 0.86rem;
      line-height: 1.5;
      margin: 0;
    }
    .pricing-list {
      margin: 0.1rem 0 0;
      padding-left: 1.1rem;
      color: var(--text-soft);
      font-size: 0.82rem;
      line-height: 1.58;
    }
    .pricing-list li { margin-bottom: 0.35rem; }
    .buyer-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1rem;
    }
    .pricing-faq {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 1.1rem 1.25rem;
      margin-bottom: 1rem;
    }
    .pricing-faq h3 {
      font-family: var(--font-display);
      font-size: 1.25rem;
      margin-bottom: 0.85rem;
    }
    .pricing-faq-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.85rem;
    }
    .pricing-faq-grid > div {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 0.85rem;
    }
    .pricing-faq-grid h4 {
      font-size: 0.9rem;
      margin-bottom: 0.35rem;
      color: var(--text);
    }
    .pricing-faq-grid p {
      color: var(--text-soft);
      font-size: 0.82rem;
      line-height: 1.5;
      margin: 0;
    }
    .status-page {
      max-width: 1080px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }
    .status-hero { max-width: 900px; }
    .status-overview { margin-top: 1rem; }
    .status-overview-card {
      display: flex;
      justify-content: space-between;
      gap: 1rem;
      align-items: center;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 1rem 1.1rem;
      box-shadow: var(--shadow-sm);
    }
    .status-overview-card.ok {
      border-color: rgba(141, 168, 130, 0.38);
      background: linear-gradient(180deg, rgba(141, 168, 130, 0.08), var(--surface) 55%);
    }
    .status-overview-card.warn {
      border-color: rgba(168, 144, 110, 0.42);
      background: linear-gradient(180deg, rgba(168, 144, 110, 0.08), var(--surface) 55%);
    }
    .status-overview-card strong {
      color: var(--text);
      font-size: 1rem;
      text-transform: capitalize;
    }
    .status-overview-card p,
    .status-component-card p,
    .status-section-head p,
    .status-update-item p {
      color: var(--text-soft);
      font-size: 0.86rem;
      line-height: 1.5;
      margin: 0.25rem 0 0;
    }
    .status-meta {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      color: var(--muted);
      font-size: 0.78rem;
      text-align: right;
      white-space: nowrap;
    }
    .status-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1rem;
    }
    .status-component-card,
    .status-updates-card,
    .status-update-item {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 1rem 1.1rem;
      box-shadow: var(--shadow-sm);
    }
    .status-component-top,
    .status-section-head,
    .status-update-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 1rem;
    }
    .status-component-top h3,
    .status-section-head h3,
    .status-update-top h3 {
      font-size: 0.95rem;
      margin: 0;
      color: var(--text);
    }
    .status-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      border: 1px solid var(--border);
      border-radius: var(--btn-radius-pill);
      padding: 0.25rem 0.55rem;
      color: var(--text-soft);
      font-size: 0.72rem;
      font-weight: 600;
      text-transform: capitalize;
      white-space: nowrap;
    }
    .status-pill.ok { border-color: rgba(141, 168, 130, 0.3); color: var(--green); background: var(--green-soft); }
    .status-pill.warn { border-color: rgba(168, 144, 110, 0.3); color: var(--yellow); background: rgba(168, 144, 110, 0.12); }
    .status-pill.maintenance { color: var(--muted); background: rgba(237, 224, 200, 0.04); }
    .status-dot {
      display: inline-block;
      width: 0.5rem;
      height: 0.5rem;
      border-radius: 50%;
      background: var(--muted);
      flex: 0 0 auto;
    }
    .status-dot.ok { background: var(--green); box-shadow: 0 0 8px var(--green-soft); }
    .status-dot.warn { background: var(--yellow); box-shadow: 0 0 8px rgba(168, 144, 110, 0.32); }
    .status-dot.maintenance { background: var(--muted); }
    .status-updates-card {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      margin-bottom: 1rem;
    }
    .status-update-item + .status-update-item { margin-top: 0.75rem; }
    .status-update-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      color: var(--muted);
      font-size: 0.76rem;
      margin-top: 0.65rem;
    }
    .status-update-meta span:not(:empty) {
      border: 1px solid var(--border);
      border-radius: var(--btn-radius-pill);
      padding: 0.18rem 0.5rem;
    }
    .status-timeline {
      list-style: none;
      margin: 0.85rem 0 0;
      padding: 0.75rem 0 0;
      border-top: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
    }
    .status-timeline li {
      display: grid;
      grid-template-columns: 120px 1fr;
      gap: 0.75rem;
      color: var(--text-soft);
      font-size: 0.82rem;
      line-height: 1.45;
    }
    .status-timeline time {
      color: var(--muted);
      font-size: 0.75rem;
    }
    @media (max-width: 600px) {
      .account-usage { grid-template-columns: 1fr; }
      .pricing-actions { flex-direction: column; align-items: stretch; }
      .pricing-actions .btn,
      .pricing-actions .btn-secondary { justify-content: center; }
      .status-overview-card,
      .status-section-head,
      .status-update-top { flex-direction: column; align-items: flex-start; }
      .status-meta { text-align: left; white-space: normal; }
      .status-timeline li { grid-template-columns: 1fr; gap: 0.2rem; }
    }
    @media (max-width: 900px) {
      .pricing-grid,
      .buyer-grid,
      .pricing-faq-grid,
      .status-grid { grid-template-columns: 1fr; }
    }
