/*
 * SOKU Help Center - standalone stylesheet (no Tailwind, no DaisyUI, no SPA bundle).
 * Colour tokens mirror the app themes in frontend/src/index.css (soku-dark-pro-v2 and
 * soku-light); they are copied here, not imported. One accent: the brand green.
 * Theme = html[data-theme], set before first paint by the inline script in base.html (stored
 * choice, else the system preference). The header and the footer stay dark in both themes
 * because the SOKU logo is white. Text colours were checked for WCAG AA (4.5:1).
 */
:root {
  --primary: #89f336;
  --primary-ink: #121212;
  --bg: #1a1c1e;
  --surface: #232629;
  --surface-2: #2d3135;
  --border: #3d4349;
  --text: #f7f6f5;
  --text-strong: #ffffff;
  --muted: #b4bbc1;
  --link: #89f336;
  --accent-text: #89f336;
  --code-bg: #121416;
  --ui-bg: #2d3135;
  --ui-border: #4a5158;
  --tip: #89f336;
  --note: #00e5ff;
  --warning: #ffd300;
  --shadow: 0 10px 30px rgb(0 0 0 / .35);
  --glow: rgb(137 243 54 / .16);
  --radius: 0.875rem;
  --radius-sm: 0.5rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --header-h: 5.25rem;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f7f6f5;
  --surface: #ffffff;
  --surface-2: #eef1f1;
  --border: #d3d9db;
  --text: #1b2227;
  --text-strong: #000000;
  --muted: #4a545d;
  --link: #2a7208;
  --accent-text: #2a7208;
  --code-bg: #eef1f1;
  --ui-bg: #ffffff;
  --ui-border: #b9c1c5;
  --tip: #2a7208;
  --note: #0069c2;
  --warning: #8a5a00;
  --shadow: 0 10px 30px rgb(17 23 27 / .10);
  --glow: rgb(137 243 54 / .30);
  color-scheme: light;
}
/* Always-dark bars (the logo is white): re-declare the dark tokens for them */
.site-header, .site-footer {
  --bg: #1a1c1e; --surface: #232629; --surface-2: #2d3135; --border: #3d4349;
  --text: #f7f6f5; --text-strong: #ffffff; --muted: #b4bbc1; --link: #89f336; --accent-text: #89f336;
  color-scheme: dark; color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; font: 400 1rem/1.6 var(--font); background: var(--bg); color: var(--text); }
body.nav-open { overflow: hidden; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
html[data-theme="light"] :focus-visible { outline-color: #2a7208; }
html[data-theme="light"] .site-header :focus-visible, html[data-theme="light"] .site-footer :focus-visible { outline-color: var(--primary); }
.site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--primary); }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--primary); color: var(--primary-ink); padding: .5rem 1rem; border-radius: var(--radius-sm); }

