/* ==========================================================================
   BSE StAR MF Support Portal — design system
   --------------------------------------------------------------------------
   Principles this pass is built on:

   1. ONE input at a time. The top bar's search is hidden on the home page,
      where the hero owns it. There is never a second box competing.
   2. ONE column of attention. No side rail: what mattered in it now sits under
      the article, where it is read after the answer rather than beside it.
   3. A real reading measure. Body text is capped at ~68 characters. The old
      layout ran to 96, which is what made answers tiring to read.
   4. Space instead of borders. A box is used only for something that is truly
      a separate object — a category tile, a list row. Everything else is
      separated by whitespace and type.
   5. Neon as an accent, not a texture. Colour marks one thing per screen: the
      menu path, which is what the distributor came for.

   Dark-only by deliberate choice: the palette is built on luminance contrast
   against a near-black ground and does not survive inversion.
   ========================================================================== */

:root {
  /* ground */
  --bg:            #06080e;
  --surface:       rgba(255, 255, 255, 0.030);
  --surface-2:     rgba(255, 255, 255, 0.055);
  --surface-3:     rgba(255, 255, 255, 0.085);
  --line:          rgba(255, 255, 255, 0.075);
  --line-2:        rgba(255, 255, 255, 0.145);

  /* neon */
  --mint:          #2de1c2;
  --mint-soft:     #a9f3e5;
  --violet:        #8b5cf6;
  --cyan:          #22d3ee;
  --amber:         #fbbf24;
  --rose:          #fb7185;

  /* type */
  --ink:           #edf1f7;
  --ink-2:         #aab3c6;
  --ink-3:         #6c7588;

  /* metrics */
  --measure:       680px;   /* ~68 characters at 16px — the reading column */
  --shell:         1080px;
  --radius:        13px;
  --radius-lg:     18px;

  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body:    "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", ui-monospace, Consolas, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

/* `height:100%` together with `overflow-x:hidden` on <body> makes the BODY the
   scroll container and clips everything past the first viewport. Keep the
   horizontal clip on <html> and let <body> grow. */
html { overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One slow neon bloom, anchored to the top of the page. Deliberately weaker
   than before: it should suggest depth, not compete with the content. */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -1;
  background:
    radial-gradient(34vmax 34vmax at 22% 6%, rgba(45, 225, 194, 0.10), transparent 60%),
    radial-gradient(38vmax 38vmax at 82% 2%, rgba(139, 92, 246, 0.11), transparent 62%);
  animation: drift 40s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: translate3d(-1%, 0, 0) scale(1); }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a .ext { font-size: .8em; opacity: .55; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.022em;
  line-height: 1.25;
  margin: 0;
  text-wrap: balance;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(45, 225, 194, .26); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.09); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.18); background-clip: content-box; }

/* ==========================================================================
   Primitives
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 17px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--ink); font-weight: 500; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: var(--mint); border-color: var(--mint); color: #04150f; font-weight: 700; }
.btn-primary:hover { background: #4aeed1; border-color: #4aeed1; }

.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-3); }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

.field {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--line-2); background: rgba(0,0,0,.30);
  color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field::placeholder { color: var(--ink-3); }
.field:focus { border-color: rgba(45,225,194,.5); box-shadow: 0 0 0 3px rgba(45,225,194,.11); }
textarea.field { resize: vertical; min-height: 84px; line-height: 1.6; }

label.lbl { display: block; font-size: 12.5px; color: var(--ink-2); margin: 0 0 6px; font-weight: 500; }

.muted { color: var(--ink-3); }
.dim   { color: var(--ink-2); }
.mono  { font-family: var(--font-mono); }
.row   { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.hidden { display: none !important; }

.notice { padding: 11px 14px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.notice.err  { background: rgba(251,113,133,.08); border-color: rgba(251,113,133,.3); color: #ffc4cc; }
.notice.ok   { background: rgba(45,225,194,.08);  border-color: rgba(45,225,194,.28); color: var(--mint-soft); }
.notice.warn { background: rgba(251,191,36,.08);  border-color: rgba(251,191,36,.28); color: #ffe2a1; }

.spin {
  width: 15px; height: 15px; flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,.18); border-top-color: var(--mint);
  border-radius: 50%; animation: rot .7s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }

/* section label — replaces a lot of former card headers */
.eyebrow {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}

