/* nicheclock site. One stylesheet, no framework, no web fonts (system stacks only).
   Identity: warm paper and ink, one burnt-orange accent, hour-tick rules (the clock), mono for anything you type.
   Light and dark follow the OS setting; there is no toggle. Edit tokens here, nowhere else. */
:root {
  color-scheme: light dark;
  --bg: #f6f2e9;
  --surface: #ece6d8;
  --ink: #1d1b17;
  --muted: #5c564a;
  --rule: #d6cdb9;
  --accent: #a8400c;
  --accent-ink: #fffaf2;
  --mark: #fbe9d6;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Charter, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --surface: #211f1b;
    --ink: #ece7db;
    --muted: #a39c8b;
    --rule: #38352d;
    --accent: #f0955a;
    --accent-ink: #1a0e05;
    --mark: #2b2118;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; margin: 1.25rem 0 0; border: 1px solid var(--rule); }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .5rem .75rem; z-index: 9; }
.skip:focus { left: 0; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.75rem); margin-top: 2.75rem; }
h3 { font-size: 1.15rem; margin-top: 1.75rem; }
p, ul, ol, dl, table, pre, .note { margin: 1rem 0 0; }
ul, ol { padding-left: 1.3rem; }
li + li { margin-top: .35rem; }
strong { font-weight: 650; }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface); padding: .1em .35em; border-radius: 3px; overflow-wrap: anywhere; }
pre {
  background: var(--surface); padding: .9rem 1rem; overflow-x: auto; line-height: 1.55; font-size: .875rem;
  border-left: 3px solid var(--accent); border-radius: 0 3px 3px 0; tab-size: 2;
}
pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.cm { color: var(--muted); }
table { border-collapse: collapse; width: 100%; font-size: .96rem; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: .55rem .8rem .55rem 0; border-bottom: 1px solid var(--rule); }
th { font-family: var(--mono); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
td.n { white-space: nowrap; }

@media (max-width: 40rem) {
  table:not(.stack) th, table:not(.stack) td { min-width: 8.5rem; }
  table.stack, .stack tbody, .stack tr, .stack td { display: block; }
  .stack thead { position: absolute; left: -999px; }
  .stack tr { padding: .8rem 0; border-bottom: 1px solid var(--rule); }
  .stack td { border: 0; padding: .15rem 0; white-space: normal !important; }
  .stack td:first-child { font-weight: 650; }
}

/* tick rule: 24 hour marks, the one decorative motif */
.ticks { height: 9px; border: 0; margin: 0; color: var(--rule);
  background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 28px); }
.ticks.fine { height: 5px; background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 7px); opacity: .7; }

.wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.5rem; padding-block: .85rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font: 700 1.1rem/1 var(--mono); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand svg { width: 1.35rem; height: 1.35rem; flex: none; }
.site-head nav { display: flex; flex-wrap: wrap; gap: .1rem 1.2rem; margin-left: auto; font-size: .95rem; }
.site-head nav a { color: var(--ink); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-head nav a:hover, .site-head nav a[aria-current] { border-bottom-color: var(--accent); }
.site-head nav .ghlink { display: inline-flex; align-items: center; gap: .35rem; }
.site-head nav .ghlink .gh { flex: none; }
.pilot { background: var(--mark); border-bottom: 1px solid var(--rule); font: .8rem/1.4 var(--mono); }
.pilot .wrap { padding-block: .45rem; color: var(--muted); }

.site-foot { margin-top: 4.5rem; border-top: 1px solid var(--rule); font-size: .92rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: .5rem 2rem; padding-block: 1.75rem 2.5rem; }
.site-foot a { color: var(--ink); }
.site-foot p { margin: 0; }
.site-foot .links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-left: auto; }

