/* ═══════════════════════════════════════════════════════════════════════
   UnluckyTECH base sheet (phase 2 redesign). Loaded on every page.

   Tokens, base elements, shared components, header, mobile menu and footer.
   Page layouts live in assets/css/v2/*.css and load per page from
   inc/scripts.php. Source of truth for every value here is the approved
   prototype (design/prototype/index.html) and design/system/tokens.json.

   Light is the default. Dark comes from prefers-color-scheme, or from
   data-theme on <html>, which assets/js/theme-init.js sets before first
   paint from the visitor's saved choice. Never set it per user on the
   server: a cached page would hand one visitor's theme to everyone.

   Two WordPress body classes would collide with prototype names, so they
   are renamed here: .page → .pg (body.page on every Page) and the article
   tag pill .tag → .tagpill (body.tag on tag archives).
   ═══════════════════════════════════════════════════════════════════════ */
@font-face { font-family: "Clash Display"; src: url("../fonts/clash-display/ClashDisplay-Variable.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("../fonts/satoshi/Satoshi-Variable.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #f6f5f2; --surface: #ffffff; --surface-sunken: #eeece7; --border: #e3e0d9; --border-control: #8b867c;
  --ink: #1a1b1e; --ink-2: #45464c; --ink-muted: #66655f; --on-ink: #ffffff;
  --accent: #2b2c30; --accent-ink: #1a1b1e; --on-accent: #ffffff; --accent-soft: #e8e6e0;
  --success: #17734a; --success-soft: #e3f2ea; --warning: #8f5600; --warning-soft: #fbefd9;
  --danger: #b3261e; --danger-soft: #fbe4e2; --info: #2a5aa5; --info-soft: #e4ecf8; --focus: #2a5aa5;
  --shadow-card: 0 1px 2px rgba(26, 27, 30, 0.06); --shadow-pop: 0 12px 32px rgba(26, 27, 30, 0.14);
  --term: #1a1b1e; --term-border: #1a1b1e; --term-ink: #f4f3f0; --term-dot: #45464c;
  --font-display: "Clash Display", "Satoshi", system-ui, sans-serif;
  --font-body: "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-pill: 999px;
  --container: 1200px; --header-height: 64px; --sidebar-width: 248px;
}

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1012; --surface: #17181b; --surface-sunken: #0b0b0d; --border: #2a2b30; --border-control: #6e7079;
  --ink: #ececee; --ink-2: #b9bac0; --ink-muted: #93949b; --on-ink: #111214;
  --accent: #e4e4e7; --accent-ink: #ffffff; --on-accent: #111214; --accent-soft: #26272c;
  --success: #4cc38a; --success-soft: #13291e; --warning: #e5a640; --warning-soft: #2e2312;
  --danger: #f27a72; --danger-soft: #341a18; --info: #82aef0; --info-soft: #16233a; --focus: #82aef0;
  --shadow-card: none; --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.6);
  --term: #1e1f23; --term-border: #3a3b41; --term-ink: #f4f3f0; --term-dot: #4a4b52;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0f1012; --surface: #17181b; --surface-sunken: #0b0b0d; --border: #2a2b30; --border-control: #6e7079;
  --ink: #ececee; --ink-2: #b9bac0; --ink-muted: #93949b; --on-ink: #111214;
  --accent: #e4e4e7; --accent-ink: #ffffff; --on-accent: #111214; --accent-soft: #26272c;
  --success: #4cc38a; --success-soft: #13291e; --warning: #e5a640; --warning-soft: #2e2312;
  --danger: #f27a72; --danger-soft: #341a18; --info: #82aef0; --info-soft: #16233a; --focus: #82aef0;
  --shadow-card: none; --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.6);
  --term: #1e1f23; --term-border: #3a3b41; --term-ink: #f4f3f0; --term-dot: #4a4b52;
  color-scheme: dark;
}

/* logo swap per theme */
.logo-on-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-on-light { display: none; } :root:not([data-theme="light"]) .logo-on-dark { display: block; } }
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
form { margin: 0; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/24px var(--font-body); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
a { color: var(--accent-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }
p { margin: 0; }
.ico { width: 20px; height: 20px; flex: none; }
.ico-sm { width: 16px; height: 16px; flex: none; }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--container); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.narrow { max-width: 720px; }
/* ── Eyebrow ─────────────────────────────────────────────────────────── */
.eyebrow { display: inline-flex; gap: var(--space-2); font: 500 13px/16px var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--accent-ink); }
.eyebrow::before { content: ">_"; letter-spacing: 0; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 0 18px; border-radius: var(--radius-md); border: 1px solid transparent; font: 600 16px/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink-2); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--ink-2); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-control); }
.btn-secondary:hover { background: var(--surface-sunken); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-sunken); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-danger-fill { background: var(--danger); color: var(--surface); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-md); border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { background: var(--surface-sunken); color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ── Badge ───────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--radius-sm); font: 500 13px/16px var(--font-mono); letter-spacing: .5px; text-transform: uppercase; background: var(--surface-sunken); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: var(--radius-pill); background: currentColor; }
.badge.plain::before { display: none; }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }

