/* Shared look for every page: fonts, palette, type scale, prompt, footer.
   Page-specific styles stay inline in each page. */
@font-face { font-family: 'Hack'; src: url('/fonts/Hack-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Hack'; src: url('/fonts/Hack-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Departure Mono'; src: url('/fonts/DepartureMono-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- palette: espresso + violet ---------- */
:root {
  --bg: #0f0c0a; --bg-1: #16120f; --bg-2: #1f1915;
  --line: #2f2721; --line-hi: #4a3d33;
  --fg: #efe4d2; --fg-dim: #bfae98; --muted: #8f7f6e;
  --accent: #b48aff; --sky: #8fc3d6; --green: #a3cf8b; --ball: #d8e36a;
  --mono: 'Hack', ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --pixel: 'Departure Mono', 'Hack', ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 32px);
  /* never less than the notch/cutout in landscape (viewport-fit=cover) */
  --pad-l: max(var(--gutter), env(safe-area-inset-left));
  --pad-r: max(var(--gutter), env(safe-area-inset-right));
  --measure: 720px;
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  background: var(--bg);
  background-image:
    radial-gradient(1100px 600px at 12% -10%, rgba(180, 138, 255, 0.11), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(163, 207, 139, 0.06), transparent 60%);
  background-repeat: no-repeat;
}
body {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  color: var(--fg-dim);
  font: 400 15px/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
  padding: calc(clamp(24px, 6vh, 56px) + env(safe-area-inset-top)) var(--pad-r) 0 var(--pad-l);
}
@media (min-width: 640px) { body { font-size: 16px; } }
main { flex: 1; width: 100%; max-width: var(--measure); margin-inline: auto; padding-bottom: 40px; }
::selection { background: var(--accent); color: var(--bg); }

/* ---------- type scale ---------- */
.prompt { color: var(--muted); font-size: 0.85em; }
.prompt .path { color: var(--sky); }
.prompt .sym { color: var(--accent); }
.prompt a.path { border-bottom: 1px dotted var(--line-hi); }
.prompt a.path:hover { color: var(--accent); border-color: var(--accent); }
h1 { font: 400 clamp(34px, 9vw, 56px)/1 var(--pixel); letter-spacing: -0.01em; color: var(--fg); margin: 12px 0 10px; text-wrap: balance; }
h1 .last { color: var(--accent); }
h2 { font: 400 1em/1.3 var(--pixel); color: var(--fg); }
strong { color: var(--fg); font-weight: 700; }
.small { font-size: 0.85em; color: var(--muted); }
.caret { display: inline-block; width: 0.5em; height: 0.82em; background: var(--accent); margin-left: 0.08em; transform: translateY(0.05em); animation: blink 1.1s steps(1, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }

a { color: var(--fg); text-decoration: none; }
.prose a { border-bottom: 1px dotted var(--line-hi); }
a:hover { color: var(--accent); border-color: var(--accent); }
a:focus-visible, button:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 3px; }

/* ---------- status bar footer, same on every page ---------- */
.status {
  margin: 0 calc(-1 * var(--pad-r)) 0 calc(-1 * var(--pad-l));
  padding: 4px var(--pad-r) calc(4px + env(safe-area-inset-bottom)) var(--pad-l);
  background: var(--bg-1); border-top: 1px solid var(--line);
  font-size: 0.85em; color: var(--muted);
}
.status__inner { max-width: var(--measure); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; column-gap: 16px; }
.status .seg { display: inline-flex; align-items: center; gap: 1.2ch; white-space: nowrap; min-height: 44px; }
.status .crumb { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; line-height: 44px; }
.status nav.seg { flex: none; }
.status .tilde { display: none; }
@media (max-width: 479px) {
  .status a .host { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } /* kept for screen readers */
  .status a .tilde { display: inline; }
}
.status a { color: var(--fg-dim); }
.status nav a { display: inline-flex; align-items: center; min-height: 44px; }
.status .crumb a { display: inline-block; }
.status a:hover { color: var(--accent); }
.status a[aria-current=page] { color: var(--fg); text-decoration: underline 2px var(--accent); text-underline-offset: 6px; }

@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
