/* Champ — getchamp.net
   Warm editorial. Ink on cream, one ember accent, Champ blue reserved for
   product UI inside the mockups so they read as the real app. */

:root {
  /* Palette taken from the app itself, not invented for the site:
     --accent  #4256AC  dashboard $primary (app/assets/stylesheets/dashboard.css)
     --champ   #156EF5  storefront header/primary default (ACCESSIBLE_COLOUR_DEFAULTS)
     --link    #0071EB  storefront body_link_color default
     greys     #1A1A1A / #303030 / #616161 / #E3E3E3 from dashboard_shell.css */
  --paper:      #FAFAFB;
  --paper-2:    #F1F2F4;
  --card:       #FFFFFF;
  --ink:        #1A1A1A;
  --ink-2:      #303030;
  --muted:      #616161;
  --rule:       #E3E3E3;
  --rule-soft:  #EDEEF0;
  --accent:     #4256AC;
  --accent-ink: #34448A;
  --champ:      #156EF5;
  --champ-deep: #0071EB;
  --good:       #1E7E34;

  --shadow-sm: 0 1px 2px rgba(26, 26, 26, .06), 0 2px 8px rgba(26, 26, 26, .04);
  --shadow-md: 0 2px 4px rgba(26, 26, 26, .06), 0 12px 32px rgba(26, 26, 26, .09);

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(1rem, 5vw, 2.5rem);
  --wide: 1140px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #16171B;
    --paper-2:   #1D1F24;
    --card:      #202228;
    --ink:       #F4F5F7;
    --ink-2:     #DDE0E5;
    --muted:     #9DA3AE;
    --rule:      #2E3138;
    --rule-soft: #23262B;
    --accent:    #8FA0E8;
    --accent-ink:#A9B6F0;
    --champ:     #6BA3FF;
    --champ-deep:#8FBAFF;
    --good:      #5DC07F;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.45);
    --shadow-md: 0 12px 32px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --paper: #16171B; --paper-2: #1D1F24; --card: #202228;
  --ink: #F4F5F7; --ink-2: #DDE0E5; --muted: #9DA3AE;
  --rule: #2E3138; --rule-soft: #23262B;
  --accent: #8FA0E8; --accent-ink: #A9B6F0;
  --champ: #6BA3FF; --champ-deep: #8FBAFF; --good: #5DC07F;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.45);
  --shadow-md: 0 12px 32px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 40;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); letter-spacing: -.01em; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 650; letter-spacing: 0; }

p { margin: 0 0 1.15em; text-wrap: pretty; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
strong { font-weight: 650; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }
img, svg { max-width: 100%; height: auto; }

code {
  font-family: var(--mono); font-size: .875em;
  background: var(--paper-2); border: 1px solid var(--rule-soft);
  padding: .1em .35em; border-radius: 4px; word-break: break-word;
}
pre {
  font-family: var(--mono); font-size: .85rem; line-height: 1.6;
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 10px; padding: 1rem 1.15rem; overflow-x: auto; min-width: 0;
  margin: 0 0 1.5rem;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

/* ---------- Layout ---------- */

.wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }
/* A fixed rem measure rather than `ch`: `ch` depends on whichever font has
   actually loaded at layout time, so the column width moved around. */
.prose { max-width: 42rem; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 100; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

:where(a, button, summary, input):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px;
}

/* ---------- Masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.masthead__in { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand__logo { display: block; width: auto; }
.brand__logo--dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__logo--light { display: none; }
  :root:not([data-theme="light"]) .brand__logo--dark { display: block; }
}
:root[data-theme="dark"] .brand__logo--light { display: none; }
:root[data-theme="dark"] .brand__logo--dark { display: block; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) {
  color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding-block: .35rem; border-bottom: 1.5px solid transparent;
}
.nav a:not(.btn):hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav a:not(.btn)[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 720px) {
  .masthead__in { height: auto; flex-wrap: wrap; padding-block: .75rem; gap: .5rem 1rem; }
  .nav { margin-left: 0; width: 100%; gap: 1.1rem; overflow-x: auto; padding-bottom: .25rem; }
  .nav .btn { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 .95rem/1 var(--sans); letter-spacing: .005em;
  padding: .82rem 1.35rem; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-sm); }
.btn--primary:hover { color: var(--paper); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--sm { padding: .55rem 1rem; font-size: .875rem; }

/* ---------- Hero ---------- */

.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2rem, 5vw, 3.5rem); }
/* minmax(0,1fr), not 1fr: a `1fr` track floors at the content's min-width, so
   a <pre> of long URLs widened the whole page on phones instead of
   scrolling inside its own box. */
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.eyebrow {
  font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); display: flex; align-items: center; gap: .6rem; margin-bottom: 1.4rem;
}
.eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--rule); max-width: 120px; }
.hero h1 em {
  /* Inline + cloned decoration so the marker band is drawn per line fragment;
     as a block the gradient spans the whole box and only marks the last line. */
  font-style: normal; display: inline;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background-image: linear-gradient(
    transparent 62%,
    color-mix(in srgb, var(--champ) 20%, transparent) 62%,
    color-mix(in srgb, var(--champ) 20%, transparent) 88%,
    transparent 88%);
  background-repeat: no-repeat; background-size: 100% 100%; width: fit-content;
  padding-inline: .12em; margin-inline: -.12em;
}
.lede { font-size: clamp(1.1rem, 2vw, 1.28rem); color: var(--ink-2); max-width: 46ch; line-height: 1.55; }
.cta-row { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; margin-top: 2rem; }
.cta-note { font-size: .875rem; color: var(--muted); margin: 1rem 0 0; }