/* ── Card ────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-5); min-width: 0; }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color .15s ease; }
a.card:hover { border-color: var(--border-control); }
.card-title { margin: 0; font: 700 20px/28px var(--font-body); color: var(--ink); }
.card-meta { margin-top: 4px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); }
.tile { width: 40px; height: 40px; flex: none; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--surface-sunken); color: var(--ink); }
.grid { display: grid; gap: var(--space-5); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* ── Fields ──────────────────────────────────────────────────────────── */
.field { display: grid; gap: var(--space-2); }
.label { font-size: 14px; line-height: 20px; font-weight: 600; }
.help { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 10px var(--space-4); background: var(--surface); color: var(--ink); border: 1px solid var(--border-control); border-radius: var(--radius-md); font: 400 16px/22px var(--font-body); }
.input::placeholder, .textarea::placeholder { color: var(--ink-muted); }
.textarea { min-height: 120px; resize: vertical; }
.field.error .input { border-color: var(--danger); }
.field.error .help { color: var(--danger); }
.form { display: grid; gap: var(--space-4); }
.check { display: flex; gap: var(--space-2); align-items: center; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }

/* ── Notice ──────────────────────────────────────────────────────────── */
.notice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border-radius: var(--radius-md); background: var(--info-soft); }
.notice > .ico { color: var(--info); margin-top: 2px; }
.notice-title { font-weight: 700; }
.notice-body { margin-top: 2px; color: var(--ink-2); font-size: 14px; line-height: 20px; font-weight: 500; }
.notice.success { background: var(--success-soft); } .notice.success > .ico { color: var(--success); }
.notice.warning { background: var(--warning-soft); } .notice.warning > .ico { color: var(--warning); }
.notice.danger { background: var(--danger-soft); } .notice.danger > .ico { color: var(--danger); }

/* ── Table ───────────────────────────────────────────────────────────── */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: var(--space-3) var(--space-4); background: var(--surface-sunken); color: var(--ink-muted); font: 500 13px/16px var(--font-mono); letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
td { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); color: var(--ink-2); vertical-align: middle; }
td:first-child { color: var(--ink); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
td .mono { font-size: 14px; }
tbody tr:hover td { background: var(--surface-sunken); }
td a.rowlink { color: var(--ink); font-weight: 600; text-decoration: none; }
td a.rowlink:hover { text-decoration: underline; }

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; height: var(--header-height); background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: var(--space-6); }
.logo { display: flex; align-items: center; }
.logo img { height: 28px; width: auto; }
.mainnav { display: flex; gap: var(--space-1); }
.mainnav a { display: inline-flex; align-items: center; height: var(--header-height); padding: 0 var(--space-3); color: var(--ink-2); font-weight: 600; text-decoration: none; box-shadow: inset 0 -2px 0 transparent; }
.mainnav a:hover { color: var(--ink); }
.mainnav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .site-header .wrap { gap: var(--space-3); }
  .mainnav, .header-contact { display: none; }
  .menu-btn { display: inline-grid; }
}
@media (max-width: 420px) { .account-btn span { display: none; } .account-btn { padding: 0 10px; } }

/* mobile sheet */
.sheet { position: fixed; inset: 0; z-index: 40; background: var(--surface); padding: calc(env(safe-area-inset-top, 0px) + var(--space-3)) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + var(--space-5)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: var(--space-5); overflow-y: auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet nav { display: grid; }
.sheet nav a { display: flex; align-items: center; min-height: 56px; border-bottom: 1px solid var(--border); color: var(--ink); font: 600 20px/28px var(--font-body); text-decoration: none; }
.sheet nav a[aria-current="page"] { color: var(--accent-ink); }

/* ── Pages ───────────────────────────────────────────────────────────── */
main { min-height: 60vh; }
.pg { padding-block: var(--space-8); }
.page-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-7); max-width: 760px; }
.page-title { margin: 0; font: 600 40px/44px var(--font-display); letter-spacing: -.8px; }
.lead { font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: 62ch; }
.section + .section { margin-top: var(--space-8); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); flex-wrap: wrap; }
.section-title { margin: 0; font: 600 28px/34px var(--font-display); letter-spacing: -.4px; }
.section-head a { font-weight: 600; }
@media (max-width: 640px) { .pg { padding-block: var(--space-7); } .page-title { font-size: 32px; line-height: 36px; } .section + .section { margin-top: var(--space-7); } }

