/*
 * Static marketing and editorial pages. Deliberately independent of the app
 * bundle so public content stays small, crawlable and fast. Colours follow the
 * landing page and respect the visitor's system theme.
 */
:root {
  color-scheme: dark;
  --bg: #07080d;
  --bg-soft: #0b0d14;
  --panel: #10131c;
  --panel-2: #161a26;
  --ink: #f3f4f8;
  --ink-2: #c3c8d6;
  --muted: #9aa1b4;
  --line: rgb(255 255 255 / .09);
  --line-2: rgb(255 255 255 / .17);
  --brand: #a99bff;
  --brand-strong: #8d7eff;
  --gold: #d9b77c;
  --green: #6fd8a8;
  --cta: #f3f2fb;
  --cta-ink: #0d0f17;
  --shadow: 0 24px 70px rgb(0 0 0 / .35);
  --spectrum: linear-gradient(90deg, #8d7eff, #60a8ff, #46cd9c, #cda85f, #e58a5c, #f07fa8);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 16px;
  --wrap: 1120px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f7f5f0;
    --bg-soft: #f1eee6;
    --panel: #ffffff;
    --panel-2: #f4f1ea;
    --ink: #151821;
    --ink-2: #3d4252;
    --muted: #646a7b;
    --line: rgb(27 30 42 / .1);
    --line-2: rgb(27 30 42 / .18);
    --brand: #5c42d6;
    --brand-strong: #4a32c0;
    --gold: #9a7428;
    --green: #237a55;
    --cta: #151821;
    --cta-ink: #ffffff;
    --shadow: 0 24px 70px rgb(48 38 20 / .13);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.015em;
  text-wrap: balance;
}

p { margin: 0 0 16px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 22px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--cta);
  color: var(--cta-ink);
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.head-row {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand img { border-radius: 8px; }

.desk-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}
.desk-nav a {
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
}
.desk-nav a:hover { color: var(--ink); background: var(--panel); }

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.signin {
  color: var(--ink-2);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 6px;
}
.signin:hover { color: var(--ink); }

.mobile-nav { display: none; position: relative; }
.mobile-nav summary {
  list-style: none;
  cursor: pointer;
  padding: 9px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  user-select: none;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav > div {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(280px, calc(100vw - 44px));
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.mobile-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: .95rem;
}
.mobile-nav a:hover { background: var(--panel-2); color: var(--ink); }

/* Buttons and links */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--cta);
  color: var(--cta-ink);
  text-decoration: none;
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .16s ease, opacity .16s ease, border-color .16s ease;
}
.button:hover { opacity: .9; transform: translateY(-1px); }
.button.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.button.ghost:hover { border-color: var(--brand); }
.button.small { min-height: 36px; padding: 0 15px; font-size: .86rem; }

.text-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 58px;
  background:
    radial-gradient(900px 420px at 12% -10%, rgb(141 126 255 / .2), transparent 65%),
    radial-gradient(700px 380px at 92% 10%, rgb(205 168 95 / .12), transparent 62%),
    var(--bg);
}
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--spectrum);
  opacity: .55;
}
.hero-inner { max-width: 960px; }

.crumbs { margin-bottom: 26px; }
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .8rem;
  color: var(--muted);
}
.crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line-2);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero h1 {
  max-width: 20ch;
  margin-bottom: 20px;
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.025em;
}

.lede {
  max-width: 68ch;
  margin-bottom: 26px;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}

.article-meta {
  margin: -8px 0 22px;
  color: var(--muted);
  font-size: .86rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: .84rem;
}

/* Content */
.content { padding-bottom: 18px; }

.section {
  padding: 44px 0;
  border-top: 1px solid var(--line);
}
.content > .section:first-child { border-top: 0; padding-top: 30px; }

.section h2 {
  margin-bottom: 18px;
  font-size: clamp(1.65rem, 2.8vw, 2.25rem);
}

.section > p,
.section > .ticks,
.section > .steps,
.section > .table-wrap,
.section > .card-grid {
  max-width: 860px;
}
.section > p { color: var(--ink-2); }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 14px;
  margin-top: 6px;
}
.card {
  padding: 21px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card h3 {
  margin-bottom: 8px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.6;
}

/* Lists */
.ticks,
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ticks { display: grid; gap: 10px; }
.ticks li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-2);
}
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 700;
}

.steps { display: grid; gap: 0; margin-top: 4px; }
.steps li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 0; }
.steps li > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  color: var(--brand);
  font-family: var(--mono);
  font-size: .84rem;
  font-weight: 600;
}
.steps h3 {
  margin: 3px 0 5px;
  font-family: var(--sans);
  font-size: .98rem;
  font-weight: 650;
  letter-spacing: -.01em;
}
.steps p { margin: 0; color: var(--muted); font-size: .93rem; }

