/* =========================================================================
   Name of Record — design system
   Editorial / institutional. Restrained neutral palette, single ink-blue
   accent, serif headlines (Newsreader) over a clean sans body (Inter).
   ========================================================================= */

:root {
  /* Palette — warm neutrals + a single ink-blue accent */
  --paper:        #FBFAF7;
  --paper-2:      #f4f3ee;
  --paper-3:      #efeee7;
  --white:        #ffffff;
  --ink:          #1A1916;
  --ink-soft:     #3b3d44;
  --muted:        #6c6f78;
  --faint:        #9a9ca3;
  --line:         #e6e4da;
  --line-2:       #d8d6c9;
  --line-strong:  #c9c7b8;

  --blue:         #1C3A5E;   /* ink navy — primary accent (Name of Record) */
  --blue-700:     #16314F;
  --blue-900:     #10243A;
  --blue-tint:    #EBEEF4;
  --blue-tint-2:  #DAE2EC;

  /* Record gold — reserved for the canonical record & seal; not general UI */
  --gold:         #A4802E;
  --gold-tint:    #F6EFDD;
  --gold-deep:    #6C551D;

  /* Restrained functional colors — status only */
  --green:        #2f6b46;
  --green-tint:   #e7f1ea;
  --amber:        #8a6320;
  --amber-tint:   #f6efdd;
  --red:          #8f2f2f;
  --red-tint:     #f4e6e3;

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Geometry */
  --r-sm: 7px;
  --r:    11px;
  --r-lg: 16px;
  --maxw: 1120px;
  --maxw-narrow: 760px;

  --shadow-sm: 0 1px 2px rgba(20,22,30,.04);
  --shadow:    0 4px 22px rgba(20,22,30,.06);
  --shadow-lg: 0 18px 50px rgba(20,22,30,.10);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv05" 1, "ss01" 1;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-700); }
button { font-family: inherit; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
::selection { background: var(--blue-tint-2); }

/* --------------------------------------------------------------- headings */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--ink);
  letter-spacing: -.015em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.1rem); font-weight: 500; line-height: 1.06; letter-spacing: -.025em; }
h2 { font-size: clamp(1.85rem, 3.3vw, 2.7rem); line-height: 1.1; letter-spacing: -.02em; }
h3 { font-size: 1.32rem; line-height: 1.22; }
h4 { font-size: 1.06rem; font-family: var(--sans); font-weight: 600; letter-spacing: -.005em; }
p  { margin: 0 0 1rem; }
strong { font-weight: 600; color: var(--ink); }

.serif { font-family: var(--serif); }
.lede { font-size: clamp(1.12rem, 1.7vw, 1.32rem); line-height: 1.55; color: var(--ink-soft);
  font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny  { font-size: .78rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); }

.eyebrow {
  font-family: var(--sans); font-size: .735rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em; color: var(--blue);
  display: inline-flex; align-items: center; gap: .5rem;
}
.eyebrow--muted { color: var(--muted); }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .6; }
.eyebrow.no-rule::before { display: none; }

