/* =========================================================================
   Lodestar — 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:        #fbfbf8;
  --paper-2:      #f4f3ee;
  --paper-3:      #efeee7;
  --white:        #ffffff;
  --ink:          #17181b;
  --ink-soft:     #3b3d44;
  --muted:        #6c6f78;
  --faint:        #9a9ca3;
  --line:         #e6e4da;
  --line-2:       #d8d6c9;
  --line-strong:  #c9c7b8;

  --blue:         #1f3a8a;   /* ink blue — primary accent */
  --blue-700:     #1a3072;
  --blue-900:     #14245a;
  --blue-tint:    #eef2fb;
  --blue-tint-2:  #e3eaf7;

  /* 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; }
.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); transform: translateY(-1px); }
.btn--secondary { background: var(--white); color: var(--ink); border-color: var(--line-2); }
.btn--secondary:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); 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); transform: translateY(-2px); }
.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(31,58,138,.14); }
.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; color: var(--blue); flex: none; }
.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; }

/* 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; }
.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; }

.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); }

/* ----------------------------------------------------- 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__bill { color: var(--faint); font-size: .8rem; margin-bottom: 22px; }
.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; 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; } }
.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 { font-size: .92rem; font-weight: 600; }
.checkrow__d { 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); }

/* prefilled note */
.prefill { display: flex; gap: 10px; align-items: flex-start; background: var(--blue-tint); border: 1px solid var(--blue-tint-2);
  border-radius: var(--r-sm); padding: 12px 15px; font-size: .86rem; color: var(--blue-900); margin-bottom: 24px; }
.prefill svg { width: 17px; height: 17px; color: var(--blue); flex: none; margin-top: 1px; }

/* ----------------------------------------------------- dashboard */
.dash { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 66px); }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.dash__side { border-right: 1px solid var(--line); padding: 26px 18px; background: var(--paper); }
@media (max-width: 900px) { .dash__side { border-right: 0; border-bottom: 1px solid var(--line); } }
.dash__side h6 { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin: 22px 10px 8px; }
.dnav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink-soft);
  font-size: .9rem; font-weight: 500; cursor: pointer; }
.dnav-item svg, .dnav-item .ico { width: 17px; }
.dnav-item:hover { background: var(--paper-2); color: var(--ink); }
.dnav-item.active { background: var(--blue-tint); color: var(--blue-700); font-weight: 600; }
.dash__main { padding: 34px 38px; max-width: 1000px; }
@media (max-width: 620px) { .dash__main { padding: 24px 20px; } }
.dash__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.dview { display: none; } .dview.active { display: block; animation: fade .25s var(--ease); }

.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: 14px; }
@media (max-width: 700px){ .statbar { grid-template-columns: repeat(2,1fr);} }
.stat { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--white); }
.stat .n { font-family: var(--serif); font-size: 2rem; font-weight: 500; letter-spacing: -.02em; line-height: 1; }
.stat .l { font-size: .8rem; color: var(--muted); margin-top: 7px; }
.stat .trend { font-size: .76rem; font-weight: 600; margin-top: 6px; display:inline-flex; align-items:center; gap:3px; }
.trend--up { color: #2f6b46; } .trend--down { color: #8f2f2f; } .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; }
.diff__line.ctx { color: var(--muted); } .diff__line.ctx::before { content: "  "; }
.diff__actions { display: flex; gap: 8px; }

/* report-issue / generic list rows */
.listrow { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; padding: 17px 18px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--white); margin-bottom: 10px; }
.listrow .t { font-size: .94rem; font-weight: 600; }
.listrow .d { font-size: .86rem; color: var(--muted); margin-top: 2px; }
.listrow.col { grid-template-columns: 1fr; }

/* 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; } }
