/* MarineFlow site — a nautical-chart look: deep water, radar cyan, brass for warnings. */
:root {
  --abyss: #030d1a;
  --deep: #061628;
  --navy: #0a2540;
  --line: #15395c;
  --foam: #e8f4fb;
  --mist: #8fb0c8;
  --cyan: #38d4ff;
  --teal: #19b5a5;
  --brass: #f0b44c;
  --signal: #ff6b5b;
  --paper: #f3efe4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--abyss);
  color: var(--foam);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .88em; background: rgba(56, 212, 255, .09); color: #bfeeff; padding: .08em .38em; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: .005em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.15rem; }
h3 small { font: 400 .78rem/1 var(--sans); color: var(--mist); margin-left: .5rem; letter-spacing: .02em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 4.5rem 1.25rem; }
.mt { margin-top: 2.6rem; }
.sub { color: var(--mist); max-width: 62ch; margin-bottom: 2rem; }
.note { color: var(--mist); font-size: .88rem; margin: .8rem 0 0; }

/* header ------------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1.25rem;
  background: rgba(3, 13, 26, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--foam); font: 600 1.1rem var(--serif); letter-spacing: .03em; }
.brand svg { color: var(--cyan); }
.brand:hover { text-decoration: none; }
.top nav { display: flex; gap: 1.1rem; align-items: center; font-size: .9rem; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.top nav a { color: var(--mist); }
.top nav a:hover { color: var(--foam); text-decoration: none; }
.top nav .gh { color: var(--abyss); background: var(--cyan); padding: .3rem .8rem; border-radius: 999px; font-weight: 600; }
@media (max-width: 820px) { .top nav a:not(.gh) { display: none; } }

/* hero --------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 5.5rem 1.25rem 4.5rem;
  background:
    radial-gradient(ellipse at 78% 20%, rgba(56, 212, 255, .16), transparent 55%),
    linear-gradient(180deg, var(--navy), var(--abyss) 85%);
  border-bottom: 1px solid var(--line);
}
.hero-copy { position: relative; max-width: 1120px; margin: 0 auto; }
.eyebrow { font: 600 .78rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin-bottom: 1.2rem; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.7rem); max-width: 22ch; margin-bottom: .6em; }
.hero h1 em { font-style: italic; color: var(--brass); }
.lede { font-size: 1.15rem; color: #c6dcea; max-width: 56ch; }
/* a seven-digit number in a monospace face needs about 12rem: size the columns for it, let a column shrink (min-width: 0) and break rather than overflow */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1.2rem 1.6rem; margin: 2.2rem 0 1rem; max-width: 980px; }
.stat { border-left: 2px solid var(--cyan); padding: .1rem .5rem .1rem .9rem; min-width: 0; }
.stat b { display: block; font: 600 clamp(1.5rem, 2.6vw, 2.1rem)/1.1 var(--mono); color: var(--foam); overflow-wrap: anywhere; }
.stat span { font-size: .8rem; color: var(--mist); letter-spacing: .04em; }
.snapshot { color: var(--mist); font-size: .84rem; max-width: 70ch; }

.radar { position: absolute; right: -140px; top: -30px; width: min(720px, 90vw); aspect-ratio: 1; color: rgba(56, 212, 255, .22); pointer-events: none; }
.radar svg { width: 100%; height: 100%; }
.sweep { position: absolute; inset: 4%; border-radius: 50%; background: conic-gradient(from 0deg, rgba(56, 212, 255, .28), rgba(56, 212, 255, 0) 22%); animation: sweep 9s linear infinite; mask: radial-gradient(circle, #000 62%, transparent 63%); -webkit-mask: radial-gradient(circle, #000 62%, transparent 63%); }
@keyframes sweep { to { transform: rotate(360deg); } }
@media (max-width: 820px) { .radar { right: -260px; opacity: .6; } }

/* bands and cards ----------------------------------------------------- */
.band { background: var(--deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.two { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .two, .three { grid-template-columns: 1fr; } }
.card { background: linear-gradient(180deg, rgba(21, 57, 92, .45), rgba(10, 37, 64, .35)); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; }
.card.hot { border-top: 3px solid var(--brass); }
.card.cold { border-top: 3px solid var(--cyan); }
.tag { display: inline-block; font: 600 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mist); margin-bottom: .8rem; }
.hot .tag { color: var(--brass); }
.cold .tag { color: var(--cyan); }
.facts { list-style: none; margin: 1rem 0 0; padding: 1rem 0 0; border-top: 1px dashed var(--line); font-size: .88rem; color: var(--mist); }
.facts li { padding: .15rem 0; }
.facts li::before { content: "› "; color: var(--cyan); }

.paper { margin: 0; background: var(--paper); border-radius: 12px; padding: 1rem; box-shadow: 0 0 0 1px #d9d2bf, 0 18px 50px rgba(0, 0, 0, .45); }
.paper img { display: block; width: 100%; height: auto; }

.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; margin: 1.8rem 0 0; }
.counters div { text-align: center; padding: 1rem .5rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(10, 37, 64, .5); }
.counters b { display: block; font: 600 1.9rem/1.1 var(--mono); color: var(--cyan); }
.counters span { font-size: .8rem; color: var(--mist); }
.counters.big b { font-size: 2.6rem; }

/* results panels ------------------------------------------------------ */
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.panel { background: var(--abyss); border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem 1.4rem 1.2rem; min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
#map { width: 100%; height: auto; display: block; border-radius: 10px; background: #020a14; }

.bars.h .row { display: grid; grid-template-columns: 8.5rem 1fr 3.8rem; align-items: center; gap: .7rem; padding: .22rem 0; font-size: .88rem; }
.bars.h .label { color: var(--foam); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars.h .track { height: 12px; background: rgba(21, 57, 92, .55); border-radius: 99px; overflow: hidden; }
.bars.h .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--cyan)); width: 0; transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.bars.h .val { font: .82rem var(--mono); color: var(--mist); text-align: right; }

.bars.v { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 1rem; border-bottom: 1px solid var(--line); }
.bars.v .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; position: relative; }
.bars.v .bar { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--cyan), var(--teal)); height: 0; transition: height 1s cubic-bezier(.2, .8, .2, 1); }
.bars.v .gap { flex: 0 0 38px; align-self: center; text-align: center; font: .68rem/1.2 var(--mono); color: var(--brass); border-left: 1px dashed var(--brass); border-right: 1px dashed var(--brass); padding: .4rem 0; }
.bars.v .tick { position: absolute; bottom: -1.5rem; font: .66rem var(--mono); color: var(--mist); white-space: nowrap; }
#timeline { margin-bottom: 1.8rem; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font: 600 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mist); padding: .55rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: .6rem .7rem; border-bottom: 1px solid rgba(21, 57, 92, .6); vertical-align: top; }
td.n, th.n { text-align: right; font-family: var(--mono); }
tr:hover td { background: rgba(56, 212, 255, .04); }
.pill { display: inline-block; padding: .08rem .55rem; border-radius: 99px; font: 600 .78rem var(--mono); }
.pill.r25 { background: rgba(255, 107, 91, .18); color: var(--signal); }
.pill.r20 { background: rgba(240, 180, 76, .18); color: var(--brass); }
.pill.r10 { background: rgba(56, 212, 255, .14); color: var(--cyan); }
.log td:first-child { min-width: 14rem; }

