/* Deliberately minimal and unbranded.
   Jack is supplying visual direction (plan-23 §8.2); guessing at it now would
   only have to be undone. This is legible, responsive and theme-aware, and
   nothing more. Wide content scrolls inside its own box so the page body never
   scrolls sideways on a phone — error strings and code are long by nature. */

:root {
  --bg: #fbfbfa; --fg: #1a1a18; --muted: #5f5f58;
  --rule: #e0e0da; --code-bg: #f2f2ee; --accent: #7a2e12;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14140f; --fg: #e8e8e0; --muted: #9a9a90;
    --rule: #2c2c26; --code-bg: #1e1e18; --accent: #d98f6a;
  }
}
:root[data-theme="dark"] {
  --bg: #14140f; --fg: #e8e8e0; --muted: #9a9a90;
  --rule: #2c2c26; --code-bg: #1e1e18; --accent: #d98f6a;
}
:root[data-theme="light"] {
  --bg: #fbfbfa; --fg: #1a1a18; --muted: #5f5f58;
  --rule: #e0e0da; --code-bg: #f2f2ee; --accent: #7a2e12;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.65 ui-serif, Georgia, "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}
main, header.site, footer.site {
  max-width: 42rem; margin: 0 auto; padding: 0 1.25rem;
}
header.site {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: baseline; justify-content: space-between;
  padding-top: 2rem; padding-bottom: 1.5rem;
}
.wordmark {
  font-weight: 700; letter-spacing: -.01em; text-decoration: none; color: var(--fg);
}
nav a { color: var(--muted); text-decoration: none; margin-right: .75rem; font-size: .9rem; }
nav a:hover, a:hover { color: var(--accent); }
a { color: var(--accent); }

h1 { font-size: 1.9rem; line-height: 1.2; letter-spacing: -.015em; margin: 1rem 0 .5rem; }
h2 { font-size: 1.25rem; margin: 2.25rem 0 .5rem; }
h3 { font-size: 1.05rem; margin: 1.75rem 0 .4rem; }

.lede, .standfirst { color: var(--muted); font-size: 1.1rem; margin-top: 0; }
.dek { display: block; color: var(--muted); font-size: .92rem; }

ul.posts { list-style: none; padding: 0; }
ul.posts li { margin: 0 0 1.1rem; }
ul.posts a { font-weight: 600; text-decoration: none; }

/* Long by nature — must scroll inside its own box, never the page. */
pre {
  background: var(--code-bg); border: 1px solid var(--rule); border-radius: 4px;
  padding: .85rem 1rem; overflow-x: auto;
}
pre code { font-size: .86rem; white-space: pre; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em; background: var(--code-bg); padding: .1em .3em; border-radius: 3px;
}
pre code { background: none; padding: 0; }

.symptom h2 { margin-top: 1.5rem; }

table.facts { border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: .9rem; display: block; overflow-x: auto; }
table.facts th, table.facts td {
  text-align: left; padding: .4rem .75rem .4rem 0;
  border-bottom: 1px solid var(--rule); vertical-align: top;
}
table.facts th { color: var(--muted); font-weight: 500; white-space: nowrap; }
table.facts td { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }

.evidence-note {
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: .88rem;
}
footer.site {
  margin-top: 4rem; padding: 1.5rem 1.25rem 3rem;
  border-top: 1px solid var(--rule); color: var(--muted); font-size: .88rem;
}
img { max-width: 100%; height: auto; }

/* ── Ascent Engine ─────────────────────────────────────────────────────────
   The fallback markup is the real content and ships in every response; the
   engine hides it only once WebGL is actually running (.nl-ready). No JS, no
   GPU, or a failed fetch all leave the readable page in place. */

.ascent-host { position: relative; }
.nl-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.nl-spacer { position: relative; z-index: 0; pointer-events: none; }
.nl-layer  { position: fixed; inset: 0; z-index: 2; pointer-events: none;
             font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.nl-layer > * { pointer-events: auto; }
.nl-layer, .nl-layer button { text-shadow: 0 1px 14px rgba(0,0,0,0.6); }

/* Fallback is visible by default; the engine removes it on success. */
.ascent-host.nl-ready .ascent-fallback { display: none; }
.nl-noscript { max-width: 42rem; margin: 1rem auto; color: var(--muted); }

.nl-zone { position: fixed; left: 1.5rem; bottom: 2rem; color: #fff; transition: opacity .2s; }
.nl-zone-title { font-size: 1.05rem; letter-spacing: .02em; }
.nl-zone-sub   { font-size: .8rem; opacity: .72; margin-top: .15rem; }
.nl-alt        { font-size: .78rem; opacity: .6; margin-top: .6rem; }

.nl-rail { position: fixed; right: 1.25rem; top: 50%; transform: translateY(-50%);
           display: flex; flex-direction: column; gap: .7rem; }
.nl-dot  { width: 8px; height: 8px; padding: 0; border-radius: 50%; cursor: pointer;
           border: 1px solid rgba(255,255,255,.5); background: transparent; transition: .25s; }
.nl-dot.on { background: #f5b04a; border-color: #f5b04a; transform: scale(1.25); }
.nl-layer.nl-dossier-open .nl-rail { opacity: 0; pointer-events: none; }

.nl-hint { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
           color: #fff; font-size: .74rem; letter-spacing: .18em; opacity: .7; transition: opacity .4s; }

.nl-label { position: fixed; left: 0; top: 0; background: none; border: 0; cursor: pointer;
            font: inherit; font-size: .78rem; text-align: center; line-height: 1.25;
            transition: opacity .15s; white-space: nowrap; }
.nl-label-name { display: block; font-weight: 600; }
.nl-label-tag  { display: block; font-size: .62rem; opacity: .65; letter-spacing: .12em; }

.nl-dossier { position: fixed; right: 1.5rem; top: 50%; transform: translateY(-50%);
              width: min(23rem, 34vw); max-height: 76vh; overflow-y: auto; color: #fff;
              background: rgba(10,10,14,.82); backdrop-filter: blur(10px);
              border: 1px solid rgba(255,255,255,.14); border-radius: 6px; padding: 1.25rem 1.35rem; }
.nl-dossier h2 { font-size: 1.15rem; margin: .5rem 0 .2rem; }
.nl-dossier h3 { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
                 opacity: .6; margin: 1.1rem 0 .35rem; }
.nl-dossier p, .nl-dossier li { font-size: .84rem; line-height: 1.55; }
.nl-dates { opacity: .6; font-size: .78rem !important; }
.nl-pending { opacity: .5; font-style: italic; }
.nl-learn { padding-left: 1.1rem; margin: .3rem 0; }
.nl-tag { display: inline-block; font-size: .64rem; letter-spacing: .14em;
          border: 1px solid; border-radius: 3px; padding: .12rem .45rem; }
.nl-close { position: absolute; top: .5rem; right: .7rem; background: none; border: 0;
            color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; opacity: .6; }
.nl-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.nl-chip  { font: inherit; font-size: .7rem; cursor: pointer; color: #fff;
            background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18);
            border-radius: 999px; padding: .22rem .6rem; }
.nl-chip:hover { background: rgba(255,255,255,.14); }

@media (max-width: 720px) {
  .nl-dossier { right: 0; left: 0; top: auto; bottom: 0; width: auto; transform: none;
                max-height: 62vh; border-radius: 10px 10px 0 0; }
  .nl-zone { bottom: 1rem; left: 1rem; }
}

/* Fallback typography — this is what a crawler and a no-JS reader actually get. */
.ascent-fallback { max-width: 42rem; margin: 0 auto; padding: 0 1.25rem 4rem; }
.stratum { margin: 3rem 0; }
.stratum-sub { color: var(--muted); margin-top: -.4rem; }
.node { border-top: 1px solid var(--rule); padding-top: 1.1rem; margin-top: 1.5rem; }
.node h3 { margin-bottom: .2rem; }
.node h4 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
           color: var(--muted); margin: .9rem 0 .3rem; }
.node-meta { margin: 0 0 .5rem; }
.tag { display: inline-block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
       border: 1px solid; border-radius: 3px; padding: .1rem .4rem; }
.tag-buried { color: #b06f14; } .tag-idea { color: #2f7a5e; }
.tag-flight { color: #17836b; } .tag-live { color: #a8700e; } .tag-moonshot { color: #6a5bbd; }
@media (prefers-color-scheme: dark) {
  .tag-buried { color: #f0a03a; } .tag-idea { color: #8fd9bd; }
  .tag-flight { color: #35c9a5; } .tag-live { color: #f5b04a; } .tag-moonshot { color: #b7a9f0; }
}
.dates { color: var(--muted); font-size: .85rem; }
.pending { color: var(--muted); font-style: italic; }
.threads { color: var(--muted); font-size: .85rem; }
