/* SMPHosting design system: tokens, base, components. Shared by the site and the billing preview.
   Signature: the page is a slice through a world. Sections are layers (surface, dirt, stone,
   deepslate, bedrock) joined by stepped edges, each tagged with a real Y level. Everything else
   stays quiet: flat surfaces, 1px rules, one green. */

/* ---------- Fallback faces sized to the web fonts, so the swap barely moves text ---------- */
@font-face { font-family: "Archivo Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial"); font-weight: 700 900; size-adjust: 119%; ascent-override: 72%; descent-override: 19%; }
@font-face { font-family: "Geist Fallback"; src: local("Arial"), local("ArialMT"), local("Helvetica"); size-adjust: 102.2%; ascent-override: 94%; descent-override: 25%; line-gap-override: 0%; }

:root {
  color-scheme: dark;
  /* Brand */
  --grass: #a3ef63;
  --grass-hover: #b6f57f;
  --grass-ink: #0b1a0a;
  --grass-edge: #6fb83a;
  /* Surfaces (dark is the default: the brand's own night) */
  --bg: #081319;
  --bg-sunken: #061015;
  --surface: #11232b;
  --surface-2: #162b34;
  --surface-hover: #183039;
  --line: #1f3740;
  --line-strong: #2c4852;
  --field-border: #5a7882;
  /* Text */
  --text: #eef5ec;
  --text-2: #a9bcb6;
  --text-3: #8ba39a;
  --link: #a3ef63;
  --focus: #a3ef63;
  /* Signals: each also has its own shape in the UI */
  --ok: #a3ef63;
  --warn: #f2b24a;
  --bad: #ff8a7e;
  --info: #8ccfff;
  /* Materials (art and Y tags only) */
  --m-grass: #a3ef63;
  --m-dirt: #83583a;
  --m-stone: #9aa4a7;
  --m-deep: #3a454b;
  --m-bedrock: #22282b;
  /* Layers: the page background deepens as you scroll */
  --layer-surface: #081319;
  --layer-dirt: #0e1816;
  --layer-stone: #0d1a1f;
  --layer-deep: #0a151a;
  --layer-bedrock: #05090b;
  /* Type */
  --font-display: "Archivo", "Archivo Fallback", system-ui, sans-serif;
  --font-text: "Geist", "Geist Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.625rem, 1.25rem + 1.4vw, 2.125rem);
  --step-4: clamp(2rem, 1.35rem + 2.6vw, 3.125rem);
  --step-5: clamp(2.5rem, 1.4rem + 4.6vw, 5rem);
  /* Space (4px grid) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --grass-edge: #4f8f22;
    --bg: #f4f7f1; --bg-sunken: #e9eee5; --surface: #ffffff; --surface-2: #f7faf5; --surface-hover: #eef4ea;
    --line: #d6dfd3; --line-strong: #b9c6b6; --field-border: #7f918a;
    --text: #0b161b; --text-2: #46534e; --text-3: #56645e; --link: #2f6b12; --focus: #2f6b12;
    --ok: #2f6b12; --warn: #8a4b00; --bad: #b42318; --info: #0b5c99;
    --layer-surface: #f4f7f1; --layer-dirt: #f2eee6; --layer-stone: #eef1f1; --layer-deep: #e8ecee; --layer-bedrock: #10171b;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --grass-edge: #4f8f22;
  --bg: #f4f7f1; --bg-sunken: #e9eee5; --surface: #ffffff; --surface-2: #f7faf5; --surface-hover: #eef4ea;
  --line: #d6dfd3; --line-strong: #b9c6b6; --field-border: #7f918a;
  --text: #0b161b; --text-2: #46534e; --text-3: #56645e; --link: #2f6b12; --focus: #2f6b12;
  --ok: #2f6b12; --warn: #8a4b00; --bad: #b42318; --info: #0b5c99;
  --layer-surface: #f4f7f1; --layer-dirt: #f2eee6; --layer-stone: #eef1f1; --layer-deep: #e8ecee; --layer-bedrock: #10171b;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 var(--step-0)/1.6 var(--font-text);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 var(--s4); }
h1, h2, h3, h4 { margin: 0 0 var(--s4); line-height: 1.1; color: var(--text); text-wrap: balance; }
h1, h2, .display { font-family: var(--font-display); font-weight: 800; font-stretch: 118%; letter-spacing: -0.025em; }
h1 { font-size: var(--step-5); line-height: .98; }
h2 { font-size: var(--step-4); line-height: 1.02; }
h3 { font-family: var(--font-text); font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
h4 { font-size: var(--step-0); font-weight: 600; }
small, .small { font-size: var(--step--1); }
code, kbd, samp, .mono { font-family: var(--font-mono); font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }
::selection { background: color-mix(in srgb, var(--grass) 45%, transparent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--grass); color: var(--grass-ink); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - var(--gutter) * 2); margin-inline: auto; }
.lede { font-size: var(--step-1); color: var(--text-2); line-height: 1.55; max-width: 60ch; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: var(--s5); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-weight: 800; font-stretch: 112%; font-size: 1.125rem; letter-spacing: -0.02em; min-height: 44px; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: var(--s2); }
.nav a, .nav button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-2); font-size: .9375rem; font-weight: 500; text-decoration: none; }
.nav a:hover, .nav button:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--grass); border-radius: 0; }
.header-actions { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; color: var(--text-2); }
.icon-btn:hover { color: var(--text); background: var(--surface); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-btn { width: auto; padding: 0 10px; gap: 6px; display: inline-flex; align-items: center; font-size: .8125rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.signin { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .9375rem; padding: 0 10px; min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--radius-sm); }
.signin:hover { color: var(--text); background: var(--surface); }
.menu-btn { display: none; }
.mobile-nav { border-top: 1px solid var(--line); background: var(--bg); padding: var(--s3) 0 var(--s5); }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; display: grid; }
.mobile-nav a, .mobile-nav button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font-size: 1.0625rem; font-weight: 500; text-decoration: none; text-align: left; }
.mobile-nav .mobile-cta { display: flex; gap: var(--s3); margin-top: var(--s4); }
.mobile-nav .mobile-cta .btn { flex: 1; }
@media (max-width: 1080px) {
  .nav, .header-actions .signin, .header-actions .btn { display: none; }
  .menu-btn { display: inline-grid; }
}
@media (min-width: 1081px) { .mobile-nav { display: none !important; } }

/* ---------- Buttons ---------- */
.btn { --btn-bg: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--btn-bg); color: var(--text); font-weight: 600; font-size: .9688rem; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background-color .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--grass); color: var(--grass-ink); border-color: var(--grass-edge); box-shadow: inset 0 -3px 0 rgba(10, 40, 5, .22); }
.btn-primary:hover { background: var(--grass-hover); }
.btn-primary:active { box-shadow: inset 0 -1px 0 rgba(10, 40, 5, .22); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1.0313rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; opacity: 1; background: var(--surface); color: var(--text-3); border-color: var(--line); box-shadow: none; transform: none; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; }
.link-arrow::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg); transition: transform .15s var(--ease); }
.link-arrow:hover { text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) { .link-arrow:hover::after { transform: translateX(3px) rotate(45deg); } }

