:root { --oak: #3c5a3d; --oak-soft: #8ea88e; --oak-tint: #eef2ed; --oak-wash: #f6f8f5;
  --grey: #a3a39c; --grey-soft: #dcdcd6; --grey-wash: #f5f5f2; --wide: 860px; }
body.essay { overflow-x: hidden; }
/* ---------- head ---------- */
.head { text-align: center; margin: clamp(2rem, 7vw, 4.5rem) auto clamp(2.5rem, 6vw, 4rem); }
.kicker, .meta, .strap { font-family: var(--sans); }
.kicker { margin: 0 0 1.25rem; font-size: 15px; color: var(--fg-soft); }
.draft { margin-left: 0.5rem; font-size: 11px; background: var(--grey-wash); color: var(--fg-faint); border-radius: 100px; padding: 0.3em 0.8em; vertical-align: 0.1em; }
.head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 10vw, 5.4rem); line-height: 1; letter-spacing: -0.01em; text-wrap: balance; }
.strap { margin: 1.4rem auto 0; max-width: 30em; font-size: 17px; color: var(--fg-soft); text-wrap: balance; }
.head .meta { margin: 0.6rem 0 0; font-size: 15px; color: var(--fg-faint); }

/* ---------- prose ---------- */
.prose p { margin: 0 0 1.6rem; }
.prose h2 { font-family: var(--sans); font-weight: 500; font-size: 1.3rem; letter-spacing: -0.012em; line-height: 1.3; margin: 3.2rem 0 1.1rem; text-wrap: balance; }
.prose sup:not(.cite) { font-size: 0.7em; line-height: 0; }
.part { margin: 4.5rem 0 0 !important; padding-top: 1.2rem; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 14px; color: var(--fg-faint); }
.part + h2 { margin-top: 1rem; }

.cite { line-height: 0; }
.fn { font: 500 11px/1 var(--sans); color: var(--oak); background: none; border: 0; padding: 0 1px 0 2px; cursor: pointer; vertical-align: 0.15em; }
.fn:hover, .fn[aria-expanded="true"] { text-decoration: underline; }
.fn:focus-visible { outline: 2px solid var(--oak); outline-offset: 2px; border-radius: 2px; }
.fnbox { margin: -0.8rem 0 1.6rem; padding: 0.8rem 1rem; background: var(--oak-wash); border-left: 2px solid var(--oak); font-family: var(--sans); font-size: 13.5px; line-height: 1.5; color: var(--fg-soft); }
.fnbox p { margin: 0 0 0.35rem !important; }
.fnbox p:last-child { margin: 0 !important; }
.fnbox b { color: var(--fg); font-weight: 500; }
.fig .fnbox { margin: 0.6rem 0 0; }

/* ---------- the three layers ---------- */
.layers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 2.6rem 0 0.5rem; background: var(--rule); border: 1px solid var(--rule); }
.layers a { display: block; padding: 1rem 1rem 1.1rem; background: var(--bg); text-decoration: none; font-family: var(--sans); }
.layers a:hover { background: var(--oak-wash); }
.layers span { display: block; font-size: 12px; color: var(--fg-faint); }
.layers b { display: block; margin: 0.15rem 0 0.4rem; font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; }
.layers i { font-style: normal; font-size: 13px; line-height: 1.45; color: var(--fg-soft); }

