/* SWOT Tank Water Tracker: shared site styles. Colours match the proposal deck. */
:root {
  color-scheme: light;
  --page: #f8f5ef; --surface: #fffdf9; --surface-2: #f2ede3;
  --ink: #1d2a33; --ink-2: #4c5961; --muted: #626b70;
  --rule: #e7e0d3; --grid: #ede7db; --axis: #cfc6b6;
  --navy: #0b2230; --navy-2: #12384d; --on-navy: #ffffff; --on-navy-2: #c9d6de;
  --blue: #2a78d6; --orange: #eb6834; --aqua: #1baf7a;
  --blue-strong: #1c5cab; --orange-strong: #b9481b; --link: #1c5cab;
  --blue-wash: rgba(42, 120, 214, .10); --orange-wash: rgba(235, 104, 52, .13);
  --focus: #1c5cab;
  --shadow: 0 1px 2px rgba(11, 34, 48, .06), 0 6px 18px rgba(11, 34, 48, .06);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0b141a; --surface: #12202a; --surface-2: #172a36;
    --ink: #e8eef2; --ink-2: #b4c2cb; --muted: #8c9ba5;
    --rule: #23343f; --grid: #1e2e38; --axis: #34485a;
    --navy: #081a24; --navy-2: #12384d;
    --blue: #3987e5; --orange: #d95926; --aqua: #199e70;
    --link: #8ec9f0;
    --blue-wash: rgba(57, 135, 229, .15); --orange-wash: rgba(217, 89, 38, .17);
    --focus: #8ec9f0;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }
.small { font-size: .88rem; color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 70ch; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6em; }

/* header and navigation */
.top { background: var(--navy); color: var(--on-navy); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; min-height: 60px; padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--on-navy); text-decoration: none; font-weight: 700; font-size: 1.02rem; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-left: auto; }
.nav a { color: var(--on-navy-2); text-decoration: none; padding: 7px 12px; border-radius: 999px; font-size: .95rem; }
.nav a:hover { color: var(--on-navy); background: rgba(255, 255, 255, .08); }
.nav a[aria-current="page"] { color: var(--on-navy); background: rgba(255, 255, 255, .14); font-weight: 600; }
@media (max-width: 640px) { .nav { margin-left: 0; width: 100%; } .nav a { padding: 6px 10px; } }

/* hero */
.hero { position: relative; background: var(--navy); color: var(--on-navy); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: url("img/hero.jpg") center / cover no-repeat; opacity: .9; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8, 26, 36, .94) 0%, rgba(8, 26, 36, .82) 45%, rgba(8, 26, 36, .35) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: clamp(56px, 9vw, 110px); padding-bottom: clamp(48px, 7vw, 90px); }
.hero h1 { font-size: clamp(2.1rem, 5.6vw, 3.6rem); max-width: 21ch; margin-bottom: .35em; }
.hero p { color: var(--on-navy-2); max-width: 46ch; font-size: clamp(1.05rem, 2.2vw, 1.3rem); }
.hero .meta { font-size: .95rem; color: var(--on-navy-2); margin-top: 1.4em; }
.hero .credit { position: absolute; right: 16px; bottom: 10px; z-index: 1; font-size: .72rem; color: rgba(255, 255, 255, .7); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 650; text-decoration: none; border: 2px solid transparent; font-size: 1rem; cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--blue-strong); color: #fff; }
.btn.ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn.line { border-color: var(--blue); color: var(--ink); background: transparent; }

/* page title band (inner pages) */
.band { background: var(--navy); color: var(--on-navy); }
.band .wrap { padding-top: 44px; padding-bottom: 40px; }
.band h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.band p { color: var(--on-navy-2); max-width: 70ch; margin: 0; font-size: 1.08rem; }

