/* Reading layout of machinebehavior.io: the serif column of the research pages.
   Colours, type and spacing come from /design/tokens.css (loaded by every page); the variables below
   (--paper, --ink, --teal ...) are mapped onto the tokens there, so this file holds no colour values. The import keeps a page that lacks the head block styled. */
@import url("/design/tokens.css");
html { background: var(--paper); }
body {
  font-family: var(--mb-font-serif);
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
  padding: 3.5rem 1.25rem 4rem;
}
.sheet { max-width: var(--mb-read-w); margin: 0 auto; }
.nav {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-bottom: 2.2rem;
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.nav a { color: var(--ink-soft); text-decoration: none; text-transform: lowercase; }
.nav a:hover, .nav a:focus-visible { color: var(--teal); text-decoration: underline; outline: none; }
.nav a[aria-current="page"] { color: var(--teal); font-weight: 700; }
.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal);
}
h1 {
  font-size: clamp(1.9rem, 6vw, 2.6rem); line-height: 1.08;
  margin: 0.4rem 0 0.6rem; text-wrap: balance; letter-spacing: -0.01em;
}
h2 { font-size: 1.25rem; margin: 2.4rem 0 0.8rem; }
.subtitle { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 2.2rem; text-wrap: balance; }
.thesis { font-size: 1.05rem; margin: 0 0 1.1rem; }
.thesis strong { color: var(--teal); font-weight: 600; }
.oneliner {
  border-left: 3px solid var(--teal); padding: 0.15rem 0 0.15rem 1rem;
  margin: 1.8rem 0; font-size: 1.15rem; font-style: italic;
}
section { margin-top: 2.6rem; }
.label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft);
  border-bottom: 1px solid var(--rule); padding-bottom: 0.45rem; margin-bottom: 1rem;
}
.log { font-family: var(--mono); font-size: 0.85rem; display: grid; gap: 0.55rem; }
.log-row { display: flex; gap: 0.9rem; align-items: baseline; }
.log-num {
  color: var(--rust); min-width: 7.5ch; text-align: right;
  font-variant-numeric: tabular-nums; font-weight: 700;
}
.log-what { color: var(--ink-soft); }
.surfaces, .files { display: grid; gap: 0.9rem; }
.surface {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--mb-radius-s);
  padding: 0.9rem 1.1rem; display: grid; gap: 0.2rem;
}
.surface-name { font-weight: 700; font-size: 1.02rem; }
.surface-role { color: var(--ink-soft); font-size: 0.93rem; }
a.mono, .surface a, .files a {
  font-family: var(--mono); font-size: 0.82rem; color: var(--teal);
  text-decoration: none; word-break: break-all;
}
.surface a:hover, .files a:hover, a.mono:hover,
.surface a:focus-visible, .files a:focus-visible, a.mono:focus-visible { text-decoration: underline; outline: none; }
.file-row { display: grid; gap: 0.1rem; }
.file-title { font-weight: 700; font-size: 0.98rem; }
.file-note { color: var(--ink-soft); font-size: 0.9rem; }
.claim {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--mb-radius-s);
  padding: 1rem 1.1rem; display: grid; gap: 0.45rem; margin-bottom: 0.9rem;
}
.claim-head { display: flex; gap: 0.8rem; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.claim-text { font-size: 1.02rem; font-weight: 600; }
.status {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.15rem 0.55rem; border: 1px solid; border-radius: 999px;
  white-space: nowrap;
}
.status.supported { color: var(--teal); border-color: var(--teal); }
.status.refuted { color: var(--rust); border-color: var(--rust); }
.status.testing { color: var(--ink-soft); border-color: var(--ink-soft); }
.status.proposed { color: var(--ink-soft); border-color: var(--ink-soft); }
.claim-meta { font-size: 0.9rem; color: var(--ink-soft); }
.claim-refute { font-size: 0.9rem; }
.claim-refute em { font-style: normal; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
table { border-collapse: collapse; font-family: var(--mono); font-size: 0.82rem; margin: 1rem 0; }
th, td { border: 1px solid var(--rule); padding: 0.45rem 0.7rem; text-align: left; }
th { background: var(--card); font-weight: 700; }
td.n { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; }
dt { font-weight: 700; margin-top: 1.4rem; }
dt .term-mono { font-family: var(--mono); font-size: 0.9em; color: var(--teal); }
dd { margin: 0.25rem 0 0; }
dd .receipt { font-size: 0.85rem; color: var(--ink-soft); }
.footer {
  margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap;
}
.sig { font-weight: 700; }
.motto { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); }
.thesis a:not(.mono) { color: var(--teal); }

.conf { margin-top: .6rem; font-size: .75em; color: var(--ink-soft); }
.conf a { color: var(--ink-soft); }
.figure { margin: 0.6rem 0 0; }
.figure img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--rule); }
.figure figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.55rem; }
.figure figcaption a { color: var(--teal); }
/* home page: a band of nodes and links from the map above the menu; its sides and bottom fade into the page */
body.home { padding-top: calc(min(100vw, 880px) * 0.2575 - 0.5rem); }
.hero { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: min(100vw, 880px); aspect-ratio: 1138 / 293;
  pointer-events: none; z-index: 0; background: url("/map/home-net-light.png") center / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%), linear-gradient(to right, transparent 0, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%), linear-gradient(to right, transparent 0, #000 18%, #000 82%, transparent 100%);
  mask-composite: intersect; }
