/* Hydrogen Price Calculator — advanced panels. Same language as the price page. */
@font-face {
  font-family: "Newsreader";
  src: url("/lcoh/price/fonts/newsreader-opsz-vf.woff2") format("woff2"),
       url("/lcoh/price/fonts/newsreader-vf.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("/lcoh/price/fonts/satoshi-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("/lcoh/price/fonts/satoshi-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("/lcoh/price/fonts/satoshi-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* 3-2 step 1: .adv used to redeclare its own copy of every design variable with older R6 values.
   Those now live once in app.css's :root block and cascade down to this subtree unchanged, so
   this rule only keeps the non-token layout/typography declarations. */
.adv {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-input);
  line-height: 1.45;
  max-width: 100%;
  min-width: 0;
}
.adv * { box-sizing: border-box; }
.adv button, .adv input, .adv select, .adv textarea { font: inherit; color: inherit; }
.adv :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.adv-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-2) var(--sp-5); }
.adv h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}
.adv .purpose { margin: 4px 0 0; color: var(--ink-2); font-size: var(--fs-body); max-width: 62ch; }
.adv-reset {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  padding: 0 var(--sp-3);
  min-height: 44px;
  font-size: var(--fs-body);
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .adv-reset:hover { border-color: var(--ink); background: var(--surface-2); }
}
.adv-effect {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
  font-size: var(--fs-body);
  font-variant-numeric: tabular-nums;
}
.adv-effect .effect-fig { margin: 0; }
.adv-effect .fig-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-3);
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.adv-effect .fig-unit { letter-spacing: 0.04em; }
.adv-effect .effect-plot { display: grid; gap: var(--sp-1); }
.adv-effect .effect-row.before { margin-bottom: 2px; }
.adv-effect .before .effect-bar { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.adv-effect .after .effect-bar { background: var(--ink); }
.adv-effect .effect-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: var(--sp-2);
  min-height: 18px;
}
.adv-effect .effect-label,
.adv-effect .effect-value {
  font-family: var(--font-ui);
  font-size: var(--fs-meta);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
/* 3-2 batch 2: axis ticks read one step quieter than the direct value labels beside them -- 11px
   --ink-3, matching .bar-axis-tick/.hero-bar-axis's own "quiet axis" treatment. */
.adv-effect .effect-tick {
  font-family: var(--font-ui);
  font-size: var(--fs-cap);
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.adv-effect .effect-value { text-align: right; color: var(--ink); }
.adv-effect .effect-track {
  position: relative;
  height: 10px;
  background: var(--line);
}
.adv-effect .effect-bar {
  display: block;
  height: 100%;
  min-width: 1px;
}
.adv-effect .effect-axis {
  position: relative;
  height: 18px;
  margin-left: 60px;
  margin-right: 60px;
  /* 3-2 batch 2: quiet axis grammar (chart guidance) -- 1px --line, not --line-2, matching every
     other axis rule on the page (bar-axis-track, ladder-axis, hero-bar-axis). */
  border-top: 1px solid var(--line);
}
.adv-effect .effect-tick {
  position: absolute;
  top: 3px;
  transform: translateX(-50%);
  white-space: nowrap;
}
.adv-effect .effect-tick:first-child { transform: translateX(0); }
.adv-effect .effect-tick:last-child { transform: translateX(-100%); }
.adv-effect .effect-note { margin: 8px 0 0; color: var(--ink-2); font-size: var(--fs-sm); }
.adv-effect .effect-baseline { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 0; width: 100%; }
.adv-effect .effect-baseline-name { color: var(--ink-3); font-size: var(--fs-meta); }
.adv-effect .effect-baseline-value { font-variant-numeric: tabular-nums; font-size: var(--fs-title); color: var(--ink); }
.adv-effect .effect-baseline-unit { color: var(--ink-2); font-size: var(--fs-meta); }
.adv svg .axis { stroke: var(--line); stroke-width: 1; }
.adv svg .axis-label { font-size: var(--fs-meta); fill: var(--ink-3); }
.adv svg .axis-title { font-size: var(--fs-meta); fill: var(--ink-2); }
.adv .policy-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-2);
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: var(--fs-sm);
}
.adv .policy-col { margin-top: 8px; }
.adv .column-tag { margin-left: 0; }
.adv-note { margin: 10px 0 0; color: var(--ink-2); font-size: var(--fs-body); }
.adv-warn { color: var(--warn); }
.adv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--sp-5) var(--sp-6);
  margin-top: 18px;
  min-width: 0;
}
.adv-controls, .adv-viz { min-width: 0; }
.adv label.field { display: grid; gap: var(--sp-1); margin: 0 0 14px; font-size: var(--fs-body); color: var(--ink); }
.adv label.field > span { color: var(--ink); }
.adv .control {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  border-bottom: 1px solid var(--line-2);
  min-height: 44px;
}
.adv .control > input, .adv .control > select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  min-height: 44px;
  padding: 0;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-h3);
}
.adv .control > select { font-size: var(--fs-input); }
.adv textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  padding: var(--sp-2) 0;
  min-height: 120px;
  resize: vertical;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: var(--fs-sm);
}
.adv-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.adv-row > button, .adv-file {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 0 var(--sp-4);
  cursor: pointer;
  min-height: 44px;
  font-size: var(--fs-body);
}
.adv-row > button.primary {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}
.adv-row > button.quiet, .adv-file.quiet {
  background: transparent;
  color: var(--ink);
}
.adv-file { display: inline-flex; align-items: center; position: relative; overflow: hidden; padding: 0 var(--sp-4); }
.adv-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 44px; width: 100%; max-width: 100%; font-size: var(--fs-input); }
.adv-check {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  width: auto;
  margin: 0 0 12px;
  padding: 0;
  font-size: var(--fs-body);
  border: 0;
  background: transparent;
  cursor: pointer;
}
.adv-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  flex: none;
  accent-color: var(--ink);
}
.adv table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-body);
}
.adv th, .adv td {
  text-align: right;
  padding: 8px 12px;
  height: 38px;
  border-bottom: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  font-weight: 400;
  vertical-align: middle;
}
.adv th:first-child, .adv td:first-child { text-align: left; color: var(--ink-2); padding-left: 0; }
.adv thead th {
  color: var(--ink-3);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  border-bottom: 1px solid var(--line-2);
  height: 36px;
  background: var(--paper);
}
.adv td input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-ctrl);
  background: var(--surface);
  text-align: right;
  padding: 0 var(--sp-2);
  font-family: var(--font-ui);
  font-size: var(--fs-input);
  font-variant-numeric: tabular-nums;
}
.adv td input:hover { border-color: var(--ink); }
.adv td input:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  background: var(--surface);
}
.adv .scroll.year-scroll { position: relative; }
.adv .scroll.year-scroll.is-scrolled th:first-child,
.adv .scroll.year-scroll.is-scrolled td:first-child {
  box-shadow: 8px 0 8px -8px var(--shadow-ink);
}
.adv .scroll-cue {
  position: sticky;
  top: 8px;
  float: right;
  margin: 0;
  font-size: var(--fs-meta);
  color: var(--ink-3);
  pointer-events: none;
}
.adv td input.touched { border-color: var(--ink); }
.adv .scroll {
  max-height: 420px;
  overflow: auto;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.adv svg.chart { width: 100%; height: auto; display: block; overflow: hidden; }
.adv svg text { font-family: var(--font-ui); fill: var(--ink-2); font-size: var(--fs-meta); }
/* 3-2 batch 2: axis tick/year labels read quieter (11px --ink-3) than a direct data label (mark
   text, unit) -- same split app.css's own chart grammar already makes (bar-axis-tick vs bar-value). */
.adv svg text.axis-label { fill: var(--ink-3); font-size: var(--fs-cap); }
.adv .axis { stroke: var(--line); stroke-width: 1; }
.adv .base-line { stroke: var(--ink-3); stroke-width: 1.5; fill: none; }
.adv .over-line { stroke: var(--accent); stroke-width: 2.25; stroke-dasharray: 7 4; fill: none; }
.adv .legend { display: flex; gap: var(--sp-4); margin: 8px 0 0; font-size: var(--fs-sm); color: var(--ink-2); }
.adv .swatch { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--ink-3); vertical-align: middle; margin-right: 6px; }
.adv .swatch.over { border-top-color: var(--accent); border-top-style: dashed; }
.adv .steps { display: flex; flex-direction: column; gap: var(--sp-3); }
.adv .step { border-top: 1px solid var(--line); padding-top: var(--sp-2); }
.adv .step h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 500; }
.adv .pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.adv .unverified {
  display: inline-block;
  border: 1px solid var(--warn);
  color: var(--warn);
  font-family: var(--font-ui);
  font-size: var(--fs-meta);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--sp-1) var(--sp-1);
  margin-left: 8px;
  vertical-align: 2px;
}
.adv .scope {
  display: inline-block;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: var(--fs-meta);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--sp-1) var(--sp-1);
  margin-left: 8px;
  vertical-align: 2px;
}
.adv .policy { margin: 0 0 14px; padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); }
.adv .policy p { margin: 4px 0; }
.adv .kicker { font-size: var(--fs-meta); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 4px; }
.adv .err { color: var(--error); margin: 8px 0 0; }
.adv .ok { color: var(--positive-ink); }
@media (max-width: 900px) {
  .adv-grid, .adv .pair { grid-template-columns: 1fr; }
  .adv h2 { font-size: var(--fs-h3); }
  .adv .scroll { max-height: 360px; }
  .adv input[type="number"], .adv input[type="text"] { font-size: var(--fs-input); }
}