/* Buttons: the app's primary button (green fill, dark ink) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem 1.1rem; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: filter .15s, transform .15s, border-color .15s, background .15s; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { border-color: var(--ui-border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }
.btn-lg { padding: .75rem 1.4rem; font-size: 1.05rem; }
.icon-btn { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.icon-btn:hover { border-color: var(--muted); background: var(--surface-2); }
.icon-btn svg { width: 1.2rem; height: 1.2rem; }
.theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: block; }
html[data-theme="light"] .theme-toggle .i-moon { display: none; }
.menu-btn { display: none; }

/* Header: the landing navbar, measured value by value (DaisyUI navbar + menu + btn-xs + btn-primary) */
.site-header { position: sticky; top: 0; z-index: 30; background: #1c1d1f; border-bottom: 1px solid rgb(61 67 73 / .7); }
.header-inner { max-width: 80rem; margin: 0 auto; padding: 15px 1rem; min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.brand { display: inline-flex; flex-direction: column; align-items: flex-end; flex: none; text-decoration: none; transition: opacity .15s; }
.brand:hover { opacity: .9; }
.brand img { display: block; height: auto; width: auto; max-width: 100%; }
.brand .badge { display: inline-block; background: var(--primary); color: var(--primary-ink); padding: 2px 8px; font-size: .875rem; font-weight: 600; line-height: 1; letter-spacing: .05em; text-transform: uppercase; user-select: none; }
.top-nav { display: flex; align-items: center; padding: 8px 4px; font-size: .875rem; line-height: 1.5; }
.top-nav a { display: block; padding: 6px 12px; border-radius: 6px; color: var(--text); text-decoration: none; }
.top-nav a:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.top-nav a[aria-current="page"] { background: color-mix(in srgb, var(--text) 10%, transparent); }
.header-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.lang-switch { display: flex; align-items: center; gap: .25rem; }
.lang-switch a, .lang-switch span.lang { display: inline-flex; align-items: center; gap: 4px; height: 1.5rem; padding: 0 6px; border-radius: 6px; font-size: .6875rem; font-weight: 600; text-decoration: none; color: var(--text); opacity: .6; }
.lang-switch a:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.lang-switch .lang.current { font-weight: 700; color: var(--primary); opacity: 1; }
.lang-switch img { height: .875rem; width: auto; }
.lang-switch .sep { font-size: .75rem; color: var(--text); opacity: .3; }
.site-header .btn-primary { min-height: 2.5rem; padding: 0 16px; font-size: .875rem; border-radius: 6px; border-bottom-color: color-mix(in srgb, var(--primary) 80%, #000); box-shadow: 0 3px 2px -2px rgb(137 243 54 / .3), 0 4px 3px -2px rgb(137 243 54 / .3); }
.header-search-slot { flex: 1 1 auto; max-width: 22rem; min-width: 0; }

/* Layout: left nav panel | article | right TOC panel, centred on wide screens */
.layout { max-width: 80rem; margin: 0 auto; padding: 2.5rem 1rem 5rem; display: grid; gap: 2rem; grid-template-columns: 15.5rem minmax(0, 46rem) 14rem; justify-content: center; align-items: start; }
.layout.no-toc { grid-template-columns: 15.5rem minmax(0, 1fr); }
.layout.wide { grid-template-columns: minmax(0, 1fr); }
/* The nav panel has its natural height and scrolls with the page, so no article is ever cut off */
.sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem .75rem; }
.toc { position: sticky; top: calc(var(--header-h) + 1.25rem); max-height: calc(100vh - var(--header-h) - 2.5rem); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem .75rem; scrollbar-width: thin; }
.sidebar-title { margin: 0 0 .75rem; padding: 0 .6rem; font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.nav-group { margin: 0 0 1.1rem; }
.nav-group:last-child { margin-bottom: 0; }
.nav-group h2 { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 700; color: var(--text-strong); margin: 0 0 .25rem; padding: .3rem .6rem; }
.nav-group h2 svg { width: 1.05rem; height: 1.05rem; flex: none; color: var(--accent-text); }
.nav-group ul { list-style: none; margin: 0 0 0 1.1rem; padding: 0; border-left: 1px solid var(--border); }
.nav-group a { display: block; margin-left: -1px; padding: .34rem .6rem .34rem .9rem; border-left: 2px solid transparent; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); text-decoration: none; font-size: .9rem; line-height: 1.4; }
.nav-group a:hover { background: var(--surface-2); color: var(--text-strong); }
.nav-group a[aria-current="page"] { background: color-mix(in srgb, var(--primary) 16%, var(--surface)); color: var(--text-strong); font-weight: 600; border-left-color: var(--primary); }
.toc h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 .6rem; padding: 0 0 0 .6rem; }
.toc ul { list-style: none; margin: 0 0 0 .6rem; padding: 0; border-left: 1px solid var(--border); }
.toc a { display: block; margin-left: -1px; padding: .28rem .5rem .28rem .85rem; color: var(--muted); text-decoration: none; font-size: .88rem; line-height: 1.4; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text-strong); }
.toc a.active { color: var(--text-strong); font-weight: 600; border-left-color: var(--primary); }
.toc .sub a { padding-left: 1.6rem; font-size: .82rem; line-height: 1.35; }

/* Mobile: the left panel becomes a drawer opened by the header button */
.drawer-links { display: none; }
@media (max-width: 1240px) { .layout { grid-template-columns: 15.5rem minmax(0, 1fr); } .layout .content { max-width: 48rem; } .toc { display: none; } }
@media (max-width: 1023px) { .top-nav { display: none; } }
@media (max-width: 900px) {
  .layout, .layout.no-toc { grid-template-columns: minmax(0, 1fr); padding: 1.5rem 1.25rem 4rem; }
  .header-actions .btn, .header-actions .lang-switch { display: none; }
  .menu-btn { display: inline-grid; }
  .sidebar { position: fixed; z-index: 40; top: var(--header-h); left: 0; bottom: 0; width: min(21rem, 88vw); overflow-y: auto; border-radius: 0; border-width: 0 1px 0 0; transform: translateX(-102%); transition: transform .22s ease; visibility: hidden; padding: 1rem; }
  body.nav-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow); }
  .drawer-links { display: block; margin: 0 0 1rem; padding: 0 0 1rem; border-bottom: 1px solid var(--border); }
  .drawer-links a { display: block; padding: .55rem .6rem; color: var(--text); text-decoration: none; font-weight: 600; border-radius: var(--radius-sm); }
  .drawer-links a:hover { background: var(--surface-2); }
  .drawer-links .lang-switch { display: inline-flex; margin: .5rem .5rem 0; }
  .drawer-links .btn { display: flex; margin-top: .75rem; }
  .backdrop { position: fixed; inset: var(--header-h) 0 0 0; z-index: 35; background: rgb(0 0 0 / .55); }
  body:not(.nav-open) .backdrop { display: none; }
}
@media (min-width: 901px) { .backdrop, .drawer-only { display: none; } }

