/* =============================================================================
   LoL Champ Tracker — website styles

   Tokens and component idioms mirror the desktop app's own styles.css so the
   site and the product read as one thing. Grade colours, win/loss colours and
   the accent are copied verbatim from the app.
   ========================================================================== */

:root {
  /* ---- surfaces ---- */
  --bg:          #262624;
  --bg-deep:     #1b1a19;
  --bg-elev:     #1f1e1d;
  --surface:     #30302e;
  --surface-hi:  #3a3a37;
  --border:      rgba(255, 255, 255, 0.08);
  --border-hi:   rgba(255, 255, 255, 0.14);

  /* ---- ink ---- */
  --text:   #f5f4ef;
  --muted:  #b3b0a6;
  --faint:  #96948a;  /* 4.98:1 on --bg — #8c8a80 measured 4.38 and missed AA */

  /* ---- accent ---- */
  --accent:       #d97757;
  --accent-hi:    #e28e6f;
  --accent-press: #c96442;
  --accent-soft:  rgba(217, 119, 87, 0.14);
  --accent-line:  rgba(217, 119, 87, 0.32);

  /* ---- grade palette (identical to the app) ---- */
  --g-splus: #f2c94c;
  --g-s:     #4fd1c5;
  --g-a:     #7bbf6a;
  --g-b:     #6aa6e8;
  --g-c:     #b8b5ab;
  --g-d:     #e07a5f;
  --win:     #6aa6e8;
  --loss:    #d96a6a;

  /* ---- type ---- */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* ---- geometry ---- */
  --wrap:      1180px;
  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 40px 90px -24px rgba(0, 0, 0, 0.75);
  --header-h:  64px;
}

/* ============================== base ==================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

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

img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

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

::selection { background: var(--accent-soft); color: var(--text); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-elev); }
::-webkit-scrollbar-thumb { background: #45443f; border-radius: 8px; border: 3px solid var(--bg-elev); }
::-webkit-scrollbar-thumb:hover { background: #55534d; }

/* ============================== layout ================================== */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: 96px; }
.section--tight { padding-block: 64px; }
.section + .section { padding-top: 0; }

.rule { height: 1px; background: var(--border); border: 0; }

/* ---- section headings ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent-line);
}

h1, h2, h3, h4 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.h-xl { font-size: clamp(40px, 6.2vw, 68px); letter-spacing: -0.03em; }
.h-lg { font-size: clamp(30px, 3.6vw, 42px); }
.h-md { font-size: clamp(21px, 2.2vw, 26px); letter-spacing: -0.015em; }

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
  line-height: 1.6;
  max-width: 62ch;
}

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head .lede { margin-top: 16px; }
.section-head.center .lede { margin-inline: auto; }

/* ============================== buttons ================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding-inline: 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s ease-out, border-color .18s ease-out,
              color .18s ease-out, transform .18s ease-out;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #1b1a19; }
.btn-primary:hover { background: var(--accent-hi); color: #1b1a19; }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-hi);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-hi); border-color: rgba(255,255,255,.22); color: var(--text); }

.btn-sm { height: 38px; padding-inline: 16px; font-size: 14px; }
.btn .ico { width: 17px; height: 17px; flex-shrink: 0; }
.btn-sub { font-size: 12px; font-weight: 500; opacity: .72; }

/* ============================== header ================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(31, 30, 29, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2b2a27, #1f1e1d);
  border: 1px solid var(--border-hi);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 17px; height: 17px; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.brand-name span { color: var(--faint); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 4px; }
/* :not(.btn) matters — `.nav a` is more specific than `.btn-primary`, so
   without it the header CTA would inherit muted grey text on the accent fill. */
.nav a:not(.btn) {
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: background-color .15s, color .15s;
}
.nav a:not(.btn):hover { background: var(--surface); color: var(--text); }
.nav a:not(.btn).active { color: var(--text); background: var(--surface); }
.nav .btn { margin-left: 8px; }

.nav-toggle { display: none; }

/* ============================== hero ==================================== */
.hero {
  position: relative;
  padding-top: 88px;
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  top: -280px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 700px;
  background: radial-gradient(closest-side, rgba(217,119,87,.16), transparent 72%);
  pointer-events: none;
  z-index: 0;
}
.hero > .wrap { position: relative; z-index: 1; }

