:root{color-scheme:dark;--bg:#0c1218;--surface:#151e27;--text:#e9eff4;--muted:#a8b7c4;--line:#314353;--accent:#8bd5fa;--glass:rgba(25,43,57,.8);--abs:#232c34;--workspace:#8bcff3;--project:#c2acfa;--mode:#a5d9b0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px}
body[data-guide-theme=light]{color-scheme:light;--bg:#f4f7f9;--surface:#fff;--text:#172b3c;--muted:#526575;--line:#c6d3dc;--accent:#075c85;--glass:rgba(225,239,248,.85);--abs:#e2e7eb;--workspace:#086a91;--project:#704da0;--mode:#316b47}
*{box-sizing:border-box}html{scroll-padding-top:6rem}body{margin:0;background:var(--bg);color:var(--text);line-height:1.7}a{color:var(--accent);text-underline-offset:.25em}a:hover{text-decoration-thickness:2px}button{font:inherit;cursor:pointer}button,a{-webkit-tap-highlight-color:transparent}a:focus-visible,button:focus-visible{outline:3px solid var(--accent);outline-offset:5px}::selection{background:#386d91;color:#fff}.skip-link{position:fixed;top:-6rem;left:1rem;z-index:20;background:var(--surface);padding:.6rem 1rem}.skip-link:focus{top:1rem}
.guide-header{min-height:4.5rem;padding:1rem clamp(1rem,4vw,4.5rem);display:flex;gap:1rem;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10;background:var(--glass);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}.guide-header>div{display:flex;align-items:center;gap:1.5rem}.brand{color:var(--text);display:flex;align-items:center;gap:.8rem;text-decoration:none;font-weight:750;letter-spacing:-.02em}.brand-mark{display:flex;gap:4px;width:26px;height:26px}.brand-mark i:first-child{width:8px;background:var(--glass);border:1px solid var(--accent)}.brand-mark i:last-child{flex:1;border-radius:5px;background:var(--abs);border:1px solid var(--muted)}.desktop-link{font-size:.94rem;font-weight:650;text-decoration:none}#guideTheme{background:var(--glass);color:var(--text);border:1px solid var(--line);border-radius:0;padding:.3rem .75rem;box-shadow:inset 0 1px 0 #ffffff19;transition:transform 8ms}#guideTheme:active{transform:translateY(1px);box-shadow:inset 0 1px 3px #0003}
.guide-layout{max-width:1460px;margin:auto;padding:0 clamp(1rem,4vw,4.5rem);display:grid;grid-template-columns:235px minmax(0,1fr);gap:clamp(2rem,5vw,5rem)}.guide-sidebar{position:sticky;top:5.8rem;align-self:start;height:calc(100dvh - 7rem);overflow:auto;padding:1.5rem 0 2rem}.eyebrow{font-size:.8rem;letter-spacing:.12em;font-weight:700;color:var(--accent);margin:0 0 1.2rem}.guide-sidebar nav{display:grid;gap:.1rem}.guide-sidebar nav a{font-size:.9rem;color:var(--muted);padding:.42rem .45rem;text-decoration:none;display:flex;align-items:baseline;gap:.7rem;border-left:2px solid transparent}.guide-sidebar nav a span{font-size:.78rem;font-variant-numeric:tabular-nums;opacity:.7}.guide-sidebar nav a:hover,.guide-sidebar nav a[aria-current=true]{color:var(--text);border-left-color:var(--accent);background:var(--glass)}.material-link{font-size:.87rem;display:block;margin:1.5rem .45rem}.sidebar-note{font-size:.8rem;color:var(--muted);margin:1.5rem .45rem}main{min-width:0;max-width:960px;padding-top:3.5rem}.guide-intro{padding-bottom:3.5rem}h1{font-size:clamp(2.5rem,4.5vw,4.4rem);line-height:1.12;letter-spacing:-.045em;margin:0 0 1.8rem;font-weight:740}h2{font-size:clamp(1.6rem,2.6vw,2.2rem);line-height:1.24;letter-spacing:-.025em;margin:.4rem 0 1.5rem}h3{font-size:1.12rem;line-height:1.45;margin:1.9rem 0 .6rem}p{margin:.8rem 0 1rem;max-width:77ch}.lede{font-size:1.3rem;line-height:1.65;color:var(--text);max-width:64ch}.intro-links{display:flex;gap:.8rem 1.8rem;flex-wrap:wrap;margin:1.7rem 0 2rem}.intro-links a{font-size:.94rem;font-weight:650}.scope-note{padding-left:1rem;border-left:2px solid var(--line);color:var(--muted);font-size:.95rem}.chapter{padding:3.3rem 0;border-top:1px solid var(--line);scroll-margin-top:1rem}.chapter-number{font-size:.8rem;letter-spacing:.1em;font-weight:700;color:var(--muted);margin:0}.principles,.screen-stories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5rem;margin:2rem 0}.principles article{border-top:2px solid var(--accent);padding-top:.8rem}.principles h3,.screen-stories h3{margin:.2rem 0 .6rem}.principles p,.screen-stories p{font-size:.98rem;color:var(--muted)}
.model-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:2rem 0}.model-cards article{background:var(--surface);border:1px solid var(--line);border-top:3px solid var(--workspace);padding:1.2rem}.model-cards .project-model{border-top-color:var(--project)}.model-cards .mode-model{border-top-color:var(--mode)}.model-label{font-size:.78rem;letter-spacing:.1em;font-weight:700;color:var(--muted)}.model-cards h3{margin:.7rem 0}.model-cards p{font-size:.95rem;margin:0;color:var(--muted)}figure{margin:2rem 0}figcaption,.caption{font-size:.9rem;color:var(--muted);line-height:1.6;margin-top:1rem}.relationship{border:1px solid var(--line);padding:1.1rem}.workspace-strip,.project-strip{display:flex;flex-wrap:wrap;gap:.5rem 1rem;justify-content:space-between;padding:.85rem;border-left:3px solid var(--workspace);background:var(--glass)}.project-strip{margin:1rem 0 1rem 1.5rem;border-color:var(--project)}.workspace-strip span,.project-strip span,.mode-strip span{color:var(--muted);font-size:.92rem}.mode-strip{margin-left:3rem;display:grid;grid-template-columns:1fr 1fr;gap:.8rem}.mode-strip>div{border-left:3px solid var(--mode);padding:.7rem;background:var(--surface);display:grid;gap:.3rem}.relationship figcaption{margin-bottom:0}
.table-scroll{overflow:auto;margin:1.8rem 0;border:1px solid var(--line)}table{width:100%;border-collapse:collapse;min-width:570px;text-align:left;font-size:.95rem}th{font-size:.9rem;font-weight:700;background:var(--glass)}th,td{padding:.85rem 1rem;vertical-align:top;border-bottom:1px solid var(--line)}tr:last-child td{border-bottom:0}td:first-child{font-weight:650;min-width:135px}th:first-child{min-width:135px}.rule-pair,.material-comparison,.folder-example,.status-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem;margin:1.8rem 0}.rule-pair article{border-left:2px solid var(--accent);padding-left:1rem}.rule-pair h3{margin:0 0 .5rem}.rule-pair p{color:var(--muted);margin:0}.material-comparison>article{padding:1.5rem;border:1px solid var(--line)}.material-comparison h3{margin:.7rem 0}.abs-example{background:var(--abs);border-radius:22px;box-shadow:inset 0 1px 0 #ffffff15,0 5px 12px #0002}.glass-example{background:var(--glass);position:relative}.glass-example::before{content:"";position:absolute;left:1.5rem;right:1.5rem;top:0;height:1px;background:var(--accent);box-shadow:0 0 4px #8bd5fa33}.material-caption{font-size:.88rem;padding-top:.7rem;border-top:1px solid var(--line);color:var(--muted)}code,kbd{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em}p code{overflow-wrap:anywhere;color:var(--accent)}kbd{display:inline-block;padding:.06rem .35rem;border:1px solid var(--line);border-bottom-width:2px;border-radius:4px;background:var(--surface);white-space:normal;color:var(--text)}.app-colours{display:flex;flex-wrap:wrap;gap:.7rem 1.2rem;margin:1.5rem 0}.app-colours span{display:flex;gap:.5rem;align-items:center;font-size:.92rem}.app-colours span::before{content:"";width:.75rem;height:.75rem;background:var(--app-colour);border-radius:3px}
.monitor-model{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.monitor-model>div{border:1px solid var(--line);padding:1rem;background:var(--surface)}.monitor-model b{font-size:.9rem}.monitor-model>div>span{display:flex;min-height:7rem;margin-top:1rem}.monitor-app{align-items:center;justify-content:center;border-radius:14px;background:var(--abs);border:1px solid var(--line);color:var(--muted)}.monitor-areas{gap:.5rem}.monitor-areas i{flex:1;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:.9rem;background:var(--glass);border-top:2px solid var(--project)}.monitor-areas i:nth-child(2){border-color:var(--workspace)}.monitor-areas i:nth-child(3){border-color:var(--mode)}.monitor-model figcaption{grid-column:1/-1}.folder-example>div{min-width:0;background:var(--surface);border:1px solid var(--line);padding:1rem}.folder-example b{font-size:.95rem}.folder-example pre{overflow:auto;font-size:.91rem;line-height:1.8;margin:.9rem 0 0;tab-size:2}.folder-example code{color:var(--muted);font-size:1em}.workflow-steps{list-style:none;padding:0;counter-reset:workflow}.workflow-steps li{counter-increment:workflow;position:relative;padding:.2rem 0 .6rem 3.5rem;border-left:1px solid var(--line);margin-left:1rem}.workflow-steps li::before{content:counter(workflow);position:absolute;left:-1rem;top:1.8rem;width:2rem;height:2rem;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line);color:var(--accent);font-weight:700;border-radius:8px}.workflow-steps h3{margin:1.5rem 0 .5rem}.decision-list article{border-left:2px solid var(--line);padding-left:1.2rem;margin:1.8rem 0}.decision-list h3{margin:0 0 .5rem}.decision-list p{margin:0;color:var(--muted)}.decision-list b{color:var(--text)}.status-columns article{background:var(--surface);border-top:2px solid var(--accent);padding:1rem 1.4rem}.status-columns article:last-child{border-top-color:var(--project)}.status-columns h3{margin:.4rem 0 1rem}ul{padding-left:1.3rem}li{margin:.7rem 0}.status-columns li{font-size:.95rem;color:var(--muted)}.open-questions li{padding-left:.3rem}.closing{padding:1.5rem 0 0;margin-top:2rem;border-top:1px solid var(--line)}.closing p{font-size:1.4rem;font-weight:700;letter-spacing:-.02em}.closing a{font-weight:650}.guide-footer{display:flex;justify-content:space-between;gap:1rem;border-top:1px solid var(--line);padding:2rem 0 3rem;font-size:.86rem;color:var(--muted)}
@media(min-width:1700px){.guide-layout{max-width:1540px}}@media(max-width:1150px){.guide-layout{grid-template-columns:205px minmax(0,1fr);gap:2rem}.model-cards{grid-template-columns:1fr}.model-cards article{padding:1rem}.principles,.screen-stories{grid-template-columns:1fr}.principles{gap:.8rem}.screen-stories{gap:.5rem}}@media(max-width:800px){.guide-layout{display:block}.guide-sidebar{position:static;height:auto;padding:1.6rem 0 1rem;border-bottom:1px solid var(--line)}.guide-sidebar nav{display:grid;grid-template-columns:1fr 1fr;gap:.1rem .5rem}.guide-sidebar nav a{padding:.4rem .1rem}.sidebar-note{display:none}.material-link{margin:1rem .1rem}.guide-sidebar .eyebrow{margin-bottom:.7rem}main{padding-top:2rem}.guide-intro{padding-bottom:2rem}.chapter{padding:2.4rem 0}.rule-pair,.material-comparison,.folder-example,.status-columns{grid-template-columns:1fr}.guide-header{padding:.8rem 1rem}.guide-header>div{gap:.8rem}.brand{font-size:.92rem}.desktop-link{font-size:.84rem}.guide-footer{flex-wrap:wrap}}@media(max-width:480px){.guide-sidebar nav{grid-template-columns:1fr}.relationship{padding:.7rem}.project-strip{margin-left:.7rem}.mode-strip{margin-left:1.4rem;grid-template-columns:1fr}.monitor-model{grid-template-columns:1fr}.monitor-model figcaption{grid-column:auto}.guide-header{flex-wrap:wrap}.brand-mark{width:22px;height:22px}.lede{font-size:1.12rem}.eyebrow{font-size:.75rem}.workflow-steps li{padding-left:2.3rem}.table-scroll{margin-left:0;margin-right:0}}
/* Scroll padding already clears the header; do not add the shared Area offset twice. */
.philosophy-page .chapter[id]{scroll-margin-top:0}
/* Rationale belongs beside the rule it explains, without another card layer. */
.design-reason{border-left:2px solid var(--line);padding:.15rem 0 .15rem 1.15rem;margin:1.6rem 0;color:var(--muted)}
.design-reason h3{color:var(--text);margin:.4rem 0 .65rem}
.design-reason p{margin:.6rem 0}
/* Historical evidence stays beside its rationale, with the original one click away. */
.history-example{border-top:1px solid var(--line);padding-top:1.2rem;margin:2rem 0 0;scroll-margin-top:0}
.history-example figcaption p{font-size:.95rem;line-height:1.7;margin:.1rem 0 .85rem}
.history-example figcaption strong{color:var(--text)}
.history-detail{display:grid;grid-template-columns:minmax(0,320px) minmax(0,1fr);gap:.6rem 1.6rem;align-items:start}
.history-detail>.image-label{grid-column:1/-1}
.history-detail>.image-link{width:100%;align-self:start}
.history-detail>figcaption{margin:0}
.history-mode-crop img{height:auto;aspect-ratio:300/100;object-fit:cover;object-position:top}
.history-small-detail>.image-link{max-width:320px}
.history-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.6rem}
.history-pair .image-link img{height:40rem;width:100%;object-fit:contain;background:var(--surface)}
.history-index{color:var(--muted);line-height:2}
@media(max-width:800px){.history-detail{grid-template-columns:minmax(0,1fr)}.history-detail>.image-link{max-width:367px}.history-detail>.image-label{grid-column:auto}.history-pair{grid-template-columns:minmax(0,1fr)}.history-pair .image-link{max-width:320px}.history-pair .image-link img{height:auto}}
@media print{.history-detail,.history-pair{display:block}.history-detail>.image-link{max-width:320px}.history-pair .image-link img{height:auto;max-width:300px}.history-example{break-inside:avoid;scroll-margin-top:0}}
/* Pictures explain a specific change; reference imagery stays distinct from the prototype. */
.story-figure{min-width:0;margin:2rem 0}.image-label,.example-label{display:block;font-size:.72rem;font-weight:750;letter-spacing:.1em;color:var(--accent);margin:0 0 .65rem}.image-link{display:block;background:var(--surface);line-height:0;outline-offset:4px}.image-link img{display:block;width:100%;height:auto;border:1px solid var(--line)}.story-figure figcaption{margin-top:.8rem;max-width:75ch}.image-credit{display:block;font-size:.76rem;line-height:1.6;margin-top:.6rem;overflow-wrap:anywhere}.story-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem;margin:2rem 0}.story-gallery .story-figure{margin:0}.story-gallery img{aspect-ratio:4/3;object-fit:contain;background:var(--surface)}.illustrated-rule{display:grid;grid-template-columns:minmax(0,290px) minmax(0,1fr);align-items:start;gap:2rem;margin:2rem 0}.illustrated-rule .story-figure{margin:0}.illustrated-rule>div{padding-top:1.8rem}.illustrated-rule h3{margin:.5rem 0 .8rem}.detail-image img{max-width:300px}.source-note{font-size:.85rem;color:var(--muted);padding-left:1rem;border-left:2px solid var(--line)}.image-credits{padding:2.8rem 0;border-top:1px solid var(--line)}.image-credits h2{font-size:1.5rem}.image-credits p,.image-credits li{font-size:.85rem;color:var(--muted)}.table-scroll code{overflow-wrap:anywhere}.project-story{grid-template-columns:minmax(0,240px) minmax(0,1fr)}
@media(max-width:1150px){.illustrated-rule{gap:1.2rem;grid-template-columns:minmax(0,230px) minmax(0,1fr)}.illustrated-rule>div{padding-top:0}.story-gallery{gap:1rem}}
@media(max-width:620px){.story-gallery,.illustrated-rule{grid-template-columns:minmax(0,1fr)}.story-gallery{gap:2rem}.illustrated-rule .image-link{max-width:300px}.illustrated-rule{gap:1.2rem}.illustrated-rule>div{padding-top:0}.image-link img{max-width:100%}.story-gallery img{aspect-ratio:auto}.image-credits{padding:2rem 0}}
@media print{:root,body[data-guide-theme=light]{--bg:#fff;--surface:#fff;--text:#111;--muted:#444;--line:#bbb;--accent:#155378;--glass:#f4f6f8;--abs:#eee;color-scheme:light}.guide-header,.guide-sidebar,.skip-link,#guideTheme,.intro-links,.closing{display:none}.guide-layout{display:block;max-width:none;padding:0}main{max-width:none;padding:0}.guide-intro,.chapter{padding:1rem 0}h1{font-size:2.3rem}h2{font-size:1.6rem}h2,h3{break-after:avoid}figure,.model-cards,.table-scroll,.decision-list article{break-inside:avoid}a{color:inherit}table{min-width:0;font-size:.85rem}th,td{padding:.5rem}.guide-footer{padding:1rem 0}.story-figure img{max-height:16cm;object-fit:contain}.image-credits{font-size:.8rem}}


/* The reading page uses the desktop's palettes and ABS/acrylic hierarchy. */
body.philosophy-page {
  color-scheme: dark;
  --bg:#161a1c; --surface:#272d31; --abs:#30363a;
  --text:#f1f5f7; --muted:#aeb7bd; --line:rgba(240,244,248,.15);
  --accent:#c2d4dc; --glass:rgba(13,13,15,.68);
  --glass-edge:rgba(240,240,244,.24); --glass-highlight:rgba(255,255,255,.15);
  --reading-shadow:0 12px 32px rgba(0,0,0,.25);
  background:radial-gradient(ellipse at 15% 0,rgba(107,132,147,.11),transparent 65%),var(--bg);
}
body.philosophy-page[data-theme="oled"] { --bg:#07090a; --surface:#15191b; --abs:#242a2d; }
body.philosophy-page[data-theme="light"] {
  color-scheme: light;
  --bg:#d9dde0; --surface:#f0f2f1; --abs:#e6e8e5;
  --text:#182025; --muted:#526068; --line:rgba(70,80,87,.21);
  --accent:#354f5e; --glass:rgba(234,234,237,.72);
  --glass-edge:rgba(255,255,255,.76); --glass-highlight:rgba(255,255,255,.76);
  --reading-shadow:0 12px 32px rgba(28,38,42,.12);
}
/* System palette before the early shared theme script runs, including without JS. */
@media(prefers-color-scheme:light) {
  body.philosophy-page:not([data-theme]) {
    color-scheme:light; --bg:#d9dde0; --surface:#f0f2f1; --abs:#e6e8e5;
    --text:#182025; --muted:#526068; --line:rgba(70,80,87,.21);
    --accent:#354f5e; --glass:rgba(234,234,237,.72);
    --glass-edge:rgba(255,255,255,.76); --glass-highlight:rgba(255,255,255,.76);
    --reading-shadow:0 12px 32px rgba(28,38,42,.12);
  }
}
.philosophy-page .guide-header {
  background:var(--glass); border-bottom:1px solid var(--glass-edge);
  box-shadow:inset 0 1px var(--glass-highlight); backdrop-filter:blur(18px);
}
.philosophy-page .guide-layout {max-width:1500px;grid-template-columns:230px minmax(0,1fr);gap:24px;padding-top:28px;padding-bottom:40px;}
.philosophy-page .guide-sidebar {
  top:6rem; height:auto; max-height:calc(100dvh - 8rem); padding:22px 16px;
  background:var(--glass); border:1px solid var(--glass-edge); border-radius:0;
  box-shadow:inset 0 1px var(--glass-highlight); backdrop-filter:blur(18px);
}
.philosophy-page .guide-sidebar nav a {padding:10px 9px;border-left:0;border-bottom:1px solid transparent;}
.philosophy-page .guide-sidebar nav a[aria-current=true] {border-bottom-color:var(--accent);background:rgba(128,140,148,.1);}
.philosophy-page .guide-sidebar nav a:hover {background:rgba(128,140,148,.1);}
.philosophy-page #main {
  width:100%;max-width:1000px;padding:clamp(24px,4vw,52px);
  background:var(--surface);border:1px solid var(--line);border-radius:24px;
  box-shadow:inset 0 1px var(--glass-highlight),var(--reading-shadow);
}
.philosophy-page .guide-intro {padding-bottom:32px;}
.philosophy-page h1 {font-size:clamp(2.2rem,4vw,3.8rem);}
.philosophy-page h2 {font-size:clamp(1.55rem,2.5vw,2.1rem);}
.philosophy-page .chapter {padding:32px 0;}
.philosophy-page .chapter>section+section {margin-top:34px;}
.philosophy-page .chapter>section>h3 {font-size:1.2rem;}
.philosophy-page p {max-width:70ch;}
.philosophy-page .scope-note,.philosophy-page .source-note {border-left-color:var(--line);}
.philosophy-page :is(.eyebrow,.chapter-number,.image-label) {color:var(--muted);}
.philosophy-page :is(.brand-mark i:last-child,kbd) {border-radius:8px;corner-shape:squircle;}
.philosophy-page .brand-mark i:first-child {border-color:var(--glass-edge);}
.philosophy-page .image-link {background:var(--abs);border-radius:12px;overflow:hidden;}
.philosophy-page .image-link img {border:0;}
.philosophy-page #guideTheme {
  min-width:72px;min-height:38px;padding:6px 12px;background:var(--glass);
  border-color:var(--glass-edge);border-radius:0;color:var(--text);
  box-shadow:inset 0 1px var(--glass-highlight);
}
.philosophy-page .guide-footer {margin-top:16px;padding-bottom:0;}
@media(max-width:900px) {
  .philosophy-page .guide-layout {grid-template-columns:minmax(0,1fr);gap:16px;padding-top:16px;}
  .philosophy-page .guide-sidebar {position:static;max-height:none;padding:16px;}
  .philosophy-page .guide-sidebar nav {display:flex;flex-wrap:wrap;gap:4px 12px;}
  .philosophy-page .guide-sidebar :is(.material-link,.sidebar-note) {margin:10px 8px;}
}
@media(max-width:600px) {
  .philosophy-page .guide-layout {padding-left:12px;padding-right:12px;}
  .philosophy-page #main {padding:22px 18px;border-radius:20px;}
  .philosophy-page .guide-header {padding:12px 16px;}
  .philosophy-page .guide-header>div {flex-wrap:wrap;gap:12px;}
  .philosophy-page .desktop-link {font-size:.85rem;}
}
@media print {
  body.philosophy-page {--bg:#fff;--surface:#fff;--abs:#eee;--text:#111;--muted:#444;--line:#bbb;--accent:#333;background:#fff;color-scheme:light;}
  .philosophy-page .guide-layout {display:block;padding:0;}
  .philosophy-page #main {border:0;border-radius:0;box-shadow:none;padding:0;}
  .philosophy-page .image-link {border-radius:0;}
}
