/* Site styles. System fonts only; light and dark through tokens on :root. */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #16202c;
  --text-muted: #4c5a6b;
  --border: #d8dee7;
  --accent: #0b5cad;
  --accent-strong: #08467f;
  --accent-contrast: #ffffff;
  --accent-soft: #e3eefa;
  --focus: #f0a800;
  --good: #1d7a46;
  --bad: #b3261e;
  --warn: #9a6300;
  --unrec: #8a96a5;
  --cell-good: #3f9b68;
  --cell-bad: #d2453b;
  --cell-warn: #e0a42b;
  --cell-unrec: #c5ccd6;
  --cell-locked: #6b5bbf;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 8px 24px rgb(16 24 40 / 8%);
  --radius: 10px;
  --max: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b;
    --bg-alt: #141b24;
    --surface: #18212c;
    --surface-2: #1f2a37;
    --text: #e6ebf1;
    --text-muted: #a7b3c2;
    --border: #2c3846;
    --accent: #6cb2ff;
    --accent-strong: #9ccbff;
    --accent-contrast: #0b1520;
    --accent-soft: #17304b;
    --good: #5cc98b;
    --bad: #ff8a80;
    --warn: #f2c063;
    --unrec: #8e9aab;
    --cell-good: #3f9b68;
    --cell-bad: #d9574d;
    --cell-warn: #d9a03a;
    --cell-unrec: #3a4655;
    --cell-locked: #8576d6;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f141b;
  --bg-alt: #141b24;
  --surface: #18212c;
  --surface-2: #1f2a37;
  --text: #e6ebf1;
  --text-muted: #a7b3c2;
  --border: #2c3846;
  --accent: #6cb2ff;
  --accent-strong: #9ccbff;
  --accent-contrast: #0b1520;
  --accent-soft: #17304b;
  --good: #5cc98b;
  --bad: #ff8a80;
  --warn: #f2c063;
  --unrec: #8e9aab;
  --cell-good: #3f9b68;
  --cell-bad: #d9574d;
  --cell-warn: #d9a03a;
  --cell-unrec: #3a4655;
  --cell-locked: #8576d6;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }

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

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 750; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--accent-contrast);
  padding: 10px 14px; border-radius: 6px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.nav a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text-muted); text-decoration: none; font-weight: 550; font-size: .97rem; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.nav .btn { margin-left: 6px; }
.nav a.btn { display: inline-flex; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }
@media (max-width: 960px) {
  .menu-toggle { display: inline-grid; margin-left: auto; }
  .nav { position: absolute; left: 0; right: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--border); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .nav a { padding: 12px 10px; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 8px; font-weight: 650; text-decoration: none; border: 1px solid transparent;
  font-size: 1rem; line-height: 1.2; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-contrast); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.nav a.btn-primary { color: var(--accent-contrast); background: var(--accent); }
.nav a.btn-primary:hover { background: var(--accent-strong); }
.btn svg { width: 18px; height: 18px; }

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 46em; }
.muted { color: var(--text-muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.page-head { padding-top: 56px; padding-bottom: 24px; }
.page-head .lead { margin-bottom: 0; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--accent); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 12px; }
.hero .fine { font-size: .9rem; color: var(--text-muted); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Sector strip motif */
.sector-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.sector-card h3 { font-size: 1rem; margin-bottom: 12px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sector-card h3 span { font-weight: 500; color: var(--text-muted); font-size: .9rem; }
.sectors { display: grid; grid-template-columns: repeat(32, 1fr); gap: 3px; }
.sectors i { aspect-ratio: 1; border-radius: 2px; background: var(--cell-good); }
.sectors i.b { background: var(--cell-bad); }
.sectors i.w { background: var(--cell-warn); }
.sectors i.u { background: var(--cell-unrec); }
.sectors i.l { background: var(--cell-locked); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; margin: 14px 0 0; font-size: .88rem; color: var(--text-muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; background: var(--cell-good); }
.legend i.b { background: var(--cell-bad); } .legend i.w { background: var(--cell-warn); } .legend i.u { background: var(--cell-unrec); } .legend i.l { background: var(--cell-locked); }
@media (max-width: 600px) { .sectors { grid-template-columns: repeat(20, 1fr); } .sectors i:nth-child(n+201) { display: none; } }

/* Cards and grids */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-bottom: .4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .ico { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.card .ico svg { width: 22px; height: 22px; }

.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 26px; margin: 6px 0; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px; border-left: 2.5px solid var(--good); border-bottom: 2.5px solid var(--good); transform: rotate(-45deg); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; gap: 24px; } .split.flip > :first-child { order: 0; } }

/* Screenshots */
figure { margin: 0; }
.shot { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.shot img { width: 100%; }
.shot a { display: block; }
figcaption { font-size: .92rem; color: var(--text-muted); margin-top: 10px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }

/* Problem / solution */
.ps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ps .card h3 { display: flex; align-items: center; gap: 10px; }
.ps .card.problem h3 { color: var(--bad); }
.ps .card.solution h3 { color: var(--good); }
@media (max-width: 760px) { .ps { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { background: var(--accent); color: var(--accent-contrast); border-radius: 14px; padding: 40px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .3em; }
.cta-band p { margin: 0; opacity: .92; }
.cta-band .btn { background: var(--accent-contrast); color: var(--accent); }
.cta-band .btn:hover { opacity: .92; color: var(--accent); }

/* Pricing */
.editions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 1060px) { .editions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .editions { grid-template-columns: 1fr; } }
.edition { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: relative; }
.edition.featured { border: 2px solid var(--accent); }
.edition .badge { position: absolute; top: -12px; left: 24px; background: var(--accent); color: var(--accent-contrast); font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.edition h3 { margin-bottom: 4px; }
.edition .price { font-size: 2.1rem; font-weight: 750; margin: 8px 0 0; }
.edition .price small { font-size: .95rem; font-weight: 500; color: var(--text-muted); }
.edition .renew { font-size: .9rem; color: var(--text-muted); margin: 2px 0 14px; min-height: 2.9em; }
.edition p.sum { flex: 1; }
.edition .btn { width: 100%; }

.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface-2); font-weight: 650; position: sticky; top: 0; }
tbody th { font-weight: 450; }
tr.group th { background: var(--bg-alt); font-weight: 700; color: var(--text); font-size: .9rem; letter-spacing: .02em; text-transform: uppercase; }
td.yes, td.no { text-align: center; width: 12%; }
td.yes svg { width: 18px; height: 18px; color: var(--good); vertical-align: -3px; }
td.no span { color: var(--unrec); }
.matrix th:first-child { min-width: 280px; }
@media (max-width: 640px) {
  .matrix th:first-child { min-width: 0; }
  th, td { padding: 8px 6px; }
  .matrix { font-size: .82rem; }
  .matrix thead th { font-size: .74rem; }
  td.yes, td.no { width: 13%; }
}

/* FAQ */
details { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin: 10px 0; }
summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 700; color: var(--accent); }
details[open] summary::after { content: "\2212"; }
details > div { padding: 0 18px 14px; }

/* Notes */
.note { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 20px 0; }
.note.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 650; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.pill.good { color: var(--good); }
.pill.warn { color: var(--warn); }

.fs-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 1em; }
.fs-list li { padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .93rem; font-weight: 550; }

.status-table td:first-child { white-space: nowrap; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }

pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; overflow-x: auto; font-size: .9rem; }
pre code { background: none; padding: 0; }

.prose { max-width: 50em; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.4em; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 48px 0 32px; margin-top: 40px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.site-footer h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-base { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Grid children may shrink below their content (long code lines scroll inside their own box). */
.grid > *, .split > *, .editions > *, .ps > *, .gallery > *, .hero-grid > * { min-width: 0; }
p code, td code, li code { overflow-wrap: anywhere; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a { transition: background-color .15s, color .15s, border-color .15s; }
}