.hero h1 { margin-bottom: 22px; }
.hero h1 .grad {
  background: linear-gradient(103deg, var(--accent-hi) 8%, #f0c9a8 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede { margin-inline: auto; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}
.hero-note {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--faint);
}
.hero-note code { color: var(--muted); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 26px;
}
.pill b { color: var(--text); font-weight: 600; }
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--g-a);
  box-shadow: 0 0 0 3px rgba(123,191,106,.16);
}

/* ---- the app window sitting under the hero ---- */
.hero-shot {
  margin-top: 64px;
  position: relative;
}
.hero-shot::after {           /* fade the bottom edge into the page */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 180px;
  background: linear-gradient(to bottom, transparent, var(--bg) 88%);
  pointer-events: none;
  z-index: 3;
}

/* ============================== app mockup ============================== */
/* A faithful, static recreation of the real app UI (see the app's styles.css). */
.app-window {
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
  user-select: none;
  font-size: 14px;
}
.aw-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 15px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.aw-chrome i { width: 11px; height: 11px; border-radius: 50%; background: #3d3c38; display: block; }
.aw-chrome .t {
  margin-left: auto; margin-right: auto;
  font-size: 12px; color: var(--faint); letter-spacing: .01em;
  transform: translateX(-24px);
}

.aw-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(31,30,29,.5);
}
.aw-brand { display: flex; align-items: center; gap: 12px; }
.aw-logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-press));
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #241f1c;
}
.aw-brand h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.aw-brand p { font-size: 12px; color: var(--faint); margin-top: 1px; }

.aw-tools { display: flex; align-items: center; gap: 10px; }
.aw-search {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; color: var(--faint); font-size: 13px;
}
.aw-search svg { width: 15px; height: 15px; opacity: .7; }
.aw-sync {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: 9px;
  background: var(--accent); color: #241f1c;
  font-size: 13px; font-weight: 700;
}
.aw-sync svg { width: 15px; height: 15px; }

.aw-syncbar {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.aw-avatar {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--accent);
  display: grid; place-items: center;
  color: var(--accent); font-weight: 800; font-size: 16px;
  flex-shrink: 0;
}
.aw-riot { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.aw-riot .n { font-weight: 600; font-size: 15px; }
.aw-riot .g { color: var(--faint); font-size: 14px; }
.aw-region {
  margin-left: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent);
}
.aw-meta { font-size: 12px; color: var(--faint); margin-top: 2px; }
.aw-change { margin-left: auto; font-size: 13px; color: var(--accent); font-weight: 500; }

.aw-tabsbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; border-bottom: 1px solid var(--border);
}
.aw-tabs {
  display: flex; gap: 4px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.aw-tab {
  padding: 6px 16px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--faint);
}
.aw-tab.on { background: var(--accent-soft); color: var(--accent); }
.aw-avg {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border-hi);
}
.aw-avg .l { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.aw-avg .v { font-size: 18px; font-weight: 800; color: var(--g-a); }

.aw-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px 20px; flex-wrap: wrap;
}
.aw-progress { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 260px; }
.aw-progress .num { font-size: 20px; font-weight: 800; }
.aw-progress .num small { font-size: 13px; font-weight: 500; color: var(--faint); }
.aw-bar {
  flex: 1; height: 7px; border-radius: 99px;
  background: var(--surface); overflow: hidden; min-width: 90px;
}
.aw-bar i { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-press)); }
.aw-progress .pct { font-size: 13px; font-weight: 700; color: var(--accent); }

