/* fold33.io: the quiet pages (404, privacy). The colours and faces are site.css's; keep them in step */
:root {
  color-scheme: dark;
  --bg: #060a11;
  --panel: rgba(11, 17, 27, .78);
  --line: rgba(169, 188, 205, .12);
  --line2: rgba(169, 188, 205, .24);
  --line3: rgba(169, 188, 205, .5);
  --fg: #e4e8ee;
  --dim: #8a98a9;
  --mute: #768394;
  --tld: #566273;
  --luna: #ece3d2;
  --ghost: #9db3cc;
  --accent: #cddcec;
  --accent-rgb: 205, 220, 236;
  --glow: .35;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter Tight', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e9e3d7;
  --panel: rgba(250, 247, 240, .5);
  --line: rgba(24, 32, 46, .12);
  --line2: rgba(24, 32, 46, .22);
  --line3: rgba(24, 32, 46, .55);
  --fg: #141c28;
  --dim: #4f5764;
  --mute: #5f646b;
  --tld: #8b8f94;
  --luna: #101a2a;
  --ghost: #101a2a;
  --accent: #1c3152;
  --accent-rgb: 28, 49, 82;
  --glow: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { position: relative; z-index: 0; display: grid; grid-template: auto 1fr auto / minmax(0, 1fr); min-height: 100vh; min-height: 100svh;
  font: 400 16px/1.65 var(--sans); color: var(--fg); -webkit-font-smoothing: antialiased;
  background: radial-gradient(90% 60% at 50% 0%, #0c1522 0%, var(--bg) 70%) no-repeat, var(--bg); }
[data-theme="light"] body { background: radial-gradient(80% 70% at 70% 20%, #f1ece2 0%, var(--bg) 70%) no-repeat, var(--bg); }
/* film grain by night, cotton fibres on paper, as on the home page */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 30; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
[data-theme="light"] body::after { opacity: .42; mix-blend-mode: multiply; background-size: 200px 200px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='p' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='1.1'%3E%3CfeDistantLight azimuth='-45' elevation='52'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"); }
a { color: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.mono { font: 400 12px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.ink { color: var(--accent); text-shadow: 0 0 14px rgba(var(--accent-rgb), var(--glow)); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 40; padding: 8px 12px; border-radius: 8px; background: var(--accent); color: var(--bg); font: 400 13px/1 var(--mono); text-decoration: none; }
.skip:focus { top: 12px; }

/* the mark: the lit half, its mirror, the fold */
.mark { display: block; width: 26px; height: 26px; }
#f33 .lit { fill: var(--luna); }
#f33 .gh { fill: var(--ghost); fill-opacity: .42; }
#f33 .fold { stroke: var(--ghost); stroke-width: 2; stroke-dasharray: 3 3.6; opacity: .7; }
[data-theme="light"] #f33 .gh { fill-opacity: .22; }

/* ── nav ── */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: clamp(16px, 3vh, 26px) 44px; }
.brand { display: flex; align-items: center; gap: 11px; font: 500 16px/1 var(--mono); letter-spacing: -.01em; text-decoration: none; }
.brand .tld { color: var(--tld); }
.nav-end { font: 400 13px/1 var(--mono); color: var(--dim); }
.nav-end a { display: inline-block; padding: 8px 0; text-decoration: none; }

/* ── footer ── */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 22px; padding: 10px 22px; border-top: 1px solid var(--line); font: 400 12px/1.4 var(--mono); color: var(--dim); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot a { display: inline-block; padding: 6px 0; text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; }
.foot a[aria-current="page"] { color: var(--fg); text-decoration: none; }

/* ── 404 ── */
.lost { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 24px 48px; text-align: center; }
.lost-mark { width: clamp(88px, min(30vw, 24vh), 176px); height: auto; overflow: visible; }
.lost-mark .ring { fill: none; stroke: var(--ghost); stroke-width: 1; stroke-dasharray: .01 3.2; stroke-linecap: round; opacity: .55; }
.lost h1 { margin-top: clamp(18px, 4vh, 34px); font: 400 clamp(40px, min(9vw, 9vh), 68px)/1.04 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.lost h1 em, .doc h1 em { font-style: italic; color: var(--fg); }
[data-theme="dark"] .lost h1 em, [data-theme="dark"] .doc h1 em { color: #fff; }
.lost .mono { margin-top: 14px; }
/* a way home, set like the prompt on the home page */
.go { display: inline-flex; align-items: center; gap: 14px; margin-top: clamp(22px, 4vh, 32px); padding: 13px 20px; border-radius: 14px; border: 1px solid var(--line3); background: var(--panel);
  font: 400 15px/1.3 var(--mono); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.go .ps1 { flex: none; }
.lost .write { margin-top: 18px; font: 400 13px/1.6 var(--mono); color: var(--dim); }
.lost .write a, .doc a { text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; }

/* ── privacy ── */
.doc { width: min(700px, 100%); margin: 0 auto; padding: clamp(12px, 5vh, 56px) 24px 72px; }
.doc h1 { font: 400 clamp(42px, 8vw, 64px)/1.04 var(--serif); letter-spacing: -.02em; }
.doc .updated { margin-top: 14px; }
.doc h2 { margin: 42px 0 12px; font: 500 12px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.doc p + p, .doc p + ul, .doc ul + p { margin-top: 12px; }
.doc ul { list-style: none; }
.doc li { position: relative; padding-left: 22px; }
.doc li + li { margin-top: 8px; }
.doc li::before { content: ""; position: absolute; left: 4px; top: .78em; width: 5px; height: 5px; border-radius: 50%; background: var(--mute); }
.doc .gist { margin-top: 30px; padding: 18px 22px; border: 1px solid var(--line2); border-radius: 16px; background: var(--panel); }
.doc .gist li::before { background: var(--accent); }
.doc .term { font: 400 14.5px/1 var(--mono); color: var(--accent); }
.doc .fine { color: var(--dim); }

@media (hover: hover) {
  .nav-end a:hover, .foot a:hover, .lost .write a:hover, .doc a:hover { color: var(--fg); text-decoration-color: currentColor; }
  .go:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
}
@media (max-width: 860px) {
  .nav { padding: 16px 20px; }
  .doc { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 480px) {
  .go { gap: 10px; padding: 12px 16px; font-size: 14px; }
  .foot { padding: 8px 18px; }
}
@media (forced-colors: active) {
  .go { border-color: LinkText; }
}