/* Article header and column */
.content { min-width: 0; }
.breadcrumbs { font-size: .875rem; color: var(--muted); margin: 0 0 1.5rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "\203A"; margin-right: .35rem; opacity: .7; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text-strong); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--text); }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .9rem; font-size: .8rem; font-weight: 700; color: var(--accent-text); text-transform: uppercase; letter-spacing: .08em; }
.eyebrow a { color: inherit; text-decoration: none; padding: .15rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--primary) 16%, transparent); }
.eyebrow a:hover { background: color-mix(in srgb, var(--primary) 28%, transparent); }
.eyebrow .dot { opacity: .5; }
h1 { font-size: clamp(2rem, 3.2vw, 2.6rem); line-height: 1.15; margin: 0 0 .9rem; letter-spacing: -.015em; font-weight: 700; color: var(--text-strong); }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--muted); margin: 0 0 1.25rem; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.1rem; font-size: .9rem; color: var(--muted); margin-bottom: 2.25rem; padding: .9rem 0; border-block: 1px solid var(--border); }
.meta-row .meta-item { display: inline-flex; align-items: center; gap: .4rem; }
.meta-row svg { width: 1rem; height: 1rem; }
.list-heading { margin: 2.25rem 0 0; font-size: 1.25rem; color: var(--text-strong); }

