/* ==========================================================================
   Product pages A: physical risk, hazard products, climate projections, transition risk
   Loaded after site.css by src/pages/products/{physical-risk,hazard-products,
   climate-projections,transition-risk}.html. Only page-level additions live here;
   shared components (figure, card-grid, table, chip, sev, panel …) come from site.css.

   VOCABULARY
     .product-hero-grid    page-hero content: copy + console illustration (collapses at 960px)
     .product-hero-meta    small row of chips under the hero buttons
     .console              .figure variant with a .console-bar (mono path + status) on top
     .fact-strip           four key facts in a ruled row: .fact > .fact-value + .fact-label
     .question-grid        "what you can do with it": li.question > .question-index, h3, p, .question-where
     .chain                horizontal hazard-to-loss chain: li > .chain-step(b + span)
     .scale                labelled segmented legend: li > span.scale-swatch + text (never colour-only)
     .family-nav           anchor chips to the sections of one page
     .family               one hazard family: .family-head (svg, eyebrow, h2) + body
     .spec-list            dl of key/value rows in mono
     .range-legend         legend row for range charts: .key-band, .key-line, .key-marker
   ========================================================================== */

/* ---------- Hero ---------- */
.product-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 2.5rem 4rem; align-items: center; }
.product-hero-grid .h1 { max-width: 18ch; }
.product-hero-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.5rem; }
@media (max-width: 960px) { .product-hero-grid { grid-template-columns: minmax(0, 1fr); } .product-hero-grid .h1 { max-width: 22ch; } }