/* Tables */
.table-wrap {
  margin: 20px 0 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  font-size: .92rem;
}
th, td {
  padding: 13px 15px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
th {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-2);
  white-space: nowrap;
}
td { color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 550; }
tbody tr:last-child td { border-bottom: 0; }

/* Notes and FAQs */
.note {
  max-width: 860px;
  margin: 20px 0 0;
  padding: 16px 18px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: var(--panel);
  color: var(--ink-2);
  font-size: .94rem;
}

.faq-section { max-width: 860px; }
.faqs { border-top: 1px solid var(--line); }
.faqs details { border-bottom: 1px solid var(--line); }
.faqs summary {
  position: relative;
  padding: 18px 34px 18px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
}
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 14px;
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}
.faqs details[open] summary::after { content: "−"; }
.faqs details p {
  max-width: 72ch;
  padding: 0 10px 20px 0;
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

/* Related pages */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease;
}
.related-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.related-card span {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}
.related-card strong {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.2;
}
.related-card em {
  color: var(--muted);
  font-size: .9rem;
  font-style: normal;
  line-height: 1.55;
}

/* Pricing */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.plan.featured {
  border-color: var(--brand);
  background: var(--panel-2);
  box-shadow: var(--shadow);
}
.plan h3 {
  font-family: var(--sans);
  font-size: .84rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.plan .price {
  margin: 10px 0 2px;
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
}
.plan .plan-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  line-height: 1.5;
}
.plan > p:not(.price, .plan-note) { color: var(--ink-2); font-size: .93rem; }
.plan .ticks { margin: 4px 0 20px; }
.plan .ticks li { font-size: .9rem; }
.plan .button { margin-top: auto; }

/* CTA */
.cta-band {
  margin-top: 56px;
  padding: 54px 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(700px 320px at 8% 0%, rgb(141 126 255 / .14), transparent 65%),
    var(--bg-soft);
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.cta-inner h2 { margin-bottom: 8px; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.cta-inner p:not(.eyebrow) { margin: 0; max-width: 56ch; color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Footer */
.site-foot {
  padding: 54px 0 24px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 36px;
}
.foot-brand p {
  max-width: 34ch;
  margin: 14px 0 16px;
  color: var(--muted);
  font-size: .9rem;
}
.foot-grid h2 {
  margin: 4px 0 12px;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot-grid a:not(.brand) {
  display: block;
  padding: 4px 0;
  color: var(--ink-2);
  text-decoration: none;
  font-size: .9rem;
}
.foot-grid a:not(.brand):hover { color: var(--brand); }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

/* Responsive */
@media (max-width: 940px) {
  .desk-nav { display: none; }
  .mobile-nav { display: block; margin-left: auto; }
  .head-actions { margin-left: 0; }
  .head-actions .signin { display: none; }
  .foot-grid { grid-template-columns: 1.6fr 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .hero { padding: 44px 0 42px; }
  .hero h1 { max-width: none; }
  .section { padding: 34px 0; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  .head-row { gap: 12px; min-height: 62px; }
  .head-actions .button.small { padding: 0 12px; }
  .hero-actions .button { width: 100%; }
  .plan-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-base { flex-direction: column; }
  .steps li { grid-template-columns: 32px 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-head, .site-foot, .cta-band, .hero-actions, .related-section, .skip { display: none !important; }
  body { background: #fff; color: #111; }
  .hero, .cta-band, .site-foot { background: #fff; }
  .hero::after { display: none; }
  .lede, .section > p, .card p, .steps p, .note, td { color: #222; }
  .card, .plan, .table-wrap, .related-card { background: #fff; border-color: #bbb; }
  a { color: #111; }
}

/* ---- Additions: navigation state, article contents, grouped hubs, footer ---- */
.desk-nav a[aria-current="page"] { color: var(--ink); background: var(--panel); }
.mobile-nav a[aria-current="page"] { color: var(--brand); }

.foot-grid { grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); }
.foot-grid > div { min-width: 0; }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { color: var(--brand); }

.toc {
  max-width: 760px;
  margin: 8px 0 8px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.toc h2 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 32px; }
.toc li { margin: 0 0 6px; break-inside: avoid; color: var(--muted); }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }

.hub-group + .hub-group { padding-top: 8px; }
.section { scroll-margin-top: 84px; }

@media (max-width: 940px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .toc ol { columns: 1; }
}
@media (max-width: 420px) {
  .foot-grid { grid-template-columns: 1fr; }
}
@media print {
  .toc { display: none; }
}