/* service detail / product */
.feature { display: grid; gap: var(--space-2); }
.feature .tile { margin-bottom: var(--space-2); }
.feature p { color: var(--ink-2); font-size: 15px; line-height: 22px; }
details.faq { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
details.faq + details.faq { margin-top: var(--space-3); }
details.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); font-weight: 700; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font: 500 20px/24px var(--font-mono); color: var(--ink-muted); }
details.faq[open] summary::after { content: "−"; }
details.faq p { padding: 0 var(--space-5) var(--space-5); color: var(--ink-2); max-width: 70ch; }
.cta-band { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: center; justify-content: space-between; padding: var(--space-6); border-radius: var(--radius-lg); background: var(--ink); color: var(--on-ink); }
.cta-band h2 { margin: 0; font: 600 28px/34px var(--font-display); }
.cta-band p { color: var(--on-ink); opacity: .85; margin-top: var(--space-2); }
.cta-band .btn-secondary { background: transparent; color: var(--on-ink); border-color: var(--on-ink); }
.price-card { display: grid; gap: var(--space-4); align-content: start; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.price { font: 600 40px/44px var(--font-display); font-variant-numeric: tabular-nums; }
.price small { font: 500 16px/24px var(--font-body); color: var(--ink-muted); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.checklist li { display: flex; gap: var(--space-3); color: var(--ink-2); }
.checklist .ico { color: var(--success); margin-top: 2px; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--space-7); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: var(--space-6); } }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { height: 36px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--border-control); background: var(--surface); color: var(--ink); font: 600 14px/1 var(--font-body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { margin-top: var(--space-8); border-top: 1px solid var(--border); background: var(--surface); }
.site-footer .wrap { padding-block: var(--space-7) calc(var(--space-6) + env(safe-area-inset-bottom, 0px)); display: grid; gap: var(--space-6); }
.foot-cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--space-5); }
.foot-cols .foot-title { margin: 0 0 var(--space-3); font: 500 13px/16px var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.foot-cols a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.foot-cols a:hover { color: var(--ink); text-decoration: underline; }
.foot-cols p { color: var(--ink-2); font-size: 14px; line-height: 20px; font-weight: 500; margin-top: var(--space-3); max-width: 32ch; }
.foot-bottom { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; padding-top: var(--space-5); border-top: 1px solid var(--border); color: var(--ink-muted); font-size: 14px; font-weight: 500; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: var(--surface-sunken); border: 1px solid var(--border); }
.seg button { height: 32px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink-2); font: 600 14px/1 var(--font-body); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); outline: 1px solid var(--border); }
@media (max-width: 900px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-cols > :first-child { grid-column: 1 / -1; } }

/* sign-in */
.auth { max-width: 440px; margin: 0 auto; }
.auth .card { padding: var(--space-6); }
.auth h1 { margin: var(--space-2) 0 var(--space-2); font: 600 28px/34px var(--font-display); }
.code-input { letter-spacing: 8px; font-family: var(--font-mono); font-size: 22px; text-align: center; }
.divider { display: flex; align-items: center; gap: var(--space-3); color: var(--ink-muted); font-size: 14px; font-weight: 500; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100vw - 32px)); display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-pop); font-weight: 500; }
.toast .mono { opacity: .7; font-size: 13px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ── v2: header right side, homepage hero, quick links, help block ───── */
.hsearch { display: flex; align-items: center; gap: var(--space-2); height: 40px; width: clamp(220px, 22vw, 300px); padding: 0 14px; border-radius: var(--radius-pill); background: var(--surface-sunken); border: 1px solid var(--border); color: var(--ink-muted); }
.hsearch:focus-within { border-color: var(--border-control); outline: 2px solid var(--focus); outline-offset: 2px; }
.hsearch input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: 500 16px/1 var(--font-body); outline: none; }
.hsearch input::placeholder { color: var(--ink-muted); font-size: 14px; }
.search-toggle { display: none; }
.hdiv { width: 1px; height: 24px; background: var(--border); margin: 0 var(--space-2); }
.hlink { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-2); border-radius: var(--radius-md); color: var(--ink); font: 600 15px/1 var(--font-body); text-decoration: none; white-space: nowrap; }
.hlink:hover { background: var(--surface-sunken); }
.hlink[aria-current="page"] { color: var(--accent-ink); }
.search-drop { border-top: 1px solid var(--border); background: var(--surface); }
.search-drop form { display: flex; align-items: center; gap: var(--space-3); padding-block: var(--space-3); color: var(--ink-muted); }
.search-drop input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--border-control); border-radius: var(--radius-md); padding: 0 var(--space-4); background: var(--surface); color: var(--ink); font: 400 16px/1 var(--font-body); }
@media (max-width: 1180px) { .hsearch { display: none; } .search-toggle { display: inline-grid; } }
/* Narrow phones: the wordmark plus four 44px buttons don't fit, so show only the round mark (the left of the wordmark image). */
@media (max-width: 380px) { .site-header .logo { width: 28px; overflow: hidden; } .site-header .logo img { max-width: none; } }
@media (max-width: 900px) { .hlink span, .hdiv { display: none; } .hlink { width: 44px; justify-content: center; padding: 0; } .site-header .wrap { gap: var(--space-2); } .header-actions { gap: 0; } }

