:root {
  --paper: #f4f5f7;
  --surface: #ffffff;
  --ink: #11131a;
  --muted: #5d6470;
  --line: #d9dde4;
  --soft: #e9ecf1;
  --orange: #ff5c35;
  --blue: #2447ff;
  --cyan: #00b8d9;
  --green: #0b8f68;
  --yellow: #f2bd27;
  --purple: #7b4dff;
  --navy: #151d33;
  --radius: 1rem;
  --shadow: 0 18px 50px rgba(17, 19, 26, .08);
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #0d1018;
  --surface: #151922;
  --ink: #f4f6fb;
  --muted: #a8b0be;
  --line: #313846;
  --soft: #202632;
  --navy: #080b12;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1018;
    --surface: #151922;
    --ink: #f4f6fb;
    --muted: #a8b0be;
    --line: #313846;
    --soft: #202632;
    --navy: #080b12;
    --shadow: 0 18px 50px rgba(0, 0, 0, .28);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 1rem; line-height: 1.6; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
::selection { background: var(--yellow); color: #111; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: .75rem; left: .75rem; transform: translateY(-180%); z-index: 1000; padding: .75rem 1rem; background: var(--ink); color: var(--paper); border-radius: .5rem; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

.topbar { position: sticky; top: 0; z-index: 50; height: 4.5rem; display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; background: color-mix(in srgb, var(--surface) 91%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-weight: 800; letter-spacing: -.03em; text-decoration: none; }
.brand > span:last-child > span { color: var(--orange); }
.brand-mark { display: grid; grid-template-columns: repeat(2, .6rem); gap: .12rem; transform: rotate(8deg); }
.brand-mark i { width: .6rem; height: .6rem; display: block; background: var(--blue); }
.brand-mark i:nth-child(2) { background: var(--orange); border-radius: 50%; }
.brand-mark i:nth-child(3) { background: var(--yellow); }
.brand-mark i:nth-child(4) { background: var(--cyan); }
.top-actions { display: flex; align-items: center; gap: .65rem; }
.edition { color: var(--muted); font-size: .82rem; }
.icon-button, .print-button, #clearSearch { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: .65rem; min-height: 2.6rem; cursor: pointer; }
.icon-button { width: 2.6rem; font-size: 1.25rem; }
.print-button, #clearSearch { padding: .55rem .85rem; font-weight: 700; }
.icon-button:hover, .print-button:hover { border-color: var(--ink); }

.app-shell { max-width: 100rem; margin: 0 auto; display: grid; grid-template-columns: 17rem minmax(0, 1fr); }
.sidebar { position: sticky; top: 4.5rem; height: calc(100vh - 4.5rem); padding: 1.5rem 1rem 2rem; border-right: 1px solid var(--line); overflow-y: auto; background: var(--paper); }
.search-wrap label { display: block; margin-bottom: .45rem; font-size: .78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.search-field { display: flex; align-items: center; gap: .45rem; padding: 0 .65rem; min-height: 2.85rem; background: var(--surface); border: 1px solid var(--line); border-radius: .7rem; }
.search-field:focus-within { outline: 3px solid color-mix(in srgb, var(--orange) 35%, transparent); border-color: var(--orange); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); min-width: 0; }
.search-field kbd { padding: .1rem .34rem; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: .3rem; font-size: .68rem; }
.toc { margin-top: 1.5rem; }
.toc .eyebrow { margin: 1.35rem .6rem .4rem; color: var(--muted); font-size: .67rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.toc a { display: flex; gap: .65rem; align-items: center; padding: .52rem .6rem; margin: .1rem 0; border-radius: .5rem; color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 650; }
.toc a span { width: 1.4rem; color: color-mix(in srgb, var(--muted) 70%, transparent); font-size: .7rem; font-variant-numeric: tabular-nums; }
.toc a:hover { background: var(--soft); color: var(--ink); }
.toc a.active { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.toc a.active span { color: var(--orange); }

main { min-width: 0; }
.content-section { padding: clamp(3.5rem, 7vw, 7rem) clamp(1.25rem, 5.5vw, 6rem); border-bottom: 1px solid var(--line); }
.intro { min-height: calc(100vh - 4.5rem); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(25rem, .95fr); gap: clamp(3rem, 7vw, 7rem); align-items: center; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 5rem 5rem; background-position: -1px -1px; }
.intro-copy { padding: 2rem 0; }
.kicker, .chapter { margin: 0 0 1rem; color: var(--orange); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { max-width: 12ch; margin: 0; font-size: clamp(3rem, 6.3vw, 6.3rem); line-height: .94; letter-spacing: -.07em; }
h1 em { color: var(--blue); font-style: normal; }
.lead { max-width: 44rem; margin: 2rem 0; color: var(--muted); font-size: clamp(1.08rem, 1.5vw, 1.3rem); }
.filter-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter { padding: .65rem .95rem; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink); cursor: pointer; font-weight: 750; }
.filter:hover { border-color: var(--ink); }
.filter.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.design-lens { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; padding: 1rem; background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lens-center { grid-column: 1 / -1; min-height: 11rem; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.4rem; background: var(--navy); color: #fff; }
.lens-center span { font-size: 3rem; font-weight: 850; letter-spacing: -.06em; }
.lens-center small { color: #bfc8dc; }
.lens-tile { min-height: 8rem; display: flex; flex-direction: column; padding: 1rem; color: #10121a; }
.lens-tile strong { font-size: .7rem; }
.lens-tile span { margin-top: auto; font-size: 1.3rem; font-weight: 850; }
.lens-tile small { font-size: .73rem; }
.tile-purpose { background: var(--orange); }
.tile-people { background: var(--yellow); }
.tile-form { background: var(--cyan); }
.tile-system { background: #95dd6f; }
.tile-impact { grid-column: 1 / -1; background: var(--purple); color: #fff; }

.quick-map { background: var(--navy); color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 3rem; }
.section-head.compact { align-items: start; margin-bottom: 2rem; }
.section-head h2 { max-width: 15ch; margin: 0; font-size: clamp(2.35rem, 4.5vw, 4.8rem); line-height: 1; letter-spacing: -.06em; }
.section-head > p { max-width: 34rem; margin: 0; color: var(--muted); font-size: 1.05rem; }
.quick-map .section-head > p { color: #aeb8cc; }
.decision-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #394156; }
.decision-strip article { padding: 1.5rem; border-right: 1px solid #394156; }
.decision-strip article:last-child { border: 0; }
.decision-strip span { display: block; color: var(--orange); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.decision-strip strong { display: block; margin: .75rem 0; font-size: 1.15rem; line-height: 1.3; }
.decision-strip p { margin: 0; color: #aeb8cc; font-size: .9rem; }

.principle-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.principle-grid article { min-height: 14rem; padding: 1.3rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.principle-grid b { color: var(--orange); font-size: .72rem; }
.principle-grid h3 { margin: 2.5rem 0 .6rem; font-size: 1.25rem; letter-spacing: -.03em; }
.principle-grid p { margin: 0; color: var(--muted); font-size: .9rem; }
.rule-callout { display: grid; grid-template-columns: 8rem 1fr; align-items: start; gap: 1rem; margin-top: 2rem; padding: 1.5rem; border-left: .35rem solid var(--orange); background: var(--soft); }
.rule-callout span { color: var(--orange); font-size: .75rem; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.rule-callout p { max-width: 60rem; margin: 0; font-size: clamp(1.15rem, 2vw, 1.6rem); }
.rule-callout.dark { background: #080b12; color: #fff; border-color: var(--yellow); }
.rule-callout.dark span { color: var(--yellow); }

.process-track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.process-track article { padding: 1.5rem; background: var(--surface); }
.process-track article:nth-child(1) { border-top: .45rem solid var(--orange); }
.process-track article:nth-child(2) { border-top: .45rem solid var(--yellow); }
.process-track article:nth-child(3) { border-top: .45rem solid var(--cyan); }
.process-track article:nth-child(4) { border-top: .45rem solid var(--purple); }
.process-track span { font-weight: 850; color: var(--muted); }
.process-track h3 { margin: 2rem 0 .5rem; font-size: 1.45rem; }
.process-track p { color: var(--muted); }
.process-track ul, .topic-card ul, .pour-grid ul { margin: 1rem 0 0; padding-left: 1.1rem; }
.process-track li, .topic-card li, .pour-grid li { margin: .35rem 0; }
.quality-gates { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); margin-top: 1rem; border: 1px solid var(--line); }
.quality-gates > * { padding: 1rem; border-right: 1px solid var(--line); }
.quality-gates > *:last-child { border: 0; }
.quality-gates h3 { margin: 0; }
.quality-gates div { display: flex; flex-direction: column; }
.quality-gates span { color: var(--muted); font-size: .82rem; }

.topic-grid { display: grid; gap: 1rem; }
.topic-grid.three { grid-template-columns: repeat(3, 1fr); }
.topic-grid.two { grid-template-columns: repeat(2, 1fr); }
.topic-card { position: relative; padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.topic-card h3 { margin: 0 0 1rem; font-size: 1.45rem; letter-spacing: -.03em; }
.topic-card ul { color: var(--muted); }
.topic-no { position: absolute; top: 1.3rem; right: 1.4rem; color: var(--orange); font-size: .75rem; font-weight: 850; }
.mini-demo { margin-top: 1.4rem; min-height: 5rem; border: 1px solid var(--line); }
.grid-demo { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem; padding: .5rem; }
.grid-demo i { background: color-mix(in srgb, var(--blue) 20%, var(--surface)); }
.grid-demo i:nth-child(2), .grid-demo i:nth-child(5) { background: var(--blue); }
.type-scale { display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; align-items: center; margin-top: 1.5rem; padding: 1rem; border-left: .3rem solid var(--blue); background: var(--soft); }
.type-scale b { grid-row: 1 / 3; font-size: 2.5rem; letter-spacing: -.08em; }
.type-scale strong { font-size: 1rem; }
.type-scale span { color: var(--muted); font-size: .78rem; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); min-height: 5rem; margin-top: 1.5rem; }
.swatches i:nth-child(1) { background: var(--blue); }.swatches i:nth-child(2) { background: var(--orange); }.swatches i:nth-child(3) { background: var(--green); }.swatches i:nth-child(4) { background: var(--yellow); }.swatches i:nth-child(5) { background: var(--navy); }

.visual-examples { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.visual-examples-head { display: grid; grid-template-columns: minmax(12rem, .65fr) minmax(20rem, 1.35fr) minmax(16rem, 1fr); gap: 2rem; align-items: end; margin-bottom: 1.5rem; }
.visual-examples-head .kicker { align-self: start; }
.visual-examples-head h3 { margin: 0; font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1.05; letter-spacing: -.045em; }
.visual-examples-head > p:last-child { margin: 0; color: var(--muted); }
.visual-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.visual-gallery figure { margin: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.visual-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.visual-gallery figcaption { display: grid; gap: .2rem; padding: 1rem 1.1rem 1.15rem; }
.visual-gallery figcaption strong { font-size: 1.05rem; }
.visual-gallery figcaption span { color: var(--muted); font-size: .88rem; }

.discipline { background: var(--surface); }
.discipline-layout { display: grid; grid-template-columns: .85fr 1.5fr; gap: 1rem; }
.big-statement { display: flex; flex-direction: column; min-height: 30rem; padding: 2rem; background: var(--orange); color: #111; }
.big-statement span { font-size: clamp(2rem, 4vw, 4rem); line-height: 1; letter-spacing: -.06em; }
.big-statement strong { font-size: clamp(2.1rem, 4.5vw, 4.5rem); line-height: .95; letter-spacing: -.07em; }
.big-statement p { max-width: 30rem; margin-top: auto; }
.detail-columns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.detail-columns article { padding: 1.6rem; background: var(--paper); }
.detail-columns h3 { margin: 0 0 1rem; font-size: 1.3rem; }
.detail-columns ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.do-dont article { padding: 1.25rem; border: 1px solid var(--line); }
.do-dont b { color: var(--green); text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; }
.do-dont article:last-child b { color: #d54437; }
.do-dont p { margin: .4rem 0 0; }

.interface-model { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 1rem; }
.interface-stage { padding: 1.5rem; background: var(--navy); color: #fff; border-top: .45rem solid var(--orange); }
.interface-stage:nth-child(2) { border-color: var(--yellow); }.interface-stage:nth-child(3) { border-color: var(--cyan); }.interface-stage:nth-child(4) { border-color: var(--purple); }
.interface-stage span { color: #aeb8cc; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.interface-stage h3 { margin: 1.8rem 0 .5rem; }
.interface-stage p { margin: 0; color: #c9d0df; font-size: .9rem; }

.ux-equation { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-bottom: 2rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); }
.ux-equation span, .ux-equation b { padding: .6rem .8rem; font-weight: 800; }
.ux-equation span { background: var(--soft); }
.ux-equation i { color: var(--orange); font-style: normal; }
.ux-equation b { margin-left: auto; background: var(--blue); color: #fff; }
.method-table { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; min-width: 45rem; border-collapse: collapse; background: var(--surface); }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy); color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
td:first-child { font-weight: 750; }
tbody tr:last-child td { border-bottom: 0; }
.measurement-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1rem; }
.measurement-cards article { display: flex; flex-direction: column; padding: 1.25rem; border: 1px solid var(--line); background: var(--surface); }
.measurement-cards span { color: var(--orange); font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.measurement-cards strong { margin: .8rem 0 1.4rem; }
.measurement-cards small { margin-top: auto; color: var(--muted); }

.brand-section { background: #1a2140; color: #fff; }
.brand-section .section-head > p { color: #b8c0d5; }
.brand-stack { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #49516d; border: 1px solid #49516d; }
.brand-stack article { min-height: 16rem; padding: 1.5rem; background: #20294b; }
.brand-stack span { color: #9faccc; font-size: .78rem; }
.brand-stack h3 { margin: 3rem 0 .6rem; font-size: 1.7rem; }
.brand-stack p { color: #c7cee0; font-size: .9rem; }
.touchpoint-map { display: grid; grid-template-columns: 1.25fr 2fr; gap: 1rem; margin-top: 1rem; padding: 1.5rem; background: var(--yellow); color: #111; }
.touchpoint-title { display: flex; flex-direction: column; }
.touchpoint-title span { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.touchpoint-title strong { margin-top: auto; font-size: 1.5rem; line-height: 1.2; }
.touchpoint-map ol { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; }
.touchpoint-map li { padding: .6rem; border-left: 1px solid rgba(17,17,17,.3); }
.touchpoint-map b, .touchpoint-map small { display: block; }
.touchpoint-map small { margin-top: .5rem; }

.print-spec { display: grid; grid-template-columns: .75fr 1.35fr; gap: 2rem; align-items: center; }
.print-sheet { aspect-ratio: 1 / 1.414; display: grid; padding: 2.5rem; color: #111; background: #fff; border: .6rem solid var(--orange); box-shadow: var(--shadow); transform: rotate(-2deg); }
.print-sheet > span { align-self: start; color: var(--orange); font-size: .8rem; font-weight: 800; }
.print-sheet > div { align-self: end; display: grid; grid-template-columns: repeat(6, 1fr); gap: .3rem; height: 60%; }
.print-sheet b { grid-column: 1 / -1; align-self: end; font-size: clamp(1.5rem, 3vw, 3rem); line-height: 1; letter-spacing: -.06em; }
.print-sheet i { background: #dfe4ec; }
.print-sheet i:nth-of-type(2), .print-sheet i:nth-of-type(5) { background: var(--blue); }
.print-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.print-list article { padding: 1.2rem; border-top: 2px solid var(--ink); }
.print-list b { color: var(--orange); }
.print-list p { margin: .5rem 0 0; color: var(--muted); }
.note, .legal-note { margin: 2rem 0 0; padding: 1.2rem; background: var(--soft); border-left: .3rem solid var(--yellow); }

.accessibility-section { background: #071c19; color: #f3fffb; }
.accessibility-section .section-head > p { color: #abd0c7; }
.pour-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.pour-grid article { padding: 1.5rem; border: 1px solid #24534a; background: #0b2924; }
.pour-grid b { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 2.5rem; border-radius: 50%; background: #70e6c9; color: #071c19; }
.pour-grid span { font-size: 1.5rem; font-weight: 850; }
.pour-grid p, .pour-grid ul { color: #bfe1d9; }
.access-details { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 1rem; background: #24534a; border: 1px solid #24534a; }
.access-details article { padding: 1.25rem; background: #071c19; }
.access-details h3 { margin: 0; color: #70e6c9; }
.access-details p { margin-bottom: 0; color: #bfe1d9; font-size: .9rem; }
.contrast-panel { display: grid; grid-template-columns: repeat(3, 1fr) 1.5fr; margin-top: 2rem; border: 1px solid #35665c; }
.contrast-panel > * { padding: 1.25rem; border-right: 1px solid #35665c; }
.contrast-panel > *:last-child { border: 0; }
.contrast-panel div { display: flex; flex-direction: column; }
.contrast-panel span { color: #9bcabf; font-size: .75rem; text-transform: uppercase; }
.contrast-panel strong { font-size: 2.5rem; color: #70e6c9; }
.contrast-panel small { color: #bfe1d9; }
.contrast-panel p { margin: 0; color: #bfe1d9; font-size: .9rem; }
.legal-note { color: #111; background: #70e6c9; border-color: #fff; }
.legal-note p { margin: .4rem 0 0; }

.system-pyramid { display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: .5rem; }
.system-pyramid article { display: flex; flex-direction: column; justify-content: flex-end; padding: 1rem; background: var(--navy); color: #fff; }
.system-pyramid article:nth-child(1) { min-height: 9rem; background: var(--orange); color: #111; }.system-pyramid article:nth-child(2) { min-height: 11rem; }.system-pyramid article:nth-child(3) { min-height: 13rem; }.system-pyramid article:nth-child(4) { min-height: 15rem; }.system-pyramid article:nth-child(5) { min-height: 17rem; }.system-pyramid article:nth-child(6) { min-height: 19rem; background: var(--blue); }
.system-pyramid span { font-size: .72rem; opacity: .7; }
.system-pyramid b { margin-top: auto; font-size: 1.2rem; }
.system-pyramid p { margin: .5rem 0 0; font-size: .82rem; opacity: .8; }
.governance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1rem; }
.governance-grid article { padding: 1.25rem; border: 1px solid var(--line); }
.governance-grid h3 { margin: 0; }
.governance-grid p { margin-bottom: 0; color: var(--muted); }

.audit-section { background: color-mix(in srgb, var(--blue) 4%, var(--paper)); }
.audit-layout { display: grid; grid-template-columns: .75fr 1.8fr; gap: 1.5rem; align-items: start; }
.audit-progress { position: sticky; top: 6rem; display: flex; align-items: center; gap: 1rem; padding: 1.25rem; background: var(--navy); color: #fff; }
.progress-ring { --progress: 0; width: 6rem; height: 6rem; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--orange) calc(var(--progress) * 1%), #343d53 0); position: relative; }
.progress-ring::after { content: ""; position: absolute; inset: .55rem; border-radius: 50%; background: var(--navy); }
.progress-ring span { position: relative; z-index: 1; font-weight: 850; }
.audit-progress b { font-size: 1.1rem; }
.audit-progress p { margin: .2rem 0 .7rem; color: #bec7da; font-size: .85rem; }
.audit-progress button { padding: .4rem 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: #fff; cursor: pointer; font-size: .78rem; }
.checklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin: 0; padding: 0; border: 0; }
.checklist label { display: flex; align-items: flex-start; gap: .8rem; min-height: 6.3rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: .7rem; cursor: pointer; }
.checklist label:hover { border-color: var(--blue); }
.checklist label:has(input:checked) { background: color-mix(in srgb, var(--blue) 8%, var(--surface)); border-color: var(--blue); }
.checklist input { width: 1.25rem; height: 1.25rem; margin: .2rem 0 0; accent-color: var(--blue); }
.checklist span { display: flex; flex-direction: column; color: var(--muted); font-size: .9rem; }
.checklist b { color: var(--ink); font-size: 1rem; }
.checklist-tabs { margin-top: 2rem; background: var(--surface); border: 1px solid var(--line); }
[role="tablist"] { display: flex; gap: .3rem; padding: .5rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
[role="tab"] { flex: 1; min-width: 7rem; padding: .7rem; border: 0; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
[role="tab"][aria-selected="true"] { background: var(--ink); color: var(--paper); }
[role="tabpanel"] { padding: 1.2rem; }
[role="tabpanel"] ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem 2rem; margin: 0; padding-left: 1.2rem; }

.source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.source-grid a { min-height: 14rem; display: flex; flex-direction: column; padding: 1.4rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.source-grid a:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: var(--shadow); }
.source-grid span { color: var(--orange); font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.source-grid h3 { margin: 1.5rem 0 .5rem; font-size: 1.4rem; }
.source-grid p { margin: 0; color: var(--muted); font-size: .9rem; }
.source-grid b { margin-top: auto; color: var(--blue); }
.source-note { color: var(--muted); font-size: .82rem; }

footer { display: grid; grid-template-columns: 1fr minmax(14rem, 1.4fr) minmax(12rem, auto) auto; align-items: center; gap: 2rem; padding: 2.5rem clamp(1.25rem, 5.5vw, 6rem); background: var(--navy); color: #fff; }
footer p { color: #aeb8cc; }
footer > a { font-weight: 800; }
.studio-credit { display: flex; align-items: center; justify-content: center; gap: .8rem; padding: .75rem 1rem; border-left: 1px solid #3d465c; border-right: 1px solid #3d465c; }
.studio-credit img { display: block; width: 4.8rem; max-height: 2.4rem; object-fit: contain; }
.studio-credit span { color: #aeb8cc; font-size: .78rem; line-height: 1.35; }
.studio-credit strong { display: block; color: #fff; font-size: .88rem; font-weight: 800; }
.footer-links { display: grid; gap: .35rem; justify-items: start; font-size: .86rem; font-weight: 750; }
.footer-links a { color: #fff; text-underline-offset: .2em; }
.footer-links a:hover { color: var(--yellow); }

.legal-body { min-height: 100vh; }
.legal-topbar { position: sticky; }
.legal-back { font-weight: 750; text-decoration-thickness: .08em; text-underline-offset: .2em; }
.legal-page { width: min(100% - 2rem, 70rem); margin: 0 auto; padding: clamp(3rem, 7vw, 7rem) 0; }
.legal-intro { max-width: 52rem; margin-bottom: 3.5rem; }
.legal-intro h1 { max-width: 12ch; }
.legal-intro .lead { margin-bottom: 0; }
.legal-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.legal-section { padding: clamp(1.4rem, 3.5vw, 2.5rem); background: var(--surface); }
.legal-section h2 { margin: 0 0 1rem; font-size: clamp(1.5rem, 2.7vw, 2.3rem); line-height: 1.1; letter-spacing: -.035em; }
.legal-section h3 { margin: 1.7rem 0 .5rem; }
.legal-section p, .legal-section ul { max-width: 70ch; }
.legal-section address { font-style: normal; }
.legal-section a { color: var(--blue); text-underline-offset: .18em; }
.legal-meta { color: var(--muted); font-size: .9rem; }
.legal-footer { grid-template-columns: 1fr minmax(12rem, auto) minmax(16rem, auto); }
.legal-footer .studio-credit { border-left: 0; }
.no-results { position: fixed; inset: 4.5rem 0 0 17rem; z-index: 40; padding: 10vh 8vw; background: var(--paper); text-align: center; }
.no-results strong { font-size: 2rem; }
.no-results p { color: var(--muted); }
.search-hit { outline: 3px solid var(--yellow); outline-offset: .3rem; }

@media (max-width: 1180px) {
  .principle-grid { grid-template-columns: repeat(3, 1fr); }
  .intro { grid-template-columns: 1fr; }
  .design-lens { max-width: 45rem; }
  .topic-grid.three { grid-template-columns: repeat(2, 1fr); }
  .visual-examples-head { grid-template-columns: 1fr 1fr; }
  .visual-examples-head > p:last-child { grid-column: 2; }
  .decision-strip, .process-track, .measurement-cards, .brand-stack, .pour-grid, .governance-grid { grid-template-columns: repeat(2, 1fr); }
  .decision-strip article:nth-child(2) { border-right: 0; }
  .decision-strip article:nth-child(-n+2) { border-bottom: 1px solid #394156; }
  .system-pyramid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .system-pyramid article:nth-child(n) { min-height: 12rem; }
  .contrast-panel { grid-template-columns: repeat(3, 1fr); }
  .contrast-panel p { grid-column: 1 / -1; border-top: 1px solid #35665c; }
}

@media (max-width: 860px) {
  .topbar { padding: 0 1rem; }
  .edition { display: none; }
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 4.5rem; z-index: 45; width: 100%; height: auto; padding: .65rem 1rem; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .search-wrap label, .toc .eyebrow { display: none; }
  .toc { display: flex; gap: .25rem; margin: .55rem 0 0; overflow-x: auto; padding-bottom: .2rem; }
  .toc a { flex: 0 0 auto; padding: .42rem .65rem; background: var(--surface); border: 1px solid var(--line); }
  .toc a span { display: none; }
  .content-section { padding-top: 4.5rem; }
  .intro { min-height: auto; }
  .discipline-layout, .print-spec, .audit-layout { grid-template-columns: 1fr; }
  .audit-progress { position: static; }
  .touchpoint-map { grid-template-columns: 1fr; }
  .visual-gallery { grid-template-columns: repeat(2, 1fr); }
  .source-grid { grid-template-columns: repeat(2, 1fr); }
  .no-results { inset: 8rem 0 0; }
}

@media (max-width: 620px) {
  .brand { font-size: .92rem; }
  .print-button { display: none; }
  .content-section { padding-inline: 1rem; }
  h1 { font-size: clamp(3rem, 15vw, 4.8rem); }
  .section-head { display: block; }
  .section-head > p { margin-top: 1.2rem; }
  .principle-grid, .topic-grid.three, .topic-grid.two, .decision-strip, .process-track, .detail-columns, .interface-model, .measurement-cards, .brand-stack, .print-list, .pour-grid, .access-details, .governance-grid, .checklist, .source-grid, .visual-gallery, .visual-examples-head { grid-template-columns: 1fr; }
  .visual-examples-head > p:last-child { grid-column: auto; }
  .principle-grid article { min-height: 11rem; }
  .quality-gates { grid-template-columns: 1fr 1fr; }
  .quality-gates h3 { grid-column: 1 / -1; }
  .do-dont { grid-template-columns: 1fr; }
  .ux-equation b { width: 100%; margin-left: 0; text-align: center; }
  .touchpoint-map ol { grid-template-columns: 1fr; }
  .touchpoint-map li { border-left: 0; border-top: 1px solid rgba(17,17,17,.3); }
  .contrast-panel { grid-template-columns: 1fr; }
  .contrast-panel > *, .contrast-panel p { grid-column: auto; border-right: 0; border-bottom: 1px solid #35665c; }
  .system-pyramid { grid-template-columns: 1fr 1fr; }
  .system-pyramid article:nth-child(n) { min-height: 10rem; }
  [role="tabpanel"] ul { grid-template-columns: 1fr; }
  .rule-callout { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; }
  .studio-credit { justify-content: flex-start; border-left: 0; border-right: 0; border-top: 1px solid #3d465c; border-bottom: 1px solid #3d465c; }
  .legal-footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  :root { --paper: #fff; --surface: #fff; --ink: #000; --muted: #333; --line: #aaa; }
  .topbar, .sidebar, .filter-group, .audit-progress button, footer, .no-results { display: none !important; }
  .app-shell { display: block; }
  .content-section { padding: 1.2cm 0; break-inside: avoid; }
  .intro { min-height: auto; grid-template-columns: 1fr 1fr; }
  .topic-card, .principle-grid article, .source-grid a { break-inside: avoid; }
  a { text-decoration: none; }
}