.adv .adv-grid.stack { grid-template-columns: minmax(0, 1fr); }
.adv svg.chart { max-width: 100%; width: auto; height: auto; overflow: hidden; }
.adv svg text { font-size: var(--fs-sm); }
.adv .over-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; }

.adv .year-picker,
.adv .year-fields,
.adv .year-overridden { display: block; }
.adv .year-picker {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: var(--sp-2);
  align-items: center;
  margin: 0 0 12px;
  max-width: 280px;
}
.adv .year-step,
.adv .year-picker select {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-input);
}
.adv .year-step { padding: 0; font-size: var(--fs-h3); line-height: 1; cursor: pointer; }
.adv .year-picker select { width: 100%; padding: 0 var(--sp-2); }
.adv .year-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2) var(--sp-4);
  margin: 0 0 12px;
}
.adv .year-field { display: grid; gap: var(--sp-1); margin: 0; font-size: var(--fs-body); }
.adv .year-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-input);
  padding: 0 var(--sp-2);
  font-variant-numeric: tabular-nums;
}
.adv .year-field input.touched { border-color: var(--ink); }
.adv .year-overridden {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-2);
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: var(--fs-body);
}
.adv .year-overridden-label { letter-spacing: 0.04em; text-transform: uppercase; font-size: var(--fs-meta); }
.adv .year-jumps { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.adv .year-jump {
  min-height: 32px;
  padding: 0 var(--sp-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: var(--fs-body);
}
.adv .year-jump:hover { border-color: var(--ink); }
.adv .year-grid-toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  padding: 0 var(--sp-3);
  min-height: 44px;
  font-size: var(--fs-body);
  cursor: pointer;
  color: var(--ink);
}
.adv .year-grid-wrap { margin-top: 4px; max-width: 100%; min-width: 0; }
.adv .year-grid-wrap .year-scroll,
.adv .year-grid-wrap .year-more { display: none; }
.adv.year-grid-open .year-grid-wrap .year-scroll { display: block; max-height: 420px; overflow: auto; }
.adv.year-grid-open .year-grid-wrap .year-more { display: block; }
.adv .adv-grid.year-stage {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  grid-template-areas:
    "controls effect"
    "controls chart"
    "grid grid";
  gap: var(--sp-2) var(--sp-5);
  margin-top: 12px;
  align-items: start;
}
.adv .year-stage .adv-controls { grid-area: controls; }
.adv .year-stage .year-effect { grid-area: effect; margin: 0; }
.adv .year-stage .adv-viz { grid-area: chart; }
.adv .year-stage .year-grid-wrap { grid-area: grid; }
.adv.year-narrow .year-stage {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  /* C3-09 (3-2 R2 QA repair): this rule only changed display (flex, so the two-column grid never
     renders visually at narrow widths) but never redeclared grid-template-columns, so the earlier
     .adv .adv-grid.year-stage rule (equal specificity, three classes each) kept "supplying" that
     property to getComputedStyle even though it had no visual effect under display:flex. A real
     regression this masked: the advanced/before-after bars this grid hosts still measured their own
     width against a stale two-column basis and rendered at ~3.8px. Redeclare it explicitly. */
  grid-template-columns: minmax(0, 1fr);
}
.adv.year-narrow .year-effect { order: 1; }
.adv.year-narrow .year-effect,
.adv.year-narrow .effect-fig,
.adv.year-narrow .effect-baseline { width: 100%; max-width: none; align-self: stretch; flex: 1 0 100%; }
.adv.year-narrow .adv-controls { order: 2; }
.adv.year-narrow .adv-viz { order: 3; }
.adv.year-narrow .year-grid-wrap { order: 4; }
.adv.year-narrow .year-fields { grid-template-columns: 1fr; }
.adv.year-narrow .year-picker { max-width: none; }
.adv .year-more {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: var(--fs-sm);
}
.adv .year-more[hidden] { display: none; }
.adv table.year-plan {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}
.adv table.year-plan th:nth-child(1) { width: 8%; }
.adv table.year-plan th:nth-child(2),
.adv table.year-plan th:nth-child(3) { width: 20%; }
.adv table.year-plan th:nth-child(4),
.adv table.year-plan th:nth-child(5) { width: 26%; }
.adv table.year-plan th,
.adv table.year-plan td { white-space: nowrap; }
.adv table.year-plan thead th:first-child { color: var(--ink-3); }
.adv table.year-plan th:first-child,
.adv table.year-plan td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--paper);
  min-width: 0;
}
.adv table.year-plan td input {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  font-size: var(--fs-input);
  font-variant-numeric: tabular-nums;
  overflow: visible;
  box-sizing: border-box;
}
.adv table.year-plan td:nth-child(4) input,
.adv table.year-plan td:nth-child(5) input { width: 100%; min-width: 0; max-width: 100%; }
.adv .scroll.year-scroll { max-width: 100%; overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; }
.adv-file { overflow: hidden; }
@media (max-width: 900px) {
  .adv table.year-plan {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
  }
  .adv table.year-plan th:nth-child(n),
  .adv table.year-plan td:nth-child(n) { width: auto; }
  .adv table.year-plan th:first-child,
  .adv table.year-plan td:first-child { min-width: 44px; }
  .adv table.year-plan td input {
    font-size: var(--fs-input);
    width: 13ch;
    min-width: 12ch;
    max-width: none;
  }
  .adv table.year-plan td:nth-child(4) input,
  .adv table.year-plan td:nth-child(5) input { width: 15ch; min-width: 14ch; }
  .adv .scroll.year-scroll { max-height: none; overflow-x: auto; overflow-y: visible; }
}
@media (max-width: 600px) {
  .adv-grid, .adv .adv-grid { grid-template-columns: minmax(0, 1fr); }
  .adv-viz, .adv svg.chart { width: 100%; max-width: 100%; }
  .adv.year-narrow.year-grid-open .year-scroll { overflow-x: auto; max-height: 360px; }
  .adv.year-narrow .year-dots {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-1);
    margin: -4px 0 12px;
    min-height: 10px;
  }
  .adv.year-narrow .year-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--r-round);
    background: var(--ink);
  }
}

.adv.year-wide .adv-head { gap: var(--sp-1) var(--sp-4); }
.adv.year-wide h2 { font-size: var(--fs-h3); }
.adv.year-wide .purpose:empty { display: none; }
.adv.year-wide .year-note { margin: 4px 0 0; font-size: var(--fs-sm); }
.adv.year-wide .adv-grid.year-stage { margin-top: 8px; gap: var(--sp-1) var(--sp-5); }
.adv.year-wide .year-fields { gap: var(--sp-1) var(--sp-3); margin-bottom: 8px; }
.adv.year-wide .year-picker { margin-bottom: 8px; }
.adv.year-wide svg.chart { max-height: 220px; }