/* ---------- Sections ---------- */

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--tint { background: var(--paper-2); border-block: 1px solid var(--rule-soft); }
.section__head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head p { color: var(--muted); font-size: 1.08rem; margin-bottom: 0; }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 268px), 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px;
  padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .45rem; font-size: 1.22rem; }
.card p { color: var(--muted); font-size: .96rem; margin-bottom: 0; }
.card__num {
  font: 600 .75rem/1 var(--mono); color: var(--accent);
  letter-spacing: .1em; display: block; margin-bottom: .9rem;
}
a.card { text-decoration: none; display: block; transition: transform .14s ease, box-shadow .16s ease, border-color .16s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); }
a.card h3 { color: var(--ink); }

/* Feature list with rules rather than boxes — quieter, more editorial */
.featlist { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.featlist > div { padding: 1.6rem 1.75rem 1.6rem 0; border-top: 1px solid var(--rule); }
.featlist h3 { font-size: 1.1rem; font-family: var(--sans); font-weight: 650; letter-spacing: 0; margin-bottom: .4rem; }
.featlist p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Pull quote / definition block, echoing the original site's "fo·rum" card */
.define {
  border-left: 3px solid var(--accent); padding: .35rem 0 .35rem 1.5rem;
  font-family: var(--display); font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.35;
  color: var(--ink); font-variation-settings: "WONK" 1;
}
.define span { display: block; font-family: var(--mono); font-size: .8rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; font-variation-settings: normal; }

/* ---------- Mockup frame ---------- */

.mock {
  border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow-md);
}
.mock__bar {
  display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem;
  background: var(--paper-2); border-bottom: 1px solid var(--rule);
}
.mock__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); flex: none; }
.mock__url {
  font: 500 .74rem/1 var(--mono); color: var(--muted); background: var(--card);
  border: 1px solid var(--rule-soft); border-radius: 999px; padding: .34rem .75rem;
  margin-left: .4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mock svg { display: block; width: 100%; height: auto; }
.mock__cap { font-size: .85rem; color: var(--muted); margin: .75rem 0 0; }

/* ---------- Pricing ---------- */

.price {
  background: var(--card); border: 1px solid var(--rule); border-radius: 18px;
  padding: clamp(1.75rem, 4vw, 2.75rem); box-shadow: var(--shadow-md); max-width: 460px;
}
.price__amt { font-family: var(--display); font-size: 3.5rem; line-height: 1; font-variation-settings: "WONK" 1; }
.price__per { font-family: var(--sans); font-size: 1rem; color: var(--muted); font-weight: 500; }
.checks { list-style: none; padding: 0; margin: 1.75rem 0; display: grid; gap: .7rem; }
.checks li { display: flex; gap: .7rem; align-items: flex-start; font-size: .98rem; color: var(--ink-2); }
.checks svg { flex: none; margin-top: .3rem; color: var(--good); }

.compare { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* ---------- Docs ---------- */

/* padding-BLOCK only: the `padding` shorthand here used to wipe out .wrap's
   padding-inline, so docs pages sat flush to the 1140px edge while every other
   page was inset by the gutter. */
.docs { display: grid; gap: clamp(2rem, 5vw, 3.5rem); padding-block: 2.5rem 4rem;
        grid-template-columns: minmax(0, 1fr); }
.docs > * { min-width: 0; }
@media (min-width: 940px) { .docs { grid-template-columns: 234px minmax(0, 1fr); } }

.docnav { font-size: .93rem; }
@media (min-width: 940px) { .docnav { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; } }
.docnav__h {
  font: 600 .72rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); margin: 1.6rem 0 .7rem;
}
.docnav__h:first-child { margin-top: 0; }
.docnav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.docnav a {
  display: block; padding: .38rem .7rem; margin-left: -.7rem; border-radius: 7px;
  color: var(--ink-2); text-decoration: none;
}
.docnav a:hover { background: var(--paper-2); color: var(--ink); }
.docnav a[aria-current="page"] { background: var(--paper-2); color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }

.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }

article.prose h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin-top: 2.75rem;
  padding-top: 1.5rem; border-top: 1px solid var(--rule-soft);
}
article.prose h3 { margin-top: 2rem; font-size: 1.18rem; }
article.prose > h1 + p { font-size: 1.15rem; color: var(--ink-2); }
article.prose ul, article.prose ol { padding-left: 1.3rem; margin: 0 0 1.3rem; }
article.prose li { margin-bottom: .45rem; }
article.prose li::marker { color: var(--accent); }

.anchor {
  color: var(--rule); text-decoration: none; margin-left: .4rem; font-size: .7em;
  opacity: 0; transition: opacity .12s;
}
:is(h2, h3):hover .anchor, .anchor:focus { opacity: 1; }

.note {
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  background: var(--card); border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.25rem; margin: 0 0 1.5rem;
}
.note p:last-child { margin-bottom: 0; }
.note strong:first-child { display: block; margin-bottom: .3rem; }
.note--warn { border-left-color: #C70A24; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.75rem; font-size: .93rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 650; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

details {
  border-bottom: 1px solid var(--rule); padding: 1.15rem 0;
}
summary {
  cursor: pointer; font-family: var(--display); font-size: 1.15rem; font-weight: 600;
  font-variation-settings: "WONK" 1; list-style: none; display: flex; gap: 1rem;
  align-items: baseline; justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-family: var(--mono); font-size: 1.1rem; flex: none; }
details[open] summary::after { content: "–"; }
details > :not(summary) { margin-top: .85rem; color: var(--ink-2); }
details p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--rule); padding: 3rem 0 2.5rem; margin-top: 2rem; }
.foot__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.foot h4 { font: 600 .72rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.foot a { color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.foot a:hover { color: var(--accent); text-decoration: underline; }
.foot__base {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule-soft);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .85rem; color: var(--muted);
}

/* Table of contents — compact and columnar. A long guide has twenty headings,
   and a single-column list of them pushes the actual content below the fold. */
.toc {
  border: 1px solid var(--rule); border-radius: 10px;
  background: var(--paper-2); padding: 1.1rem 1.25rem; margin: 0 0 2rem;
}
.toc__h {
  font: 600 .7rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .75rem;
}
.toc ul {
  list-style: none; margin: 0; padding: 0;
  columns: 2; column-gap: 2rem;
}
@media (min-width: 1040px) { .toc ul { columns: 3; } }
@media (max-width: 560px)  { .toc ul { columns: 1; } }
.toc li { break-inside: avoid; margin: 0 0 .3rem; }
.toc a {
  color: var(--ink-2); text-decoration: none; font-size: .9rem;
  display: block; line-height: 1.4;
}
.toc a:hover { color: var(--accent); text-decoration: underline; }