.aw-filters { display: flex; align-items: center; gap: 10px; }
.aw-toggle { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.aw-track {
  width: 34px; height: 19px; border-radius: 99px; padding: 2px;
  background: var(--accent); display: flex; justify-content: flex-end;
}
.aw-track i { width: 15px; height: 15px; border-radius: 50%; background: #241f1c; }
.aw-chips {
  display: flex; gap: 5px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.aw-chip { padding: 5px 11px; border-radius: 7px; font-size: 12.5px; color: var(--faint); }
.aw-chip.on { background: var(--accent-soft); color: var(--accent); }

.aw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 12px;
  padding: 4px 20px 26px;
}
.champ {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.champ.played { border-color: var(--accent-line); }
.champ .por { position: relative; aspect-ratio: 1; background: var(--bg-elev); }
.champ .por img { width: 100%; height: 100%; object-fit: cover; }
.champ.unplayed .por img { filter: grayscale(.7) brightness(.62); }
.champ .body { padding: 7px 9px 9px; }
.champ .nm { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.champ .st { font-size: 11px; color: var(--faint); margin-top: 2px; }
.champ .st b { font-weight: 700; }
.champ .st .good { color: var(--g-a); }
.champ .st .bad { color: #d98a6a; }

.badge-n {
  position: absolute; top: 6px; right: 6px;
  min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center;
  background: rgba(38,38,36,.9);
  border: 1px solid var(--border-hi); border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  backdrop-filter: blur(4px);
}
.pill-mark {
  position: absolute; bottom: 6px; left: 6px;
  padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 800;
  color: var(--g);
  background: color-mix(in srgb, var(--g) 22%, rgba(0,0,0,.62));
  border: 1px solid color-mix(in srgb, var(--g) 55%, transparent);
  backdrop-filter: blur(4px);
}
.tick {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(38,38,36,.34);
}
.tick svg { width: 34px; height: 34px; color: var(--g-a); filter: drop-shadow(0 2px 5px rgba(0,0,0,.6)); }

/* grade helper classes — set --g, everything else reads it */
.gr-splus { --g: var(--g-splus); }
.gr-s     { --g: var(--g-s); }
.gr-a     { --g: var(--g-a); }
.gr-b     { --g: var(--g-b); }
.gr-c     { --g: var(--g-c); }
.gr-d     { --g: var(--g-d); }

/* ---- matches list mockup ---- */
.match-list { display: flex; flex-direction: column; gap: 9px; }
.match {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-hi);
  border-radius: 11px;
}
.match.win { border-left-color: #5b8fd6; }
.match.loss { border-left-color: var(--loss); }
.match img { width: 42px; height: 42px; border-radius: 9px; flex-shrink: 0; }
.match .mid { flex: 1; min-width: 0; }
.match .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.match .cn { font-weight: 700; font-size: 14.5px; }
.match .q { font-size: 11.5px; color: var(--accent); font-weight: 600; }
.match .pos { font-size: 10.5px; color: var(--faint); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
.match .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.match .sub .duo { color: var(--accent); }
.match .right { text-align: right; flex-shrink: 0; }
.match .res { font-size: 13px; font-weight: 800; }
.match.win .res { color: var(--win); }
.match.loss .res { color: var(--loss); }
.match .ago { font-size: 11px; color: var(--faint); }
.mark-badge {
  display: grid; place-items: center;
  min-width: 54px; padding: 5px 8px; border-radius: 10px;
  line-height: 1.05; flex-shrink: 0;
  color: var(--g);
  background: color-mix(in srgb, var(--g) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--g) 45%, transparent);
}
.mark-badge .s { font-size: 17px; font-weight: 800; }
.mark-badge .g { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; opacity: .85; }

/* ============================== stat strip ============================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: var(--bg); padding: 26px 24px; }
.stat .v { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.stat .k { font-size: 13.5px; color: var(--faint); margin-top: 4px; }

/* ============================== features ================================ */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s ease-out, transform .2s ease-out;
}
.card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.card h3 { font-size: 18px; margin-bottom: 9px; }
.card p { color: var(--muted); font-size: 15px; }
.card .ico-box {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: grid; place-items: center;
  color: var(--accent);
  margin-bottom: 18px;
}
.card .ico-box svg { width: 20px; height: 20px; }
.card--wide { grid-column: span 2; }
.card--flush { padding: 28px 28px 0; overflow: hidden; }

/* ============================== mark explainer ========================== */
.mark-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.weights { display: flex; flex-direction: column; gap: 14px; }
.weight { display: grid; grid-template-columns: 132px 1fr 42px; align-items: center; gap: 14px; }
.weight .wl { font-size: 14px; color: var(--muted); }
.weight .wt { height: 9px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.weight .wt i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
}
.weight .wv { font-size: 13px; font-weight: 700; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }

.grade-scale { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.grade-row {
  display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 14px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--g);
  border-radius: 10px;
}
.grade-row .gl { font-size: 17px; font-weight: 800; color: var(--g); }
.grade-row .gd { font-size: 13.5px; color: var(--muted); }
.grade-row .gv { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* ============================== download ================================ */
/* minmax(0, …) everywhere: a bare 1fr takes its minimum from the item's
   min-content, so one unbreakable child can widen the whole page. */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
}
.dl-card.is-detected { border-color: var(--accent-line); background: linear-gradient(180deg, rgba(217,119,87,.05), var(--surface) 62%); }
.dl-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.dl-head svg { width: 30px; height: 30px; color: var(--text); flex-shrink: 0; }
.dl-head h3 { font-size: 20px; }
.dl-tag {
  margin-left: auto;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line);
}
.dl-tag.muted { background: var(--bg-elev); color: var(--faint); border-color: var(--border); }
.dl-meta { font-size: 13.5px; color: var(--faint); margin-bottom: 20px; }
.dl-card .btn { width: 100%; max-width: 100%; }
.dl-steps { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.dl-steps li {
  display: flex; gap: 11px;
  font-size: 14px; color: var(--muted);
  padding-top: 10px; border-top: 1px solid var(--border);
}
.dl-steps li:first-child { border-top: 0; padding-top: 0; }
.dl-steps b { color: var(--text); font-weight: 600; }
.dl-steps .n {
  flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--bg-elev); border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--faint);
}
.dl-foot { margin-top: auto; }

/* ============================== steps (quick start) ===================== */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: s; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
}
.step .n {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: #241f1c;
  font-size: 14px; font-weight: 800;
  margin-bottom: 16px;
}
.step h3 { font-size: 16.5px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--muted); }
.step code { font-size: 13px; }