/* Prose */
.prose { font-size: 1.125rem; line-height: 1.75; }
.prose h2 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 1rem; letter-spacing: -.01em; color: var(--text-strong); font-weight: 700; }
.prose h3 { font-size: 1.2rem; margin: 0 0 .5rem; color: var(--text-strong); font-weight: 650; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15rem; }
.prose li { margin: .35rem 0; }
.prose a { font-weight: 500; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); padding: .12em .4em; border-radius: 5px; border: 1px solid var(--border); }
.prose pre { background: var(--code-bg); padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; border: 1px solid var(--border); }
.prose pre code { background: none; padding: 0; border: 0; }
.prose img { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
/* Screenshots are 1920 wide: scale to the column, keep the ratio from the width/height attributes. */
.prose picture, .prose picture img { display: block; max-width: 100%; height: auto; }
.doc-video { margin: 0 0 1.75rem; }
.doc-video-play, .doc-video iframe { display: flex; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--border); }
.doc-video-play { align-items: flex-end; gap: 1rem; padding: 1.5rem; text-decoration: none; color: var(--text-strong); background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--primary) 22%, var(--surface)), var(--surface) 70%); }
.doc-video-play:hover .doc-video-icon, .doc-video-play:focus-visible .doc-video-icon { transform: scale(1.06); }
.doc-video-icon { display: grid; place-items: center; flex: none; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--primary); color: var(--primary-ink); transition: transform .15s; }
.doc-video-icon svg { width: 1.6rem; height: 1.6rem; }
.doc-video-text { display: grid; gap: .25rem; }
.doc-video-text small { color: var(--muted); font-size: .9rem; }
.doc-video figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }
.prose figure { margin: 1.75rem 0; }
.prose figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }

/* Tables fill the column: the wrapper scrolls on narrow screens, the table is always 100% wide */
.table-wrap { margin: 1.4rem 0 1.6rem; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5; margin: 0; }
.prose th, .prose td { text-align: left; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap:has(th:nth-child(4)) table { font-size: .9rem; }
.table-wrap:has(th:nth-child(4)) th, .table-wrap:has(th:nth-child(4)) td { padding: .65rem .7rem; }
.table-wrap:has(th:nth-child(4)) th { white-space: normal; font-size: .72rem; letter-spacing: .02em; }
.prose th { background: var(--surface-2); color: var(--text-strong); font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.prose tr:last-child td { border-bottom: 0; }

/* UI labels: bold in the body is an interface name (a button, a menu, a screen), styled like one */
.prose strong { font-weight: 600; color: var(--text-strong); }
.prose :is(p, li, td, blockquote) > strong:not(.step-title):not(.step-lead):not(.callout-label),
.prose :is(p, li) > a > strong {
  display: inline-block; font-size: .88em; line-height: 1.35; padding: .05em .5em; margin: 0; white-space: nowrap;
  background: var(--ui-bg); border: 1px solid var(--ui-border); border-bottom-width: 2px; border-radius: .4rem;
}

/* Steps: numbered rail; a bold sentence at the start is the step title, other bold stays inline */
.prose ol { counter-reset: step; list-style: none; padding: 0; margin: 1.4rem 0 1.6rem; }
.prose ol > li { counter-increment: step; position: relative; padding: 0 0 1.5rem 3.4rem; margin: 0; min-height: 4.2rem; }
.prose ol > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-weight: 800; font-size: 1rem; display: grid; place-items: center; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent); }
.prose ol > li::after { content: ""; position: absolute; left: 1.09rem; top: 2.45rem; bottom: .15rem; width: 2px; background: var(--border); }
.prose ol > li:last-child { padding-bottom: 0; min-height: 0; }
.prose ol > li:last-child::after { display: none; }
.prose ol > li > p { margin: 0 0 .5rem; }
.prose .step-lead { color: var(--text-strong); font-weight: 650; }
.prose .step-title { display: block; font-size: 1.15rem; color: var(--text-strong); margin-bottom: .2rem; }
.prose ul { padding-left: 1.4rem; }
.prose ul li::marker { color: var(--primary); }
html[data-theme="light"] .prose ul li::marker { color: #2a7208; }

/* Sections written as cards (result, troubleshooting, privacy, next step) */
.doc-section { margin: 0 0 3rem; }
.doc-section:not(.doc-plain) { padding: 1.5rem 1.6rem 1.3rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.doc-section:not(.doc-plain) > h2 { display: flex; align-items: center; gap: .75rem; }
.sec-icon { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; flex: none; border-radius: .65rem; color: var(--k); background: color-mix(in srgb, var(--k) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 40%, transparent); }
.sec-icon svg { width: 1.25rem; height: 1.25rem; }
.doc-plain > h2 { padding-top: 2rem; border-top: 1px solid var(--border); }
.doc-plain:first-child > h2 { border-top: 0; padding-top: 0; }
.doc-trouble { --k: var(--warning); }
.doc-faq { --k: var(--note); }
.doc-privacy { --k: var(--accent-text); }
.doc-result { --k: var(--tip); }
.doc-next { --k: var(--accent-text); }
.topic { margin: 1rem 0 0; padding: 1.1rem 1.25rem .15rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.topic h3 { display: flex; gap: .55rem; align-items: baseline; font-size: 1.1rem; }
.topic h3::before { content: "?"; flex: none; display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 999px; font-size: .8rem; font-weight: 800; background: var(--k, var(--warning)); color: #121212; transform: translateY(-1px); }
.doc-privacy .topic h3::before, .doc-result .topic h3::before, .doc-next .topic h3::before, .doc-plain .topic h3::before { content: "#"; background: var(--surface-2); color: var(--muted); }

/* Callouts (a blockquote starting with **Tip:** / **Note:** / **Warning:**) */
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); }
.prose blockquote p:last-child { margin: 0; }
.callout-tip { --k: var(--tip); } .callout-note { --k: var(--note); } .callout-warning { --k: var(--warning); }
.prose blockquote.callout { border-left-color: var(--k); background: color-mix(in srgb, var(--k) 9%, var(--surface)); }
.prose .callout-label { display: inline; background: none; border: 0; padding: 0; margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--k); }
.prose .callout-label::after { content: " "; }

/* Tags and chips: small and light */
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.tags li { margin: 0; padding: 0; border: 0; background: none; }
.tag { display: inline-block; font-size: .8rem; line-height: 1.5; padding: .1rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-decoration: none; transition: color .15s, background .15s; }
.tag:hover { color: var(--text-strong); background: color-mix(in srgb, var(--primary) 22%, var(--surface-2)); }
.tag::before { content: "#"; opacity: .7; }
.chip { display: inline-block; font-size: .78rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.tags.spaced { margin-top: .9rem; }

/* Article cards (home, sections, categories, tags): icon, title, one-line description, light meta */
.home-body, .content { container-type: inline-size; }
.grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); margin: 1.1rem 0 2.5rem; }
@container (min-width: 32rem) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 50rem) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 68rem) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { position: relative; display: flex; flex-direction: column; gap: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.1rem; text-decoration: none; color: var(--text); transition: border-color .18s, transform .18s, box-shadow .18s; }
a.card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
a.card::after { content: "\2192"; position: absolute; right: 1.15rem; top: 1.2rem; color: var(--muted); transition: transform .18s, color .18s; }
a.card:hover::after { transform: translateX(3px); color: var(--link); }
.card h3 { margin: .35rem 0 0; font-size: 1.1rem; line-height: 1.3; color: var(--text-strong); font-weight: 650; padding-right: 1.5rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .card-foot { margin-top: auto; padding-top: .7rem; display: flex; gap: .75rem; align-items: center; font-size: .82rem; color: var(--muted); }
.card .card-foot .kind { font-weight: 600; color: var(--accent-text); }
.card-icon { width: 2.75rem; height: 2.75rem; border-radius: .8rem; display: grid; place-items: center; color: var(--accent-text); background: color-mix(in srgb, var(--primary) 16%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent); font-weight: 800; }
.card-icon svg { width: 1.4rem; height: 1.4rem; }
.card-num { font-size: 1.05rem; color: var(--primary-ink); background: var(--primary); box-shadow: none; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 3rem; }
.section-head h2 { margin: 0; font-size: 1.5rem; color: var(--text-strong); letter-spacing: -.01em; font-weight: 700; }
.section-head a { font-size: .95rem; font-weight: 600; }
.page-hero { margin-bottom: 2rem; }
.page-hero .lead { max-width: 44rem; }
.group-head { display: flex; align-items: center; gap: .75rem; margin: 2.5rem 0 0; }
.group-head h2 { margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--text-strong); }
.group-head .chip { margin-left: auto; }

