/* Shared frame for fallibilism.com inner pages: same night world, type and nav as the home page. */
:root {
  --bg: #04050a;
  --panel: rgba(10, 12, 19, .86);
  --ink: #f4f1ea;
  --muted: #a9afbc;
  --faint: #232837;
  --pen: #ff4d3d;
  --u: #9d8cff; --m: #55c2ff; --l: #4fe3a5; --x: #ffc35c; --c: #ff7fc0;
  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, "Times New Roman", serif;
  --font-body: "Geist", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--font-body); font-size: 1.125rem; line-height: 1.65; font-weight: 350;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(157, 140, 255, .14), transparent 70%),
    radial-gradient(50rem 26rem at 10% -15%, rgba(85, 194, 255, .10), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
::selection { background: var(--pen); color: var(--ink); }
.wrap { max-width: 86rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.mono { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.grad { font-style: italic; font-weight: 400; background: linear-gradient(90deg, var(--u), var(--m), var(--l), var(--x), var(--c)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* Nav (shared with home) */
nav.top { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px); background: rgba(4, 5, 10, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--faint); }
nav.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; height: 4rem; }
.brand { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; letter-spacing: .22em; text-decoration: none; }
.navr { display: flex; align-items: center; gap: 1.6rem; }
nav.top ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
nav.top ul a { text-decoration: none; color: var(--muted); transition: color .2s; }
nav.top ul a:hover, nav.top ul a[aria-current="page"] { color: var(--ink); }
.cta { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; transition: transform .2s, box-shadow .2s; white-space: nowrap; }
.cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(85, 194, 255, .25); }
.menu-btn { display: none; background: none; border: 1px solid var(--faint); color: var(--ink); border-radius: 999px; padding: .45rem .9rem; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(4, 5, 10, .97); display: flex; flex-direction: column; justify-content: center; padding: 2rem var(--gutter-r) 2rem var(--gutter); }
.sheet[hidden] { display: none; }
.sheet a { display: block; font-family: var(--font-display); font-size: 2.1rem; line-height: 1.5; text-decoration: none; }
.sheet a.sheet-cta { margin-top: 1.6rem; font-family: var(--font-mono); font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; color: var(--m); }
.sheet .close { position: absolute; top: calc(1rem + env(safe-area-inset-top, 0px)); right: var(--gutter-r); }

/* Page */
.page-head { padding-block: clamp(4.5rem, 10vw, 8rem) clamp(2.5rem, 5vw, 4rem); }
.page-head h1 { margin: 1rem 0 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(3rem, 8vw, 7rem); line-height: .95; letter-spacing: -.025em; text-wrap: balance; }
.page-head .tag { margin: 1.3rem 0 0; font-family: var(--font-display); font-style: italic; font-size: clamp(1.35rem, 2.4vw, 2rem); color: var(--m); }
.page-head .lede { margin: 1.6rem 0 0; max-width: 38rem; font-size: clamp(1.1rem, 1.5vw, 1.3rem); }
.block { padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--faint); }
.block h2 { margin: .8rem 0 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.02; letter-spacing: -.015em; text-wrap: balance; max-width: 20ch; }
.prose { max-width: 40rem; }
.prose p { margin: 0 0 1.1rem; }
.prose p.dim, .dim { color: var(--muted); }
.prose h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; margin: 2.2rem 0 .6rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.1rem; }
.prose li { margin-bottom: .5rem; }

.grid3 { margin-top: 2.2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--faint); border: 1px solid var(--faint); }
.grid3 > * { background: var(--panel); padding: 1.6rem 1.5rem 1.8rem; min-width: 0; }
.grid3 h3 { margin: .6rem 0 .5rem; font-family: var(--font-display); font-weight: 500; font-size: 1.55rem; line-height: 1.15; }
.grid3 p { margin: 0; color: var(--muted); font-size: 1rem; }
a.card { text-decoration: none; display: block; transition: background .2s; }
a.card:hover { background: rgba(20, 24, 36, .95); }
a.card .go { margin-top: 1.1rem; display: inline-block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
code { font-family: var(--font-mono); font-size: .9em; background: rgba(255, 255, 255, .06); padding: .1em .4em; border-radius: 3px; }

.figs { margin-top: 2.2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.figs b { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.figs span { display: block; margin-top: .5rem; }
.figs-note { margin-top: 1.2rem; }

.facts { margin-top: 2rem; display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); border-top: 1px solid var(--faint); max-width: 48rem; }
.facts dt, .facts dd { margin: 0; padding: 1rem 0; border-bottom: 1px solid var(--faint); }
.facts dt { padding-top: 1.25rem; }
.facts dd { font-size: 1.1rem; }

.news { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 2rem; padding-block: 2rem; border-top: 1px solid var(--faint); }
.news li:last-child { border-bottom: 1px solid var(--faint); }
.news .meta { display: flex; flex-direction: column; gap: .5rem; padding-top: .4rem; }
.news .kind { color: var(--k, var(--muted)); }
.news h2 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; max-width: none; }
.news p { margin: .8rem 0 0; color: var(--muted); max-width: 42rem; }

/* Footer sitemap (shared with home) */
footer.site { border-top: 1px solid var(--faint); background: var(--bg); position: relative; z-index: 1; }
footer.site .cols { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem; padding-block: 3.5rem 2.5rem; }
footer.site .brand { font-size: 1.1rem; }
footer.site h4 { margin: 0 0 1rem; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
footer.site ul a { text-decoration: none; color: var(--muted); font-size: .98rem; transition: color .2s; }
footer.site ul a:hover { color: var(--ink); }
footer.site .base { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-block: 1.6rem calc(2.4rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--faint); color: var(--muted); font-size: .92rem; }
footer.site .base p { margin: 0; }

@media (max-width: 960px) {
  nav.top ul { display: none; }
  .menu-btn { display: inline-block; }
  .grid3, .figs { grid-template-columns: minmax(0, 1fr); }
  footer.site .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer.site .cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  nav.top .cta { display: none; }
  .news li { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
}
