:root {
  color-scheme: light;
  --paper: #f6f5ef;
  --surface: #fffefa;
  --white: #fff;
  --ink: #18231f;
  --muted: #505c55;
  --faint: #69746d;
  --line: #d9ded5;
  --dark: #162721;
  --dark-text: #f5f6eb;
  --accent: #a23b25;
  --accent-light: #ffc4a7;
  --green: #385949;
  --frame: min(1200px, calc(100% - 80px));
  --heading: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.55; }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.1; }
h2 { font-size: clamp(2rem, 3.7vw, 3rem); letter-spacing: -.054em; }
h3 { font-size: 1.25rem; letter-spacing: -.032em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #be5a42; outline-offset: 4px; }
.frame { width: var(--frame); margin-inline: auto; }
.section-space { margin-top: 88px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip:focus { position: fixed; z-index: 5; padding: 10px; color: white; background: var(--dark); }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 750; letter-spacing: .115em; text-transform: uppercase; }
.section-label { color: var(--accent); margin-bottom: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #c55e43; }

.masthead { position: sticky; top: 0; z-index: 2; background: rgba(246,245,239,.98); border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.identity { display: inline-flex; align-items: center; gap: 6px; width: max-content; font-family: var(--heading); font-weight: 800; font-size: 19px; letter-spacing: -.048em; }
.identity > span:last-child { color: var(--accent); }
.brand-mark { display: block; width: 24px; height: 23px; margin-right: 4px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 26%, 27% 26%, 27% 43%, 80% 43%, 80% 69%, 27% 69%, 27% 100%, 0 100%); }
.masthead nav { display: flex; gap: 28px; align-items: center; }
.masthead nav a, .page-link { font-weight: 650; font-size: 13px; }
.masthead nav a:hover, .page-link:hover, .text-link:hover { color: var(--accent); }
.page-link { justify-self: end; border-left: 1px solid var(--line); padding-left: 18px; }
.page-link span { padding-left: 3px; color: var(--accent); }

.hero { display: grid; grid-template-columns: 1.06fr 1fr; align-items: center; gap: 50px; padding: 46px 0 35px; }
.hero .eyebrow { color: var(--accent); margin-bottom: 19px; }
.hero h1 { font-size: clamp(3rem, 5.8vw, 5.3rem); font-weight: 760; letter-spacing: -.062em; line-height: 1.01; }
.hero-summary { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.14rem); max-width: 480px; margin-top: 22px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 23px; margin-top: 28px; }
.hero-image { overflow: hidden; border: 1px solid #39463e; background: #273831; border-radius: 14px; }
.hero-image img { width: 100%; aspect-ratio: 1.56; object-fit: cover; object-position: center 59%; }
.hero-image figcaption { display: flex; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; color: #f3f4eb; background: var(--dark); padding: 11px 15px; font-size: 11px; }
.hero-image figcaption span:first-child { font-weight: 750; color: #ffe4d2; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 42px; padding: 9px 15px; border: 1px solid transparent; border-radius: 7px; font-size: 13px; font-weight: 750; line-height: 1.25; white-space: nowrap; }
.button-dark { background: var(--dark); color: white; }
.button-dark:hover { background: #304c3e; }
.button-outline { background: var(--surface); border-color: #c8d0c7; }
.button-outline:hover:not(:disabled) { background: #e9eee7; border-color: #8e9e91; }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }
.text-link span { color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.stat { min-width: 0; padding: 17px 20px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { display: block; font-family: var(--heading); font-size: clamp(1.65rem, 3vw, 2.2rem); letter-spacing: -.06em; line-height: 1.03; }
.stat span { display: block; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.stat small { display: block; color: var(--faint); font-size: .71rem; margin-top: 3px; }

.analysis-overview { margin-top: 34px; display: grid; grid-template-columns: .73fr 1.27fr; gap: 18px; }
.finding, .chart-card { padding: 26px; border-radius: 12px; }
.finding { background: var(--dark); color: var(--dark-text); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.finding .section-label, .finding .text-link span { color: var(--accent-light); }
.finding h2 { font-size: clamp(1.85rem, 3.1vw, 2.85rem); }
.finding p:not(.eyebrow) { color: #dde6dc; font-size: .93rem; margin-top: 14px; }
.finding .text-link { margin-top: 18px; }
.finding .text-link:hover { color: var(--accent-light); }
.chart-card { background: var(--surface); border: 1px solid var(--line); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-heading p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.segmented { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.segmented button { border: 0; border-radius: 4px; font-size: .75rem; font-weight: 700; padding: 5px 8px; background: transparent; line-height: 1.2; }
.segmented button[aria-pressed="true"] { background: var(--dark); color: var(--white); }
.chart { display: grid; gap: 2px; margin-top: 16px; }
.bar { background: transparent; border: 0; padding: 3px 0; width: 100%; display: grid; grid-template-columns: minmax(100px, 155px) 1fr 24px; gap: 10px; align-items: center; text-align: left; font-size: .76rem; font-weight: 620; border-radius: 3px; }
.bar:hover { color: var(--accent); }
.bar-track { background: #eef0e9; border-radius: 3px; height: 9px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 3px; background: #607d6b; min-width: 3px; }
.bar:first-child .bar-fill, .bar:hover .bar-fill { background: #af4932; }
.bar-value { font-variant-numeric: tabular-nums; text-align: right; font-weight: 760; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: .94rem; margin-top: 8px; max-width: 68ch; }
.explorer-shell { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; overflow: hidden; }
.filters { display: grid; grid-template-columns: minmax(210px, 1.5fr) repeat(3, minmax(108px, 1fr)); gap: 12px; padding: 20px; border-bottom: 1px solid var(--line); }
.filters label, .sort-label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 710; min-width: 0; }
.filters input, .filters select, .sort-label select { width: 100%; min-width: 0; height: 40px; background: var(--white); border: 1px solid #cbd2c8; border-radius: 6px; padding: 0 9px; color: var(--ink); font-size: 13px; font-weight: 530; }
.filters input:focus-visible, .filters select:focus-visible, .sort-label select:focus-visible { outline-offset: 1px; }
.filters input { padding-left: 35px; }
.input-wrap { position: relative; }
.search-icon { position: absolute; top: 13px; left: 13px; height: 11px; width: 11px; border: 1.6px solid #606e65; border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 1.6px; background: #606e65; transform: rotate(48deg); top: 8px; left: 7px; }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 20px; }
.result-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
#results { color: var(--ink); font-size: 13px; font-weight: 740; }
.quiet-button { border: 0; padding: 0; background: transparent; font-size: 12px; font-weight: 660; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.sort-label { display: flex; align-items: center; justify-content: flex-end; }
.sort-label select { width: auto; max-width: 165px; height: 31px; padding: 0 6px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #edeFE8; color: var(--muted); font-size: .73rem; }
th, td { padding: 11px 11px; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
td { border-bottom: 1px solid #e4e7df; font-size: .82rem; }
tbody tr:hover { background: #f8f8f2; }
tbody tr:focus-within { background: #f4f6ee; }
td:first-child { width: 41%; }
td:nth-child(2) { color: var(--muted); width: 19%; }
.part-button { display: flex; gap: 11px; align-items: center; width: 100%; min-width: 0; text-align: left; padding: 0; cursor: pointer; border: 0; background: transparent; }
.part-button .thumb { flex: 0 0 54px; width: 54px; height: 42px; border-radius: 5px; object-fit: cover; }
.part-name { display: block; font-weight: 755; line-height: 1.32; }
.part-process { display: block; color: var(--muted); font-size: .72rem; line-height: 1.38; margin-top: 2px; }
.part-button:hover .part-name { color: var(--accent); }
.chip { display: inline-block; border-radius: 20px; padding: 3px 8px; font-size: .72rem; font-weight: 710; line-height: 1.25; }
.chip-driver { color: #6a2c1f; background: #f8e5dc; }
.chip-stated { color: #2c5342; background: #e5eee6; }
.chip-inferred { color: #554b3e; background: #ede8df; }
.open-row { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #d2d9cf; border-radius: 50%; background: var(--surface); font-size: 16px; }
.open-row:hover { border-color: var(--green); color: var(--accent); }
.empty { text-align: center; padding: 52px 18px; }
.empty p { margin: 6px 0 15px; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 13px 20px; gap: 14px; font-size: 13px; }
.pagination .button { min-height: 34px; }
#page-number { color: var(--muted); }

.floor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.floor-grid article { border-top: 2px solid var(--green); padding: 14px 0 0; }
.floor-grid p { color: var(--muted); font-size: .87rem; margin: 9px 0; }
.floor-grid a { color: var(--accent); font-size: .77rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.industry-section { background: #e9eee5; padding-block: 56px; }
.industry-switch { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.industry-switch button { border: 1px solid #c1cbc1; border-radius: 7px; background: var(--surface); font-size: .8rem; font-weight: 720; padding: 8px 12px; }
.industry-switch button[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: white; }
.industry-switch button:hover:not([aria-pressed="true"]) { background: #dce6da; }
.industry-panel { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; border: 1px solid #d0d9d0; border-radius: 12px; padding: 27px; background: var(--surface); }
.industry-panel h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
.readout { font-size: .78rem; color: var(--accent); margin-top: 5px; font-weight: 750; }
.industry-panel .lead { color: var(--muted); margin: 12px 0 16px; }
.industry-panel ul { padding: 0; list-style: none; margin: 0 0 14px; }
.industry-panel li { border-top: 1px solid var(--line); padding: 9px 0; font-size: .91rem; }
.industry-panel li strong { display: block; }
.industry-panel figcaption { color: var(--muted); font-size: .78rem; margin-top: 7px; }
.industry-panel figure img { width: 100%; aspect-ratio: 1.27; object-fit: cover; border-radius: 9px; }
.industry-panel .source-note { font-size: .76rem; color: var(--muted); margin: 0 0 10px; }
.production-readout { margin-top: 37px; }
.production-readout > p { color: var(--muted); margin-top: 6px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.metric { padding: 17px; border: 1px solid #d0d9d0; background: var(--surface); border-radius: 8px; }
.metric strong { display: block; font: 755 clamp(1.12rem, 2vw, 1.55rem)/1.1 var(--heading); letter-spacing: -.037em; color: var(--accent); margin-bottom: 5px; }
.metric h4 { margin: 0 0 5px; font-size: .83rem; }
.metric p { font-size: .77rem; color: var(--muted); }
.metric a { color: var(--accent); margin-top: 8px; font-size: .74rem; text-decoration: underline; text-underline-offset: 3px; }
.workflow { display: grid; grid-template-columns: .53fr 1.47fr; margin-top: 37px; gap: 20px; padding: 22px; border: 1px solid #ccd7cb; border-radius: 9px; }
.workflow p { margin-top: 7px; color: var(--muted); font-size: .83rem; }
.workflow dl { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; gap: 12px 20px; }
.workflow dt, .method-list dt { font-weight: 760; font-size: .85rem; }
.workflow dd, .method-list dd { margin: 3px 0 0; font-size: .83rem; color: var(--muted); }

.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0 20px; }
.video-card { position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 17px 20px; }
.video-card h3 { margin: 4px 35px 12px 0; }
.video-length { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .75rem; }
.video-card .video-open { position: absolute; right: 18px; top: 15px; border: 1px solid var(--line); border-radius: 50%; width: 33px; height: 33px; display: grid; place-items: center; }
.video-card ul { display: flex; gap: 7px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.video-card li a { display: inline-block; padding: 5px 7px; border-radius: 4px; background: #eaf0e7; font-size: .75rem; font-weight: 690; }
.video-card li a:hover, .video-open:hover { color: var(--accent); }
.disclosure { margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.disclosure summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; font-size: .9rem; font-weight: 740; padding: 13px 16px; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary span:nth-child(2) { color: var(--faint); font-size: .75rem; font-weight: 570; }
.disclosure summary::after { content: "+"; font-size: 1.2rem; color: var(--accent); line-height: 1; margin-left: auto; }
.disclosure[open] summary::after { content: "−"; }
.disclosure[open] summary { border-bottom: 1px solid var(--line); }
.link-list, .unresolved-list, .method-list { margin: 0; padding: 13px 18px; list-style: none; }
.link-list { columns: 2; column-gap: 25px; }
.link-list li { break-inside: avoid; padding: 6px 0; font-size: .8rem; }
.link-list a, .unresolved-list a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.link-list small { color: var(--muted); display: block; }
.unresolved-list li, .method-list > div { padding: 7px 0; font-size: .85rem; }
.unresolved-list p { color: var(--muted); }
.footer { margin-top: 54px; border-top: 1px solid var(--line); }
.footer .frame { display: flex; justify-content: space-between; gap: 10px; padding-block: 19px; font-size: .78rem; }
.footer a { color: var(--accent); font-weight: 740; }

dialog { position: fixed; inset: 0; width: min(690px, calc(100% - 28px)); max-height: min(91vh, 880px); padding: 0; border: 1px solid #9eafa2; border-radius: 13px; box-shadow: 0 14px 56px #14231f46; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: #15221fb0; }
.dialog-shell { position: relative; padding: 27px; }
.close-button { position: absolute; right: 13px; top: 13px; border-radius: 50%; width: 32px; height: 32px; background: var(--paper); border: 1px solid var(--line); font-size: 23px; line-height: 1; z-index: 1; }
.close-button:hover { background: #e1e9e0; }
.dialog-shell h2 { font-size: clamp(1.6rem, 4vw, 2.45rem); padding-right: 24px; }
.detail-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 15px; }
.detail-process { font-size: .85rem; color: var(--muted); line-height: 1.5; border-bottom: 1px solid var(--line); padding: 0 0 11px; }
.detail-analysis { margin: 12px 0; }
.detail-gallery { margin-top: 13px; }
.detail-gallery img { width: 100%; height: min(43vh, 335px); object-fit: contain; border: 1px solid #d3dbd1; background: #e8ede7; border-radius: 8px; }
.detail-gallery figcaption { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 5px; color: var(--muted); font-size: .76rem; }
.gallery-controls { display: flex; align-items: center; gap: 6px; }
.gallery-controls button { border-radius: 5px; border: 1px solid var(--line); background: var(--surface); padding: 3px 8px; }
.detail-sources { margin-top: 15px; }
.detail-sources h3 { font-size: 1rem; }
.detail-sources ul { list-style: none; padding: 0; margin: 5px 0 0; }
.detail-sources li { display: flex; flex-wrap: wrap; gap: 7px; padding: 5px 0; font-size: .81rem; }
.detail-sources a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.detail-sources small { color: var(--muted); align-self: center; }

@media (max-width: 1050px) {
  :root { --frame: calc(100% - 56px); }
  .hero { gap: 32px; }
  .hero h1 { font-size: clamp(3rem, 6.2vw, 4.8rem); }
  .wide-only { display: none; }
  .finding, .chart-card { padding: 20px; }
}
@media (max-width: 760px) {
  :root { --frame: calc(100% - 36px); }
  .masthead-inner { min-height: 56px; gap: 9px; }
  .masthead nav { gap: 11px; }
  .masthead nav a, .page-link { font-size: 11px; }
  .page-link { padding-left: 8px; }
  .identity { font-size: 16px; }
  .brand-mark { width: 19px; height: 19px; }
  .hero { grid-template-columns: 1fr; gap: 22px; padding: 28px 0 22px; }
  .hero h1 { font-size: clamp(3rem, 8.5vw, 4.8rem); }
  .hero-summary { margin-top: 12px; }
  .hero-actions { margin-top: 16px; }
  .hero-image img { aspect-ratio: 1.7; }
  .analysis-overview { grid-template-columns: 1fr; margin-top: 20px; gap: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat { padding: 13px 14px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section-space { margin-top: 55px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 13px; gap: 9px; }
  .filters label { font-size: 11px; }
  .result-bar, .pagination { padding-inline: 13px; }
  th:first-child, td:first-child { padding-left: 13px; }
  th:last-child, td:last-child { padding-right: 13px; }
  .industry-panel { grid-template-columns: 1fr; padding: 17px; gap: 15px; }
  .industry-panel figure img { aspect-ratio: 1.7; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow { grid-template-columns: 1fr; gap: 12px; }
  .floor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 530px) {
  html { scroll-padding-top: 100px; }
  .masthead-inner { grid-template-columns: 1fr auto; padding-block: 8px 6px; gap: 3px 12px; }
  .masthead nav { order: 3; grid-column: 1 / -1; justify-content: space-between; gap: 10px; padding-top: 4px; }
  .masthead nav a { padding: 3px 0; font-size: 12px; }
  .identity { font-size: 18px; }
  .section-heading { align-items: flex-start; }
  .section-heading .button { min-height: 35px; padding: 6px 8px; font-size: 11px; }
  .sort-label { gap: 3px; font-size: 10px; }
  .sort-label select { max-width: 116px; }
  thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  #parts-table, #parts-table tbody { display: block; }
  #parts-table tr { display: grid; grid-template-columns: 1fr auto 31px; align-items: center; gap: 5px 7px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
  #parts-table td { padding: 0; border: 0; width: auto; min-width: 0; }
  #parts-table td:first-child { grid-column: 1 / 3; }
  #parts-table td:nth-child(2) { grid-column: 1; font-size: .72rem; }
  #parts-table td:nth-child(3) { grid-column: 2; justify-self: end; }
  #parts-table td:nth-child(4) { grid-column: 1; }
  #parts-table td:last-child { grid-column: 3; grid-row: 1 / 4; }
  .part-button .thumb { width: 45px; flex-basis: 45px; height: 36px; }
  .chart-card, .finding { padding: 15px; }
  .bar { grid-template-columns: minmax(102px, 133px) 1fr 21px; font-size: .72rem; gap: 6px; }
  .video-grid { grid-template-columns: 1fr; }
  .link-list { columns: 1; }
  .dialog-shell { padding: 16px; }
  .metric { padding: 11px; }
  .workflow dl { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