@media (prefers-color-scheme: dark) { .hero { background-image: url("/map/home-net-dark.png"); } }
a:focus-visible { outline: 2px solid var(--mb-focus); outline-offset: 2px; border-radius: 2px; }
.sheet { position: relative; z-index: 1; }
/* long hashes, URLs and code wrap inside the column; on a phone a wide table scrolls inside its own box */
.sheet { overflow-wrap: break-word; }
.sheet code, .sheet .mono, .sheet a { overflow-wrap: anywhere; }
.sheet pre { max-width: 100%; overflow-x: auto; }
@media (max-width: 819px) { .sheet table { display: block; max-width: 100%; overflow-x: auto; } }

/* home page: a portal front page in the reading brand. Hero with the map, section cards,
   the latest research, topics, the TYChat lessons, the other surfaces and the aim. Lists between static: markers
   are written by scripts/build_fallbacks.py. */
body.mb-read.home > .sheet { max-width: 1160px; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; align-items: center; margin: 0.6rem 0 0; }
.home-hero h1 { font-size: clamp(2.5rem, 5.4vw, 3.9rem); margin: 0.3rem 0 0.7rem; letter-spacing: -0.02em; }
.home-hero .subtitle { font-size: 1.22rem; margin-bottom: 1.3rem; }
.home-hero .thesis { max-width: 620px; }
.home-hero .oneliner { margin: 1.4rem 0; max-width: 620px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.6rem 0 0; }
.home-btn { display: inline-block; font: 500 var(--mb-text-md)/1.2 var(--mb-font-sans); padding: 11px 18px; border-radius: 999px; text-decoration: none;
  color: var(--mb-text); background: var(--mb-surface-raised); border: 1px solid var(--mb-line); }
.home-btn:hover { border-color: var(--mb-teal); color: var(--mb-teal); }
.home-btn.primary { background: var(--mb-teal); border-color: var(--mb-teal); color: var(--mb-surface); }
.home-btn.primary:hover { color: var(--mb-surface); filter: brightness(1.08); }
.home-map { margin: 0; }
.home-map img { display: block; width: 100%; height: auto; border-radius: var(--mb-radius-l); border: 1px solid var(--mb-line); box-shadow: var(--mb-shadow); }
.home-map figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.7rem; }
.home-map figcaption a { color: var(--teal); }
.home-band { margin-top: 3.4rem; }
.home-band h2.label { display: flex; align-items: baseline; gap: 12px; font-size: 0.72rem; font-weight: 400; margin: 0 0 1.1rem; }
.home-more { margin-left: auto; font-family: var(--mb-font-mono); letter-spacing: 0; text-transform: none; color: var(--teal); }
.home-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.home-grid.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.home-grid .mb-entry { padding: 16px 18px; }
.home-grid .mb-entry > a { font-size: 1.08rem; }
.home-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.home-chips a { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--mb-line);
  background: var(--mb-surface-raised); color: var(--mb-text); text-decoration: none; font: 500 var(--mb-text-md)/1.2 var(--mb-font-sans); }
.home-chips a:hover { border-color: var(--teal); color: var(--teal); }
.home-chips span { display: none; }
.home-else { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 4px 28px; }
.home-else li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--mb-line); }
.home-else a { font-weight: 700; color: var(--mb-text); text-decoration: none; }
.home-else a:hover { color: var(--teal); text-decoration: underline; }
.home-else span { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.45; }
.home-aims .thesis { font-size: 1.2rem; max-width: 760px; }
@media (max-width: 960px) { .home-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