/* ============================== callouts / code ========================= */
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.5px 5px;
  color: #e8c9b8;
  word-break: break-word;
}

.code {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 11px;
  margin: 20px 0;
  overflow: hidden;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.16);
}
.code-head .lbl {
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint);
}
.copy {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 7px; padding: 4px 10px;
  font: inherit; font-size: 12px; font-weight: 600;
  color: var(--muted); cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.copy:hover { background: var(--surface-hi); color: var(--text); }
.copy.done { color: var(--g-a); border-color: rgba(123,191,106,.4); }
.code pre {
  margin: 0;
  padding: 15px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: #ddd8cd;
  -webkit-text-size-adjust: 100%;
}
.code pre .c { color: #7e7a70; }             /* comment  */
.code pre .k { color: var(--accent-hi); }     /* keyword  */
.code pre .s { color: #9dc98a; }              /* string   */
.code pre .u { color: #7fb3e0; }              /* url/path */

.note {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: rgba(217,119,87,.06);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 22px 0;
  font-size: 14.5px;
  color: var(--muted);
}
.note b, .note strong { color: var(--text); }
.note.warn { border-left-color: var(--g-splus); background: rgba(242,201,76,.06); }
.note.danger { border-left-color: var(--loss); background: rgba(217,106,106,.06); }
.note.good { border-left-color: var(--g-a); background: rgba(123,191,106,.06); }
.note .nt {
  display: block;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text); margin-bottom: 6px;
}

/* ============================== tables ================================== */
.tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  margin: 22px 0;
}
table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 520px; }
thead th {
  text-align: left;
  padding: 11px 15px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--faint);
  white-space: nowrap;
}
tbody td { padding: 12px 15px; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--text); font-weight: 500; white-space: nowrap; }
tbody td code { white-space: nowrap; }

