/* Shared by every page of zontakllc.com: colour tokens (light and dark), base rules, the top bar, buttons, the footer
   and the status bar. Page layouts live in each page (the front page, /made/) or in article.css.

   "Morning and night" (2026-11-08): one family for all three tabs.
   Light = a soft morning: a misty blue-grey page with a faint sky wash at the top, ink-navy words, no pure white glare.
   Dark  = deep water at night (the Tao's xuan): a blue-black page, a few quiet stars behind it, bright white words.
   One accent (the board's blue), the logo's Sunglow for one small star, hairlines everywhere. */
:root {
  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "JetBrains Mono", "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sun: #ffd36e;
  --radius: 14px; --r-l: 16px; --r-xl: 22px;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(56px, 7vw, 88px);
}
:root, :root[data-theme="light"] {
  --bg: #f2f4f8;  --band: #eaeef4;  --surface: #fafbfd;  --sunk: #edf0f5;
  --line: #e0e5ec;  --line-strong: #c9d1dc;
  --head: #0f1a2b;  --text: #243042;  --muted: #536074;  --faint: #5b6779;
  --accent: #2459c4;  --on-accent: #ffffff;  --accent-soft: #e4ecfa;
  --inv-bg: #14223a;  --inv-fg: #f6f8fb;  --chip-bg: #e6eaf0;
  --ok: #276b3f;  --warn: #8a5d00;  --bad: #b42318;
  --sky: linear-gradient(180deg, #e3eaf5 0, #edf1f7 260px, var(--bg) 620px);
  --shadow: 0 1px 2px rgb(16 26 43 / 0.04), 0 10px 28px -16px rgb(16 26 43 / 0.14);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d121a;  --band: #111823;  --surface: #131a25;  --sunk: #0f151f;
    --line: #1f2835;  --line-strong: #2e3a4b;
    --head: #f6f8fb;  --text: #e6eaf0;  --muted: #b0b9c6;  --faint: #8d98a8;
    --accent: #7aa2f7;  --on-accent: #0b1220;  --accent-soft: #18243a;
    --inv-bg: #7aa2f7;  --inv-fg: #0b1220;  --chip-bg: #1f2835;
    --ok: #8cc89b;  --warn: #e5b567;  --bad: #f08a8a;
    --sky: linear-gradient(180deg, #111a28 0, #0f1520 320px, var(--bg) 720px);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 14px 36px -18px rgb(0 0 0 / 0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0d121a;  --band: #111823;  --surface: #131a25;  --sunk: #0f151f;
  --line: #1f2835;  --line-strong: #2e3a4b;
  --head: #f6f8fb;  --text: #e6eaf0;  --muted: #b0b9c6;  --faint: #8d98a8;
  --accent: #7aa2f7;  --on-accent: #0b1220;  --accent-soft: #18243a;
  --inv-bg: #7aa2f7;  --inv-fg: #0b1220;  --chip-bg: #1f2835;
  --ok: #8cc89b;  --warn: #e5b567;  --bad: #f08a8a;
  --sky: linear-gradient(180deg, #111a28 0, #0f1520 320px, var(--bg) 720px);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 14px 36px -18px rgb(0 0 0 / 0.6);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { position: relative; isolation: isolate; min-height: 100vh; background: var(--sky) no-repeat, var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
/* the night sky: a few still stars behind every page in dark (two tiles of different sizes, so no pattern shows) */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: url("../img/stars-near.svg") 0 0 / 997px 733px repeat, url("../img/stars-far.svg") 211px 97px / 613px 457px repeat; }
:root[data-theme="dark"] body::before { opacity: .8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { opacity: .8; } }
/* on a reading page the stars keep to the margins, so none sits among the words like a full stop */
body:has(.article)::before { -webkit-mask-image: linear-gradient(90deg, #000 calc(50% - 470px), transparent calc(50% - 400px), transparent calc(50% + 400px), #000 calc(50% + 470px));
  mask-image: linear-gradient(90deg, #000 calc(50% - 470px), transparent calc(50% - 400px), transparent calc(50% + 400px), #000 calc(50% + 470px)); }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 8px 12px; background: var(--accent); color: var(--on-accent); font: 600 14px var(--mono); border-radius: 8px; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
::selection { background: var(--accent-soft); color: var(--head); }

/* ---------- top bar: the logo, the tabs, the theme switch, one outline pill ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
/* the logo is golden Tiny alone, no word beside it (owner, 2026-11-10); a little lighter gold at night */
.brand { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; text-decoration: none; color: #dea03a; }
.brand .tiny { width: 38px; height: 38px; flex: none; }
:root[data-theme="dark"] .brand { color: #eab654; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand { color: #eab654; } }

/* the name in tiny letters at the foot of every page; the legal "© 2026 Zontak LLC" line stays as it is */
.zname { display: block; flex-basis: 100%; margin: 6px 0 0; font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.22em; text-transform: lowercase; color: var(--faint); }
.top-end { display: flex; align-items: center; gap: 10px; }
.top .btn { min-height: 40px; }
.theme { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s; }
.theme:hover { color: var(--head); border-color: var(--accent); }
.theme svg { width: 17px; height: 17px; }
.theme .sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme .sun { display: block; } :root:not([data-theme="light"]) .theme .moon { display: none; } }
:root[data-theme="dark"] .theme .sun { display: block; } :root[data-theme="dark"] .theme .moon { display: none; }

/* buttons: soft pills. Solid = the one main action on a screen (ink by day, the board's blue at night). */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font: 550 14.5px/1 var(--sans); text-decoration: none; white-space: nowrap; border: 1px solid var(--line-strong); background: var(--bg); color: var(--head); cursor: pointer; transition: border-color .15s, filter .15s; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--inv-bg); border-color: var(--inv-bg); color: var(--inv-fg); }
.btn.primary:hover { filter: brightness(1.12); }
.btn .arr { font-family: var(--sans); }
/* the header's "Write to me" is an outline pill on every page: each page's own solid button is the main one */
.site-top .btn.primary { background: var(--bg); color: var(--head); border-color: var(--line-strong); }
.site-top .btn.primary:hover { border-color: var(--accent); filter: none; }
.cta[aria-current] { background: transparent; border-color: var(--line-strong); color: var(--text); }

/* the status bar: one quiet line of true facts (wraps on a phone) */
.statusbar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--sunk); font: 400 12px/1.7 var(--mono); color: var(--muted); }
.statusbar a { color: var(--text); text-underline-offset: 3px; }
.statusbar .dot { margin-inline: 6px; opacity: .5; font-style: normal; }
.sb-live::before { content: ""; display: inline-block; vertical-align: 1px; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--ok); }   /* green = live */

@media (prefers-reduced-motion: reduce) { .theme, .btn { transition: none; } }

/* Legal line and design credit: there if you look for it, barely visible otherwise (Bobo, 2026-11-10). */
.legal { font-size: 9px; opacity: .45; letter-spacing: .02em; }
.credit { font-size: 9px; opacity: .45; }
.zname { display: none; }