/* sections */
section { padding: clamp(44px, 6vw, 72px) 0; }
section + section { border-top: 1px solid var(--rule); }
.section-head { max-width: 760px; margin-bottom: 28px; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.tile .value { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.1; color: var(--ink); }
.tile .value .unit { font-size: .5em; font-weight: 600; color: var(--ink-2); margin-left: .2em; }
.tile .label { margin: .4em 0 .6em; color: var(--ink-2); }
.tile .src { font-size: .82rem; color: var(--muted); }
.tile .key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.callout { margin-top: 22px; font-size: 1.15rem; font-weight: 650; color: var(--ink); padding-left: 14px; border-left: 4px solid var(--orange); }

/* problem statement and cards */
.statement { background: var(--navy); color: var(--on-navy); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 22px; }
.statement .eyebrow { color: #8fc1f2; }
.statement p { font-size: clamp(1.15rem, 2.4vw, 1.45rem); font-weight: 650; margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.card h3 { display: flex; align-items: center; gap: 12px; }
.card p { color: var(--ink-2); margin-bottom: .5em; }
.icon { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--blue); color: #fff; flex: none; }
.icon svg { width: 20px; height: 20px; }
.icon.orange { background: var(--orange); }
.icon.aqua { background: var(--aqua); }

/* how it works */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; position: relative; box-shadow: var(--shadow); }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue-strong); color: #fff; font-weight: 700; margin-bottom: 10px; }
.steps li:last-child::before { background: var(--orange-strong); }
.steps p { color: var(--ink-2); margin: 0; }

/* pictures */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.shot { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.shot img { width: 100%; aspect-ratio: 640 / 675; object-fit: cover; }
.shot figcaption { padding: 12px 16px 14px; }
.shot .big { font-size: 1.35rem; font-weight: 700; }
.shot .sub { color: var(--ink-2); }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.map { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); background: #fff; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.facts li { display: flex; gap: 14px; align-items: flex-start; }
.facts b { display: block; }
.facts span { color: var(--ink-2); }

/* team */
.members { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.member { background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--c, var(--blue)); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.member .who { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.member h3 { margin: .3em 0 .5em; font-size: 1.3rem; }
.pill { display: inline-block; font-size: .82rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 2px solid var(--c, var(--blue)); color: var(--ink); margin: 0 6px 10px 0; }
.pill.stretch { border: 1.5px dashed var(--muted); color: var(--ink-2); }
.member ul { padding-left: 1.1em; margin: 0 0 .8em; color: var(--ink-2); }
.member .out { border-top: 1px solid var(--rule); padding-top: 10px; font-size: .95rem; }
.shared { margin-top: 16px; background: var(--navy); color: var(--on-navy); border-radius: var(--radius); padding: 16px 22px; }

/* explore links */
.explore { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.explore a { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: transform .15s; }
.explore a:hover { transform: translateY(-2px); border-color: var(--blue); }
.explore b { display: block; font-size: 1.15rem; margin-bottom: .3em; }
.explore span { color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .explore a { transition: none; } .explore a:hover { transform: none; } }

/* footer */
.foot { background: var(--navy); color: var(--on-navy-2); padding: 34px 0; font-size: .9rem; }
.foot a { color: #8fc1f2; }
.foot h2 { font-size: 1rem; color: var(--on-navy); margin-bottom: .6em; }
.foot ul { margin: 0 0 1em; padding-left: 1.1em; }

/* reservoir picker and charts (Real SWOT data page) */
.picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.picker button { font: inherit; font-size: .95rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; }
.picker button:hover { border-color: var(--blue); }
.picker button[aria-selected="true"] { background: var(--blue-strong); border-color: var(--blue-strong); color: #fff; }
.notes { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.notes li { padding: 10px 14px; border-left: 4px solid var(--orange); background: var(--surface); border-radius: 0 10px 10px 0; color: var(--ink); }
.chart { margin: 22px 0 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 18px 8px; box-shadow: var(--shadow); }
.chart h3 { margin: 0; }
.chart .plot { position: relative; margin-top: 10px; touch-action: pan-y; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--blue-wash); }
.chart .dot { fill: var(--blue); stroke: var(--surface); stroke-width: 2; }
.chart .band { fill: var(--orange-wash); }
.chart .band-label { fill: var(--ink-2); font-size: 12px; font-weight: 600; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; }
.chart .focus { fill: var(--blue); stroke: var(--surface); stroke-width: 3; }
.tip { position: absolute; top: 0; pointer-events: none; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .14); font-size: .88rem; white-space: nowrap; z-index: 2; }
.tip strong { display: block; font-size: 1.05rem; color: var(--ink); }
.tip .k { display: inline-block; width: 14px; height: 2px; background: var(--blue); vertical-align: middle; margin-right: 6px; }
.tip .d { color: var(--muted); }
.empty { padding: 26px 6px 30px; color: var(--ink-2); }
.tablewrap { margin-top: 22px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 18px; }
.tablewrap summary { cursor: pointer; font-weight: 600; }
.scrollx { overflow-x: auto; margin-top: 12px; }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .92rem; }
table.data th, table.data td { padding: 6px 10px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* cost calculator */
.calc { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.presets button { font: inherit; font-size: .95rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; }
.presets button:hover { border-color: var(--blue); }
.presets button[aria-pressed="true"] { background: var(--blue-strong); border-color: var(--blue-strong); color: #fff; }
.opt-row { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.opt-row .head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.opt-row .head label, .opt-row .head .check { font-weight: 650; }
.opt-row .price { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .92rem; }
.opt-row p { margin: .35em 0 .5em; color: var(--ink-2); font-size: .95rem; }
.opt-row input[type="range"] { width: 100%; accent-color: var(--blue-strong); height: 28px; }
.count { font-weight: 700; font-variant-numeric: tabular-nums; }
.check { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--blue-strong); margin: 0; }
.summary { position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
@media (max-width: 900px) { .summary { position: static; } }
.summary .hero-figure { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 700; line-height: 1.1; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; margin: 14px 0; }
.summary dt { color: var(--ink-2); }
.summary dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary h3 { margin-top: 1em; font-size: 1rem; }
.summary ul { padding-left: 1.1em; color: var(--ink-2); margin: .3em 0 0; }
.lines { list-style: none; padding: 0; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--rule); color: var(--ink-2); }
.lines li b { color: var(--ink); white-space: nowrap; }
.sources { font-size: .92rem; color: var(--ink-2); padding-left: 1.1em; }
.sources li { margin-bottom: .35em; }

/* slide viewer (Presentation page) */
.viewer { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.viewer:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.stage { position: relative; }
.stage img { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; border-radius: 8px; background: var(--surface-2); user-select: none; -webkit-user-drag: none; touch-action: pan-y; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(11, 34, 48, .74); color: #fff; display: grid; place-items: center; cursor: pointer; }
.nav-btn:hover { background: rgba(11, 34, 48, .9); }
.nav-btn:disabled { opacity: .25; cursor: default; }
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn.prev { left: 10px; }
.nav-btn.next { right: 10px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 4px 2px; }
.counter { margin: 0; font-weight: 600; }
.btn.small { padding: 7px 14px; font-size: .92rem; }
.viewer:fullscreen { background: #000; border: 0; border-radius: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; }
.viewer:fullscreen .stage img { max-height: calc(100vh - 56px); width: auto; max-width: 100%; margin: 0 auto; border-radius: 0; }
.viewer:fullscreen .bar { color: #fff; padding: 10px 18px; }
.viewer:fullscreen .bar .btn { color: #fff; border-color: rgba(255, 255, 255, .6); }
.thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 158px; gap: 10px; overflow-x: auto; padding: 14px 2px 8px; scroll-snap-type: x proximity; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; scroll-snap-align: start; text-align: left; font: inherit; font-size: .78rem; color: var(--ink-2); }
.thumbs button img { width: 100%; height: auto; border-radius: 6px; display: block; }
.thumbs button[aria-current="true"] { border-color: var(--blue); }
.thumbs .n { display: block; padding: 4px 3px 2px; line-height: 1.3; }
.thumbs button[aria-current="true"] .n { color: var(--ink); font-weight: 600; }
.downloads { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