/* ==========================================================================
   Brand
   ========================================================================== */

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px; height: 32px; flex: 0 0 auto; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(45,225,194,.2), rgba(139,92,246,.22));
  border: 1px solid rgba(45,225,194,.32);
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  letter-spacing: -.04em; color: var(--mint);
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; letter-spacing: -.02em; color: var(--ink); }
.brand-name b { color: var(--mint); font-weight: 600; }
.brand-sub { font-size: 10.5px; color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; margin-top: -2px; }

/* ==========================================================================
   Sign in
   ========================================================================== */

.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.auth-hero { padding: 56px 6vw; max-width: 720px; margin-left: auto; }
.auth-hero h1 { font-size: clamp(32px, 3.6vw, 50px); line-height: 1.08; margin: 34px 0 18px; letter-spacing: -.035em; }
.auth-hero h1 .glow {
  background: linear-gradient(100deg, var(--mint), var(--cyan) 48%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-hero p { color: var(--ink-2); font-size: 16.5px; max-width: 44ch; margin: 0; }
.auth-points { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 12px; max-width: 46ch; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.auth-points .dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 10px; flex: 0 0 auto; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.auth-points li:nth-child(2) .dot { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.auth-points li:nth-child(3) .dot { background: var(--cyan);   box-shadow: 0 0 10px var(--cyan); }
.auth-points li:nth-child(4) .dot { background: var(--amber);  box-shadow: 0 0 10px var(--amber); }
.auth-foot { margin-top: 44px; font-size: 12px; color: var(--ink-3); }

.auth-panel { display: grid; place-items: center; padding: 40px 6vw; }
.auth-card {
  width: 100%; max-width: 380px; min-width: 0; padding: 30px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.auth-card * { min-width: 0; }
.auth-card h2 { font-size: 22px; margin: 0 0 6px; }

.tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px;
  background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 11px; margin: 20px 0 18px;
}
.tabs button { padding: 8px; border: 0; background: transparent; border-radius: 9px; color: var(--ink-3); font-size: 13.5px; font-weight: 500; transition: .15s; }
.tabs button.on { background: var(--surface-3); color: var(--ink); }

/* `1fr` is `minmax(auto, 1fr)`, and an <input>'s auto minimum is its default
   size=20 — about twenty characters. That floor stopped the six columns from
   shrinking, so the boxes rendered enormous and burst out of the card. */
.otp-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.otp-boxes input {
  width: 100%; min-width: 0; aspect-ratio: 1 / 1.1; text-align: center;
  font-family: var(--font-mono); font-size: 20px; font-weight: 600; padding: 0;
  border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0,0,0,.3); outline: none;
  transition: .15s;
}
.otp-boxes input:focus { border-color: rgba(45,225,194,.55); box-shadow: 0 0 0 3px rgba(45,225,194,.12); }
.otp-boxes input.filled { border-color: rgba(45,225,194,.38); color: var(--mint); }

@media (max-width: 940px) {
  .auth-wrap { grid-template-columns: 1fr; align-items: start; }
  .auth-hero { padding: 34px 22px 4px; margin: 0; }
  .auth-hero h1 { margin-top: 22px; font-size: clamp(28px, 8vw, 38px); }
  .auth-points, .auth-foot { display: none; }
  .auth-panel { padding: 24px 20px 56px; }
}

/* ==========================================================================
   App shell
   ========================================================================== */

.topbar {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 8, 14, .82);
  backdrop-filter: blur(16px) saturate(1.3);
}
/* Three things only: identity, one search, account. */
.topbar-in {
  max-width: var(--shell); margin: 0 auto; padding: 11px 26px;
  display: flex; align-items: center; gap: 20px;
}

.omnibox { position: relative; flex: 1; max-width: 480px; margin: 0 auto; }
.omnibox .field { padding-left: 38px; font-size: 14.5px; }
.omnibox .mag { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; display: flex; }
.omnibox .kbd {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; pointer-events: none;
}
/* On the home page the hero owns the search, so the bar hides its own. */
.topbar.no-search .omnibox { visibility: hidden; pointer-events: none; }

.avatar {
  width: 31px; height: 31px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(139,92,246,.36), rgba(45,225,194,.3));
  border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; font-family: var(--font-display);
}

.menu {
  position: absolute; right: 0; top: calc(100% + 9px); z-index: 60; min-width: 208px;
  background: #0a0e17; border: 1px solid var(--line-2); border-radius: 12px; padding: 5px;
  box-shadow: 0 24px 56px -18px #000;
}
.menu .who { padding: 9px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu button, .menu a {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2); font-size: 13.5px; text-decoration: none;
}
.menu button:hover, .menu a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }

.shell { max-width: var(--shell); margin: 0 auto; padding: 34px 26px 96px; }
/* the single reading column */
.column { max-width: var(--measure); margin: 0 auto; }

/* ==========================================================================
   Suggestions — one component, used by whichever input is on screen
   ========================================================================== */

.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: #0a0e17; border: 1px solid var(--line-2); border-radius: 13px;
  overflow: hidden auto; max-height: 66vh; box-shadow: 0 26px 60px -20px #000;
  text-align: left;
}
.suggest .sg-head {
  padding: 8px 15px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); border-bottom: 1px solid var(--line);
}
.suggest .sg-item { display: block; padding: 12px 15px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.suggest .sg-item:hover, .suggest .sg-item.cursor { background: var(--surface-2); text-decoration: none; }
.suggest .sg-item.cursor { box-shadow: inset 2px 0 0 var(--mint); }
.suggest .sg-t { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.suggest .sg-s {
  font-size: 13px; color: var(--ink-3); line-height: 1.5; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.suggest .sg-m { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.suggest .sg-path {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--mint-soft);
  background: rgba(45,225,194,.07); border: 1px solid rgba(45,225,194,.2);
  border-radius: 6px; padding: 2px 7px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.suggest .sg-c { font-size: 11px; color: var(--ink-3); }
.suggest mark { background: rgba(45,225,194,.17); color: var(--mint); border-radius: 3px; padding: 0 1px; font-weight: 700; }
.suggest .sg-ask {
  display: flex; align-items: center; gap: 9px; padding: 12px 15px;
  color: var(--mint); text-decoration: none; font-size: 13.5px; background: rgba(45,225,194,.045);
}
.suggest .sg-ask:hover, .suggest .sg-ask.cursor { background: rgba(45,225,194,.11); text-decoration: none; }
.suggest .sg-ask em { font-style: normal; color: var(--ink); }
.suggest .sg-ask .sg-enter {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--ink-3);
  border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; flex: 0 0 auto;
}
.suggest .sg-empty { padding: 14px 15px; color: var(--ink-3); font-size: 13.5px; }

/* ==========================================================================
   The ask bar — the single input on the home and ask pages
   ========================================================================== */

.askbar { position: relative; }
.askbar textarea {
  width: 100%; padding: 18px 60px 18px 20px; min-height: 60px; max-height: 190px;
  border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0,0,0,.34);
  outline: none; resize: none; font-size: 16px; line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
}
.askbar textarea:focus { border-color: rgba(45,225,194,.5); box-shadow: 0 0 0 3px rgba(45,225,194,.1); }
.askbar .go {
  position: absolute; right: 10px; bottom: 10px;
  width: 38px; height: 38px; padding: 0; border-radius: 10px;
  display: grid; place-items: center;
}

/* ==========================================================================
   Home
   ========================================================================== */

.hero { text-align: center; padding: 52px 0 12px; }
.hero h1 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.035em; margin: 0 0 12px; }
.hero h1 .glow {
  background: linear-gradient(100deg, var(--mint), var(--cyan) 52%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--ink-2); max-width: 52ch; margin: 0 auto 30px; font-size: 16px; }
.hero .askbar { max-width: 620px; margin: 0 auto; }

/* Three examples, as quiet text — they teach the tool without shouting. */
.examples { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; margin-top: 18px; }
.examples button {
  border: 0; background: none; padding: 2px 0; color: var(--ink-3); font-size: 13.5px;
  border-bottom: 1px dashed rgba(255,255,255,.16); transition: color .15s, border-color .15s;
}
.examples button:hover { color: var(--mint); border-bottom-color: rgba(45,225,194,.5); }

.section { margin-top: 62px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-head h2 { font-size: 17px; }

/* Two columns: eight tiles in four calm rows, rather than a wall of eight. */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cat {
  display: flex; gap: 15px; align-items: flex-start; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  text-decoration: none; color: inherit;
  transition: border-color .16s, background .16s;
}
.cat:hover { text-decoration: none; background: var(--surface-2); border-color: var(--line-2); }
.cat .ico {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center;
  background: rgba(45,225,194,.1); border: 1px solid rgba(45,225,194,.22); color: var(--mint);
}
.cat h3 { font-size: 15px; margin: 2px 0 4px; }
.cat p { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.55; }
.cat .n { font-size: 12px; color: var(--ink-3); margin-left: auto; flex: 0 0 auto; font-family: var(--font-mono); }
.cat[data-accent="violet"] .ico { background: rgba(139,92,246,.11); border-color: rgba(139,92,246,.24); color: #b69bff; }
.cat[data-accent="cyan"]   .ico { background: rgba(34,211,238,.1);  border-color: rgba(34,211,238,.24); color: var(--cyan); }
.cat[data-accent="amber"]  .ico { background: rgba(251,191,36,.1);  border-color: rgba(251,191,36,.24); color: var(--amber); }

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

/* article list — a row, not a card */
.a-list { display: grid; }
.a-item { display: block; padding: 16px 2px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.a-item:first-child { border-top: 1px solid var(--line); }
.a-item:hover { text-decoration: none; }
.a-item:hover h3 { color: var(--mint); }
.a-item h3 { font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: 0; margin: 0 0 4px; transition: color .15s; }
.a-item p { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }
.a-item .meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }

.path-chip {
  display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 11px;
  color: var(--mint-soft); background: rgba(45,225,194,.07);
  border: 1px solid rgba(45,225,194,.2); border-radius: 6px; padding: 3px 8px;
}

/* verification badge */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.badge .d { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.badge.official .d { background: var(--mint);   box-shadow: 0 0 7px var(--mint); }
.badge.portal   .d { background: var(--cyan);   box-shadow: 0 0 7px var(--cyan); }
.badge.practice .d { background: var(--violet); box-shadow: 0 0 7px var(--violet); }
.badge.review   .d { background: var(--amber);  box-shadow: 0 0 7px var(--amber); }
/* the pill form, used only in the admin table */
.badge.pill { padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface-2); }

/* ==========================================================================
   Article — one column, no rail
   ========================================================================== */

.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--mint); }

.doc-head { margin-bottom: 30px; }
.doc-head h1 { font-size: clamp(25px, 3.2vw, 33px); line-height: 1.2; margin: 0 0 14px; }
/* The short answer, as a lead paragraph. No box, no rule — just larger, calmer text. */
.doc-lead { font-size: 18px; line-height: 1.62; color: var(--ink-2); margin: 0 0 18px; }

/* The menu path is the one place colour is spent hard: it is what they came for. */
.paths { display: grid; gap: 7px; margin: 0 0 34px; }
.paths .eyebrow { margin-bottom: 3px; }
.path-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 11px; border: 1px solid rgba(45,225,194,.24); background: rgba(45,225,194,.05);
}
.path-row .p { font-family: var(--font-mono); font-size: 13.5px; color: #b6f5e8; flex: 1; word-break: break-word; line-height: 1.5; }
.path-row button {
  flex: 0 0 auto; border: 1px solid transparent; background: transparent; color: var(--ink-3);
  border-radius: 7px; padding: 4px 9px; font-size: 12px; transition: .15s;
}
.path-row button:hover { color: var(--mint); border-color: rgba(45,225,194,.4); }

/* rendered markdown */
.prose { font-size: 16px; line-height: 1.75; color: #ccd4e2; }
.prose > *:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; margin: 42px 0 14px; color: var(--ink); letter-spacing: -.02em; }
.prose h4 { font-size: 16.5px; margin: 30px 0 10px; color: var(--ink); }
.prose h5 { font-size: 12px; margin: 24px 0 8px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin: 8px 0; padding-left: 3px; }
.prose li::marker { color: var(--mint); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose code {
  font-family: var(--font-mono); font-size: .86em; padding: 2px 6px; border-radius: 5px;
  background: rgba(45,225,194,.09); border: 1px solid rgba(45,225,194,.17); color: var(--mint-soft);
}
.prose pre.code {
  margin: 0 0 22px; padding: 16px 18px; border-radius: 11px; overflow-x: auto;
  background: rgba(0,0,0,.42); border: 1px solid var(--line);
}
.prose pre.code code { background: none; border: 0; padding: 0; color: #b6f5e8; font-size: 13.5px; line-height: 1.65; white-space: pre; }
.prose blockquote { margin: 0 0 22px; padding: 2px 0 2px 20px; border-left: 2px solid rgba(251,191,36,.5); color: #f4e2bd; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

/* Tables: no outer box, just rules. Much lighter at a glance. */
.prose .table-wrap { overflow-x: auto; margin: 0 0 24px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 440px; }
.prose th, .prose td { padding: 11px 14px 11px 0; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
.prose th:last-child, .prose td:last-child { padding-right: 0; }
.prose thead th {
  border-bottom-color: var(--line-2); color: var(--ink-3); font-weight: 600;
  font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; padding-bottom: 9px;
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose ul.checklist { list-style: none; padding-left: 0; }
.prose li.check { display: flex; gap: 11px; align-items: flex-start; }
.prose li.check .box { width: 16px; height: 16px; margin-top: 5px; flex: 0 0 auto; border-radius: 4px; border: 1px solid var(--line-2); background: rgba(0,0,0,.3); }
.prose li.check .box.on { background: var(--mint); border-color: var(--mint); }

/* Everything that used to sit in the right rail now reads AFTER the answer. */
.doc-foot { margin-top: 52px; padding-top: 30px; border-top: 1px solid var(--line); display: grid; gap: 34px; }
.doc-foot section > .eyebrow { display: block; margin-bottom: 12px; }

.tool-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px;
  border: 1px solid rgba(139,92,246,.28); background: rgba(139,92,246,.07);
  color: #d5c9ff; font-size: 14px; text-decoration: none; margin: 0 8px 8px 0;
}
.tool-link:hover { text-decoration: none; background: rgba(139,92,246,.14); }

.sources-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.sources-list li { font-size: 13px; color: var(--ink-3); line-height: 1.6; padding-left: 14px; border-left: 1px solid var(--line-2); }

.related { display: grid; gap: 2px; }
.related a { display: block; padding: 9px 0; font-size: 14.5px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.related a:hover { color: var(--mint); text-decoration: none; }
.related a:last-child { border-bottom: 0; }

.helpful { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }

/* ==========================================================================
   Ask — a conversation
   --------------------------------------------------------------------------
   Turns stack downwards and the composer is pinned to the bottom, so a
   follow-up is always one keystroke away. The question is a quiet right-aligned
   bubble; the answer is plain prose at full measure, because it is the thing
   being read.
   ========================================================================== */

.chat { padding-bottom: 150px; }   /* room for the pinned composer */
.thread { min-height: 40vh; }

.turn { margin-bottom: 46px; }
.turn:last-child { margin-bottom: 12px; }

.bubble-q {
  max-width: 82%; margin: 0 0 22px auto; padding: 12px 17px;
  border-radius: 15px 15px 4px 15px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 15.5px; line-height: 1.55; color: var(--ink);
}
.bubble-a { font-size: 16px; }

.thinking { display: flex; align-items: center; gap: 11px; color: var(--ink-3); font-size: 15px; padding: 2px 0 0; }
/* The articles being read, shown instantly while the model is still writing. */
.reading { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.reading span {
  font-size: 12.5px; color: var(--ink-3); padding: 4px 10px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--surface);
}

.composer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: linear-gradient(to top, var(--bg) 62%, rgba(6,8,14,0));
  padding: 30px 26px 20px;
}
.composer-in { position: relative; }
.composer-note {
  margin: 10px 0 0; font-size: 11.5px; color: var(--ink-3); text-align: center; line-height: 1.5;
}
/* the dropdown opens UPWARDS out of a bottom-pinned composer */
.composer .suggest { top: auto; bottom: calc(100% + 8px); max-height: 54vh; }

.chat-empty { text-align: center; padding: 8vh 0 0; }
.chat-empty h1 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 12px; }
.chat-empty p { color: var(--ink-2); max-width: 48ch; margin: 0 auto 26px; }

.sources { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.sources .eyebrow { display: block; margin-bottom: 12px; }
/* Article titles are long: a numbered list reads far better than a column of
   full-width pills. */
.src-list { margin: 0; padding: 0 0 0 22px; display: grid; gap: 7px; }
.src-list li { font-size: 14px; color: var(--ink-3); line-height: 1.55; }
.src-list li::marker { color: var(--mint); font-family: var(--font-mono); font-size: 12px; }
.src-list a { color: var(--ink-2); }
.src-list a:hover { color: var(--mint); text-decoration: none; }

.rate { display: flex; gap: 8px; align-items: center; margin-top: 26px; font-size: 13.5px; color: var(--ink-3); }
.rate button { border: 1px solid var(--line-2); background: transparent; border-radius: 8px; padding: 5px 12px; font-size: 13px; color: var(--ink-3); }
.rate button:hover { color: var(--ink); }
.rate button.on { color: var(--mint); border-color: rgba(45,225,194,.45); background: rgba(45,225,194,.07); }

/* ==========================================================================
   Admin
   ========================================================================== */

.adm-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 26px; overflow-x: auto; }
.adm-tabs button {
  padding: 10px 14px; border: 0; background: transparent; color: var(--ink-3);
  font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.adm-tabs button.on { color: var(--mint); border-bottom-color: var(--mint); }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: rgba(255,255,255,.016); }
.tbl .num { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface-2); font-size: 12px; color: var(--ink-2);
}

.drawer-bg { position: fixed; inset: 0; z-index: 90; background: rgba(2,4,8,.72); backdrop-filter: blur(3px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91; width: min(720px, 100%);
  background: #080b13; border-left: 1px solid var(--line-2); display: flex; flex-direction: column;
  box-shadow: -30px 0 80px -30px #000;
}
.drawer header { padding: 17px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.drawer .body { padding: 24px; overflow-y: auto; flex: 1; display: grid; gap: 16px; align-content: start; }
.drawer footer { padding: 15px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; } }

.empty-state { text-align: center; padding: 64px 20px; color: var(--ink-3); }
.empty-state .big { font-size: 30px; margin-bottom: 14px; opacity: .3; }

/* ==========================================================================
   Small screens
   ========================================================================== */

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .topbar-in { padding: 10px 16px; gap: 12px; }
  .omnibox .kbd { display: none; }
  .shell { padding: 22px 18px 72px; }
  .hero { padding: 30px 0 8px; }
  .examples { gap: 4px 16px; }
  .prose { font-size: 15.5px; }
  .doc-lead { font-size: 16.5px; }
  .prose th, .prose td { padding-right: 12px; }
  .composer { padding: 24px 16px 14px; }
  .chat { padding-bottom: 156px; }
  .bubble-q { max-width: 90%; }
}