/* ---------- Console illustration ---------- */
.console { box-shadow: var(--shadow-2); }
.console-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem 1.1rem; background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-family: var(--font-data); font-size: .7rem; color: var(--muted); min-width: 0;
}
.console-path { display: flex; gap: .35rem; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.console-path b { font-weight: 500; color: var(--ink-2); }
.console-path span + span::before, .console-path b::before { content: "/"; margin-right: .35rem; color: var(--border-strong); }
.console-path > :first-child::before { content: none; }
.console-status { display: inline-flex; align-items: center; gap: .4rem; flex: none; color: var(--ink-2); }
.console-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.console-tabs { display: flex; gap: .25rem; padding: .6rem 1.1rem 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
.console-tabs span { font-size: .75rem; padding: .3rem .6rem .45rem; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.console-tabs .is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.console .figure-body + .figure-body { padding-top: 0; }
.console .table { font-size: .78rem; }
.console .table td, .console .table th { padding: .4rem .45rem; }
@media (max-width: 480px) { .console-status { display: none; } }

/* ---------- Fact strip ---------- */
.fact-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.fact { padding: 1.2rem 1.25rem 0; border-right: 1px solid var(--border); }
.fact:first-child { padding-left: 0; }
.fact:last-child { border-right: 0; }
.fact-value { font-family: var(--font-data); font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.fact-value small { font-size: .5em; color: var(--muted); letter-spacing: 0; margin-left: .15em; }
.fact-label { margin-top: .6rem; font-size: .85rem; color: var(--ink-2); line-height: 1.45; }
@media (max-width: 860px) {
  .fact-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 1.2rem 1rem 1.2rem 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .fact:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--border); }
}

/* ---------- Questions a risk team asks ---------- */
.question-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; counter-reset: question; }
.question { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .25rem 1rem; padding-block: 1.6rem; border-top: 1px solid var(--border); }
.question-index { grid-row: span 3; font-family: var(--font-data); font-size: .75rem; color: var(--accent-text); padding-top: .35rem; }
.question h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
.question p { color: var(--ink-2); font-size: .9375rem; margin-top: .35rem; }
.question-where { margin-top: .6rem; font-family: var(--font-data); font-size: .72rem; color: var(--muted); }
@media (max-width: 860px) { .question-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Chain (hazard to loss) ---------- */
.chain { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.chain li { position: relative; padding: 1.1rem 1.25rem 1.2rem; border-right: 1px solid var(--border); }
.chain li:last-child { border-right: 0; background: var(--accent-subtle); }
.chain li:not(:last-child)::after {
  content: ""; position: absolute; right: -6px; top: 50%; width: 10px; height: 10px; z-index: 1;
  background: var(--surface); border-top: 1px solid var(--border); border-right: 1px solid var(--border); transform: translateY(-50%) rotate(45deg);
}
.chain b { display: block; font-family: var(--font-data); font-weight: 500; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.chain strong { display: block; margin-top: .35rem; font-weight: 600; font-size: .95rem; color: var(--ink); }
.chain span { display: block; margin-top: .25rem; font-size: .82rem; color: var(--ink-2); line-height: 1.45; }
@media (max-width: 960px) {
  .chain { grid-template-columns: minmax(0, 1fr); }
  .chain li { border-right: 0; border-bottom: 1px solid var(--border); }
  .chain li:last-child { border-bottom: 0; }
  .chain li:not(:last-child)::after { right: auto; left: 1.5rem; top: auto; bottom: -6px; transform: rotate(135deg); }
}

.chain-vertical { grid-template-columns: minmax(0, 1fr); }
.chain-vertical li { border-right: 0; border-bottom: 1px solid var(--border); }
.chain-vertical li:last-child { border-bottom: 0; }
.chain-vertical li:not(:last-child)::after { right: auto; left: 1.5rem; top: auto; bottom: -6px; transform: rotate(135deg); }

/* ---------- Labelled scale (legend that never relies on colour alone) ---------- */
.scale { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; margin-top: .9rem; }
.scale li { font-size: .72rem; color: var(--ink-2); line-height: 1.3; }
.scale-swatch { display: block; height: 10px; border-radius: 2px; margin-bottom: .4rem; background: var(--seq-min); }
.scale li:nth-child(2) .scale-swatch { background: color-mix(in oklab, var(--accent) 30%, var(--surface)); }
.scale li:nth-child(3) .scale-swatch { background: color-mix(in oklab, var(--accent) 52%, var(--surface)); }
.scale li:nth-child(4) .scale-swatch { background: color-mix(in oklab, var(--accent) 75%, var(--surface)); }
.scale li:nth-child(5) .scale-swatch { background: var(--accent-strong); }
.scale .mono { display: block; color: var(--muted); font-size: .68rem; }
@media (max-width: 560px) { .scale { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .5rem; } }

/* ---------- Family navigation and sections ---------- */
.family-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.family-nav a {
  display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border: 1px solid var(--border-strong);
  border-radius: var(--r-full); font-size: .875rem; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--surface);
}
.family-nav a:hover { border-color: var(--accent); background: var(--accent-subtle); }
.family-nav b { font-family: var(--font-data); font-weight: 500; font-size: .7rem; color: var(--accent-text); }
.family-head { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 1rem 1.25rem; align-items: center; margin-bottom: 2rem; }
.family-head svg { width: 56px; height: 56px; color: var(--accent-strong); }
.family-head svg .fill-soft { fill: var(--accent-soft); }
.family-head .h2 { margin-top: .4rem; }
.family-products { display: grid; gap: 0; border-top: 1px solid var(--border); }
.family-products li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 1.5rem; padding-block: 1rem; border-bottom: 1px solid var(--border); }
.family-products strong { font-weight: 600; color: var(--ink); }
.family-products p { grid-column: 1; color: var(--ink-2); font-size: .9rem; }
.family-products .chip { grid-row: 1; grid-column: 2; align-self: start; }
@media (max-width: 560px) { .family-products li { grid-template-columns: minmax(0, 1fr); } .family-products .chip { grid-row: auto; grid-column: 1; justify-self: start; } }

/* ---------- Spec list ---------- */
.spec-list { display: grid; gap: 0; font-size: .875rem; border-top: 1px solid var(--border); }
.spec-list div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .6rem; border-bottom: 1px solid var(--border); }
.spec-list dt { color: var(--muted); }
.spec-list dd { font-family: var(--font-data); font-size: .8rem; color: var(--ink); text-align: right; }

/* ---------- Chart legends and extra marks ---------- */
.range-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; padding: 0 1.1rem .4rem; font-size: .72rem; color: var(--ink-2); }
.range-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.range-legend i { display: inline-block; width: 18px; height: 8px; border-radius: 2px; }
.key-band { background: var(--uncertainty-band); border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); }
.key-line { height: 2px !important; background: var(--accent-strong); }
.key-dash { height: 0 !important; border-top: 1.5px dashed var(--ink-2); }
.key-marker { width: 9px !important; height: 9px !important; border-radius: 50% !important; border: 2px solid var(--accent-strong); background: var(--surface); }
.key-solid { background: var(--accent-strong); }
.key-soft { background: color-mix(in oklab, var(--accent) 55%, var(--surface)); }
.key-outline { background: var(--seq-min); border: 1px solid var(--accent); }
.key-partial { background: transparent; border: 1px dashed var(--accent); }
.key-marker-solid { background: var(--accent-strong) !important; }
.key-ink { background: var(--ink) !important; }
.key-muted { background: color-mix(in oklab, var(--ink) 18%, var(--surface)); }
.figure-body svg .mark-muted { fill: color-mix(in oklab, var(--ink) 16%, var(--surface)); }
.figure-body svg .mark-partial { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 2; }
.figure-body svg .mark-band-strong { fill: color-mix(in oklab, var(--accent) 28%, transparent); }
.figure-body svg .mark-point { fill: var(--accent-strong); }
.figure-body svg .mark-point-light { fill: var(--surface); stroke: var(--accent-strong); stroke-width: 1.5; }
.figure-body svg .mark-quadrant { fill: var(--accent-subtle); }
.figure-body svg text.label-strong { fill: var(--ink); font-weight: 500; }
.figure-body svg text.label-ink2 { fill: var(--ink-2); }

/* ---------- Tables in content sections ---------- */
.content-table { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: .75rem 1rem .5rem; }
.content-table .table td:first-child { font-weight: 600; color: var(--ink); }
.content-table .table td { color: var(--ink-2); }
.table .sev { vertical-align: middle; }
.table td .chip { margin-left: .25rem; }

/* ---------- Two-column prose blocks ---------- */
.prose-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 3rem; }
.prose-columns h3 { font-weight: 600; font-size: 1rem; color: var(--ink); }
.prose-columns p { color: var(--ink-2); font-size: .9375rem; margin-top: .4rem; }
@media (max-width: 760px) { .prose-columns { grid-template-columns: minmax(0, 1fr); } }

.figure-caption { font-size: .8rem; color: var(--muted); margin-top: .75rem; max-width: 60ch; }
