/* Server-rendered pages (/proof, /whitepaper) and the readable layer of the home page. */
:root { --pg-milk: #F4F1EA; --pg-ink: #17282d; --pg-ink-2: #4c5d61; --pg-ink-3: #8a9799; --pg-line: rgba(30, 52, 58, .12); --pg-teal: #1d4f57; --pg-amber: #b7792b; }

/* Live strip: shared by every page */
.lv { position: fixed; left: 50%; bottom: 4px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 10px; white-space: nowrap;
  font: 400 10.5px/1.4 Inter, system-ui, sans-serif; color: var(--pg-ink-3); padding: 3px 10px; background: rgba(244, 241, 234, .72); border-radius: 6px; }
.lv a { color: var(--pg-ink-2); text-decoration: none; }
.lv a:hover { color: var(--pg-ink); text-decoration: underline; }
.lv code { font: inherit; font-variant-numeric: tabular-nums; }
.lv-sep { width: 1px; height: 9px; background: var(--pg-line); }
@media (max-width: 560px) { .lv { gap: 7px; font-size: 10px; max-width: calc(100vw - 16px); overflow: hidden; } .lv > span:first-child, .lv > .lv-sep:first-of-type { display: none; } }
body:not(.pg) .lv { bottom: 2px; }

/* Readable layer on the home page; the 3D HUD replaces it once it mounts */
.ssr { position: fixed; inset: 0; overflow-y: auto; z-index: 5; padding: 48px 16px 60px; color: var(--pg-ink); font: 400 14px/1.55 Inter, system-ui, sans-serif; background: var(--pg-milk); }
.ssr[hidden] { display: none; }
.ssr > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.ssr h1 { font: 400 56px/1 'Instrument Serif', Georgia, serif; margin-bottom: 14px; }
.ssr h2 { font: 400 26px/1.2 'Instrument Serif', Georgia, serif; margin: 34px auto 12px; }
.ssr-lede { color: var(--pg-ink-2); font-size: 15px; margin-bottom: 26px; }
.ssr-links { margin-top: 30px; display: flex; gap: 20px; }
.ssr a, .pg a { color: var(--pg-teal); }

/* Page shell */
html:has(body.pg) { overflow: auto; height: auto; }
body.pg { margin: 0; min-height: 100vh; height: auto; overflow: auto; background: var(--pg-milk); color: var(--pg-ink); font: 400 15px/1.6 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.pg-top { max-width: 920px; margin: 0 auto; padding: 22px 16px 0; display: flex; align-items: baseline; justify-content: space-between; }
.pg-mark { font: 400 28px/1 'Instrument Serif', Georgia, serif; color: var(--pg-ink) !important; text-decoration: none; }
.pg-top nav { display: flex; gap: 18px; font-size: 13px; }
.pg-top nav a { color: var(--pg-ink-2); text-decoration: none; }
.pg-top nav a[aria-current] { color: var(--pg-ink); text-decoration: underline; text-underline-offset: 4px; }
.pg-main { max-width: 920px; margin: 0 auto; padding: 30px 16px 80px; }
.pg-main h1 { font: 400 clamp(44px, 8vw, 72px)/1 'Instrument Serif', Georgia, serif; margin: 6px 0 22px; letter-spacing: -.01em; }
.pg-main h2 { font: 400 28px/1.2 'Instrument Serif', Georgia, serif; margin: 0 0 14px; }
.pg-main section { padding: 30px 0; border-top: 1px solid var(--pg-line); }
.pg-main p { margin: 0 0 12px; max-width: 64ch; }
.pg-line { font-size: 13px; color: var(--pg-ink-2); }
.pg-lede { font-size: 18px; color: var(--pg-ink-2); margin-bottom: 26px !important; }
.pg-quiet { color: var(--pg-ink-3); font-size: 13px; }
.pg code, .ssr code { font: 500 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }

/* Vitals */
.pg-vitals { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--pg-line); }
.pg-vitals div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--pg-line); }
.pg-vitals dt { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--pg-ink-3); font-weight: 500; }
.pg-vitals dd { margin: 4px 0 0; font: 400 26px/1.1 'Instrument Serif', Georgia, serif; font-variant-numeric: tabular-nums; }

/* Moods */
.pg-moods { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 24px; }
.pg-moods li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--pg-line); font-size: 14px; }
.pg-moods span { color: var(--pg-ink-2); }

/* Feeds */
.pg-feed { list-style: none; padding: 0; margin: 0; }
.pg-feed li { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--pg-line); }
.pg-feed p { margin: 0 !important; }
.pg-feed span { color: var(--pg-ink-3); font-size: 12.5px; white-space: nowrap; }

/* Tables */
.pg-table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.pg-table th, .pg-table td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--pg-line); }
.pg-table thead th { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--pg-ink-3); font-weight: 500; }
.pg-table tbody th { font-weight: 500; white-space: nowrap; }
.pg-table td a + a { margin-left: 12px; }
.pg-table td:last-child { white-space: nowrap; }

.pg-steps { padding-left: 20px; margin: 0; max-width: 68ch; }
.pg-steps li { margin-bottom: 12px; }

/* Token box: only rendered when the token exists */
.pg-token { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 18px; }
.pg-token .k { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--pg-ink-3); font-weight: 500; }
.pg-token a { background: var(--pg-ink); color: var(--pg-milk) !important; text-decoration: none; padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; }

@media (max-width: 560px) {
  .pg-feed li { flex-direction: column; gap: 2px; }
  .pg-vitals { grid-template-columns: repeat(2, 1fr); }
  .pg-table td:last-child { white-space: normal; }
}
