/* CV-06 — P06 Decision Lens commodity reference. Same visual system as samples/06-decision-lens. */
:root {
  color-scheme: light;
  --ink: #171714;
  --ink-soft: #4d4d47;
  --paper: #f3f0e8;
  --surface: #fffdf7;
  --surface-2: #e8e4da;
  --rule: #24241f;
  --rule-soft: #77766d;
  --signal: #174f78;
  --signal-soft: #d8e7f0;
  --focus: #005ea8;
  --max: 96rem;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--paper);
  font-size: 1rem;
}

body,
button {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--ink);
  text-decoration-thickness: .12em;
  text-underline-offset: .2em;
}

a:hover {
  text-decoration-thickness: .2em;
}

:focus,
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  min-height: 44px;
  background: var(--surface);
  border: 2px solid var(--rule);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-head,
.primary-nav,
main > section,
.site-footer {
  width: min(100%, var(--max));
  margin-inline: auto;
}

.prototype-notice {
  margin: 0;
  padding: .7rem clamp(1rem, 3vw, 3rem);
  color: var(--surface);
  background: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .015em;
}

.brand-lockup {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 1rem 2rem;
  padding: 1.5rem clamp(1rem, 3vw, 3rem);
  border-bottom: 2px solid var(--rule);
  background: var(--paper);
}

.brand-lockup p {
  margin: 0;
}

.brand-name {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -.04em;
}

.brand-context {
  color: var(--ink-soft);
}

.edition-mark,
.section-kicker,
.hero-index {
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--rule);
  background: var(--surface);
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: .65rem clamp(.9rem, 2vw, 1.5rem);
  border-right: 1px solid var(--rule);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-nav a:hover {
  background: var(--signal-soft);
}

main > section {
  padding: clamp(3rem, 6vw, 6rem) clamp(1rem, 3vw, 3rem);
  border-bottom: 2px solid var(--rule);
}

h1,
h2,
h3,
p,
li,
dt,
dd {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.04;
}

h1 {
  max-width: 24ch;
  margin-bottom: 1.5rem;
  font-size: clamp(1.9rem, 3.4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.045em;
}

h2 {
  max-width: 24ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 800;
  letter-spacing: -.05em;
}

h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

/* Hero: oversized decision question, then the controlled heading and fixed items. */
.hero {
  display: grid;
  grid-template-columns: minmax(2rem, .4fr) minmax(0, 2.3fr) minmax(18rem, 1fr);
  gap: clamp(1.25rem, 3vw, 3.5rem);
  align-items: start;
}

.hero-index {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--ink-soft);
}

.decision-question {
  max-width: 14ch;
  margin: 0 0 clamp(2rem, 5vw, 4rem);
  font-size: clamp(3.2rem, 7.4vw, 8rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.075em;
}

.service-definition {
  max-width: 46rem;
  margin: 0 0 1.5rem;
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  line-height: 1.35;
}

.dataset-line {
  max-width: 44rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 4px solid var(--rule);
  font-weight: 700;
}

.opening-decision {
  padding: 1.5rem;
  border: 2px solid var(--rule);
  background: var(--surface);
}

.opening-decision h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
}

.boundary-line {
  padding-top: 1.25rem;
  border-top: 4px solid var(--rule);
  font-weight: 700;
}

.opening-decision .boundary-line {
  margin: 0 0 1.25rem;
}

.descriptive-contrast {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
}

.back-link-wrap {
  margin: 0;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 48px;
  padding: .85rem 1rem;
  border: 2px solid var(--rule);
  border-radius: 0;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.action-secondary {
  color: var(--ink);
  background: var(--surface);
}

.action-secondary:hover {
  background: var(--signal-soft);
}

.section-kicker {
  display: inline-block;
  margin-bottom: 2rem;
  padding-bottom: .35rem;
  border-bottom: 4px solid var(--signal);
}

.section-lede {
  max-width: 58rem;
  margin: 0 0 2rem;
  font-size: 1.05rem;
}

/* Lens controls (primary interaction) and static equivalent. */
.lens-controls {
  padding: 1.25rem;
  border: 2px solid var(--rule);
  border-bottom: 0;
  background: var(--paper);
}

.control-label {
  margin: 0 0 .75rem;
  font-weight: 800;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.lens-toggle,
.lens-reset {
  min-height: 48px;
  min-width: 44px;
  padding: .7rem 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--rule);
  border-radius: 0;
  cursor: pointer;
  font-weight: 700;
}

.lens-toggle[aria-pressed="true"] {
  color: var(--surface);
  background: var(--signal);
  border-color: var(--signal);
  box-shadow: inset 0 0 0 2px var(--surface);
}

.lens-reset {
  margin-left: auto;
  border-style: dashed;
}

.lens-status {
  margin: 1rem 0 0;
  padding-left: 1rem;
  border-left: 4px solid var(--signal);
}

.lens-static {
  padding: 1.25rem;
  border: 2px solid var(--rule);
  border-bottom: 0;
  background: var(--surface);
}

.lens-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0;
  margin: 0 0 1rem;
  border: 1px solid var(--rule);
}

.lens-map > div {
  padding: .75rem 1rem;
  border-right: 1px solid var(--rule);
}

