:root {
  --ink: #17211f;
  --muted: #52615d;
  --paper: #f6f3ed;
  --panel: #ffffff;
  --line: #d8d0c3;
  --green: #145a4a;
  --blue: #214f7a;
  --amber: #c47a27;
  --red: #a13c33;
  --shadow: 0 18px 60px rgba(23, 33, 31, 0.12);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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: 18px;
  line-height: 1.65;
  letter-spacing: 0;
}

a {
  color: var(--blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--amber);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 56px);
  background: rgba(246, 243, 237, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(216, 208, 195, 0.8);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  letter-spacing: 0;
}

.header-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.hero {
  min-height: 86vh;
  display: grid;
  align-items: end;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ink);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(13, 20, 18, 0.86) 0%, rgba(13, 20, 18, 0.58) 42%, rgba(13, 20, 18, 0.16) 100%),
    linear-gradient(0deg, rgba(13, 20, 18, 0.74) 0%, rgba(13, 20, 18, 0.08) 56%);
}

.hero-inner {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 0 0 clamp(46px, 8vh, 80px);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #f5c77a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: #f5c77a;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 930px;
  margin: 0;
  color: #fff;
  font-size: 5.2rem;
  font-weight: 900;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.32);
}

.subtitle {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.22rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.hero-segments {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.hero-segments a {
  min-height: 150px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

.hero-segments strong,
.hero-segments span {
  display: block;
}

.hero-segments strong {
  margin-bottom: 7px;
  font-size: 0.88rem;
}

.hero-segments span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  line-height: 1.35;
}

.shell {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 56px);
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(36px, 6vw, 80px) 0;
}

.shell > div {
  min-width: 0;
}

.toc {
  position: sticky;
  top: 86px;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.toc a {
  display: block;
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.3;
  text-decoration: none;
}

.toc a:hover {
  color: var(--green);
}

article {
  min-width: 0;
}

section {
  margin: 0 0 clamp(46px, 7vw, 82px);
}

h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 2.45rem;
}

h3 {
  margin: 34px 0 12px;
  font-size: 1.45rem;
}

p {
  margin: 0 0 18px;
}

.lede {
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  color: #28342f;
}

.source-note,
.caption,
.fineprint {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.insight,
.warning,
.method-note,
.calculator,
.matrix-panel,
.data-tool {
  margin: 28px 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.insight {
  border-left: 5px solid var(--green);
}

.warning {
  border-left: 5px solid var(--red);
}

.method-note {
  border-left: 5px solid var(--blue);
}

.callout-title {
  margin: 0 0 8px;
  font-weight: 850;
}

.quick-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.recommendation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.recommendation-list .pick {
  display: grid;
  align-content: start;
  gap: 8px;
}

.recommendation-list .pick span {
  display: block;
}

.product-details-wrap {
  max-width: 100%;
  overflow-x: auto;
}

[data-product-details-table] {
  min-width: 1120px;
  font-size: 0.86rem;
}

.pick {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.pick strong {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
}

.flowchart {
  display: grid;
  gap: 14px;
  margin: 28px 0;
}

.flow-row {
  display: grid;
  grid-template-columns: 1fr 58px 1fr;
  align-items: stretch;
  gap: 14px;
}

.flow-node {
  display: grid;
  align-content: center;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.flow-node strong {
  display: block;
  margin-bottom: 6px;
}

.flow-arrow {
  display: grid;
  place-items: center;
  color: var(--green);
  font-weight: 900;
  font-size: 1.6rem;
}

.flow-arrow::before {
  content: "->";
}

.flow-end {
  border-color: rgba(20, 90, 74, 0.35);
  background: #ecf4ee;
}

.spec-table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.45;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f0ebe2;
  color: var(--ink);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tr:last-child td {
  border-bottom: 0;
}

.tag {
  display: inline-flex;
  margin: 0 4px 6px 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf2f6;
  color: #29435a;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.source-badge {
  display: inline-flex;
  margin: 0 4px 6px 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.source-badge.official {
  background: #e4f2ec;
  color: #174f3d;
}

.source-badge.manual {
  background: #e7eef7;
  color: #214f7a;
}

.source-badge.fallback {
  background: #fff0dc;
  color: #7a4a0a;
}

.table-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 18px 0 10px;
}

.table-tools input,
.calculator input,
.calculator select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #bdb4a7;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.table-tools label,
.calculator label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 750;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.filter-chips label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
}

.filter-chips input {
  width: auto;
  min-height: 0;
  margin: 0;
}

.toolbar-label {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 850;
}

.comparison-cards,
.delivery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.comparison-cards div,
.delivery-grid div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.comparison-cards strong,
.comparison-cards span,
.delivery-grid strong,
.delivery-grid span {
  display: block;
}

.comparison-cards strong,
.delivery-grid strong {
  margin-bottom: 7px;
  color: var(--green);
}

.comparison-cards span,
.delivery-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.note-card,
.glossary-section,
.utility-panel,
.state-grid,
.callout-row {
  margin: 22px 0;
}

.note-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  background: #fff;
}

.apartment-note {
  border-left-color: var(--clay);
}

.glossary-grid,
.state-grid,
.callout-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.glossary-grid details,
.state-grid div,
.callout-row p,
.utility-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.glossary-grid summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 850;
}

.glossary-grid p {
  margin: 10px 0 0;
}

.state-grid strong,
.state-grid span {
  display: block;
}

.state-grid strong {
  color: var(--green);
}

.state-grid span {
  margin-top: 6px;
  color: var(--muted);
}

.utility-panel h3 {
  margin-top: 0;
}

.utility-panel input,
.utility-panel select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #bdb4a7;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.utility-panel input[type="checkbox"] {
  width: auto;
  min-height: 0;
  margin-right: 8px;
}

.utility-panel label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8f5ef;
  color: var(--ink);
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.fit-result {
  margin: 16px 0 0;
  padding: 14px;
  border-radius: 6px;
  background: #f3eee6;
  color: var(--muted);
}

.fit-result.pass {
  background: #e6f2ec;
  color: #174f3d;
}

.fit-result.warn {
  background: #f8e6de;
  color: #7c2c23;
}

.clearance-visual {
  display: grid;
  grid-template-columns: 92px 90px minmax(0, 1fr) 1.2fr;
  align-items: stretch;
  min-height: 92px;
  margin: 18px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.clearance-visual span {
  display: grid;
  place-items: center;
  padding: 10px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.room-zone {
  background: #f7f3ed;
}

.side-zone {
  background: #e7eef7;
}

.tread-zone {
  background: #e4f2ec;
  border-left: 1px dashed rgba(20, 90, 74, 0.45);
  border-right: 1px dashed rgba(20, 90, 74, 0.45);
}

.rear-zone {
  background: #fff0dc;
}

.selected-row td {
  background: #e4f2ec;
}

.belt-toolbar {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.belt-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.belt-band {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fdfbf7;
}

.belt-band h3 {
  margin: 0;
  color: var(--green);
  font-size: 1rem;
}

.belt-band article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.belt-band article[hidden],
.belt-map-table tr[hidden] {
  display: none;
}

.belt-band strong,
.belt-band span,
.belt-band em {
  display: block;
}

.belt-band span {
  color: #28342f;
  font-size: 0.86rem;
  line-height: 1.35;
}

.belt-band em {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.35;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.score-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.score-card strong {
  display: block;
  margin-bottom: 8px;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e0d8cc;
}

.bar span {
  display: block;
  height: 100%;
  width: var(--score);
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.checklist li,
.redflags li {
  margin-bottom: 10px;
}

.references {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.references li {
  margin-bottom: 10px;
}

.site-footer {
  padding: 28px clamp(18px, 5vw, 56px) 46px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  body {
    font-size: 16px;
  }

  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .header-note {
    text-align: left;
  }

  .hero {
    min-height: 78vh;
  }

  .hero img {
    object-position: 36% center;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .quick-picks,
  .recommendation-list,
  .score-grid,
  .checklist,
  .calculator-grid,
  .comparison-cards,
  .delivery-grid,
  .hero-segments,
  .belt-map {
    grid-template-columns: 1fr;
  }

  .flow-row {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    min-height: 24px;
    transform: rotate(90deg);
  }

  .flow-arrow::before {
    content: "->";
  }

  table,
  caption,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  table {
    min-width: 0;
  }

  [data-product-details-table] {
    min-width: 0;
  }

  tbody tr {
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
  }

  tbody tr[hidden] {
    display: none;
  }

  td,
  tbody th {
    display: grid;
    grid-template-columns: minmax(100px, 0.38fr) 1fr;
    gap: 12px;
    border-bottom: 1px solid var(--line);
  }

  tbody th {
    grid-template-columns: 1fr;
    text-align: left;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  td:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    padding: 12px 18px;
  }

  .header-note {
    display: none;
  }

  .hero-inner {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 1.95rem;
  }

  .clearance-visual {
    grid-template-columns: 1fr;
  }

  .pill {
    width: 100%;
    justify-content: center;
  }

  .table-tools {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Phase 9E dark benchmark hero label. */
.hero :where(.eyebrow,.kicker){color:#ffd2c7!important;background:transparent!important}
