/* Clowley Hub — static utility pages (Notice, 403, 404).
   Borrows the Hub v2 dark + purple aesthetic, no React. */

:root {
  --paper: #0e0d0b;
  --paper-2: #15140f;
  --card: #1a1814;
  --ink: #f1ece0;
  --ink-2: #d8d2c4;
  --muted: #94907f;
  --muted-2: #6b6857;
  --line: #2a2720;
  --line-2: #3a3628;
  --accent: #9d80ff;
  --accent-2: #b29bff;
  --accent-bg: #1f1a30;
  --accent-3: color-mix(in oklab, var(--accent) 36%, var(--line));
  --green: #6db17e;
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 14px;
  --r-4: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); }
body {
  font-family: "Geist", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
.mono { font-family: "Geist Mono", "JetBrains Mono", ui-monospace, monospace; }
.serif { font-family: "Instrument Serif", Georgia, serif; }

/* ── Top bar (matches Hub v2) ────────────────────────────── */
.hub-static-top {
  display: flex; align-items: center; gap: 22px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 40;
}
.hub-brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; letter-spacing: -0.01em;
}
.hub-brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font: 600 13px "Geist Mono", monospace; letter-spacing: 0.02em;
}
.hub-brand .b-name { font-size: 15px; }
.hub-brand .b-sub {
  font-family: "Instrument Serif", Georgia, serif;
  color: var(--accent); font-size: 19px; margin-left: -2px;
  font-style: normal; font-weight: 400;
}
.hub-static-top nav {
  display: flex; gap: 22px; font-size: 13.5px; color: var(--muted);
}
.hub-static-top nav a {
  cursor: pointer;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.hub-static-top nav a:hover { color: var(--ink-2); }
.hub-static-top nav a.active { color: var(--ink); border-bottom-color: var(--accent); }
.hub-static-top .spacer { flex: 1; }
.hub-static-top .right {
  font: 12px "Geist Mono", monospace; color: var(--muted-2);
  white-space: nowrap;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-2);
  font: 500 13px "Geist", sans-serif;
  border: 1px solid var(--line);
  background: var(--card); color: var(--ink);
  cursor: pointer; user-select: none;
  transition: background 120ms, border-color 120ms, transform 80ms;
}
.btn:hover { background: var(--paper-2); border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-lg { padding: 11px 18px; font-size: 14px; }

/* ── Error pages (403/404) ──────────────────────────────── */
.err-main {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 32px 80px;
  position: relative;
}
.err-main::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(color-mix(in oklab, var(--accent) 35%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, black 25%, transparent 75%);
  pointer-events: none;
  opacity: 0.5;
}
.err-main > * { position: relative; z-index: 1; }

.err-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font: 12px "Geist Mono", monospace;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 32px;
}
.err-eyebrow .code {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.err-eyebrow .led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent);
  margin-left: 4px;
}

.err-digit {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(180px, 26vw, 360px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin: 0;
}

.err-h1 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 28px 0 0;
  max-width: 680px;
}
.err-h1 em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.err-sub {
  max-width: 520px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.err-ctas {
  display: inline-flex; gap: 10px;
  margin-top: 32px;
}

/* ── Notice page (long-form) ────────────────────────────── */
.notice-wrap {
  flex: 1;
}
.notice-hero {
  padding: 64px 28px 48px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(800px 320px at 70% -30%, color-mix(in oklab, var(--accent) 18%, transparent) 0%, transparent 70%),
    var(--paper);
}
.notice-hero-inner {
  max-width: 920px; margin: 0 auto;
}
.notice-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 11px "Geist Mono", monospace; color: var(--accent);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.notice-eyebrow .led {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent);
}
.notice-hero h1 {
  margin: 18px 0 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
  max-width: 720px;
  padding-bottom: 4px;
}
.notice-hero h1 em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic; font-weight: 400; color: var(--accent);
}
.notice-hero p {
  margin: 18px 0 0;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 620px;
}
.notice-meta {
  margin: 24px 0 0;
  display: flex; gap: 18px; flex-wrap: wrap;
  font: 12px "Geist Mono", monospace; color: var(--muted-2);
  align-items: center;
}
.notice-meta > span { white-space: nowrap; }
.notice-meta .sep { opacity: 0.5; }

