/* Plyvero — site styles. No external resources; CSP-safe (no inline styles in HTML). */

@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('font-sans.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('font-serif.woff2') format('woff2'); }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #faf8f3;
  --bg-tint: #f4f1e9;
  --surface: #ffffff;
  --surface-2: #f6f3ec;
  --surface-3: #eeebe2;
  --ink: #1a2420;
  --ink-2: #4a5550;
  --ink-3: #6f7a74;
  --line: #e6e1d6;
  --line-strong: #d3ccbd;
  --brand: #1f4d3f;
  --brand-hover: #173c31;
  --brand-text: #1f5a48;
  --brand-soft: #e8efe9;
  --on-brand: #ffffff;
  --accent: #a26a2c;
  --accent-soft: #f6ecdc;
  --focus: #b8702f;
  --ok: #2c7a4d;   --ok-soft: #e0f0e6;
  --test: #2a5f8f; --test-soft: #e0ebf5;
  --dev: #9a5a12;  --dev-soft: #f6ead8;
  --exp: #6b4c9a;  --exp-soft: #ece6f5;
  --bad: #b42318;
  --shadow-sm: 0 1px 2px rgba(20, 33, 28, .06);
  --shadow: 0 1px 2px rgba(20, 33, 28, .05), 0 12px 32px -12px rgba(20, 33, 28, .16);
  --shadow-lg: 0 2px 4px rgba(20, 33, 28, .05), 0 30px 60px -24px rgba(20, 33, 28, .28);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
  --header-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-text); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.025em; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