/* ---------- Y tags (the section labels) ---------- */
.ytag { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 var(--s4); font: 500 .8125rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.ytag b { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 4px; font-weight: 600; letter-spacing: .02em; background: var(--m-grass); color: #0b1a0a; }
.ytag--dirt b { background: var(--m-dirt); color: #fff7ee; }
.ytag--stone b { background: var(--m-stone); color: #0b161b; }
.ytag--deep b { background: var(--m-deep); color: #e6eef0; }
.ytag--bedrock b { background: var(--m-bedrock); color: #d7e0e3; box-shadow: inset 0 0 0 1px #3a444a; }
.eyebrow { margin: 0 0 var(--s3); font: 600 .8125rem/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }

/* ---------- Layers and stepped edges ---------- */
.layer { position: relative; background: var(--layer-bg, var(--bg)); padding-block: clamp(64px, 9vw, 120px); }
.layer + .layer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 16px; pointer-events: none;
  background: var(--layer-bg, var(--bg));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M0 16V8h16V0h24v8h32V4h16v4h24V0h16v8h24v4h24v4z' fill='%23000'/%3E%3C/svg%3E") repeat-x left bottom / 192px 16px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M0 16V8h16V0h24v8h32V4h16v4h24V0h16v8h24v4h24v4z' fill='%23000'/%3E%3C/svg%3E") repeat-x left bottom / 192px 16px;
}
.layer--surface { --layer-bg: var(--layer-surface); }
.layer--dirt { --layer-bg: var(--layer-dirt); }
.layer--stone { --layer-bg: var(--layer-stone); }
.layer--deep { --layer-bg: var(--layer-deep); }
.layer--bedrock { --layer-bg: var(--layer-bedrock); }
.layer-head { display: grid; gap: var(--s2); margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }
.layer-head h2 { margin: 0; }
.layer-head p { margin: var(--s3) 0 0; }

/* Thin material seam: a 1px stack of the five strata, used under page titles */
.seam { height: 6px; display: grid; grid-template-columns: 4fr 2fr 6fr 3fr 1fr; }
.seam span:nth-child(1) { background: var(--m-grass); }
.seam span:nth-child(2) { background: var(--m-dirt); }
.seam span:nth-child(3) { background: var(--m-stone); }
.seam span:nth-child(4) { background: var(--m-deep); }
.seam span:nth-child(5) { background: var(--m-bedrock); }

/* ---------- Depth gauge (fixed rail in the left gutter on wide screens) ---------- */
.depth { position: fixed; left: 20px; top: 50%; transform: translateY(-50%); z-index: 20; display: none; width: 56px; font: 500 .75rem/1 var(--font-mono); color: var(--text-3); }
.depth ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.depth li { width: 4px; height: var(--h, 32px); border-radius: 1px; background: var(--c); opacity: .5; transition: opacity .2s; }
.depth li.is-here { opacity: 1; width: 6px; }
.depth .readout { margin-top: 12px; white-space: nowrap; color: var(--text-2); }
.depth .readout b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }
@media (min-width: 1400px) { .depth { display: block; } }
@media (prefers-reduced-motion: reduce) { .depth li { transition: none; } }

/* ---------- Cards and surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 28px); }
.card-tight { padding: var(--s5); }
.ruled { list-style: none; margin: 0; padding: 0; }
.ruled > li { padding: var(--s5) 0; border-top: 1px solid var(--line); }
.ruled > li:last-child { border-bottom: 1px solid var(--line); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--line-strong); font: 500 .75rem/1 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.tag--soon { border-style: dashed; }
.tag--good { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip-list li { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .9375rem; color: var(--text-2); }

/* Status markers: colour plus shape */
.dot { display: inline-block; width: 9px; height: 9px; flex: none; background: currentColor; }
.dot--ok { color: var(--ok); border-radius: 50%; }
.dot--warn { color: var(--warn); clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 10px; height: 10px; }
.dot--bad { color: var(--bad); }
.dot--idle { color: var(--text-3); transform: rotate(45deg); width: 8px; height: 8px; }

/* ---------- Segmented control (real radios, arrow keys for free) ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-sunken); min-inline-size: 0; }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg label { position: relative; display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 6px 14px; border-radius: 8px; cursor: pointer; color: var(--text-2); font-weight: 500; font-size: .9375rem; line-height: 1.2; }
.seg label small { font: 500 .75rem/1.2 var(--font-mono); color: var(--text-3); letter-spacing: .02em; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label:hover { color: var(--text); }
.seg label:has(input:checked) { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 rgba(0,0,0,.2); }
.seg label:has(input:checked) small { color: var(--link); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: var(--s5); }
.field > label, .label { font-weight: 600; font-size: .9375rem; }
.hint { font-size: .875rem; color: var(--text-2); margin: 0; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--bg-sunken); color: var(--text); font-size: 1rem; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea, .input[aria-invalid="true"] { border-color: var(--bad); border-width: 2px; padding: 9px 13px; }
.error { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--bad); font-size: .9063rem; font-weight: 500; }
.error::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 3px; background: currentColor; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 8px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--grass-edge); flex: none; }
.form-summary { border: 2px solid var(--bad); border-radius: var(--radius); padding: var(--s4) var(--s5); margin-bottom: var(--s5); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.form-summary h2, .form-summary h3 { font: 600 1rem/1.3 var(--font-text); margin: 0 0 6px; color: var(--text); }
.form-summary ul { margin: 0; padding-left: 20px; }
.input-group { display: flex; }
.input-group .input { border-radius: 8px 0 0 8px; }
.input-group .btn { border-radius: 0 8px 8px 0; border-left: 0; }

/* ---------- Notices ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-strong); border-left: 4px solid var(--info); border-radius: var(--radius); background: var(--surface); font-size: .9688rem; }
.notice p { margin: 0; }
.notice--warn { border-left-color: var(--warn); }
.notice--bad { border-left-color: var(--bad); }
.notice--ok { border-left-color: var(--ok); }
.preview-note { font: 500 .8125rem/1.4 var(--font-mono); color: var(--text-3); }

/* ---------- Dialog (native, renders in the top layer) ---------- */
dialog.sheet { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
dialog.sheet::backdrop { background: rgba(3, 8, 10, .62); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); padding: var(--s5) var(--s5) 0; }
.sheet-head h2 { font-size: var(--step-3); margin: 0; }
.sheet-body { padding: var(--s4) var(--s5) var(--s5); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: flex-end; padding: 0 var(--s5) var(--s5); }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: sheet-in .18s var(--ease); }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(8px); } }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .9688rem; font-variant-numeric: tabular-nums; }
table.data th { text-align: left; font: 600 .75rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }

/* ---------- Skeleton ---------- */
.skeleton { display: block; height: 1em; border-radius: 4px; background: var(--surface-2); }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-hover) 50%, var(--surface-2) 100%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
  @keyframes shimmer { to { background-position: -200% 0; } }
}

/* ---------- Footer (bedrock) ---------- */
.site-footer { --layer-bg: var(--layer-bedrock); position: relative; background: var(--layer-bedrock); color: #a9bcb6; padding: var(--s8) 0 var(--s6); }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 16px; background: var(--layer-bedrock);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M0 16V8h16V0h24v8h32V4h16v4h24V0h16v8h24v4h24v4z' fill='%23000'/%3E%3C/svg%3E") repeat-x left bottom / 192px 16px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M0 16V8h16V0h24v8h32V4h16v4h24V0h16v8h24v4h24v4z' fill='%23000'/%3E%3C/svg%3E") repeat-x left bottom / 192px 16px; }
.site-footer a { color: #d7e3df; text-decoration: none; }
.site-footer a:hover { color: #a3ef63; text-decoration: underline; }
.site-footer :focus-visible { outline-color: #a3ef63; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s6); }
.foot-brand .brand { color: #eef5ec; }
.foot-brand p { margin-top: var(--s3); max-width: 32ch; }
.site-footer h2 { font: 600 .75rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: #8ba39a; margin: 0 0 var(--s3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer li a, .site-footer li button { display: inline-flex; align-items: center; min-height: 36px; padding: 0; border: 0; background: none; color: #d7e3df; font-size: .9688rem; cursor: pointer; }
.site-footer li button:hover { color: #a3ef63; text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s4); margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid #1a2226; font-size: .875rem; color: #8ba39a; }
.foot-base .ylevel { font-family: var(--font-mono); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Utilities ---------- */
.stack > * + * { margin-top: var(--s4); }
.row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.todo { display: inline-block; padding: 1px 6px; border: 1px dashed var(--warn); border-radius: 4px; color: var(--warn); font: 500 .75rem/1.5 var(--font-mono); vertical-align: middle; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn-primary { border: 2px solid ButtonText; }
  .seg label:has(input:checked) { outline: 2px solid Highlight; }
  .layer + .layer::before, .site-footer::before { display: none; }
}
@media print {
  .site-header, .site-footer, .depth, .preview-bar { display: none !important; }
  body { background: #fff; color: #000; }
}
/* Same layer twice in a row: no step between them. */
.layer--surface + .layer--surface::before, .layer--dirt + .layer--dirt::before, .layer--stone + .layer--stone::before, .layer--deep + .layer--deep::before { display: none; }