.notice-body {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 28px 60px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  align-items: flex-start;
}
@media (max-width: 880px) {
  .notice-body { grid-template-columns: 1fr; gap: 28px; }
  .notice-toc { position: static !important; }
}
.notice-toc {
  position: sticky; top: 88px;
  font: 12.5px "Geist", sans-serif;
}
.notice-toc h6 {
  margin: 0 0 12px;
  font: 10.5px "Geist Mono", monospace;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.notice-toc ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 10px;
  counter-reset: toc;
}
.notice-toc li {
  counter-increment: toc;
  display: block;
  position: relative;
  padding-left: 28px;
  line-height: 1.4;
}
.notice-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font: 10.5px "Geist Mono", monospace;
  color: var(--muted-2);
  position: absolute;
  left: 0; top: 2px;
}
.notice-toc a {
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
}
.notice-toc a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.notice-content section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 88px;
}
.notice-content section:first-child { padding-top: 0; }
.notice-content section:last-child { border-bottom: 0; }
.notice-content h2 {
  margin: 0 0 16px;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 600;
  display: flex; align-items: baseline; gap: 14px;
  flex-wrap: wrap;
}
.notice-content h2 .num {
  font: 11px "Geist Mono", monospace; color: var(--accent);
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.notice-content h2 em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic; font-weight: 400; color: var(--accent);
}
.notice-content p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
}
.notice-content p:last-child { margin-bottom: 0; }
.notice-content ul {
  margin: 12px 0;
  padding: 0;
  list-style: none;
  display: flex; flex-direction: column;
  gap: 10px;
}
.notice-content li {
  display: block;
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.55;
}
.notice-content li::before {
  content: "—";
  color: var(--accent);
  font-family: "Geist Mono", monospace;
  position: absolute;
  left: 0; top: 0;
}
.notice-content code {
  font: 12.5px "Geist Mono", monospace;
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.notice-content .callout {
  margin: 16px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  border-radius: 0 var(--r-2) var(--r-2) 0;
}
.notice-content .callout .lbl {
  display: inline-block;
  font: 10.5px "Geist Mono", monospace;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.notice-content .callout p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-2);
}

.notice-content .as-is {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 22px 26px;
  margin: 16px 0;
}
.notice-content .as-is .lbl {
  font: 11px "Geist Mono", monospace;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.notice-content .as-is p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  font-family: "Geist Mono", monospace;
  line-height: 1.6;
}

/* Inline link */
.notice-content a {
  color: var(--accent);
  border-bottom: 1px dotted color-mix(in oklab, var(--accent) 50%, transparent);
}
.notice-content a:hover {
  border-bottom-style: solid;
}

/* ── Footer (matches v2-foot inside the app) ───────────── */
.hub-static-foot {
  border-top: 1px solid var(--line);
  padding: 22px max(28px, calc((100% - 1100px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted-2);
}
.hub-static-foot .rail {
  display: flex; gap: 18px; align-items: center;
}
.hub-static-foot a {
  color: var(--muted);
  border-bottom: 1px dotted var(--line-2);
}
.hub-static-foot a:hover { color: var(--ink-2); }
.hub-static-foot .status {
  display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 0;
  font-size: 11.5px;
}
.hub-static-foot .status .led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--green) 25%, transparent);
}

@media (max-width: 720px) {
  .hub-static-top { padding: 14px 22px; gap: 16px; flex-wrap: wrap; }
  .hub-static-top nav { display: none; }
  .hub-static-top .right { display: none; }
  .notice-hero { padding: 44px 22px 36px; }
  .notice-body { padding: 32px 22px 48px; }
  .err-main { padding: 44px 22px 60px; }
  .err-ctas { flex-direction: column; width: 100%; max-width: 280px; }
  .err-ctas .btn { justify-content: center; }
}