/* ---------- figures ---------- */
.fig { margin: 3rem 0 3.2rem; padding-top: 1rem; border-top: 1px solid var(--fg); font-family: var(--sans); }
.fig.wide { width: min(var(--wide), calc(100vw - 32px)); margin-left: calc(50% - min(var(--wide), calc(100vw - 32px)) / 2); }
.fhead { display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.fno { color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.ftitle { font-weight: 500; color: var(--fg); }
.fdisp { margin: 0.5rem 0 1.4rem !important; font-family: var(--display); font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.1; text-wrap: balance; }
.fcap { margin: 1.2rem 0 0 !important; padding-top: 0.8rem; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.55; color: var(--fg-faint); max-width: 46rem; }
.svgwrap { overflow-x: auto; }
.svgwrap svg { display: block; width: 100%; height: auto; min-width: 520px; font-family: var(--sans); }

svg .grid { stroke: var(--rule); stroke-width: 1; }
svg .ax { fill: var(--fg-faint); font-size: 12px; }
svg .val { fill: var(--fg); font-size: 14px; font-weight: 500; }
svg .val.sm { font-size: 12px; }
svg .xl { fill: var(--fg); font-size: 13.5px; font-weight: 500; }
svg .xs { fill: var(--fg-faint); font-size: 12px; }
svg .div { stroke: var(--grey-soft); stroke-dasharray: 3 4; }
svg .b-hist { fill: var(--grey); }
svg .b-oak { fill: var(--oak); }
svg .b-hyp { fill: var(--oak-wash); stroke: var(--oak-soft); stroke-dasharray: 5 4; stroke-width: 1.4; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 2rem; margin-top: 1.4rem; }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats b { display: block; font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1.1; }
.stats span { display: block; margin-top: 0.3rem; font-size: 13px; line-height: 1.45; color: var(--fg-soft); }

/* figure 2 */
.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.75rem; padding: 1rem 1.1rem 1.1rem; background: var(--grey-wash); border-radius: 6px; }
.ctl { min-width: 0; }
.clab { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 13px; color: var(--fg-soft); margin-bottom: 0.55rem; }
.clab output { color: var(--fg); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font: 500 13px/1 var(--sans); color: var(--fg-soft); background: var(--bg); border: 1px solid var(--grey-soft); border-radius: 100px; padding: 0.5em 0.85em; cursor: pointer; }
.chip:hover { border-color: var(--oak-soft); }
.chip[aria-pressed="true"] { background: var(--oak); border-color: var(--oak); color: #fff; }
.chip:focus-visible, input[type=range]:focus-visible { outline: 2px solid var(--oak); outline-offset: 2px; }
input[type=range] { width: 100%; accent-color: var(--oak); margin: 0.3rem 0 0; }
.readout { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem 2rem; margin: 1.4rem 0 0.6rem; align-items: end; }
.readout span { display: block; font-size: 13px; color: var(--fg-soft); }
.readout b { display: block; font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1.1; margin-top: 0.2rem; font-variant-numeric: tabular-nums; }
.readout .big b { font-size: 3.2rem; color: var(--oak); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -0.05em; }
.sw-phys { background: var(--grey); } .sw-algo { background: var(--oak-soft); }
.sw-acc { background: var(--oak); } .sw-rem { background: var(--grey-soft); }
svg .l-comb { fill: none; stroke: var(--oak); stroke-width: 3.5; stroke-linecap: round; }
svg .l-phys { fill: none; stroke: var(--grey); stroke-width: 2.2; stroke-linecap: round; }
svg .l-algo { fill: none; stroke: var(--oak-soft); stroke-width: 2.2; stroke-linecap: round; }
svg .end { font-size: 14px; font-weight: 500; }
svg .end.comb { fill: var(--oak); font-size: 16px; } svg .end.phys { fill: var(--fg-soft); } svg .end.algo { fill: #5f7d60; }
.fnote2 { margin: 0.6rem 0 0 !important; font-size: 13px; color: var(--fg-soft); }

/* figure 3 */
svg .ring { fill: none; stroke: var(--oak-tint); stroke-width: 30; }
svg .arc { fill: none; stroke: var(--oak); stroke-width: 1.8; }
svg .node rect { fill: var(--bg); stroke: var(--grey-soft); stroke-width: 1.2; }
svg .node.gen rect { fill: var(--oak-wash); stroke: var(--oak-soft); }
svg .nt { fill: var(--fg); font-size: 15px; font-weight: 600; }
svg .ns { fill: var(--fg-soft); font-size: 12.5px; }
svg .centre { fill: var(--fg); font-family: var(--display); font-size: 26px; }
svg .dash { stroke: var(--grey); stroke-dasharray: 3 4; }
svg .cons rect { fill: var(--grey-wash); stroke: var(--grey-soft); }

/* figure 4 */
.bars { display: grid; gap: 1.3rem; }
.brow { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 0.5rem 1.5rem; align-items: center; }
.bl b { display: block; font-size: 15px; font-weight: 500; }
.bl span { display: block; font-size: 12.5px; line-height: 1.4; color: var(--fg-faint); }
.track { position: relative; display: flex; height: 38px; background: var(--grey-wash); }
.seg { display: block; height: 100%; }
.seg.acc { background: var(--oak); } .seg.rem { background: var(--grey-soft); }
.tot { align-self: center; margin-left: 0.6rem; font: 400 1.5rem/1 var(--display); font-style: normal; }
.brow:first-child .tot { position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%); }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1rem; font-size: 13px; color: var(--fg-soft); }

/* figure 5 */
svg .band { fill: var(--grey-wash); }
svg .thr { stroke: var(--grey-soft); stroke-dasharray: 4 4; }
svg .thl { fill: var(--fg-faint); font-size: 12.5px; }
svg .l-priv { fill: none; stroke: var(--fg-soft); stroke-width: 2.2; stroke-dasharray: 6 5; }
svg .l-comm { fill: none; stroke: var(--grey); stroke-width: 2.4; }
svg .l-ind { fill: none; stroke: var(--oak); stroke-width: 3; }
svg .lab-priv { fill: var(--fg-soft); font-size: 13.5px; font-weight: 500; }
svg .lab-comm { fill: #77776f; font-size: 13.5px; font-weight: 500; }
svg .lab-ind { fill: var(--oak); font-size: 13.5px; font-weight: 600; }
svg .cross { fill: var(--bg); stroke: var(--oak); stroke-width: 2; }
svg .pt { fill: var(--oak); }
svg .axis { stroke: var(--fg-soft); stroke-width: 1; }
svg .axl { fill: var(--fg-soft); font-size: 13px; }
.evidence { margin-top: 1.3rem; border: 1px solid var(--rule); border-radius: 6px; padding: 0 1rem; }
.evidence summary { cursor: pointer; padding: 0.8rem 0; font-size: 14px; font-weight: 500; }
.evidence[open] { padding-bottom: 1rem; }
.evidence .fcap { border-top: 0; padding-top: 0; }

/* figure 6 */
svg .edge { stroke: var(--grey-soft); stroke-width: 1.2; }
svg .edge.auth { stroke: var(--grey); stroke-width: 1.8; }
svg .edge.hi { stroke: var(--oak); stroke-width: 2.4; }
svg .nj rect { fill: var(--grey-wash); stroke: var(--grey); stroke-width: 1.4; }
svg .nl rect, svg .np rect { fill: var(--bg); stroke: var(--grey-soft); stroke-width: 1.2; }
svg .nj text, svg .nl text { fill: var(--fg); font-size: 14px; font-weight: 500; }
svg .np text { fill: var(--fg-soft); font-size: 11.5px; }
svg .on rect { stroke: var(--oak); fill: var(--oak-wash); stroke-width: 1.8; }
svg .no { fill: var(--bg); stroke: var(--grey-soft); stroke-width: 1.4; }
svg .no.on { fill: var(--oak); stroke: var(--oak); }
svg .layer { fill: var(--fg-faint); font-size: 12px; }
.div3 { width: 100%; margin-top: 1.2rem; border-collapse: collapse; font-size: 13.5px; }
.div3 th { text-align: left; font-weight: 500; color: var(--fg-faint); font-size: 12.5px; padding: 0 0.8rem 0.5rem 0; border-bottom: 1px solid var(--fg); }
.div3 td { padding: 0.6rem 0.8rem 0.6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--fg-soft); }
.div3 td:first-child { color: var(--fg); font-weight: 500; }
.div3 td b { color: var(--oak); font-weight: 600; }

/* figure 7 */
.orgs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(1rem, 5vw, 3.5rem); position: relative; }
.orgs::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed var(--grey-soft); }
.org { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.org h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.osub { margin: 0.2rem 0 1.2rem !important; font-size: 13px; color: var(--fg-faint); }
.blk { width: min(100%, 17rem); padding: 0.8rem 0.9rem; border: 1.2px solid var(--grey-soft); border-radius: 4px; font-size: 14px; line-height: 1.35; background: var(--bg); }
.dep .mid { border-color: var(--grey); background: var(--grey-wash); }
.ind .mid { border-color: var(--oak); background: var(--oak-wash); }
.link { position: relative; height: 30px; border-left: 2px solid var(--oak); }
.dep .link { border-left: 2px dashed var(--grey); }
.link.cut { border-left: 2px dashed var(--grey); }
.link.cut span { position: absolute; left: -1px; top: 50%; transform: translate(-50%, -52%); font-size: 22px; line-height: 1; color: var(--fg-soft); background: var(--bg); padding: 0 2px; }
.out { width: min(100%, 17rem); padding: 0.75rem 0.9rem; border-radius: 4px; }
.out b { display: block; font-size: 15px; font-weight: 600; }
.out span { display: block; font-size: 13px; color: var(--fg-soft); }
.dep .out { background: var(--grey-wash); } .dep .out b { color: var(--fg-soft); }
.ind .out { background: var(--oak-tint); } .ind .out b { color: var(--oak); }

/* ---------- references and footer ---------- */
.refsec { margin-top: 4rem; padding-top: 1.2rem; border-top: 1px solid var(--fg); }
.refsec h2 { margin: 0 0 1rem; font-family: var(--sans); font-weight: 500; font-size: 1.1rem; }
.refs { margin: 0 0 1.5rem; padding-left: 1.5rem; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--fg-soft); }
.refs li { margin-bottom: 0.6rem; padding-left: 0.2rem; }
.refs li:target { background: var(--oak-wash); }
.ra { color: var(--fg); }
.rt { font-style: italic; font-family: var(--serif); font-size: 15px; }
.refs a { color: var(--oak); word-break: break-all; }