/* landing */
.hero { padding-block: 3rem 3.25rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
.hero > * { min-width: 0; }
.hero .lead { font-size: 1.2rem; line-height: 1.55; max-width: 38rem; margin-top: 1.25rem; }
.hero .state { margin-top: 1.5rem; font: .85rem/1.5 var(--mono); color: var(--muted); max-width: 38rem; border-left: 3px solid var(--accent); padding-left: .75rem; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn { display: inline-block; font: 600 .95rem/1 var(--sans); padding: .8rem 1.1rem; border-radius: 2px; text-decoration: none; border: 1.5px solid var(--ink); color: var(--ink); }
.btn.solid { background: var(--ink); color: var(--bg); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.term { margin: 0; }
.term .cap { font: .75rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.term pre { margin: 0; font-size: .9rem; }
.term .fine-print { font-size: .88rem; color: var(--muted); margin-top: .6rem; }
@media (min-width: 62rem) { .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; padding-block: 4.5rem 4.5rem; } }

.steps { list-style: none; padding: 0; counter-reset: step; margin-top: 1.75rem; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.75rem 3.4rem; margin: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: .05rem;
  font: 700 1.05rem/1.6 var(--mono); color: var(--accent);
}
.steps > li::after { content: ""; position: absolute; left: 1.05rem; top: 2.1rem; bottom: .25rem; width: 1px; background: var(--rule); }
.steps > li:last-child::after { display: none; }
.steps h3 { margin-top: 0; font-size: 1.12rem; }
.steps p { margin-top: .4rem; }
.steps pre { margin-top: .7rem; }

.status td:nth-child(2) { white-space: nowrap; }
.tag { white-space: nowrap; display: inline-block; font: 600 .72rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: .28rem .4rem; border: 1px solid var(--muted); color: var(--muted); border-radius: 2px; }
.tag.ok { border-color: var(--ink); color: var(--ink); }
.tag.soon { border-color: var(--accent); color: var(--accent); }

.section { padding-top: .5rem; }
.section > p, .steps p, .steps pre { max-width: 46rem; }
.section > h2:first-child { margin-top: 3rem; }

/* docs */
.docs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding-top: 2rem; }
.side { font-size: .95rem; }
.side strong { display: block; font: 600 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.side ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .1rem 1.1rem; }
.side li { margin: 0; }
.side a { color: var(--ink); text-decoration: none; display: inline-block; padding: .2rem 0; border-bottom: 2px solid transparent; }
.side a:hover, .side a[aria-current] { border-bottom-color: var(--accent); }
.doc { min-width: 0; max-width: 46rem; }
.doc > h1 { font-size: clamp(1.8rem, 4.6vw, 2.4rem); }
.doc > h1 + p { font-size: 1.15rem; color: var(--muted); margin-top: .8rem; }
.doc h2 { margin-top: 2.5rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); }
.doc h2 + p, .doc h3 + p { margin-top: .7rem; }
.note { border: 1px solid var(--rule); border-left: 3px solid var(--accent); padding: .7rem 1rem; background: var(--mark); font-size: .96rem; }
.note p { margin: .4rem 0 0; }
.note p:first-child { margin: 0; }
.note.draft { border-left-color: var(--ink); }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .95rem; }
dl.defs { display: grid; gap: .15rem 1.5rem; }
dl.defs dt { font: 600 .95rem/1.5 var(--mono); margin-top: .9rem; }
dl.defs dd { margin: 0; }
@media (min-width: 60rem) {
  .docs { grid-template-columns: 12rem minmax(0, 1fr); gap: 3.5rem; }
  .side { position: sticky; top: 1.25rem; align-self: start; }
  .side ul { flex-direction: column; gap: .1rem; }
  .side a { padding: .25rem 0; }
  dl.defs { grid-template-columns: max-content minmax(0, 1fr); }
  dl.defs dt { margin-top: .35rem; }
  dl.defs dd { margin-top: .35rem; }
}
.doc.full { grid-column: 1 / -1; }
.nf { padding-block: 4rem; }
.nf p { max-width: 36rem; }
@media print { .site-head nav, .pilot, .side, .pager { display: none; } body { background: #fff; color: #000; } }