h4 { font-size: 1rem; font-weight: 600; }
h1 em, h2 em { font-style: italic; color: var(--brand-text); }
code, kbd { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: .05em .35em; }
kbd { border-bottom-width: 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
::selection { background: var(--brand-soft); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 200; background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; }
.skip-link:focus { left: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.shell { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
.shell-narrow { width: min(820px, calc(100% - 48px)); margin: 0 auto; }

.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 24px; height: 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { min-height: var(--header-h); display: flex; align-items: center; gap: 20px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.6rem; font-weight: 500; letter-spacing: -.03em; text-decoration: none; color: var(--ink); line-height: 1; }
.wordmark:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: #f3efe4; display: grid; place-items: center; }
.brand-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-period { color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; font-size: .92rem; font-weight: 500; }
.main-nav a { text-decoration: none; color: var(--ink-2); padding: 8px 11px; border-radius: var(--radius-sm); }
.main-nav a:hover { color: var(--ink); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-3); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius-sm); font: inherit; font-size: .94rem; font-weight: 600; line-height: 1.2; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand-text); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Typography helpers ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--brand-text); margin-bottom: 16px; }
.eyebrow::before { content: ''; width: 18px; height: 1.5px; background: currentColor; opacity: .7; }
.lead { font-size: 1.15rem; line-height: 1.7; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-3); }
.small { font-size: .88rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* ---------- Status pills ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; padding: 3px 10px 3px 8px; border-radius: 999px; white-space: nowrap; line-height: 1.5; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-live { color: var(--ok); background: var(--ok-soft); }
.status-live::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.status-test { color: var(--test); background: var(--test-soft); }
.status-dev { color: var(--dev); background: var(--dev-soft); }
.status-exp { color: var(--exp); background: var(--exp-soft); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section-alt { background: var(--bg-tint); border-block: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; margin-bottom: 44px; }
.section-head p { color: var(--ink-2); margin: 0; font-size: 1.04rem; }
.section-head.single { grid-template-columns: 1fr; max-width: 760px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 60%; height: 120%;
  background: radial-gradient(closest-side, rgba(31, 77, 63, .08), transparent 70%), radial-gradient(closest-side at 70% 80%, rgba(162, 106, 44, .07), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 30px; font-size: .88rem; color: var(--ink-3); }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note .icon { width: 16px; height: 16px; color: var(--brand-text); }
.page-hero { padding: 64px 0 40px; }
.page-hero .lead { margin-bottom: 0; }
.page-hero-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.card p { color: var(--ink-2); }
.card > :last-child { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.product-card { display: flex; flex-direction: column; gap: 14px; position: relative; transition: border-color .15s, transform .15s, box-shadow .15s; }
.product-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.product-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.product-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.product-icon .icon { width: 22px; height: 22px; }
.product-card h3 { font-size: 1.25rem; margin: 0; }
.product-card p { margin: 0; font-size: .97rem; }
.product-card .link-arrow { margin-top: auto; padding-top: 6px; }
.product-card .link-arrow::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.product-card.featured { grid-column: span 2; background: linear-gradient(135deg, var(--surface) 0%, var(--brand-soft) 160%); }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; color: var(--ink-2); font-size: .95rem; }
.check-list li::before { content: ''; flex: 0 0 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c7a4d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.check-list.neutral li::before { background: var(--surface-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a7771' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 12h10'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.stat { padding: 26px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-num { display: block; font-family: var(--serif); font-size: clamp(2rem, 3.2vw, 2.6rem); line-height: 1.05; letter-spacing: -.02em; color: var(--ink); }
.stat-label { display: block; margin-top: 6px; font-size: .9rem; color: var(--ink-2); }
.stats-foot { margin-top: 12px; font-size: .82rem; color: var(--ink-3); }

/* ---------- Principles ---------- */
.principle { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.principle .product-icon { width: 44px; height: 44px; }
.principle h3 { margin-bottom: 4px; }
.principle p { margin: 0; color: var(--ink-2); font-size: .97rem; }

/* ---------- Status table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--ink); }
td { color: var(--ink-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Bars (difficulty) ---------- */
.bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.bar span { display: block; height: 100%; }
.lv-1 { background: #7cb98f; } .lv-2 { background: #4f9a73; } .lv-3 { background: #2e7a5c; } .lv-4 { background: #1f5a48; } .lv-5 { background: #a8612a; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .84rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.h3-like { font-family: var(--sans); font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin: 14px 0 8px; }
.email-line { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--ink); margin: 4px 0 0; word-break: break-all; }
.center-row { justify-content: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.section-sub { margin-top: 32px; }
.section-split { margin-top: 40px; }
.chips + h3, h3 + .chips { margin-top: 12px; }
.bar-svg { display: block; width: 100%; height: 12px; border-radius: 999px; overflow: hidden; margin: 8px 0 10px; }
.bar-svg rect.lv-1 { fill: #7cb98f; } .bar-svg rect.lv-2 { fill: #4f9a73; } .bar-svg rect.lv-3 { fill: #2e7a5c; } .bar-svg rect.lv-4 { fill: #1f5a48; } .bar-svg rect.lv-5 { fill: #a8612a; }
td .bar-svg { margin: 6px 0 0; min-width: 160px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font-size: .88rem; color: var(--ink-2); }
.chip b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 30px 38px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.timeline time { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.timeline h3 { margin-bottom: 6px; }
.timeline p { color: var(--ink-2); margin-bottom: .5em; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- Callout ---------- */
.callout { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; padding: 40px 44px; border-radius: var(--radius-lg); background: linear-gradient(135deg, #ffffff 0%, #f1f5f0 55%, #f6efe2 100%); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); position: relative; overflow: hidden; }
.callout::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--brand), var(--accent)); }
.callout h2, .callout h3 { color: var(--ink); margin-bottom: 8px; }
.callout p { color: var(--ink-2); margin: 0; max-width: 60ch; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); border-radius: var(--radius-sm); padding: 16px 18px; color: var(--ink-2); font-size: .95rem; }
.note strong { color: var(--ink); }
.note > :last-child { margin-bottom: 0; }

/* ---------- Prose ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.85rem; margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }
.split { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: .92rem; }
.toc h4, .toc-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; color: var(--ink-2); text-decoration: none; margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); border-left-color: var(--brand); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--ink-3); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 18px; color: var(--ink-2); }
.faq details > div > :last-child { margin-bottom: 0; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field label, .field-label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; font: inherit; font-size: .9rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 11px; }
.input.mono, .textarea { font-family: var(--mono); font-size: .82rem; }
.textarea { min-height: 96px; resize: vertical; }
.select { width: auto; padding-right: 30px; }
.input-row { display: flex; gap: 8px; }
.input-row .input { min-width: 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { width: 16px; height: 16px; accent-color: var(--brand); }

/* ---------- Board ---------- */
.board-shell { position: relative; container-type: inline-size; aspect-ratio: 1; }
.board {
  --sq-light: #ebecd0; --sq-dark: #739552; --sq-last-light: #f5f682; --sq-last-dark: #b9ca43;
  --sq-sel: rgba(20, 85, 30, .5); --coord-light: #739552; --coord-dark: #ebecd0; --dot: rgba(20, 30, 25, .26); --hint: rgba(168, 97, 42, .55);
  position: relative; display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; width: 100%;
  border-radius: 6px; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08), var(--shadow-lg);
}
.board[data-board-theme="brown"] { --sq-light: #f0d9b5; --sq-dark: #b58863; --sq-last-light: #cdd26a; --sq-last-dark: #aaa23a; --coord-light: #b58863; --coord-dark: #f0d9b5; }
.board[data-board-theme="blue"] { --sq-light: #dee3e6; --sq-dark: #8ca2ad; --sq-last-light: #c3d888; --sq-last-dark: #92b166; --coord-light: #788a94; --coord-dark: #dee3e6; }
.board[data-board-theme="slate"] { --sq-light: #c9cfd3; --sq-dark: #5d6b75; --sq-last-light: #d3c27b; --sq-last-dark: #a89452; --coord-light: #5d6b75; --coord-dark: #c9cfd3; }
.board[data-board-theme="sand"] { --sq-light: #efe6d2; --sq-dark: #c19a6b; --sq-last-light: #e3d47f; --sq-last-dark: #c4ad57; --coord-light: #a07a4e; --coord-dark: #efe6d2; }
.sq { position: relative; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; border: 0; border-radius: 0; background: var(--sq-light); cursor: pointer; aspect-ratio: 1; }
.sq.dark { background: var(--sq-dark); }
.sq.last { background: var(--sq-last-light); }
.sq.dark.last { background: var(--sq-last-dark); }
.sq.selected { box-shadow: inset 0 0 0 100vmax var(--sq-sel); }
.sq.hint { box-shadow: inset 0 0 0 4px var(--hint); }
.sq.check { background-image: radial-gradient(circle, rgba(220, 30, 30, .85) 0%, rgba(220, 30, 30, .45) 40%, transparent 72%); }
.sq.target::after { content: ''; width: 28%; height: 28%; border-radius: 50%; background: var(--dot); pointer-events: none; }
.sq.capture::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 6px var(--dot); pointer-events: none; }
.sq.drop-over { box-shadow: inset 0 0 0 4px rgba(255,255,255,.75); }
.sq:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 0; z-index: 2; }
.sq.drag-origin .piece { opacity: .3; }
.piece { width: 88%; height: 88%; pointer-events: none; display: block; }
.board.no-coords .coord { display: none; }
.coord { position: absolute; font-size: clamp(9px, 2.1cqw, 13px); font-weight: 700; line-height: 1; pointer-events: none; color: var(--coord-light); }
.sq.light .coord { color: var(--coord-light); }
.sq.dark .coord { color: var(--coord-dark); }
.coord-r { top: 4%; left: 5%; }
.coord-f { bottom: 4%; right: 6%; }
.drag-piece { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 20; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.promo { position: absolute; inset: 0; z-index: 30; background: rgba(10, 16, 14, .55); display: grid; place-items: center; }
.promo-box { display: flex; gap: 6px; padding: 10px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); }
.promo-box button { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.promo-box button:hover { background: var(--brand-soft); border-color: var(--brand); }
.promo-box svg { width: 52px; height: 52px; }

/* ---------- Workbench ---------- */
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 28px; align-items: start; }
.workbench > * { min-width: 0; }
.workbench .board-col { width: 100%; max-width: max(360px, min(720px, calc(100vh - 150px))); justify-self: center; }
.page-hero + .section-tight { padding-top: 12px; }
.panel-head { flex-wrap: wrap; }
.panel-head .select { max-width: 100%; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { font-family: var(--sans); font-size: .95rem; font-weight: 700; letter-spacing: 0; margin: 0; }
.panel-body { padding: 16px 18px; }
.panel + .panel { margin-top: 16px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-top: 14px; }
.tool-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 38px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; }
.tbtn:hover:not(:disabled) { background: var(--surface-2); }
.tbtn:disabled { opacity: .4; cursor: not-allowed; }
.tbtn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.tbtn.primary:hover:not(:disabled) { background: var(--brand-hover); }
.board-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; font-size: .88rem; color: var(--ink-2); min-height: 28px; }
.turn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.turn-dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.turn-dot.w { background: #fff; }
.turn-dot.b { background: #1b1b1b; border-color: #1b1b1b; }
.material { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.status-line { font-size: .9rem; font-weight: 600; color: var(--brand-text); min-height: 1.4em; }
.annotation { background: var(--surface-2); border-left: 3px solid var(--brand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 16px; }
.annotation h3 { font-size: 1rem; margin-bottom: 4px; }
.annotation p { margin: 0; font-size: .93rem; color: var(--ink-2); }
.moves { max-height: 260px; overflow-y: auto; display: grid; grid-template-columns: 44px 1fr 1fr; font-size: .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.moves .mn { padding: 5px 8px; color: var(--ink-3); background: var(--surface-2); font-variant-numeric: tabular-nums; text-align: right; }
.moves button { text-align: left; border: 0; background: transparent; padding: 5px 10px; font: inherit; color: var(--ink); cursor: pointer; border-radius: 0; }
.moves button:hover { background: var(--surface-2); }
.moves button.active { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.moves button.user { font-style: italic; }
.moves .empty { grid-column: 1 / -1; padding: 10px; color: var(--ink-3); font-size: .86rem; }
.kbd-hint { font-size: .8rem; color: var(--ink-3); margin-top: 10px; }
.settings-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.segmented button { border: 0; background: var(--surface); color: var(--ink-2); font: inherit; font-size: .84rem; font-weight: 600; padding: 7px 12px; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--line-strong); }
.segmented button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.swatches { display: inline-flex; gap: 6px; }
.swatch { width: 28px; height: 28px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; padding: 0; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); }
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.swatch-green { --a: #ebecd0; --b: #739552; }
.swatch-brown { --a: #f0d9b5; --b: #b58863; }
.swatch-blue { --a: #dee3e6; --b: #8ca2ad; }
.swatch-slate { --a: #c9cfd3; --b: #5d6b75; }
.swatch-sand { --a: #efe6d2; --b: #c19a6b; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600; z-index: 100; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Trainer ---------- */
.trainer-feedback { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); min-height: 72px; }
.trainer-feedback .fb-icon { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.trainer-feedback.good { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.trainer-feedback.good .fb-icon { background: var(--ok); color: #fff; }
.trainer-feedback.bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.trainer-feedback.bad .fb-icon { background: var(--bad); color: #fff; }
.trainer-feedback h3, .trainer-feedback .fb-title { font-size: 1rem; font-weight: 600; color: var(--ink); margin: 0 0 2px; }
.trainer-feedback p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.puzzle-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 340px; overflow-y: auto; }
.puzzle-list button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; border: 1px solid transparent; background: transparent; padding: 8px 10px; border-radius: var(--radius-sm); font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer; }
.puzzle-list button:hover { background: var(--surface-2); }
.puzzle-list button[aria-current="true"] { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.puzzle-list .pmeta { font-size: .78rem; color: var(--ink-3); white-space: nowrap; }
.solved-mark { color: var(--ok); font-weight: 700; }
.score-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.score { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.score b { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; line-height: 1.1; }
.score span { font-size: .78rem; color: var(--ink-3); }

/* Compact hero puzzle */
.hero-puzzle { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-lg); }
.hero-puzzle-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.hero-puzzle-head strong { font-size: .95rem; }
.hero-puzzle .trainer-feedback { margin-top: 14px; min-height: 0; }
.hero-puzzle-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-tint); padding: 56px 0 36px; font-size: .92rem; color: var(--ink-2); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4, .footer-h { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; color: var(--ink-2); }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-h, .toc-title { font-family: var(--sans); font-weight: 700; line-height: 1.4; }
.footer-brand p { margin: 12px 0 0; max-width: 34ch; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--ink-3); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .main-nav a { padding: 8px 8px; }
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .workbench .board-col { max-width: 640px; margin: 0 auto; width: 100%; }
}
@media (max-width: 960px) {
  .hero-grid, .section-head, .split { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; }
  .hero-visual { max-width: 520px; width: 100%; margin: 0 auto; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .product-card.featured { grid-column: span 2; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .toc { position: static; }
  .menu-toggle { display: inline-grid; }
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 24px 18px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 11px 12px; font-size: 1rem; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 620px) {
  .shell, .shell-narrow { width: calc(100% - 32px); }
  .section { padding: 64px 0; }
  .hero { padding: 44px 0 64px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .product-card.featured { grid-column: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 18px 16px; }
  .callout { padding: 26px 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-contact { display: none; }
  .moves { grid-template-columns: 36px 1fr 1fr; }
  .promo-box button { width: 52px; height: 52px; }
  .promo-box svg { width: 42px; height: 42px; }
}

@media print {
  .site-header, .site-footer, .toolbar, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}

/* Editorial identity: warm paper, deep green and restrained brass. */
:root {
  --bg: #f6f3eb; --bg-tint: #edeae0; --surface: #fffdf8; --surface-2: #f1eee5;
  --surface-3: #e8e4d9; --ink: #172a25; --ink-2: #40524b; --ink-3: #5d6a64;
  --line: #deddd1; --line-strong: #c5cabe; --brand: #214e40; --brand-hover: #15392f;
  --brand-text: #245b47; --brand-soft: #e3eee5; --accent: #946322; --focus: #a34d12;
  --ok: #266840; --test: #28597e; --dev: #81500e; --exp: #654488; --header-h: 76px;
  --radius: 12px; --radius-lg: 18px;
}
[hidden] { display: none !important; }
.no-js .js-required, .no-js .menu-toggle { display: none !important; }
.site-header { background: rgba(246, 243, 235, .96); }
.nav-wrap { gap: 22px; }
.wordmark { font-size: 1.75rem; }
.brand-mark { border-radius: 50%; width: 36px; height: 36px; }
.main-nav a { padding: 9px 11px; }
.btn { min-height: 44px; border-radius: 7px; }
.btn-sm { min-height: 38px; }
.tbtn { min-height: 40px; }
.section { padding-block: 104px; }
.section-head h2 { max-width: 15ch; }
.section-head p { max-width: 49ch; }
.page-hero { padding: 78px 0 48px; }
.page-hero h1 { max-width: 16ch; }

.hero { background: #142c27; color: #f6f2e7; padding: 72px 0 80px; }
.hero::before { inset: 0; width: 100%; height: 100%; background: radial-gradient(ellipse at 85% 10%, #31564a 0, transparent 50%), linear-gradient(125deg, transparent 50%, rgba(233, 196, 126, .06)); }
.hero-grid { grid-template-columns: 1fr .88fr; gap: clamp(40px, 7vw, 100px); }
.hero-copy { padding: 24px 0; }
.hero h1 { color: #faf7ec; font-size: clamp(3.8rem, 6.4vw, 6.25rem); line-height: .99; max-width: none; letter-spacing: -.047em; }
.hero h1 em { color: #d9bb83; }
.hero .eyebrow { color: #d9bb83; }
.hero .lead { color: #d6e1d8; max-width: 47ch; font-size: 1.08rem; }
.hero-primary { color: #172a25; background: #edddbd; }
.hero-primary:hover { color: #172a25; background: #fff3dc; }
.hero-text-link { color: #f5f0e4; text-decoration: none; font-weight: 600; padding: 10px 4px; }
.hero-text-link:hover { color: #edddbd; text-decoration: underline; }
.hero-text-link span { padding-left: 6px; }
.hero-caption { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 58px; color: #c5d4ca; font-size: .68rem; font-weight: 700; letter-spacing: .14em; }
.hero-visual { max-width: 520px; justify-self: end; width: 100%; }
.hero-puzzle { color: var(--ink); padding: 20px; border-radius: 14px; box-shadow: 0 30px 70px rgba(0, 0, 0, .26); }
.hero-puzzle-head { min-height: 44px; }
.hero-puzzle-head > div { min-width: 0; }
.hero-puzzle-head strong { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-puzzle .trainer-feedback { min-height: 90px; }
.mini-label { display: block; color: var(--ink-3); font-size: .65rem; font-weight: 700; letter-spacing: .14em; margin-bottom: 2px; }
.hero-noscript { color: #f6f2e7; }
.editorial-strip { background: #e7dfca; border-block: 1px solid #d8ceb5; }
.editorial-strip .shell { min-height: 63px; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #304d41; font-size: .7rem; letter-spacing: .15em; font-weight: 700; }
.editorial-strip span[aria-hidden] { color: #a06c2d; font-size: 1rem; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 330px; padding: clamp(26px, 4vw, 48px); border-radius: 14px; }
.feature-card-board { background: #dce9da; color: #17392d; }
.feature-card-puzzle { background: #e9ddc7; color: #403522; }
.feature-card h3 { font-family: var(--serif); color: inherit; font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1.05; font-weight: 400; letter-spacing: -.03em; margin: 32px 0 14px; }
.feature-card p { max-width: 38ch; color: inherit; }
.feature-number { font-size: .7rem; font-weight: 700; letter-spacing: .14em; }
.feature-link { display: inline-flex; align-items: center; gap: 18px; align-self: flex-start; color: inherit; font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.feature-link:hover { color: inherit; }
.feature-link span { transition: transform .2s; }
.feature-link:hover span { transform: translate(3px, -3px); }
.card { box-shadow: none; }
.product-card { min-height: 255px; padding: 28px; }
.product-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; }
.founder-grid, .editorial-project { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 7vw, 100px); align-items: start; }
.founder-grid h2, .editorial-project h2 { max-width: 15ch; }
.founder-grid > div:last-child { max-width: 56ch; color: var(--ink-2); }
.founder-quote { font-family: var(--serif); color: var(--ink); font-size: clamp(1.7rem, 2.7vw, 2.3rem); line-height: 1.25; }
.editorial-project .card h3:not(:first-child) { margin-top: 24px; }
.site-footer { background: #eae9df; }
.footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); }
.footer-brand p { max-width: 28ch; }

@media (max-width: 960px) {
  .hero-grid, .founder-grid, .editorial-project { grid-template-columns: 1fr; }
  .hero-copy { padding: 0; }
  .hero-visual { justify-self: center; }
  .hero-caption { margin-top: 34px; }
  .no-js .nav-wrap { flex-wrap: wrap; padding-block: 14px; }
  .no-js .main-nav { position: static; display: flex; flex-direction: row; flex-wrap: wrap; width: 100%; padding: 0; box-shadow: none; border: 0; order: 3; }
}
@media (max-width: 620px) {
  :root { --header-h: 68px; }
  .section { padding-block: 70px; }
  .hero { padding-block: 54px 64px; }
  .hero h1 { font-size: clamp(3rem, 12.5vw, 5rem); }
  .hero .btn-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero-grid { gap: 36px; }
  .hero-puzzle { padding: 14px; }
  .hero-puzzle-head { flex-wrap: wrap; }
  .editorial-strip .shell { font-size: .58rem; letter-spacing: .08em; gap: 5px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .page-hero { padding-block: 54px 30px; }
  .email-line { overflow-wrap: anywhere; }
}