@media (max-width: 760px) {
  .layers, .controls { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .readout { grid-template-columns: 1fr 1fr; }
  .readout .big { grid-column: 1 / -1; }
  .brow { grid-template-columns: 1fr; }
  .blk, .out { font-size: 12.5px; }
  .org h4 { font-size: 1.35rem; }
}

/* ---------- editing the wording ---------- */
.editui { position: fixed; z-index: 20; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); font-family: var(--sans); }
.ebtn { font: 500 13px/1 var(--sans); color: var(--fg); background: var(--bg); border: 1px solid var(--grey-soft); border-radius: 100px; padding: 0.75em 1.1em; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.ebtn:hover { border-color: var(--oak); }
.ebar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; max-width: min(560px, calc(100vw - 32px)); padding: 0.7rem 0.8rem 0.7rem 1rem; background: var(--fg); color: #fff; border-radius: 8px; box-shadow: 0 4px 18px rgba(0,0,0,0.15); }
.emsg { flex: 1 1 14rem; font-size: 13px; line-height: 1.4; }
.eact { display: flex; gap: 0.4rem; }
.ecancel, .esave { font: 500 13px/1 var(--sans); border-radius: 100px; padding: 0.6em 1em; cursor: pointer; border: 1px solid rgba(255,255,255,0.35); background: transparent; color: #fff; }
.esave { background: #fff; color: var(--fg); border-color: #fff; }
.ecancel:disabled, .esave:disabled { opacity: 0.5; cursor: default; }
.editing [data-b], .editing [data-k] { outline: 1px dashed var(--grey-soft); outline-offset: 4px; border-radius: 2px; cursor: text; }
.editing [data-b]:focus, .editing [data-k]:focus { outline: 1.5px solid var(--oak); }
.editing .changed { background: var(--oak-wash); outline-color: var(--oak-soft); }
.editing .fn { cursor: default; }

/* ---------- contents ---------- */
.toc { font-family: var(--sans); font-size: 13px; line-height: 1.35; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc-title { margin: 0 0 0.7rem; font-size: 12px; color: var(--fg-faint); }
.t-part { margin: 1.1rem 0 0.35rem; font-size: 12px; color: var(--fg-faint); }
.t-sec a { display: block; padding: 0.3rem 0 0.3rem 0.8rem; border-left: 2px solid var(--rule); color: var(--fg-faint); text-decoration: none; text-wrap: pretty; }
.t-sec a:hover { color: var(--fg); }
.t-sec.on a { color: var(--fg); border-left-color: var(--oak); }
.t-refs { margin-top: 1.1rem; }
.toc a:focus-visible, .tocbtn:focus-visible { outline: 2px solid var(--oak); outline-offset: 2px; }

/* Narrow screens: the contents opens from a button in the corner. */
.tocbtn { position: fixed; z-index: 19; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  font: 500 13px/1 var(--sans); color: var(--fg); background: var(--bg); border: 1px solid var(--grey-soft); border-radius: 100px; padding: 0.75em 1.1em; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.tocbtn:hover { border-color: var(--oak); }
.past-head .tocbtn { opacity: 1; pointer-events: auto; }
.editing .tocbtn { display: none; }
.tocwrap .toc { display: none; }
.tocopen .tocwrap .toc { display: block; position: fixed; z-index: 19; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 3.4rem);
  width: min(320px, calc(100vw - 32px)); max-height: min(70vh, 34rem); overflow-y: auto; padding: 1rem 1.1rem 1.1rem; background: var(--bg);
  border: 1px solid var(--grey-soft); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,0.12); }
@media (prefers-reduced-motion: reduce) { .tocbtn { transition: none; } }

/* Headings stacked with their part label (narrow screens keep them in the column). */
.mhead > .part + h2 { margin-top: 1rem; }

/* ---------- wide screens: contents fixed at the left edge, headings in the margin ---------- */
/* As on the site, each section heading sits to the left of the text it introduces,
   level with its first line. The contents is pinned to the left edge of the window,
   appears once the essay begins, and steps aside for the footer. */
@media (min-width: 1240px) {
  body.essay .prose { margin-left: 0; }
  body.essay main { padding-left: 16px; padding-right: 16px; max-width: calc(190px + 40px + var(--column) + 32px); margin-left: max(250px, calc((100vw - 190px - 40px - var(--column) - 32px) / 2)); margin-right: auto; }
  .tocwrap .toc { display: block; position: fixed; z-index: 5; left: max(24px, env(safe-area-inset-left, 0px)); top: calc(var(--bar) + env(safe-area-inset-top, 0px) + 2rem);
    width: 196px; max-height: calc(100vh - var(--bar) - 4rem); overflow-y: auto; padding: 0.3rem 0 1rem;
    opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
  .past-head:not(.past-end) .tocwrap .toc { opacity: 1; visibility: visible; }
  .tocbtn { display: none; }

  .prose { display: grid; grid-template-columns: 190px minmax(0, var(--column)); column-gap: 40px; align-items: start; }
  .prose > * { grid-column: 2; min-width: 0; }
  .prose > .fig.wide { grid-column: 1 / -1; width: auto; margin-left: 0; }
  .prose > .mhead { grid-column: 1; position: relative; text-align: right; }
  .mhead h2 { font-size: 1.02rem; line-height: 1.4; margin: 1.9rem 0 0; }
  .prose > .mhead + * { margin-top: 1.55rem; }
  .mhead > .part { margin: 0 !important; padding: 0; border: 0; font-size: 13px; line-height: 1.45; }
  .mhead > .part + h2 { margin-top: 0.3rem; }
  .prose > .mhead.haspart { margin-top: 4.5rem; }
  .prose > .mhead.haspart + * { margin-top: 5.63rem; }
  .mhead.haspart::before { content: ""; position: absolute; left: 0; top: -1.4rem; width: calc(190px + 40px + var(--column)); border-top: 1px solid var(--rule); }

  .refsec { display: grid; grid-template-columns: 190px minmax(0, var(--column)); column-gap: 40px; align-items: start; }
  .refsec h2 { grid-column: 1; text-align: right; font-size: 1.02rem; line-height: 1.4; margin: 0.1rem 0 0; }
  .refbody { grid-column: 2; }
}
@media (min-width: 1240px) and (prefers-reduced-motion: reduce) { .tocwrap .toc { transition: none; } }

.nw { white-space: nowrap; }

/* ---------- research notes ---------- */
.rnote { margin: -0.3rem 0 1.8rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-family: var(--sans); }
.rnote + .rnote { margin-top: -1.8rem; border-top: 0; }
.fig + .rnote { margin-top: 0.4rem; }
.rnote summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 0.6rem; padding: 0.7rem 0; font-size: 14px; }
.rnote summary::-webkit-details-marker { display: none; }
.rnote summary::before { content: "+"; flex: 0 0 1rem; color: var(--oak); font-weight: 600; }
.rnote[open] summary::before { content: "\2212"; }
.rnote summary:hover .rn-t { color: var(--oak); }
.rn-k { flex: none; font-size: 12.5px; color: var(--fg-faint); }
.rn-t { font-weight: 500; color: var(--fg); }
.rn-body { padding: 0.2rem 0 0.8rem 1.6rem; }
.prose .rn-body p { margin: 0 0 0.9rem; font-family: var(--serif, inherit); font-size: 15.5px; line-height: 1.6; color: var(--fg-soft); }
.ndata { margin: 0.2rem 0 1.1rem; }
.ndata .div3 { margin-top: 0; }
.prose .ndata .ncap { margin: 0.6rem 0 0; font-family: var(--sans); font-size: 13px; line-height: 1.5; color: var(--fg-faint); }
.ntab td:nth-child(2), .ntab td:nth-child(3) { white-space: nowrap; }
svg .cons.intel rect { fill: none; stroke-dasharray: 5 4; }