.kicker { font: 500 13px/16px var(--font-mono); letter-spacing: 2px; text-transform: uppercase; color: var(--ink-2); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 17px; border-radius: var(--radius-lg); }

/* ── WordPress and site glue (not in the prototype) ──────────────────── */
.ut-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 60; padding: 10px 16px; border-radius: var(--radius-md); background: var(--ink); color: var(--on-ink); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
/* The block theme wraps each template in .wp-site-blocks; keep it neutral. */
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block: 0; }
body.sheet-open { overflow: hidden; }
.hlink.is-signed-in { color: var(--ink); }
/* Template parts render inside a wrapper div; let the sticky header stick to the page, not the wrapper. */
.site-chrome { display: contents; }
/* A page still on the old design is held on dark (inc/site.php); the toggle would do nothing there. */
:root[data-theme-lock] .seg { display: none; }

/* ── Shared reading and detail blocks (articles, products, legal) ───── */
.stack { display: grid; gap: var(--space-4); }
.meta-list { display: grid; gap: var(--space-3); margin: 0; }
.meta-list dt { font: 500 13px/16px var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); }
.meta-list dd { margin: 4px 0 0; font-weight: 600; }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-size: 14px; font-weight: 500; color: var(--ink-muted); margin-bottom: var(--space-5); }
.crumbs a { color: var(--ink-2); }
.prose { min-width: 0; font-size: 17px; line-height: 29px; color: var(--ink-2); }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { margin-top: var(--space-7); color: var(--ink); font: 600 26px/32px var(--font-display); letter-spacing: -.3px; scroll-margin-top: 96px; }
.prose > .notice:first-child { margin-top: 0; }
.prose strong { color: var(--ink); }
.prose code { font: 400 14px/20px var(--font-mono); padding: 2px 6px; border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink); border: 1px solid var(--border); }
.prose .notice code { background: var(--surface); }
.code { border-radius: var(--radius-md); overflow: hidden; background: var(--term); border: 1px solid var(--term-border); }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 6px 8px 6px 14px; border-bottom: 1px solid #2c2d32; color: #a2a3a9; font: 500 13px/20px var(--font-mono); }
.code-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy { flex: none; height: 30px; padding: 0 10px; border: 1px solid #3a3b41; border-radius: var(--radius-sm); background: transparent; color: #e6e6e8; font: 600 13px/1 var(--font-body); cursor: pointer; }
.copy:hover { background: #2a2b30; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.code code, .prose .code code { padding: 0; border: 0; border-radius: 0; background: none; color: var(--term-ink); font: 400 14px/23px var(--font-mono); white-space: pre; }
.code .p { color: #8d8e95; user-select: none; }
.code .c { color: #a2a3a9; }
.prose .table-wrap td { vertical-align: top; font-size: 15px; line-height: 22px; }
.prose .table-wrap code { white-space: nowrap; }
.prose h3 { margin-top: var(--space-6); color: var(--ink); font: 700 20px/28px var(--font-body); }
.prose a { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: var(--space-2); }
.prose img { border-radius: var(--radius-md); }
.prose pre { margin: 0; padding: 14px 16px; overflow-x: auto; border-radius: var(--radius-md); background: var(--term); border: 1px solid var(--term-border); }
.prose pre code { padding: 0; border: 0; background: none; color: var(--term-ink); white-space: pre; }
.prose blockquote { margin-left: 0; padding-left: var(--space-4); border-left: 2px solid var(--border-control); }
.meta-list > div + div { margin-top: var(--space-3); }
/* Signed-in admins see WordPress's toolbar above everything; keep the sticky header under it. */
.admin-bar .site-header { top: calc(env(safe-area-inset-top, 0px) + 32px); }
@media (max-width: 782px) { .admin-bar .site-header { top: calc(env(safe-area-inset-top, 0px) + 46px); } }
@media (max-width: 600px) { .admin-bar .site-header { top: env(safe-area-inset-top, 0px); } }