/* case file ----------------------------------------------------------- */
.case { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.6rem; align-items: center; }
@media (max-width: 900px) { .case { grid-template-columns: 1fr; } }
.casemap { background: #020a14; border: 1px solid var(--line); border-radius: 14px; padding: .6rem; }
.casemap svg { width: 100%; height: auto; display: block; }
.casetext .big { font: 600 clamp(2rem, 4.6vw, 3rem)/1.1 var(--mono); color: var(--brass); display: block; margin-bottom: .2rem; }
.casetext ol { padding-left: 1.2rem; color: #c6dcea; }
.casetext ol li { margin-bottom: .5rem; }
.verdict { border-left: 3px solid var(--cyan); padding: .3rem 0 .3rem 1rem; color: #c6dcea; }

/* quality, gallery, limits --------------------------------------------- */
.check { list-style: none; margin: 0; padding: 0; }
.check li { padding: .45rem 0 .45rem 1.7rem; position: relative; border-bottom: 1px dashed var(--line); }
.check li:last-child { border-bottom: 0; }
.check li::before { position: absolute; left: 0; font-weight: 700; }
.check.yes li::before { content: "✓"; color: var(--teal); }
.check.no li::before { content: "○"; color: var(--brass); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .gallery { grid-template-columns: 1fr; } }
.shot { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--abyss); }
.shot img { display: block; width: 100%; height: auto; }
.shot img.zoomable { cursor: zoom-in; transition: filter .2s; }
.shot img.zoomable:hover, .shot img.zoomable:focus-visible { filter: brightness(1.12); outline: 2px solid var(--cyan); outline-offset: -2px; }
.shot figcaption { padding: .7rem 1rem; font-size: .88rem; color: var(--mist); border-top: 1px solid var(--line); }
.shot figcaption b { color: var(--foam); }
.shot .pending { aspect-ratio: 16 / 9; display: grid; place-content: center; text-align: center; gap: .4rem; color: var(--mist); font: .84rem var(--mono); background:
  repeating-linear-gradient(135deg, rgba(21, 57, 92, .35) 0 14px, transparent 14px 28px); }
.shot .pending b { color: var(--brass); font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }

.limits { padding-left: 1.2rem; max-width: 80ch; }
.limits li { margin-bottom: .7rem; color: #c6dcea; }
.limits b { color: var(--foam); }

.run pre { background: #020a14; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.3rem; overflow-x: auto; }
.run pre code { background: none; color: #bfeeff; padding: 0; }
.btn { display: inline-block; background: var(--cyan); color: var(--abyss); font-weight: 700; padding: .65rem 1.3rem; border-radius: 999px; margin: 0 .6rem .6rem 0; }
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--cyan); border: 1px solid var(--cyan); }

footer { border-top: 1px solid var(--line); color: var(--mist); font-size: .82rem; }
footer .wrap { padding: 1.6rem 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; }

/* lightbox: the screenshot at the width of the window; "full" shows it 1:1 and scrolls */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; padding: 1rem; background: rgba(2, 10, 20, .94); backdrop-filter: blur(6px); }
.lightbox[hidden] { display: none; }
.lb-scroll { overflow: auto; max-width: 100%; max-height: calc(100vh - 5rem); border: 1px solid var(--line); border-radius: 10px; background: #020a14; touch-action: pan-x pan-y pinch-zoom; }
.lb-scroll img { display: block; width: min(1600px, calc(100vw - 2.2rem)); max-width: none; height: auto; cursor: zoom-in; }
.lightbox.full .lb-scroll img { width: 1600px; cursor: zoom-out; }
.lb-close { position: absolute; top: .8rem; right: 1rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--line); background: var(--navy); color: var(--foam); font: 400 1.7rem/1 var(--sans); cursor: pointer; z-index: 1; }
.lb-close:hover, .lb-close:focus-visible { background: var(--cyan); color: var(--abyss); outline: none; }
.lb-hint { margin: 0; font-size: .82rem; color: var(--mist); text-align: center; }
html.lb-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sweep { animation: none; }
  .bars.h .fill, .bars.v .bar { transition: none; }
}