/* Home hero */
.hero { position: relative; isolation: isolate; border-bottom: 1px solid var(--border); background: radial-gradient(60rem 28rem at 10% -10%, var(--glow), transparent 60%), radial-gradient(50rem 26rem at 100% 0%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 60%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .45; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 3rem 3rem; -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hero-inner { max-width: 80rem; margin: 0 auto; padding: 4.5rem 1rem 4rem; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.hero-copy { max-width: 36rem; }
.hero h1 { text-wrap: balance; }
.hero .eyebrow::before { content: ""; width: 1.4rem; height: 2px; background: currentColor; }
.hero-search-slot:empty { display: none; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.08; letter-spacing: -.025em; margin-bottom: 1.1rem; }
.hero h1 .accent { color: var(--accent-text); }
.hero .lead { max-width: 32rem; font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-cats { display: grid; gap: .75rem; }
.hero-cat { display: flex; align-items: center; gap: 1rem; padding: .95rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.hero-cat:hover { border-color: var(--primary); transform: translateY(-1px); }
.hero-cat .card-icon { margin: 0; flex: none; }
.hero-cat-text { display: grid; gap: .15rem; min-width: 0; }
.hero-cat-text strong { color: var(--text-strong); font-size: 1rem; }
.hero-cat-text span { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.home-body { max-width: 80rem; margin: 0 auto; padding: 1rem 1rem 4.5rem; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding: 2.5rem 1.25rem 2rem; } .home-body { padding: 1rem 1.25rem 3rem; } }
@media (prefers-reduced-motion: no-preference) { .hero-copy { animation: rise .5s ease both; } @keyframes rise { from { opacity: 0; transform: translateY(10px); } } }

/* Recently updated rows (home) */
.list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .75rem; }
.list > li { padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s; }
.list > li:hover { border-color: var(--muted); }
.list a.title { font-weight: 650; font-size: 1.08rem; color: var(--text-strong); text-decoration: none; }
.list a.title:hover { color: var(--link); text-decoration: underline; }
.list p { margin: .25rem 0 .6rem; color: var(--muted); }
.list .row-meta { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }

/* Branded CTA, previous/next, related */
.cta-band { position: relative; overflow: hidden; margin-top: 3.25rem; border-radius: var(--radius); padding: 1.6rem 1.75rem; border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border)); background: radial-gradient(28rem 12rem at 100% 0, var(--glow), transparent 70%), var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cta-band strong { display: block; font-size: 1.3rem; color: var(--text-strong); }
.cta-band p { margin: .2rem 0 0; color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
.pager a { display: block; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 1rem 1.2rem; text-decoration: none; color: var(--text-strong); font-weight: 650; line-height: 1.35; transition: border-color .18s, transform .18s; }
.pager a:hover { border-color: var(--primary); transform: translateY(-2px); }
.pager small { display: block; color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .25rem; }
.pager .prev small::before { content: "\2190  "; }
.pager .next small::after { content: "  \2192"; }
.pager .next { text-align: right; }
.pager.single { grid-template-columns: 1fr; }
.pager.single .next { text-align: left; }
.related { margin-top: 2.75rem; }
.related h2 { font-size: 1.15rem; color: var(--text-strong); margin: 0 0 .75rem; font-weight: 700; }
.related .grid { margin: 0; }
@container (min-width: 36rem) { .related .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.related .card { padding: 1rem 1.1rem; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

/* 404 */
.not-found { text-align: center; padding: 4rem 0 2rem; max-width: 40rem; margin: 0 auto; }
.not-found .code { font-size: 6rem; font-weight: 800; line-height: 1; letter-spacing: -.05em; color: var(--accent-text); }
.not-found .hero-actions { justify-content: center; }
.not-found .grid { text-align: left; margin-top: 2.5rem; }

/* Footer: the landing footer (same grid, colours and type), always on the dark surface */
.site-footer { background: #232629; color: var(--text); margin-top: 1rem; }
.footer-inner { max-width: 80rem; margin: 0 auto; padding: 4rem 1rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.footer-brand img { display: block; height: auto; width: auto; max-width: 100%; }
.footer-brand p { margin: 1rem 0 0; max-width: 24rem; color: rgb(247 246 245 / .7); font-size: 1rem; line-height: 1.5; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; align-content: start; }
.footer-grid a { color: rgb(247 246 245 / .6); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; line-height: 1.5; }
.footer-grid a:hover { text-decoration: underline; }
.footer-grid svg { width: 1rem; height: 1rem; flex: none; }
.footer-rule { margin: 2.5rem 0 1rem; border: 0; border-top: 1px solid rgb(247 246 245 / .12); }
.footer-rights { margin: 0; color: rgb(247 246 245 / .5); font-size: .875rem; }
.footer-legal { margin-top: 1rem; text-align: center; font-size: .75rem; line-height: 1.33; }
.footer-legal p { margin: 0 0 .25rem; color: rgb(247 246 245 / .4); }
.footer-legal p:nth-child(even) { color: rgb(247 246 245 / .35); }
@media (max-width: 1023px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 639px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 600px) { .breadcrumbs [aria-current] { display: none; } .breadcrumbs li:nth-last-child(2)::after { content: ""; } }
html[data-theme="light"] .topic h3::before { color: #fff; }

/* Search: one form in the header, the home hero and the results page */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.search { position: relative; display: flex; align-items: center; width: 100%; background: var(--surface); border: 1px solid var(--ui-border); border-radius: var(--radius-sm); }
.search:focus-within { border-color: var(--primary); }
.search-icon { position: absolute; left: .7rem; width: 1.1rem; height: 1.1rem; color: var(--muted); pointer-events: none; }
.search input[type="search"] { flex: 1 1 auto; min-width: 0; height: 2.5rem; padding: 0 2.6rem 0 2.35rem; background: transparent; border: 0; color: var(--text); font: inherit; font-size: .9rem; -webkit-appearance: none; appearance: none; }
.search input[type="search"]:focus-visible { outline: none; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input[type="search"]::-webkit-search-cancel-button { display: none; }
.search-key { position: absolute; right: .6rem; padding: 0 .4rem; border: 1px solid var(--ui-border); border-radius: 4px; font: inherit; font-size: .75rem; line-height: 1.3rem; color: var(--muted); pointer-events: none; }
.search:focus-within .search-key { display: none; }
/* Without JavaScript the box needs a visible button, with it Enter is enough */
.search-submit { display: none; margin: 3px; height: calc(2.5rem - 8px); padding: 0 .9rem; border: 0; border-radius: 6px; background: var(--primary); color: var(--primary-ink); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
html:not(.js) .search-submit { display: inline-block; }
html:not(.js) .search-key { display: none; }
.search-list { position: absolute; z-index: 40; top: calc(100% + .35rem); left: 0; right: 0; margin: 0; padding: .35rem; list-style: none; max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--ui-border); border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgb(0 0 0 / .35); }
.search-list[hidden] { display: none; }
.search-list li { padding: .5rem .65rem; border-radius: 6px; cursor: pointer; color: var(--text); }
.search-list li strong { display: block; font-size: .9rem; color: var(--text-strong); }
.search-list li span { display: block; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-list li[aria-selected="true"], .search-list li:hover { background: var(--surface-2); outline: 2px solid var(--primary); outline-offset: -2px; }
.search-list li.search-empty { cursor: default; color: var(--muted); font-size: .88rem; }
.search-list li.search-empty:hover { background: transparent; outline: 0; }
.search-list li.search-all { font-size: .85rem; font-weight: 600; color: var(--link); }
.hero-search-slot { margin: 0 0 1.25rem; max-width: 32rem; }
.hero-search-slot .search input[type="search"] { height: 3rem; font-size: 1rem; }
.search-page { max-width: 32rem; margin: 0 0 1.25rem; }
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; }
  .header-search-slot { order: 3; flex: 1 0 100%; max-width: none; }
}
