/* The prediction pages, on top of site.css (compu-flair.com's stylesheet, unchanged).
   Blue = this plan / ours, grey = the benchmark (the best plan, Everest), as on the site. */
.hero-plain { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.hero-plain .versus { margin: 0; grid-template-columns: 1fr; gap: var(--space-l); }
@media (max-width: 860px) { .hero-plain .versus { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.button-quiet { margin-left: 0; }
button.button { border: 0; cursor: pointer; font-family: inherit; }

.plan-picker { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s); color: var(--muted); margin-bottom: var(--space-l); }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-weight: 500; }
.chip:hover { border-color: var(--ink); }
.chip.is-current { border-color: var(--ours); box-shadow: inset 0 0 0 1px var(--ours); }

.grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 var(--space-l); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
thead th { font-size: 0.85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
tbody th { font-weight: 600; white-space: nowrap; }
th small, td small { display: block; font-weight: 400; font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.controls td.kind { color: var(--muted); white-space: nowrap; }
.controls input {
  width: 100%; min-width: 84px; padding: 8px 10px; font: inherit; font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; text-align: right;
}
.controls input:hover { border-color: var(--muted); }
.controls input.invalid { border-color: var(--ink); border-width: 2px; }
.form-error { border-left: 3px solid var(--ink); padding: var(--space-s) var(--space-m); background: var(--paper); }

.result { margin-top: var(--space-l); }
.result-head { margin-bottom: var(--space-l); }
.npv { border-top: 3px solid var(--ours); padding-top: var(--space-m); max-width: 640px; }
.npv .versus-value { color: var(--ours); }
.npv .versus-value small { font-size: 0.45em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.objectives .num { text-align: right; white-space: nowrap; }
.objectives .err { color: var(--muted); font-size: 0.92rem; }
.verdict { white-space: nowrap; }
.verdict.better::before, .verdict.worse::before, .verdict.same::before { display: inline-block; width: 1.1em; font-weight: 700; }
.verdict.better::before { content: "↑"; color: var(--ours); }
.verdict.worse::before { content: "↓"; color: var(--bench); }
.verdict.same::before { content: "="; color: var(--bench); }
.verdict.within::before { display: inline-block; width: 1.1em; font-weight: 700; content: "≈"; color: var(--bench); }
.result .subhead { margin-top: var(--space-xl); }

.chart-key { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.92rem; color: var(--ink); }
.chart-key span { display: inline-flex; align-items: center; gap: 8px; }
.chart-key svg { width: 24px; height: 6px; }
.chart-key .muted { color: var(--muted); }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l); }
@media (max-width: 760px) { .charts { grid-template-columns: 1fr; } }
.chart { position: relative; margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: var(--space-m); }
.chart figcaption { font-size: 0.95rem; margin-bottom: 6px; }
.chart figcaption span { color: var(--muted); }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; }
.ln-plan, .ln-best { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ln-plan { stroke: var(--ours); }
.ln-best { stroke: var(--bench); stroke-dasharray: 5 4; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.tip {
  position: absolute; top: 40px; pointer-events: none; z-index: 2;
  background: var(--ink); color: var(--paper); border-radius: 6px; padding: 6px 10px;
  font-size: 0.85rem; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums;
}

.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l); }
.figure-grid .wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .figure-grid { grid-template-columns: 1fr; } }

.hero-head { margin-top: 0; text-align: center; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; }
.hero-head small { display: block; margin-top: var(--space-s); font-size: 0.45em; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.header-tag { margin: 0; text-align: right; }
.hero .actions.hero-cta { grid-column: 1 / -1; justify-content: center; }

/* Hero in one column: button, title, then the two NPVs side by side, all centered */
.hero .wrap.hero-plain { grid-template-columns: 1fr; justify-items: center; gap: var(--space-l); }
.hero-plain .versus { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 760px); text-align: center; }
.hero-plain .versus-note { margin: 0 auto; }
@media (max-width: 560px) { .hero-plain .versus { grid-template-columns: 1fr; } }
/* the figures follow the hero directly, without a dividing line */
.hero:has(.hero-plain) { border-bottom: 0; }
#figures { padding-top: 0; }
.section-title { margin-bottom: var(--space-l); }
.stale-note { border-left: 3px solid var(--ours); padding: var(--space-s) var(--space-m); background: var(--paper); color: var(--ink); font-weight: 500; }
.result.is-stale .result-head, .result.is-stale .grid-scroll, .result.is-stale .charts, .result.is-stale .results-note { opacity: 0.45; }
button.button:disabled { opacity: 0.7; cursor: progress; }

