/* Memory Challenges report. Tokens from the site's landing design and the
   timed-memory report handoff (codex/report-design-handoff-20261028). */
@font-face{font-family:Archivo;src:url('/fonts/archivo-var.woff2') format('woff2');font-weight:100 900;font-stretch:62% 125%;font-display:swap}
@font-face{font-family:'Plex Mono';src:url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');font-weight:400;font-display:swap}

:root{
  color-scheme:light;
  --graphite:#16191E;--bone:#F3F0E9;--signal:#B9721E;
  --paper:var(--bone);--ink:var(--graphite);
  --soft:rgba(22,25,30,.86);--muted:rgba(22,25,30,.68);--line:rgba(22,25,30,.15);--wash:rgba(22,25,30,.04);
  --link-line:#9A5F19;
  --sans:Archivo,'Helvetica Neue',Arial,sans-serif;
  --mono:'Plex Mono',ui-monospace,'SFMono-Regular',Menlo,monospace;
  --measure:48rem;
}
:root[data-theme="dark"]{color-scheme:dark;--paper:var(--graphite);--ink:var(--bone);--soft:rgba(243,240,233,.84);--muted:rgba(243,240,233,.64);
    --line:rgba(243,240,233,.14);--wash:rgba(243,240,233,.05);--link-line:#e0a45c}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:1.5rem}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
body{margin:0;background:var(--paper);color:var(--soft);font:18px/1.65 var(--sans);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{color:inherit;text-decoration-color:var(--link-line);text-decoration-thickness:1px;text-underline-offset:.2em}
a:hover{text-decoration-thickness:2px}
a:focus-visible,summary:focus-visible,button:focus-visible{outline:3px solid var(--signal);outline-offset:3px;border-radius:2px}
::selection{background:rgba(185,114,30,.3)}
.skip-link{position:absolute;left:1rem;top:-6rem;z-index:2;background:var(--paper);color:var(--ink);padding:.75rem 1rem;border:1px solid var(--line)}
.skip-link:focus{top:.75rem}
main:focus{outline:none}

/* Header and footer */
.site-header,.site-footer{display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding:.75rem max(1.25rem,calc((100vw - 76rem)/2));font:13px/1.4 var(--mono);color:var(--ink)}
.site-header{border-bottom:1px solid var(--line)}
.site-footer{border-top:1px solid var(--line);margin-top:4rem;color:var(--muted)}
.site-header a,.site-footer a{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:.6rem;min-height:44px}
.site-header a:hover span,.site-footer a:hover{text-decoration:underline;text-decoration-color:var(--signal)}
.status{margin:0;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}

/* Center the reading column and keep contents inline. */
.shell{max-width:calc(var(--measure) + 3.5rem);margin:0 auto;padding:3rem 1.75rem 0;display:block}
.report{grid-column:1;grid-row:1;min-width:0}
.contents{grid-column:2;grid-row:1;position:sticky;top:1.5rem;max-height:calc(100vh - 3rem);overflow:auto;
  font:14px/1.45 var(--sans);color:var(--muted);border-top:1px solid var(--line);padding-top:1rem}
.contents-title{font-weight:600;color:var(--ink);margin:0 0 .5rem}
.contents-aside{display:none}
.contents-inline{display:block;position:static;max-height:none;margin:0 0 2rem;padding-top:0;border-bottom:1px solid var(--line)}
.contents-inline ol{padding-bottom:.75rem}
.contents summary{font-weight:600;color:var(--ink);cursor:pointer;list-style:none;min-height:44px;display:flex;align-items:center}
.contents summary::-webkit-details-marker{display:none}
.contents summary::after{content:'';width:.45rem;height:.45rem;margin-left:.6rem;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg) translateY(-2px)}
.contents details[open] summary::after{transform:rotate(-135deg) translateY(-1px)}
.contents ol{list-style:none;margin:0;padding:0}
.contents li{margin:0;padding:0}
.contents a{display:block;text-decoration:none;padding:.4rem 0;color:var(--muted)}
.contents a:hover{color:var(--ink);text-decoration:underline;text-decoration-color:var(--signal)}
.contents .toc-3 a{padding-left:.9rem;font-size:13px}

/* Article */
.report-header{margin-bottom:2.25rem}
.kicker{font:11px/1.6 var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:0 0 1.1rem}
.kicker::before{content:'';display:inline-block;width:1.2rem;height:2px;margin:0 .6rem .2rem 0;background:var(--signal)}
h1{font-size:clamp(2rem,1.2rem + 3vw,3.1rem);font-weight:650;font-stretch:112%;line-height:1.08;letter-spacing:-.035em;color:var(--ink);margin:0;text-wrap:balance}
.report-subtitle{font:400 clamp(1.25rem,1.1rem + .45vw,1.35rem)/1.45 var(--sans);color:var(--soft);margin:1rem 0 0;text-wrap:balance}
h2,h3,h4,h5,h6{color:var(--ink);text-wrap:balance;scroll-margin-top:1.5rem}
h2{font-size:1.6rem;line-height:1.25;font-weight:600;letter-spacing:-.015em;margin:3.5rem 0 1.25rem;padding-top:1.25rem;border-top:1px solid var(--line)}
h3{font-size:1.3rem;line-height:1.35;font-weight:550;margin:2.5rem 0 1rem}
h4{font-size:1.1rem;line-height:1.4;font-weight:600;margin:2rem 0 .75rem}
h5,h6{font-size:1rem;line-height:1.45;font-weight:600;margin:1.75rem 0 .6rem}
p{margin:0 0 1.25rem}
ol,ul{margin:0 0 1.5rem;padding-left:1.6rem}
li{margin-bottom:.6rem;padding-left:.2rem}
li>ol,li>ul{margin:.6rem 0 0}
li p{margin-bottom:.6rem}
li::marker{color:var(--muted)}
strong{font-weight:650;color:var(--ink)}
.table-wrap{overflow-x:auto;margin:1.75rem 0}
table{width:100%;border-collapse:collapse;font:15px/1.5 var(--sans)}
th,td{text-align:left;vertical-align:top;padding:.7rem .75rem;border-bottom:1px solid var(--line)}
th{font-size:13px;font-weight:600;color:var(--muted);border-top:1px solid var(--line)}

/* Notes */
.note-ref{font:11px/1 var(--sans);vertical-align:super;margin-left:.1em}
/* padding widens the target; the matching negative margin keeps punctuation tight against the number */
.note-ref a{text-decoration:none;padding:.15rem .25rem;margin:0 -.25rem;color:var(--link-line);font-weight:600}
.notes{margin-top:3.5rem;font-size:15px;line-height:1.6}
.notes h2{font-size:1.15rem}
.notes li{position:relative;scroll-margin-top:1.5rem}
/* the highlight takes in the note's number, which sits outside its box */
.notes li:target{isolation:isolate}
.notes li:target::before{content:'';position:absolute;z-index:-1;inset:-.45rem -.6rem -.45rem -2.1rem;
  background:var(--wash);border-left:2px solid var(--signal)}
.note-back{display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:24px;
  vertical-align:middle;margin-left:.1rem;color:var(--link-line);text-decoration:none}
.note-back svg{display:block}
.note-back:hover{color:var(--ink)}

/* Figures */
figure{margin:2rem 0}
figure img{display:block;width:100%;height:auto}
figcaption{font:14px/1.55 var(--sans);color:var(--muted);margin-top:.75rem}

@media (max-width:1060px){
  .shell{display:block;max-width:calc(var(--measure) + 3.5rem);padding-top:2rem}
  .contents-aside{display:none}
  .contents-inline{display:block;position:static;max-height:none;margin:0 0 2rem;padding-top:0;border-bottom:1px solid var(--line)}
  .contents-inline ol{padding-bottom:.75rem}
}
@media (max-width:560px){
  body{font-size:17px}
  .site-header,.site-footer{padding:.5rem 1.1rem;font-size:12px}
  .shell{padding:1.5rem 1.1rem 0}
  h2{font-size:1.4rem;margin-top:2.75rem}
  h3{font-size:1.18rem}
  ol,ul{padding-left:1.3rem}
}
@media print{
  .site-header,.site-footer,.contents,.skip-link{display:none}
  .shell{display:block;padding:0}
  body{background:#fff;color:#000;font-size:11pt}
  a{text-decoration:underline}
}

/* Explicit theme preference, shared with the original report. */
.header-actions{display:flex;align-items:center;gap:1rem;flex-shrink:0}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:44px;min-width:44px;padding:.4rem .65rem;border:1px solid var(--line);border-radius:3px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}
.theme-toggle[hidden]{display:none}
.theme-toggle:hover{background:var(--wash);border-color:var(--muted)}
.theme-toggle:active{background:var(--line)}
.theme-toggle svg{width:16px;height:16px;flex:none}
.theme-sun{display:none}
:root[data-theme="dark"] .theme-sun{display:block}
:root[data-theme="dark"] .theme-moon{display:none}
@media(max-width:560px){.site-header{gap:.6rem}.header-actions{gap:.5rem}.header-actions .status{display:none}.site-header .brand{min-width:0}.theme-toggle{font-size:12px}}

@media print{
 :root,:root[data-theme="dark"]{--paper:#fff;--ink:#16191e;--soft:#16191e;--muted:#555;--line:#ccc;--wash:#f5f5f5}
}

/* Static overview at the author's diagram directive. */
/* Native Doc figure, rendered as accessible SVG for both site themes. */
.memory-overview{--accent:var(--link-line);max-width:640px;margin:1.5rem auto 2rem;padding:1.25rem .75rem;border:1px solid var(--line);border-radius:6px;color:var(--ink)}
.memory-overview svg{display:block;width:100%;height:auto}
.memory-overview .memory-overview__diagram{max-width:440px;margin:auto}
.memory-overview figcaption{border-top:1px solid var(--line);padding-top:.85rem;margin:1rem .5rem 0;font:14px/1.6 var(--sans);color:var(--muted)}
@media(max-width:700px){.memory-overview{padding:1rem .25rem .85rem}.memory-overview .memory-overview__diagram{max-width:400px}}


/* Keep prose within the reading measure. */
.report section > p,.report section > ol,.report section > ul,.report-lead > p{max-width:48rem}
.report p a{overflow-wrap:anywhere}

/* Mobile contracts: let prose wrap; contain wide figures at their own boundary. */
.shell,.report,.report section,.site-header .brand{min-width:0}
.report{overflow-wrap:break-word}
.table-wrap{max-width:100%;overscroll-behavior-x:contain}
.report img,.report video{max-width:100%;height:auto}
.site-header .brand span{overflow-wrap:anywhere}
.mc-scrub input{min-height:44px}
@media(max-width:360px){.site-header{align-items:center}.site-header .brand{font-size:11px}.mc-controls{flex-wrap:wrap}.mc-scrub{min-width:110px}.mc-time{min-width:4.5rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

.doc-figure{margin:1.5rem 0}.doc-figure img{display:block;width:100%;height:auto}