/* ============================== docs layout ============================= */
.docs {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-block: 56px 112px;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  max-height: calc(100vh - var(--header-h) - 56px);
  overflow-y: auto;
  padding-right: 8px;
}
.toc-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--faint);
  margin-bottom: 12px;
}
.toc ol { list-style: none; }
.toc a {
  display: block;
  padding: 6px 12px;
  border-left: 2px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
  transition: color .15s, border-color .15s;
}
.toc a:hover { color: var(--text); border-left-color: var(--border-hi); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc .sub a { padding-left: 26px; font-size: 13px; color: var(--faint); }
.toc .sub a:hover, .toc .sub a.active { color: var(--text); }
.toc .sub a.active { color: var(--accent); }

.doc-body { max-width: 780px; min-width: 0; }
.doc-hero { margin-bottom: 12px; }
.doc-hero h1 { font-size: clamp(32px, 4.4vw, 44px); margin-bottom: 14px; }

.doc-body section { padding-top: 52px; }
.doc-body section > h2 {
  font-size: 27px;
  letter-spacing: -.02em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.doc-body h3 { font-size: 18.5px; margin: 32px 0 12px; }
.doc-body h4 { font-size: 15.5px; margin: 24px 0 10px; color: var(--text); }
.doc-body p { color: var(--muted); margin-bottom: 16px; max-width: 72ch; }
.doc-body ul, .doc-body ol { color: var(--muted); margin: 0 0 18px 22px; }
.doc-body li { margin-bottom: 8px; max-width: 70ch; }
.doc-body li::marker { color: var(--faint); }
.doc-body strong { color: var(--text); font-weight: 600; }
.doc-body hr { border: 0; height: 1px; background: var(--border); margin: 40px 0; }

.anchor {
  color: var(--faint);
  margin-left: 10px;
  font-size: .62em;
  opacity: 0;
  transition: opacity .15s;
}
h2:hover .anchor, h3:hover .anchor { opacity: 1; }

.kbd {
  display: inline-block;
  font-family: var(--mono); font-size: 12px;
  background: var(--surface); border: 1px solid var(--border-hi);
  border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 7px;
  color: var(--text);
}

.tabset { margin: 22px 0; }
.tabset-nav { display: flex; gap: 5px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; width: fit-content; }
.tabset-nav button {
  background: none; border: 0; font: inherit;
  padding: 7px 16px; border-radius: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--faint);
  cursor: pointer; transition: background-color .15s, color .15s;
}
.tabset-nav button:hover { color: var(--muted); }
.tabset-nav button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.tabset-panel[hidden] { display: none; }

/* ============================== footer ================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  padding-block: 56px 40px;
  margin-top: 40px;
}
.foot-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.foot-brand { max-width: 340px; }
.foot-brand p { color: var(--faint); font-size: 14px; margin-top: 14px; }
.foot-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.foot-col h4 { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; font-weight: 700; }
.foot-col a { display: block; font-size: 14px; color: var(--muted); padding: 5px 0; }
.foot-col a:hover { color: var(--text); }
.legal {
  margin-top: 28px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--faint);
  max-width: 78ch;
}
.legal + .legal { margin-top: 12px; }

/* ============================== responsive ============================== */
@media (max-width: 1024px) {
  .docs { grid-template-columns: 1fr; gap: 0; }
  .toc {
    position: static;
    max-height: none;
    margin-bottom: 40px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .toc ol { columns: 2; column-gap: 24px; }
  .toc .sub { display: none; }
  .mark-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 860px) {
  .features, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--wide { grid-column: span 2; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .nav a:not(.nav-keep) { display: none; }
}

@media (max-width: 680px) {
  :root { --header-h: 58px; }
  .section { padding-block: 64px; }
  .hero { padding-top: 56px; }
  .hero-shot { margin-top: 44px; }
  .features, .steps { grid-template-columns: minmax(0, 1fr); }
  .card--wide { grid-column: span 1; }
  .aw-topbar, .aw-syncbar, .aw-tabsbar, .aw-toolbar { padding-inline: 14px; }
  .aw-grid { padding-inline: 14px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 9px; }
  .aw-search { display: none; }
  .aw-filters { display: none; }
  /* Narrow screens: let every button wrap rather than force the page wider. */
  .btn {
    max-width: 100%;
    height: auto;
    min-height: 46px;
    padding-block: 10px;
    white-space: normal;
    flex-wrap: wrap;
  }
  .btn-sm { min-height: 38px; padding-block: 6px; }
  .hero-cta .btn { width: 100%; }
  .weight { grid-template-columns: 104px 1fr 38px; gap: 10px; }
  .toc ol { columns: 1; }
  .foot-cols { gap: 36px; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .match .right { display: none; }
}

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

/* ============================== print =================================== */
@media print {
  .site-header, .toc, .site-footer, .copy { display: none !important; }
  body { background: #fff; color: #000; }
  .doc-body { max-width: none; }
}