/* How we build your model: three stages joined by arrows (stacked on narrow screens) */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.how { padding-top: 0; }
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) 40px minmax(0, 0.85fr); align-items: stretch; gap: var(--space-m); }
.stage { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: var(--space-l); display: flex; flex-direction: column; }
.stage.agent { border: 2px solid var(--ours); }
.stage-label { margin: 0 0 var(--space-m); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ours); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-m); }
.step { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: start; }
.agent .step { grid-template-columns: auto 1fr; }
.step strong { display: block; font-size: 1.02rem; line-height: 1.3; }
.step span:not(.step-num) { display: block; color: var(--muted); font-size: 0.95rem; line-height: 1.45; margin-top: 2px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--ours); color: var(--ours-ink); font-weight: 700; font-size: 0.9rem; display: grid; place-items: center; }
.icon { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.agent .icon { stroke: var(--ours); }
.loop { margin: auto 0 0; padding-top: var(--space-m); border-top: 1px dashed var(--rule); display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.92rem; }
.loop svg { width: 20px; height: 20px; fill: none; stroke: var(--ours); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.arrow { display: grid; place-items: center; }
.arrow svg { width: 40px; height: 24px; fill: none; stroke: var(--bench); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.mock { border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--paper); }
.mock-bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; border-bottom: 1px solid var(--rule); background: var(--surface); }
.mock-bar span { width: 7px; height: 7px; border-radius: 50%; background: var(--rule); }
.mock-bar em { margin-left: auto; font-style: normal; font-size: 0.75rem; color: var(--muted); }
.mock-body { padding: var(--space-m); display: grid; justify-items: center; gap: 2px; text-align: center; }
.mock-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.mock-value { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ours); line-height: 1.1; }
.mock-note { font-size: 0.75rem; color: var(--muted); }
.mock-button { margin-top: 8px; padding: 5px 12px; border-radius: 5px; background: var(--ours); color: var(--ours-ink); font-size: 0.8rem; font-weight: 600; }
.mock-chart { width: 100%; margin-top: 10px; fill: none; stroke-width: 2; stroke-linecap: round; }
.mock-plan { stroke: var(--ours); }
.mock-best { stroke: var(--bench); stroke-dasharray: 4 3; }
.result-note { margin: var(--space-m) 0 0; color: var(--muted); font-size: 0.95rem; }
.result-note strong { color: var(--ink); }

@media (max-width: 980px) {
  .flow { grid-template-columns: 1fr; }
  .arrow svg { transform: rotate(90deg); }
  .arrow { height: 28px; }
}
th small { font-variant-numeric: normal; }   /* tabular figures widen the comma in "million USD, ..." */
.nth { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-left: var(--space-s); }
.nth input { width: 84px; padding: 6px 10px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; }
.nth small { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 640px) { .site-header .wrap { flex-wrap: wrap; row-gap: 0; } }

/* "Live case studies" drop-down in the header (a <details>, works without JavaScript) */
.nav { align-items: center; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 0.97rem; display: inline-flex; align-items: center; gap: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.menu[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.menu summary:hover, .menu[open] summary { color: var(--ink); }
.menu ul {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; min-width: 190px; margin: 0; padding: 6px;
  list-style: none; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 40, 60, 0.12);
}
.menu li a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.menu li a:hover, .menu li a:focus-visible { background: var(--paper); }
@media (prefers-reduced-motion: reduce) { .menu summary::after { transition: none; } }
@media (max-width: 640px) { .menu ul { left: 0; right: auto; } .nav .menu li a { display: block; } }   /* site.css hides .nav links on phones */

/* "Try it live": the case-study fields drop down on hover, focus or tap */
.try-live { position: relative; display: inline-block; }
.try-live > button { font: inherit; font-weight: 600; font-size: 1.02rem; line-height: inherit; border: 0; cursor: pointer; }
.try-live > button::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 10px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg); transition: transform .15s;
}
.try-live:hover > button::after, .try-live:focus-within > button::after { transform: translateY(1px) rotate(-135deg); }
.try-list {                                   /* padding-top bridges the gap, so the hover is not lost */
  position: absolute; left: 0; top: 100%; z-index: 5; padding-top: 10px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.try-live:hover .try-list, .try-live:focus-within .try-list { opacity: 1; visibility: visible; transform: none; }
.try-panel {
  list-style: none; margin: 0; padding: 6px; min-width: 300px; display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(20, 40, 60, 0.14);
}
.try-panel a {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px;
  padding: 12px 14px; border-radius: 7px; color: var(--ink); text-decoration: none;
}
.try-panel a::after { content: "→"; grid-row: 1 / span 2; grid-column: 2; color: var(--ours); font-weight: 600; transition: transform .15s; }
.try-panel a:hover, .try-panel a:focus-visible { background: var(--paper); }
.try-panel a:hover::after { transform: translateX(3px); }
.try-name { font-weight: 600; }
.try-facts { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {                    /* phones: the panel spans the button row, not the button */
  .hero .actions:has(.try-live) { position: relative; }
  .try-live { position: static; }
  .try-list { right: 0; }
  .try-panel { min-width: 0; }
  .try-facts { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .try-list, .try-live > button::after, .try-panel a::after { transition: none; } }
/* the hero clips its wide reservoir map; clip only sideways so the drop-down can open below it */
.hero:has(.try-live) { overflow-x: clip; overflow-y: visible; }
.hero:has(.try-live) .wrap { position: relative; z-index: 1; }
.section-head h2 small { display: block; margin-top: var(--space-s); font-size: 0.5em; font-weight: 500; letter-spacing: 0; color: var(--muted); }
/* yellow highlight: a deep amber on the light page (pale yellow is unreadable there), bright yellow in dark mode */
:root { --highlight: #a16207; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --highlight: #facc15; } }
:root[data-theme="dark"] { --highlight: #facc15; }
.section-head h2 small.highlight { color: var(--highlight); font-weight: 600; }
.stage-label-num { display: flex; align-items: center; gap: 10px; }
.stage-label-num .step-num { letter-spacing: 0; }
/* "Try live" in the "You get" card: the panel spans the card */
.stage.outcome { position: relative; }
.try-card { position: static; margin-top: var(--space-m); }
.try-card .try-list { left: var(--space-m); right: var(--space-m); top: auto; }
.try-card .try-panel { min-width: 0; }
.try-card .try-facts { white-space: normal; }
.field-tag { margin: var(--space-s) 0 0; text-align: center; color: var(--highlight); }
.versus-note.highlight { color: var(--highlight); font-weight: 600; }
.section-head p .highlight { color: var(--highlight); font-weight: 600; }
.site-footer .credits { font-size: 0.82rem; color: var(--muted); max-width: 100ch; }
.site-footer .credits a { color: inherit; }