.lens-map > div:last-child {
  border-right: 0;
}

.lens-map dt {
  font-weight: 800;
}

.lens-map dd {
  margin: 0;
}

.lens-note {
  margin: 0;
  color: var(--ink-soft);
}

/* The comparison table: hard rules, square cells, one blue signal for emphasis. */
.reference-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid var(--rule);
  background: var(--surface);
  table-layout: fixed;
}

.reference-table caption {
  padding: 1rem;
  color: var(--surface);
  background: var(--ink);
  border: 2px solid var(--ink);
  font-weight: 800;
  text-align: left;
}

.reference-table th,
.reference-table td {
  padding: clamp(.6rem, 1.2vw, 1rem);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.reference-table th:last-child,
.reference-table td:last-child {
  border-right: 0;
}

.reference-table thead th {
  color: var(--surface);
  background: var(--ink);
  font-size: 1rem;
  letter-spacing: .04em;
}

.reference-table thead th:nth-child(1) { width: 15%; }
.reference-table thead th:nth-child(2) { width: 10%; }
.reference-table thead th:nth-child(3) { width: 24%; }
.reference-table thead th:nth-child(4) { width: 29%; }
.reference-table thead th:nth-child(5) { width: 22%; }

.reference-table tbody .name-cell {
  background: var(--surface-2);
}

.reference-table tbody {
  border-top: 2px solid var(--rule);
}

.reference-table p,
.reference-table ul,
.reference-table ol {
  margin: 0;
}

.reference-table ul,
.reference-table ol {
  padding-left: 1.2rem;
}

.reference-table li + li {
  margin-top: .3rem;
}

.cell-label {
  display: none;
}

.price-line strong {
  font-size: 1.15em;
  font-weight: 800;
}

.row-describe td {
  padding: 0;
  border-bottom: 2px solid var(--rule);
}

.describe {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.f {
  padding: clamp(.6rem, 1.2vw, 1rem);
  border-right: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}

.f:nth-child(3n) {
  border-right: 0;
}

.f-sources {
  grid-column: 1 / -1;
  border-right: 0;
}

.f-label {
  display: block;
  margin-bottom: .35rem;
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Lens emphasis: a blue rule and a light surface; nothing hidden or dimmed. */
.reference-table[data-active-lens="spec"] [data-lens-group="spec"],
.reference-table[data-active-lens="logistics"] [data-lens-group="logistics"],
.reference-table[data-active-lens="regulatory"] [data-lens-group="regulatory"] {
  box-shadow: inset 8px 0 0 var(--signal);
  background: var(--signal-soft);
}

.reference-table[data-active-lens="spec"] [data-lens-group="spec"] .f-label,
.reference-table[data-active-lens="logistics"] [data-lens-group="logistics"] .f-label,
.reference-table[data-active-lens="regulatory"] [data-lens-group="regulatory"] .f-label {
  color: var(--signal);
}

/* Closing sections and footer. */
.next-step .boundary-line,
.limits .boundary-line {
  max-width: 58rem;
  font-size: 1.15rem;
}

.site-footer {
  padding: 2rem clamp(1rem, 3vw, 3rem) 3rem;
}

.site-footer p {
  margin: 0 0 .75rem;
  font-weight: 700;
}

.enhancement {
  display: none;
}

html.js .enhancement {
  display: block;
}

/* Responsive: rail collapses, then the table becomes labelled cards in the same order. */
@media (max-width: 74rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-index {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .describe {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .f:nth-child(3n) {
    border-right: 1px solid var(--rule-soft);
  }

  .f:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 767.98px) {
  .reference-table,
  .reference-table caption,
  .reference-table tbody,
  .reference-table tr,
  .reference-table th,
  .reference-table td {
    display: block;
    width: 100%;
  }

  .reference-table thead {
    display: none;
  }

  .reference-table tbody {
    margin-top: 1rem;
    border: 2px solid var(--rule);
  }

  .reference-table th,
  .reference-table td {
    border-right: 0;
  }

  .cell-label {
    display: block;
    margin-bottom: .35rem;
    font-size: .875rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .describe {
    grid-template-columns: minmax(0, 1fr);
  }

  .f,
  .f:nth-child(2n),
  .f:nth-child(3n) {
    border-right: 0;
  }

  .lens-map > div {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .lens-map > div:last-child {
    border-bottom: 0;
  }

  .lens-reset {
    margin-left: 0;
  }

  .brand-lockup {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  .decision-question {
    font-size: clamp(2.6rem, 14vw, 5.5rem);
  }
}

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

@media (forced-colors: active) {
  :root {
    --ink: CanvasText;
    --ink-soft: CanvasText;
    --paper: Canvas;
    --surface: Canvas;
    --surface-2: Canvas;
    --rule: CanvasText;
    --rule-soft: CanvasText;
    --signal: Highlight;
    --signal-soft: Canvas;
    --focus: Highlight;
  }

  .lens-toggle[aria-pressed="true"] {
    forced-color-adjust: none;
    color: HighlightText;
    background: Highlight;
    border-color: Highlight;
  }

  :focus-visible {
    outline-color: Highlight;
  }
}