/* ---------------------------------------------------------------- layout */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.container--narrow { max-width: var(--maxw-narrow); }
.section { padding: 92px 0; }
.section--tight { padding: 64px 0; }
.section--alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--ink { background: #15161a; color: #e9e8e2; border-top: 1px solid #25262c; }
.section-head { max-width: 680px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.stack > * + * { margin-top: 1rem; }
.divider { height: 1px; background: var(--line); border: 0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--sans); font-size: .95rem; font-weight: 550; line-height: 1;
  padding: .82em 1.25em; border-radius: var(--r-sm); border: 1px solid transparent;
  cursor: pointer; transition: all .16s var(--ease); white-space: nowrap; text-decoration: none;
}
.btn svg { width: 16px; height: 16px; }
/* no transform on hover: a moving hit target makes the cursor flicker at element edges */
.btn--primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn--primary:hover { background: var(--blue-700); border-color: var(--blue-700); color:#fff; box-shadow: var(--shadow); }
.btn--secondary { background: var(--white); color: var(--ink); border-color: var(--line-2); }
.btn--secondary:hover { border-color: var(--ink); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn--ghost { background: transparent; color: var(--ink); border-color: transparent; padding-left: .4em; padding-right: .4em; }
.btn--ghost:hover { color: var(--blue); }
.btn--lg { font-size: 1.02rem; padding: .95em 1.55em; }
.btn--sm { font-size: .86rem; padding: .62em .95em; }
.btn--block { width: 100%; }
.btn--on-ink { background: #fff; color: #15161a; border-color:#fff; }
.btn--on-ink:hover { background: #ece9df; border-color:#ece9df; color:#15161a; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-quiet { color: var(--ink-soft); font-weight: 500; font-size: .92rem; }
.link-quiet:hover { color: var(--blue); }
.arrow-link { font-weight: 550; display: inline-flex; align-items: center; gap: .4em; }
.arrow-link svg { width: 15px; height: 15px; transition: transform .16s var(--ease); }
.arrow-link:hover svg { transform: translateX(3px); }

/* ----------------------------------------------------------------- cards */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.card--hover:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card--pad-lg { padding: 34px; }
.card__icon { width: 38px; height: 38px; border-radius: 9px; background: var(--blue-tint);
  color: var(--blue); display: grid; place-items: center; margin-bottom: 18px; }
.card__icon svg { width: 20px; height: 20px; }
.card h3 { margin-bottom: .4rem; }
.card h4 { margin-bottom: .35rem; }

/* tags / pills / badges */
.tag { display: inline-flex; align-items: center; gap: .4em; font-size: .76rem; font-weight: 550;
  padding: .3em .7em; border-radius: 100px; background: var(--paper-2); color: var(--ink-soft);
  border: 1px solid var(--line); }
.tag--blue { background: var(--blue-tint); color: var(--blue-700); border-color: var(--blue-tint-2); }
.tag--green { background: var(--green-tint); color: var(--green); border-color: #cfe3d6; }
.tag--amber { background: var(--amber-tint); color: var(--amber); border-color: #ecdfc1; }
.kbd { font-family: var(--mono); font-size: .82em; background: var(--paper-2); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: .12em .42em; }

/* status dots */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot--green { background: #3a8a5b; box-shadow: 0 0 0 3px rgba(58,138,91,.16); }
.dot--amber { background: #c08a2e; box-shadow: 0 0 0 3px rgba(192,138,46,.16); }
.dot--red   { background: #b3493f; box-shadow: 0 0 0 3px rgba(179,73,63,.16); }
.dot--blue  { background: var(--blue); box-shadow: 0 0 0 3px rgba(28,58,94,.16); }
.dot--idle  { background: var(--faint); }

/* --------------------------------------------------------------- navbar */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(251,251,248,.82);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-family: var(--serif);
  font-size: 1.28rem; font-weight: 600; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 22px; height: 22px; flex: none; margin-top: -2px; }
.brand__word { line-height: 1; }
.nav__links { display: flex; gap: 26px; margin-left: 8px; }
.nav__links a { color: var(--ink-soft); font-size: .92rem; font-weight: 500; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav__burger { display: none; background: none; border: 1px solid var(--line-2); border-radius: 7px;
  width: 38px; height: 34px; align-items: center; justify-content: center; color: var(--ink); }
.nav__burger svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta .link-quiet { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__inner { gap: 14px; }
}
.mobile-menu { display: none; border-bottom: 1px solid var(--line); background: var(--paper); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 13px 28px; color: var(--ink-soft); font-weight: 500; border-top: 1px solid var(--line); }
.mobile-menu a:first-child { border-top: 0; }

/* --------------------------------------------------------------- hero */
.hero { padding: 74px 0 40px; position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: 56px; align-items: center; }
@media (max-width: 940px) { .hero__grid { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 { margin: 18px 0 0; }
.hero .lede { margin: 22px 0 30px; max-width: 33ch; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero__note { margin-top: 20px; color: var(--muted); font-size: .86rem; display:flex; align-items:center; gap:.5rem; }
.hero__note svg { width: 18px; height: 18px; flex: none; color: var(--blue); }

/* faint editorial backdrop rule */
.hero::before { content:""; position:absolute; inset: 0 0 auto 0; height: 1px; background: var(--line); top: 0; opacity: 0; }

/* answer card (model output) */
.answer {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.answer__bar { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--line);
  background: var(--paper); }
.answer__q { font-size: .9rem; color: var(--ink-soft); font-weight: 500; }
.answer__q b { color: var(--ink); font-weight: 600; }
.answer__body { padding: 20px 22px 22px; font-size: 1.01rem; line-height: 1.6; }
.answer__body p { margin: 0 0 .8rem; }
.answer__body p:last-child { margin-bottom: 0; }
/* Hero before/after only: reserve a constant body height so switching tabs never reflows the
   section. Scoped to [data-ba-root] so the demo's streaming answers keep their natural height. */
[data-ba-root] .answer__body { min-height: 18rem; }
/* markdown the models return, styled to read like the chat apps */
.answer__body h3, .answer__body h4, .answer__body h5 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 1em 0 .35em; }
.answer__body h3 { font-size: 1.12rem; } .answer__body h4 { font-size: 1.02rem; } .answer__body h5 { font-size: .94rem; }
.answer__body ul, .answer__body ol { margin: 0 0 .8rem; padding-left: 1.3em; }
.answer__body li { margin: .22em 0; }
.answer__body a { text-decoration: underline; text-underline-offset: 2px; }
/* live querying state on the demo */
.d-status { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--muted); }
.querying { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .92rem; padding: 20px 2px; }
.querying .pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: nor-pulse 1.1s ease-in-out infinite; }
@keyframes nor-pulse { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.seg button .spin { margin-left: .35em; width: 11px; height: 11px; vertical-align: -1px;
  border-color: rgba(28,58,94,.25); border-top-color: var(--blue); }
.answer__meta { display:flex; align-items:center; gap:8px; padding: 12px 22px; border-top: 1px solid var(--line);
  background: var(--paper); font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.model-badge { display: inline-flex; align-items: center; gap: .45em; font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.model-badge .glyph { width: 18px; height: 18px; border-radius: 5px; display:grid; place-items:center; color:#fff; font-size:11px; font-weight:700; }
.g-openai { background:#0c8f78; } .g-claude { background:#c96442; } .g-gemini { background:#3a6fd8; } .g-perplexity { background:#1f7a8c; }
.eg { margin-top: 12px; padding: 6px 0 6px 12px; border-left: 2px solid var(--blue); font-size: .85rem; font-style: italic; color: var(--muted); }
.btn--oauth { display: inline-flex; align-items: center; justify-content: center; gap: .55em; }
.btn--oauth + .btn--oauth { margin-top: 10px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.auth-or::before, .auth-or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.auth-or span { color: var(--faint); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }

.cite { color: var(--blue); font-weight: 550; cursor: default; }
.cite-num { font-size:.72em; vertical-align: super; color: var(--blue); font-weight:600; }
.mark-bad { background: #f6e7e3; border-radius: 3px; padding: 0 .12em; box-shadow: inset 0 -2px 0 #e3b7ad; }
.mark-good { background: #e7f0e9; border-radius: 3px; padding: 0 .12em; box-shadow: inset 0 -2px 0 #b6d3bf; }

/* generic tab panels (demo models, etc.) */
[data-panel] { display: none; }
[data-panel].active { display: block; }

/* segmented toggle */
.seg { display: inline-flex; background: var(--paper-2); border: 1px solid var(--line); border-radius: 100px; padding: 3px; }
.seg button { border: 0; background: none; font-size: .82rem; font-weight: 600; color: var(--muted);
  padding: .42em 1em; border-radius: 100px; transition: all .15s var(--ease); }
.seg button.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg--ba button.active[data-state="before"] { color: var(--red); }
.seg--ba button.active[data-state="after"] { color: var(--green); }

/* ---------------------------------------------------------- logos strip */
.trust { display:flex; align-items:center; justify-content:center; gap: 38px; flex-wrap: wrap;
  filter: saturate(0); opacity: .72; }
.trust span { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--ink-soft); letter-spacing: -.01em; }
.trust small { font-family: var(--sans); font-size:.7rem; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color: var(--faint); }

/* "What we publish": monochrome platform logo strip (an editorial press-strip, not colored pills) */
.publish-platforms { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 40px; margin: 22px 0 0; }
.publish-platform svg { color: var(--ink-soft); flex: none; display: block; }

/* ----------------------------------------------------- numbered steps */
.steps { counter-reset: step; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step__n { counter-increment: step; font-family: var(--serif); font-size: 1.1rem; color: var(--blue);
  width: 40px; height: 40px; border: 1px solid var(--blue-tint-2); background: var(--blue-tint); border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; }
.step__n::before { content: counter(step, decimal-leading-zero); }
.step h3 { font-size: 1.18rem; margin-bottom: .3rem; }
.step p { margin: 0; color: var(--ink-soft); }

/* ------------------------------------------------------------- pricing */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; background: var(--white); }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }
.plan { padding: 32px 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.plan:last-child { border-right: 0; }
@media (max-width: 860px) { .plan { border-right: 0; border-bottom: 1px solid var(--line); } .plan:last-child{border-bottom:0;} }
.plan--featured { background: var(--paper); position: relative; }
.plan__name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.plan__tagline { color: var(--muted); font-size: .9rem; margin: 4px 0 18px; }
.plan__price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.plan__price .amt { font-family: var(--serif); font-size: 2.8rem; font-weight: 500; letter-spacing: -.02em; }
.plan__price .per { color: var(--muted); font-size: .9rem; }
.plan__price .was { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; margin-right: 4px; }
.plan__bill { color: var(--muted); font-size: .84rem; margin-bottom: 22px; }
.plan__bill b { color: var(--ink); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 11px; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: .92rem; line-height: 1.45; color: var(--ink-soft); align-items: start; }
.plan li svg { width: 16px; height: 16px; color: var(--blue); margin-top: 4px; }
.plan li.off { color: var(--faint); } .plan li.off svg { color: var(--faint); }
.plan .btn { margin-top: auto; }
.badge-pop { position: absolute; top: 16px; right: 16px; font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue); background: var(--blue-tint); border: 1px solid var(--blue-tint-2);
  padding: .3em .65em; border-radius: 100px; }

/* ------------------------------------------------------------- FAQ */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%;
  background: none; border: 0; text-align: left; padding: 22px 4px; font-family: var(--serif); font-size: 1.18rem;
  font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.faq__q:hover { color: var(--blue); }
.faq__icon { flex: none; width: 22px; height: 22px; position: relative; }
.faq__icon::before, .faq__icon::after { content:""; position:absolute; background: var(--blue); transition: transform .2s var(--ease); }
.faq__icon::before { left: 0; top: 10px; width: 22px; height: 2px; }
.faq__icon::after { left: 10px; top: 0; width: 2px; height: 22px; }
.faq__item.open .faq__icon::after { transform: scaleY(0); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .26s var(--ease); }
.faq__a-inner { padding: 0 4px 24px; max-width: 68ch; color: var(--ink-soft); }
.faq__a-inner p { margin: 0 0 .7rem; } .faq__a-inner p:last-child{margin-bottom:0;}

/* --------------------------------------------------------------- footer */
.footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 60px 0 36px; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 800px) { .footer__top { grid-template-columns: 1fr 1fr; gap: 30px; } }
.footer__brand .brand { margin-bottom: 14px; }
.footer__brand p { color: var(--muted); font-size: .9rem; max-width: 30ch; }
.footer__col h5 { font-size: .74rem; text-transform: uppercase; letter-spacing: .13em; color: var(--faint);
  margin: 0 0 14px; font-weight: 600; }
.footer__col a { display: block; color: var(--ink-soft); font-size: .92rem; padding: 5px 0; }
.footer__col a:hover { color: var(--blue); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--faint); font-size: .82rem; flex-wrap: wrap; }
.footer__bottom a { color: var(--muted); }

/* ----------------------------------------------------- pull quote / GPT */
.pullquote { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.32;
  font-weight: 400; letter-spacing: -.015em; color: var(--ink); }
.pullquote .attr { display: block; font-family: var(--sans); font-size: .8rem; font-weight: 600;
  letter-spacing: .04em; color: var(--muted); margin-top: 18px; text-transform: none; }

/* --------------------------------------------------------- onboarding */
.flow { display: grid; grid-template-columns: 250px 1fr; gap: 48px; align-items: start; }
@media (max-width: 880px) { .flow { grid-template-columns: 1fr; gap: 24px; } }
.flow__rail { position: sticky; top: 90px; }
@media (max-width: 880px) { .flow__rail { position: static; } .flow__rail #rail { display: none; } }
.railstep { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 9px 0; align-items: start; color: var(--muted); }
.railstep__dot { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center;
  font-size: .72rem; font-weight: 700; background: var(--white); color: var(--faint); transition: all .2s var(--ease); }
.railstep__t { font-size: .9rem; font-weight: 500; padding-top: 3px; }
.railstep.active .railstep__dot { border-color: var(--blue); background: var(--blue); color: #fff; }
.railstep.active .railstep__t { color: var(--ink); font-weight: 600; }
.railstep.done .railstep__dot { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.railstep.done .railstep__t { color: var(--ink-soft); }
.railconn { width: 1.5px; background: var(--line); height: 14px; margin-left: 12px; }
.railconn.done { background: var(--blue-tint-2); }

.panel { display: none; }
.panel.active { display: block; animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel__head { margin-bottom: 26px; }
.panel__head .eyebrow { margin-bottom: 12px; }
.panel__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 30px;
  padding-top: 22px; border-top: 1px solid var(--line); }

/* forms */
.field { margin-bottom: 20px; }
.field > label { display: block; font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: .82rem; color: var(--muted); margin: -1px 0 9px; line-height: 1.45; }
.input, .textarea, select.input { width: 100%; font-family: var(--sans); font-size: .96rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: .72em .85em;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.input:focus, .textarea:focus, select.input:focus { outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-tint); }
.textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: .5em; font-size: .85rem; font-weight: 500;
  background: var(--white); border: 1px solid var(--line-2); border-radius: 100px; padding: .42em .8em; color: var(--ink-soft); }
.chip button { background: none; border: 0; color: var(--faint); display: inline-grid; place-items: center; padding: 0; }
.chip button:hover { color: var(--red); }
.chip--add { border-style: dashed; color: var(--blue); cursor: pointer; }
.chip--sortable { cursor: grab; }
.chip .rank { font-size: .7rem; font-weight: 700; color: var(--blue); background: var(--blue-tint); border-radius: 4px;
  width: 16px; height: 16px; display:grid; place-items:center; }

.checkrow { display: flex; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); margin-bottom: 10px; align-items: flex-start; }
.checkrow input[type=checkbox], .checkrow input[type=radio] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--blue); flex:none; }
.checkrow__t { display: block; font-size: .92rem; font-weight: 600; }
.checkrow__d { display: block; font-size: .84rem; color: var(--muted); margin-top: 2px; }
.checkrow.sel { border-color: var(--blue); background: var(--blue-tint); }

/* progress bar */
.progress { height: 4px; background: var(--paper-3); border-radius: 100px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue); border-radius: 100px; transition: width .35s var(--ease); }

/* ----------------------------------------------------- dashboard */
/* Contained app: grouped scrollspy TOC beside one column of panels. The record is the hero. */
.dash { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 44px; padding: 30px 28px 90px; }
@media (max-width: 900px) { .dash { display: block; padding: 0 0 70px; } }
.dash__side { align-self: start; position: sticky; top: 82px; }
.dash__side h6 { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin: 20px 10px 7px; }
.dnav { margin-top: 14px; }
.dnav-item { display: flex; align-items: center; gap: 9px; padding: 7px 12px; border-radius: var(--r-sm); color: var(--ink-soft);
  font-size: .89rem; font-weight: 500; cursor: pointer; }
.dnav-item:hover { background: var(--paper-2); color: var(--ink); }
.dnav-item.active { background: var(--blue-tint); color: var(--blue-700); font-weight: 600; }
.dnav-item--quiet { color: var(--muted); margin-top: 10px; }
.dnav-badge { margin-left: auto; padding: .05em .55em; }
@media (max-width: 900px) {
  /* the TOC collapses to a sticky horizontal strip below the appbar */
  .dash__side { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 10px 14px; }
  .dash__side .profilecard, .dash__side h6 { display: none; }
  .dnav { margin: 0; display: flex; gap: 6px; }
  .dnav-item { white-space: nowrap; padding: 7px 11px; }
  .dnav-item--quiet { margin-top: 0; }
  .dash__main { padding: 18px 20px 0; }
}

/* panels (anchored; scrollspy targets). dpanel: `.panel` belongs to the onboarding step flow. */
.dpanel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 26px; margin-bottom: 24px; scroll-margin-top: 84px; }
@media (max-width: 620px) { .dpanel { padding: 18px; } }
@media (max-width: 900px) { .dpanel { scroll-margin-top: 64px; } }
.dpanel__head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.dpanel__head h2 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.dpanel__sub { font-family: var(--sans); font-size: .92rem; font-weight: 600; margin: 0 0 10px; letter-spacing: 0; }

/* record-identity header */
.rec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.rec-head__name { font-size: clamp(1.75rem, 3vw, 2.25rem); letter-spacing: -.02em; margin: 6px 0 0; }
.rec-head__url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 0; }
.rec-head__url a.mono { font-size: .88rem; }
.rec-head__side { text-align: right; }
@media (max-width: 620px) { .rec-head__side { text-align: left; } }

/* pipeline status (the items-spec "progression bar") */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--white); }
.pb-seg { padding: 13px 15px; border-right: 1px solid var(--line); border-top: 3px solid var(--line-2); }
.pb-seg:last-child { border-right: 0; }
.pb-seg.done { border-top-color: #3a8a5b; }
.pb-seg.part { border-top-color: #c08a2e; }
.pb-label { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; }
.pb-seg.pend .pb-label { color: var(--muted); }
.pb-sub { font-size: .75rem; color: var(--muted); margin-top: 4px; line-height: 1.45; }
@media (max-width: 880px) {
  .pipeline { grid-template-columns: 1fr; }
  .pb-seg { border-right: 0; border-top: 0; border-bottom: 1px solid var(--line); border-left: 3px solid var(--line-2); }
  .pb-seg:last-child { border-bottom: 0; }
  .pb-seg.done { border-left-color: #3a8a5b; } .pb-seg.part { border-left-color: #c08a2e; }
}
.publine--todo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--ink-soft);
  background: var(--amber-tint); border: 1px solid #ecdfc1; border-radius: var(--r-sm); padding: 12px 14px; }

/* standard one-line panel explainer */
.dpanel__note { font-size: .85rem; color: var(--muted); margin: 0 0 12px; max-width: 72ch; }

.profilecard { display: flex; align-items: center; gap: 13px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 1.1rem; flex: none; }
.avatar--lg { width: 56px; height: 56px; font-size: 1.4rem; }

/* status / health */
.health { display: grid; gap: 12px; }
.health__row { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); }
.health__row .t { display: block; font-size: .92rem; font-weight: 600; }
.health__row .d { display: block; font-size: .82rem; color: var(--muted); margin-top: 1px; }

.statbar { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
@media (max-width: 700px){ .statbar { grid-template-columns: repeat(2,1fr);} }
.stat { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; background: var(--paper); display: flex; flex-direction: column; }
.stat .n { font-family: var(--serif); font-size: 1.85rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.stat .n .of { font-size: .55em; color: var(--muted); font-family: var(--sans); letter-spacing: 0; }
.stat .n--sm { font-size: 1.3rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .8rem; font-weight: 600; color: var(--ink-soft); margin-top: 4px; }
.stat .s { font-size: .74rem; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.trend--up { color: #2f6b46; font-weight: 600; } .trend--down { color: #8f2f2f; font-weight: 600; } .trend--flat { color: var(--muted); }

/* diff */
.diff { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--white); }
.diff__head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--paper); flex-wrap: wrap; }
.diff__body { padding: 6px 0; font-family: var(--mono); font-size: .82rem; line-height: 1.7; }
.diff__line { padding: 1px 18px; white-space: pre-wrap; }
.diff__line.add { background: #ecf5ef; color: #245038; }
.diff__line.del { background: #f8ecea; color: #7a3b34; text-decoration: none; }
.diff__line.add::before { content: "+ "; color: #3a8a5b; }
.diff__line.del::before { content: "− "; color: #b3493f; }

/* dashboard: plain-words verdicts, copy line, key-value list, copy cards */
.faint { color: var(--faint); }
.vword { font-weight: 600; font-size: .88rem; }
.v-yes { color: var(--green); } .v-part { color: var(--amber); } .v-no { color: var(--red); } .v-na { color: var(--faint); font-weight: 500; }
.copyline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copyline code { font-family: var(--mono); font-size: .82rem; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: .45em .7em; color: var(--ink-soft); word-break: break-all; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 18px; margin: 0; font-size: .9rem; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; } }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--ink-soft); }
.copycard { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); padding: 16px 18px; }
.copycard blockquote { margin: 10px 0; padding: 10px 12px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-sm); font-size: .78rem; line-height: 1.55; color: var(--ink-soft); word-break: break-word; }
.btn--danger { background: var(--white); color: var(--red); border-color: #e0c4be; }
.btn--danger:hover { border-color: var(--red); color: var(--red); box-shadow: var(--shadow-sm); }
/* dashboard: SVG trend chart (no chart library) */
.chart { width: 100%; height: 200px; display: block; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .axis--mid { stroke-dasharray: 3 4; opacity: .55; }
.chart .ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .ln--blue { stroke: var(--blue); }
.chart .ln--gold { stroke: #b08a2e; }
.chart .pt--blue { fill: var(--blue); }
.chart .pt--gold { fill: #b08a2e; }
.chart .ylab { font: 9px var(--mono); fill: var(--faint); text-anchor: end; }
.chart-legend { display: flex; gap: 16px; font-size: .78rem; color: var(--muted); }
.chart-legend .sw { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.sw--blue { background: var(--blue); } .sw--gold { background: #b08a2e; }
/* dashboard: direct editor */
.editbox { border: 1px solid var(--line); border-radius: var(--r); background: var(--white); padding: 0 16px; }
.editbox > summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: .92rem; color: var(--blue); list-style: none; }
.editbox > summary::-webkit-details-marker { display: none; }
.editbox[open] { padding-bottom: 16px; }
.editbox[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.editbox .field { margin-bottom: 12px; }
/* onboarding: plan picker at payment */
.plan-picker { display: grid; gap: 10px; }
.planopt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--white); }
.planopt:hover { border-color: var(--line-2); }
.planopt.sel { border-color: var(--blue); background: var(--blue-tint); }
.planopt input { width: 16px; height: 16px; accent-color: var(--blue); flex: none; }
.planopt__main { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.planopt__name { font-weight: 600; }
.planopt__desc { font-size: .85rem; color: var(--muted); }
.planopt__meta { font-size: .74rem; color: var(--faint); text-transform: capitalize; }
.planopt__price { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; white-space: nowrap; }
.planopt__per { font-size: .8rem; color: var(--muted); font-family: var(--sans); }
.diff__line.ctx { color: var(--muted); } .diff__line.ctx::before { content: "  "; }
.diff__actions { display: flex; gap: 8px; }

/* dashboard: data tables (model tests, links, seeds) */
.rtable { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: auto; background: var(--white); }
.rtable table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 620px; }
.rtable th { text-align: left; padding: 11px 14px; font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted); background: var(--paper); border-bottom: 1px solid var(--line); white-space: nowrap; }
.rtable td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.rtable tbody tr:first-child td { border-top: 0; }
.rtable tbody tr:hover { background: var(--paper); }
.rtable .num { font-family: var(--mono); font-size: .86rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.stack-xs > * + * { margin-top: 6px; }
.morebtn { display: block; width: 100%; margin-top: 10px; padding: .6em; border: 1px dashed var(--line-2); border-radius: var(--r-sm);
  background: none; color: var(--muted); font-size: .82rem; font-weight: 550; }
.morebtn:hover { color: var(--blue); border-color: var(--blue-tint-2); background: var(--blue-tint); }
/* show-more row inside a table body */
.rtable .morebtn { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .7em; }
button.chip { cursor: pointer; }
button.chip--add:hover { border-color: var(--blue); }

/* dashboard: seeded references — one bracket per platform, the draft shown as that platform's post */
.seedgroup { margin-top: 24px; }
.seedgroup + .seedgroup { margin-top: 30px; }
.seedgroup__head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; }
.seedgroup__label { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 9px; }
.seedgroup__label::before { content: ""; width: 16px; height: 1px; background: var(--blue); opacity: .55; }
.seedgroup__note { font-size: .78rem; color: var(--muted); }

.seed { padding: 18px 0; border-top: 1px solid var(--line); }
.seedgroup__head + .seed { border-top: 0; padding-top: 14px; }
.seed__top { display: flex; align-items: center; justify-content: space-between; gap: 5px 14px; flex-wrap: wrap; }
.seed__id { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.seed__src { font-size: .92rem; font-weight: 600; color: var(--ink); }
.seed__angle { font-size: .77rem; color: var(--muted); }
.seed__status { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.seed__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 11px; }
.seed__meta { font-size: .76rem; color: var(--muted); }
.seed__manage { margin-left: auto; }
.brandmark { vertical-align: middle; flex: none; }

/* the branded post preview — recreates the platform's posting UI with our brand as the author */
.post { border: 1px solid var(--line); border-top: 2px solid var(--brand, var(--line-2)); border-radius: 12px;
  background: var(--white); padding: 13px 15px; margin-top: 11px; }
.post__head { display: flex; align-items: center; gap: 10px; }
.post__av { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: none; }
.post__av svg { width: 100%; height: 100%; display: block; }
.post__av--initials { background: var(--blue); color: #fff; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: .92rem; }
.post__who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.post__name { font-weight: 700; font-size: .9rem; color: var(--ink); }
.post__handle { font-size: .77rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post__logo { flex: none; line-height: 0; }
.post__body { font-size: .92rem; line-height: 1.6; color: var(--ink); margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post__body a { color: var(--brand, var(--blue)); text-decoration: underline; text-underline-offset: 2px; }
.post__bar { display: flex; gap: 34px; margin-top: 13px; }
.post__bar svg { width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* article style (WordPress, Reddit): context line + serif title + body */
.post--article .post__ctx { display: flex; align-items: center; gap: 7px; font-size: .75rem; color: var(--muted); font-weight: 600; }
.post__title { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; line-height: 1.3; margin: 8px 0 0; color: var(--ink); }
.post--article .post__body { margin-top: 8px; color: var(--ink-soft); }
.post__body--clamp { max-height: 4.5em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg,#000 60%,transparent); mask-image: linear-gradient(180deg,#000 60%,transparent); }
.post--empty { border-style: dashed; border-top-color: var(--line); color: var(--muted); font-size: .88rem; }

/* the action popup (native <dialog>) — every option for the post, off the main list */
.seedmodal { border: none; border-radius: 14px; padding: 0; width: min(460px, calc(100vw - 32px));
  background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px rgba(20,25,35,.3); }
.seedmodal::backdrop { background: rgba(26,25,22,.44); backdrop-filter: blur(2px); }
.seedmodal__inner { padding: 17px 19px 19px; }
.seedmodal__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.seedmodal__x { background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.seedmodal__x:hover { color: var(--ink); }
.seedmodal__scroll { max-height: 48vh; overflow: auto; margin-top: 2px; }
.seedmodal__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.regen { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.regen > summary { cursor: pointer; font-size: .84rem; font-weight: 600; color: var(--blue); list-style: none; }
.regen > summary::-webkit-details-marker { display: none; }
.regen > summary::before { content: "\21BB  "; }
.regen__body { margin-top: 10px; }
.regen__body .textarea { width: 100%; font-size: .86rem; }
/* post history: earlier posts on a platform */
.seedhist { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 11px; }
.seedhist > summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--ink-soft); list-style: none; }
.seedhist > summary::-webkit-details-marker { display: none; }
.seedhist > summary::before { content: "\2192  "; color: var(--muted); }
.seedhist[open] > summary::before { content: "\2193  "; }
.seedhist__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.seedhist__list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.seedhist__t { font-size: .86rem; color: var(--ink-soft); }

/* inline expand/collapse for a clamped post body (no JS) */
.post__exp { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.post__exp:checked ~ .post__body--clamp { max-height: 80em; -webkit-mask-image: none; mask-image: none; }
.post__more { display: inline-block; margin-top: 9px; font-size: .8rem; font-weight: 600; color: var(--blue); cursor: pointer; }
.post__more:hover { color: var(--blue-700); }
.post__more::after { content: "Read full draft \2192"; }
.post__exp:checked ~ .post__more::after { content: "Collapse \2191"; }

/* a "needs review"-style alert for a section (seed approvals, pointers to place) */
.seedalert { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-soft);
  background: var(--amber-tint); border: 1px solid #ecdfc1; border-radius: var(--r-sm); padding: 11px 14px; margin: 4px 0 2px; }
.seedalert--info { background: var(--blue-tint); border-color: var(--blue-tint-2); }
.seedalert b { font-weight: 600; }
.seedalert__x { margin-left: auto; appearance: none; border: 0; background: none; color: var(--muted); font-size: 1.2rem; line-height: 1; padding: 0 4px; cursor: pointer; border-radius: 4px; }
.seedalert__x:hover { background: rgba(0,0,0,.06); color: var(--ink); }

/* seeded references / pointers: first bracket hugs the heading; self-post action row */
.seedgroup > .seed:first-child { border-top: 0; padding-top: 8px; }
.selfcard__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; }
.seed__posted { font-size: .8rem; font-weight: 600; color: var(--green); display: inline-flex; align-items: center; }

.tag--red { background: var(--red-tint); color: var(--red); border-color: #e8cfc9; }

/* dashboard: search-term / directive editors */
.addrow { display: flex; gap: 8px; }
.addrow .input { flex: 1; min-width: 0; }
.dirrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--white); padding: 9px 12px; font-size: .88rem; color: var(--ink-soft); }
.dirrow button { background: none; border: 0; color: var(--faint); font-size: 1rem; line-height: 1; padding: 2px; flex: none; }
.dirrow button:hover { color: var(--red); }

/* dashboard: plan switch confirm bar */
.confirmbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border: 1px solid #ecdfc1; background: var(--amber-tint); border-radius: var(--r-sm); padding: 12px 14px; }


/* dashboard: version trail (record history) */
.vrow { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 2px; border-top: 1px solid var(--line); }
.vlist .vrow:first-child { border-top: 0; padding-top: 2px; }
.vrow__v { font-size: .8rem; color: var(--blue-700); font-weight: 600; }
.vrow__body { min-width: 0; }
.vrow__body .d { display: block; font-size: .8rem; color: var(--muted); margin-top: 1px; }
.vrow__when { font-variant-numeric: tabular-nums; }
.vrow--new .vrow__v { color: var(--blue); }
@media (max-width: 560px) { .vrow { grid-template-columns: 40px 1fr; } .vrow__when { grid-column: 2; } }

/* dashboard: compact run-history rows */
.runrow { display: grid; grid-template-columns: 92px 1fr auto auto; gap: 14px; align-items: baseline; padding: 7px 2px;
  border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.runlist .runrow:first-child { border-top: 0; }
.runrow .v-yes, .runrow .v-part, .runrow .v-no { font-weight: 600; }

/* dashboard: field-grouped diff */
.diff__fields { padding: 6px 18px 12px; }
.fd { display: grid; grid-template-columns: 110px 1fr; gap: 4px 16px; padding: 9px 0; border-top: 1px solid var(--line); align-items: baseline; }
.fd:first-child { border-top: 0; }
.fd__field { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.fd__vals { min-width: 0; font-size: .86rem; line-height: 1.55; }
.fd__old, .fd__new { padding: 4px 10px; border-radius: 5px; margin: 2px 0; }
.fd__old { background: #f8ecea; color: #7a3b34; }
.fd__new { background: #ecf5ef; color: #245038; }
.fd__old::before { content: "− "; font-weight: 600; }
.fd__new::before { content: "+ "; font-weight: 600; }
.fd__old b { background: #f0d4cd; border-radius: 3px; padding: 0 .15em; font-weight: 600; }
.fd__new b { background: #cfe6d6; border-radius: 3px; padding: 0 .15em; font-weight: 600; }
/* line-by-line review picker: a per-change accept/reject segmented control */
.fd--pick { grid-template-columns: 110px 1fr auto; }
.fd__pick { display: inline-flex; align-self: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.fd__pick .pickbtn { appearance: none; border: 0; background: var(--white); color: var(--muted); font: inherit; font-size: .76rem; padding: 4px 11px; cursor: pointer; line-height: 1.45; }
.fd__pick .pickbtn + .pickbtn { border-left: 1px solid var(--line); }
.fd__pick .pickbtn--yes.is-on { background: #ecf5ef; color: #245038; font-weight: 600; }
.fd__pick .pickbtn--no.is-on { background: #f8ecea; color: #7a3b34; font-weight: 600; }
.fd[data-state="reject"] .fd__vals { opacity: .45; }
@media (max-width: 620px) { .fd, .fd--pick { grid-template-columns: 1fr; gap: 2px; } .fd__pick { justify-self: start; margin-top: 4px; } }

/* dashboard: model-test table cells */
.syscell { display: flex; flex-direction: column; gap: 2px; }
.syscell .tiny { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.testtable { min-width: 680px; }
.testtable .notecell { max-width: 170px; line-height: 1.4; }

/* copy box */
.copybox { display: flex; gap: 10px; align-items: stretch; }
.copybox code { flex: 1; font-family: var(--mono); font-size: .82rem; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 11px 13px; color: var(--ink-soft); overflow:auto; white-space: pre-wrap; word-break: break-all; }
.copybtn { display:inline-flex; align-items:center; gap:.4em; }

/* ------------------------------------------------------ canonical doc */
.canon-wrap { max-width: 820px; margin: 0 auto; }
.canon-banner { background: var(--blue-900); color: #d8e2f7; font-size: .82rem; padding: 9px 0; text-align:center; }
.canon-banner a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.canon-doc { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 50px 56px; box-shadow: var(--shadow); }
@media (max-width: 620px){ .canon-doc { padding: 32px 24px; } }
.canon-doc h1 { font-size: 2.2rem; letter-spacing: -.02em; }
.canon-doc .role { font-size: 1.05rem; color: var(--ink-soft); margin-top: 4px; }
.canon-doc h2 { font-size: 1.15rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0; text-transform: uppercase;
  font-size: .8rem; letter-spacing: .12em; color: var(--blue); margin: 34px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.canon-doc dl { display: grid; grid-template-columns: 168px 1fr; gap: 10px 20px; margin: 0; }
@media (max-width: 560px){ .canon-doc dl { grid-template-columns: 1fr; gap: 2px 0; } .canon-doc dd { margin-bottom: 10px; } }
.canon-doc dt { font-weight: 600; color: var(--ink); font-size: .94rem; }
.canon-doc dd { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.canon-doc ul.clean { padding-left: 1.1rem; color: var(--ink-soft); }
.canon-doc ul.clean li { margin-bottom: 6px; }
.primary-ref { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1.5px solid var(--blue-tint-2);
  background: var(--blue-tint); border-radius: var(--r); margin: 8px 0; }
.primary-ref svg { color: var(--blue); width: 22px; flex: none; }
.primary-ref a { font-weight: 600; }
.sameas { display: flex; flex-wrap: wrap; gap: 8px; }
.sameas a { font-size: .85rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: 100px; padding: .35em .8em; color: var(--ink-soft); }
.sameas a:hover { border-color: var(--blue); color: var(--blue); }

/* code / schema block */
.codeblock { background: #16181d; border-radius: var(--r); overflow: hidden; border: 1px solid #24262d; }
.codeblock__bar { display:flex; align-items:center; gap:8px; padding: 10px 14px; border-bottom: 1px solid #24262d; }
.codeblock__bar .fname { font-family: var(--mono); font-size: .78rem; color: #9aa0ad; }
.codeblock pre { margin: 0; padding: 16px 18px; overflow: auto; font-family: var(--mono); font-size: .78rem; line-height: 1.65; color: #c8cdd6; }
.codeblock .k { color: #7fb0ff; } .codeblock .s { color: #9ece9a; } .codeblock .p { color: #d7a87a; } .codeblock .c { color: #6b7280; }

/* ---------------------------------------------------------- auth */
.auth-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 40px 20px; background:
  radial-gradient(120% 80% at 50% -10%, var(--blue-tint) 0%, var(--paper) 46%); }
.auth-card { width: 100%; max-width: 412px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 36px 34px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.7rem; text-align: center; }
.auth-sub { text-align: center; color: var(--muted); font-size: .92rem; margin: 6px 0 26px; }
.oauth-btn { display:flex; align-items:center; justify-content:center; gap: 10px; width: 100%; padding: .78em; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); background: var(--white); font-weight: 550; font-size: .92rem; color: var(--ink); transition: all .15s var(--ease); }
.oauth-btn:hover { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.oauth-btn svg, .oauth-btn img { width: 18px; height: 18px; }
.or-sep { display:flex; align-items:center; gap: 12px; color: var(--faint); font-size: .78rem; margin: 18px 0; }
.or-sep::before, .or-sep::after { content:""; height:1px; background: var(--line); flex:1; }

/* fake stripe */
.checkout { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 760px){ .checkout { grid-template-columns: 1fr; } }
.checkout__summary { background: var(--paper); padding: 32px; border-right: 1px solid var(--line); }
@media (max-width: 760px){ .checkout__summary { border-right: 0; border-bottom: 1px solid var(--line); } }
.checkout__form { padding: 32px; background: var(--white); }
.card-input { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: .72em .85em; display:flex; align-items:center; gap:10px; background:#fff; }
.card-input .ph { color: var(--faint); font-size: .92rem; }
.card-brands { display:flex; gap:5px; margin-left:auto; }
.card-brands span { width: 28px; height: 18px; border-radius: 3px; border: 1px solid var(--line); background: var(--paper-2); }
.line-item { display:flex; justify-content:space-between; padding: 9px 0; font-size: .92rem; color: var(--ink-soft); }
.line-item.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-weight: 600; color: var(--ink); font-size: 1.02rem; }
.lock-note { display:flex; align-items:center; justify-content:center; gap:6px; color: var(--muted); font-size:.78rem; margin-top:16px; }
.lock-note svg { width: 13px; height:13px; }

/* success */
.success-check { width: 66px; height: 66px; border-radius: 50%; background: var(--green-tint); color: var(--green);
  display:grid; place-items:center; margin: 0 auto 22px; }
.success-check svg { width: 32px; }

/* misc utilities */
.flex { display:flex; } .between { justify-content: space-between; } .items-center { align-items:center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .wrap { flex-wrap: wrap; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.maxw-60 { max-width: 60ch; } .maxw-50 { max-width: 50ch; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff;
  padding: .7em 1.1em; border-radius: var(--r-sm); font-size: .88rem; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0;
  pointer-events: none; transition: all .25s var(--ease); z-index: 100; display:flex; align-items:center; gap:.5em; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 15px; color: #7fd6a0; }

.banner-demo { background: var(--blue-900); color: #dbe4f7; font-size: .82rem; text-align:center; padding: 8px 16px; }
.banner-demo b { color:#fff; } .banner-demo a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* spinner */
.spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%;
  display: inline-block; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-reveal="2"] { transition-delay: .08s; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }
