/* AquaModel site, modern draft. The accent throughout is AquaModel's own plume scale. */
@view-transition { navigation: auto; }

:root {
  --abyss: #06141f;
  --deep: #0b2638;
  --sea: #0f4256;
  --teal: #0b7a84;
  --foam: #bfe7e6;
  --bg: #f5f7f5;
  --surface: #ffffff;
  --tint: #e6f0ef;
  --ink: #13242e;
  --muted: #55696f;
  --line: #d6e0df;
  --link: #0a6f7a;
  --ramp: linear-gradient(90deg, #1fbf6b, #c9e01f, #f6c81b, #f0851c, #d8261c);
  --column: 1160px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(6, 20, 31, .06), 0 10px 30px -14px rgba(6, 20, 31, .22);
  --display: Archivo, "Helvetica Neue", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #081722; --surface: #0e2331; --tint: #122d3d; --ink: #e4eeee; --muted: #9db2b8; --line: #1f3b4b; --link: #6fd3d6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .6);
  }
}
:root[data-theme=dark] {
  --bg: #081722; --surface: #0e2331; --tint: #122d3d; --ink: #e4eeee; --muted: #9db2b8; --line: #1f3b4b; --link: #6fd3d6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
img.fit { object-fit: cover; }
a { color: var(--link); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid #f6c81b; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-stretch: 108%; line-height: 1.15; letter-spacing: -.01em; }
figure { margin: 0; }
figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; background: #fff; color: #000; }
.skip:focus { left: 8px; }
[id] { scroll-margin-top: 96px; }
.center { text-align: center; }
.small { font-size: 14px; }
.zoom img { cursor: zoom-in; }

/* scroll-in: only when scripts run and motion is welcome */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(6, 20, 31, .86); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); color: #fff; view-transition-name: site-header; }
.site-header .wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; gap: 28px; transition: height .25s; }
.site-header.small-head .wrap { height: 54px; }
.brand { display: block; flex: none; padding: 3px 7px; background: #e9f4f4; border-radius: 8px; line-height: 0; }
.brand img { width: 84px; height: auto; }
.site-nav { display: flex; gap: 2px; flex: 1; }
.site-nav .item { position: relative; }
.site-nav .item > a { display: block; padding: 9px 13px; border-radius: 8px; font: 600 15px/1 var(--display); color: #dbe8ea; text-decoration: none; transition: background .15s, color .15s; }
.site-nav .item > a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.site-nav .item > a.current { color: #fff; box-shadow: inset 0 -2px 0 #f6c81b; border-radius: 8px 8px 0 0; }
.site-nav .sub { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; margin: 0; padding: 8px; list-style: none; background: var(--deep); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .6); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s; }
.site-nav .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.site-nav .has-sub:hover .sub, .site-nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub a { display: block; padding: 8px 12px; border-radius: 7px; font-size: 15px; color: #dbe8ea; text-decoration: none; }
.site-nav .sub a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.site-nav .sub a[aria-current] { color: #f6c81b; }
.sub-toggle, .tools .menu-toggle { display: none; }
.tools { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.tools button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px; background: none; color: #dbe8ea; cursor: pointer; }
.tools button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.easy-mark { margin-left: 8px; line-height: 0; }
.easy-mark img { width: 92px; height: auto; }
.progress { height: 2px; }
.progress span { display: block; height: 100%; width: 100%; background: var(--ramp); transform: scaleX(0); transform-origin: left; }

/* ---------- Page opening: text on the deep side, picture dissolving into it ---------- */
.page-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 400px !important; background: var(--abyss); color: #eaf3f4; overflow: hidden; isolation: isolate; }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ramp); }
.page-head .panel { order: 1; z-index: 2; background: none; padding: clamp(36px, 5vw, 72px) 24px clamp(36px, 5vw, 64px) max(24px, calc((100vw - var(--column)) / 2 + 24px)); align-self: center; }
.page-head > .photo, .page-head > .slideshow { order: 2; position: relative; min-height: 100%; background-color: var(--deep); background-position: center; background-size: cover; background-repeat: no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent, #000 34%); mask-image: linear-gradient(90deg, transparent, #000 34%); }
video.photo { width: 100%; height: 100%; object-fit: cover; }
.page-head > div:empty:not(.photo) { display: none; }
.page-head h1 { margin: 0 0 16px; font-size: clamp(32px, 4.2vw, 52px); font-weight: 700; color: #fff; }
.page-head h1 .sub { display: block; margin-top: 6px; font-size: .5em; font-weight: 500; color: var(--foam); }
.page-head p { margin: 0 0 14px; font-size: 18px; line-height: 1.55; color: #c9dadd; }
.page-head a { color: var(--foam); }
.page-head b, .page-head i b, .page-head b i { color: #fff; }
.crumb { margin: 0 0 14px !important; font: 500 13px/1 var(--mono) !important; letter-spacing: .08em; text-transform: uppercase; color: #f6c81b !important; }
.panel .subtitle { font-size: 20px; color: var(--foam); }

/* ---------- Reading column ---------- */
.content { max-width: var(--column); margin: 0 auto; padding: 48px 24px 56px; }
.content > p, .content > ul, .content > ol, .content > h2, .content > h3 { max-width: 650px; }
.content p { margin: 0 0 18px; }
.content ul, .content ol { margin: 0 0 18px; padding-left: 24px; }
.content li { margin-bottom: 6px; }
.content h2 { margin: 44px 0 12px; font-size: 28px; font-weight: 700; }
.content h3 { margin: 28px 0 8px; font-size: 20px; font-weight: 700; }
.content > :first-child { margin-top: 0; }
/* Text and single figures sit in one centered column; wider blocks use the full width */
.content > p, .content > ul, .content > ol, .content > h2, .content > h3 { margin-inline: auto; }
.content > p.center, .content > p.pic { max-width: none; }
.justify p, p.justify, .two-cols li { text-align: left; }

/* Contents beside long pages, following the reader */
.content:has(> .toc) { display: grid; grid-template-columns: minmax(0, 760px) 240px; column-gap: 48px; justify-content: center; }
.content:has(> .toc) > * { grid-column: 1; }
.content:has(> .toc) > p, .content:has(> .toc) > ul, .content:has(> .toc) > ol, .content:has(> .toc) > h2, .content:has(> .toc) > h3 { max-width: none; margin-inline: 0; }
.content > .toc { grid-column: 2; grid-row: 1 / span 400; position: sticky; top: 92px; align-self: start; margin-top: 0; max-height: calc(100vh - 110px); overflow: auto; font-size: 15px; border-left: 2px solid var(--line); padding-left: 16px; }
.toc p { margin: 0 0 8px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 4px 0; color: var(--muted); text-decoration: none; line-height: 1.3; }
.toc a:hover { color: var(--ink); }
.toc a.here { color: var(--link); font-weight: 600; }

/* ---------- Home ---------- */
.hero { position: relative; min-height: min(86vh, 760px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; padding: 48px max(24px, calc((100vw - 1240px) / 2)); background: radial-gradient(120% 90% at 80% 10%, #0f4256 0%, #0b2638 38%, #06141f 75%); overflow: hidden; isolation: isolate; color: #fff; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ramp); }
#plume { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero h1 { margin: 0; font-weight: 400; }
.hero h1 span { display: block; }
.hero h1 .big { font-size: clamp(48px, 6.3vw, 96px); font-weight: 800; font-stretch: 112%; letter-spacing: -.03em; line-height: .95; }
.hero h1 span:not(.big) { margin-top: 18px; font: 500 clamp(21px, 2.3vw, 30px)/1.2 var(--display); color: #dcebec; }
.hero .tagline { margin: 4px 0 0; font: 500 clamp(21px, 2.3vw, 30px)/1.2 var(--display); color: var(--foam); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
/* Arrow at the foot of the home page's top section: there is more below. Fades once the page is scrolled. */
.scroll-cue { position: absolute; left: 50%; bottom: 20px; z-index: 2; width: 44px; height: 44px; margin-left: -22px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .6); background: rgba(6, 20, 31, .5); color: #fff; animation: cue-bob 2.4s ease-in-out infinite; transition: opacity .4s, background .2s; }
.scroll-cue:hover { background: rgba(255, 255, 255, .16); }
.scroll-cue svg { width: 22px; height: 22px; }
.scroll-cue.gone { opacity: 0; pointer-events: none; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
#more { scroll-margin-top: 64px; }
.hero .slideshow { aspect-ratio: 4 / 3; border-radius: 18px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7); outline: 1px solid rgba(255, 255, 255, .14); }
.home-video { background: var(--abyss); padding: 56px 24px; }
.home-video video { display: block; width: 100%; max-width: 1040px; margin: 0 auto; border-radius: var(--radius); background: #000; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8); }
.fade-bar { display: none; }
.home-text > p { max-width: 76ch; }
.feature-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); min-height: 340px !important; margin: 56px 0 0; background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.feature-row:nth-of-type(even) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.feature-row:nth-of-type(even) .panel { order: 2; }
.feature-row .panel { display: flex; flex-direction: column; justify-content: center; padding: 36px 40px; background: none; color: var(--ink); text-align: left; }
.feature-row h2 { margin: 0 0 12px; font-size: 30px; }
.feature-row p { margin: 0 0 12px; }
.feature-row ul { margin: 0; padding-left: 20px; }
.feature-row .photo { min-height: 260px; background: var(--deep) center / cover no-repeat; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.feature-row:hover .photo { transform: scale(1.035); }
.more { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-top: 8px; font: 600 16px/1.2 var(--display); color: var(--link); text-decoration: none; }
.more::after { content: "\2192"; transition: transform .2s; }
.more:hover::after { transform: translateX(4px); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-width: 150px; padding: 13px 24px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; font: 600 16px/1 var(--display); text-decoration: none; transition: background .15s, transform .15s; }
.button:hover { background: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.button.primary { border-color: #f6c81b; background: #f6c81b; color: #06141f; }
.button.primary:hover { background: #ffd84a; }

/* Cards (Overview, Description, Architecture) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 32px 0 8px; }
.cards .card { position: relative; display: flex; flex-direction: column; padding: 24px 22px 22px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s; }
.cards .card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ramp); }
.cards .card:hover { transform: translateY(-3px); }
.cards .card h3 { margin: 0 0 10px; font-size: 21px; }
.cards .card .body { flex: 1; display: flex; flex-direction: column; font-size: 16px; }
.cards .card .body p { margin: 0 0 10px; }
.cards .card .links { list-style: none; margin: 0; padding: 0; }
.cards .card .links li { margin: 0; border-bottom: 1px solid var(--line); }
.cards .card .links li:last-child { border: 0; }
.cards .card .links a { display: flex; justify-content: space-between; padding: 8px 0; color: var(--ink); font-weight: 600; text-decoration: none; }
.cards .card .links a::after { content: "\2192"; color: var(--link); }
.cards .card .links a:hover { color: var(--link); }
.cards .card .go { align-self: flex-start; margin-top: auto; font: 600 15px/1.2 var(--display); color: var(--link); text-decoration: none; }
.cards .card .go::after { content: " \2192"; }

/* Case studies: the text is simply there, no hovering needed */
.reveal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); margin: 0 0 28px; background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.reveal .label { display: flex; align-items: flex-end; padding: 28px; background: var(--deep); color: #fff; font: 700 27px/1.15 var(--display); }
.reveal .photo { min-height: 220px; background: var(--deep) center / cover no-repeat; }
.reveal .back { grid-column: 1 / -1; padding: 26px 28px 28px; }
.reveal .back p:last-child { margin-bottom: 0; }
.case-figure { display: grid; grid-template-columns: 1fr minmax(0, 556px); gap: 28px; align-items: center; margin-top: 18px; }
.case-figure p { font-size: 15px; }
.case-figure img { width: 100%; border-radius: 8px; }
.case-strip { height: 200px; margin-top: 18px; border-radius: 10px; background: center 35% / cover no-repeat; }

/* Pictures beside text */
.figures-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.figure-row { display: flex; gap: 36px; align-items: center; margin: 24px 0; }
.figure-row > div { flex: 1; min-width: 0; }
.figure-row > img, .figure-row > figure { flex: 0 1 auto; max-width: 52%; border-radius: 10px; }
.figure-row > figure img { border-radius: 10px; }
.figure-row.tight { justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin: 0; }
.figure-row.tight > img { max-width: 100%; min-width: 0; }
.easy2-page .content { max-width: 1080px; }
.easy2-page .content h2 { margin: 52px 0 6px; }
.easy2-page .figure-row { margin: 0; align-items: flex-start; }
.easy2-page .figure-row > img { max-width: 48%; box-shadow: var(--shadow); }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 24px 0; }
.figures.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: center; }
.figures.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.figures img { border-radius: 8px; }
.excerpt { max-width: 720px; margin: 24px auto; }
.excerpt .narrow { max-width: 600px; margin: 0 auto; }
figure.center figcaption { max-width: 620px; margin: 8px auto 0; text-align: left; }

/* Published studies */
.caption-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin: 0 0 16px; padding: 18px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.caption-row .caption p { margin: 0; font-size: 15px; line-height: 1.45; }
.caption-row img { display: block; border-radius: 8px; }
.small-text p { font-size: 15px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 28px; padding: 16px 20px; background: var(--tint); border-radius: var(--radius); font-size: 16px; }
.facts dt { font: 500 13px/1.8 var(--mono); color: var(--muted); }
.facts dd { margin: 0; }

/* Development */
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
h3.project { margin: 0 0 16px; font-size: 20px; }
h3.project a { text-decoration: none; }

.pubs h2 { font-size: 24px; margin: 36px 0 14px; }
.pubs p { margin: 0 0 14px; font-size: 16px; line-height: 1.45; }
.pub-filter { display: block; width: 100%; max-width: 420px; margin: 0 0 24px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 400 16px var(--body); }
.opps h2 { font-size: 22px; margin-top: 8px; }
.opps h2 a { color: var(--link); }
.opps-head .panel a { color: var(--foam); }
.workshop h2 { margin: 16px 0 14px; }
.workshop img { display: block; margin: 0 auto; border-radius: 10px; }
.workshop figure figcaption { max-width: 620px; margin: 8px auto 0; }
.seaweed h2, .seaweed h3 { font-size: 19px; margin: 22px 0 6px; }
.seaweed p.pic { text-align: center; }
.seaweed p.pic img { border-radius: 10px; }
.seaweed p.new { color: #d8261c; text-align: center; font-size: 18px; }
.seaweed p.new a { color: inherit; }

/* Team: pick a person, their bio opens below */
.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-content: start; }
.team .person { display: contents; }
.team .card { grid-row: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 10px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 400 15px/1.3 var(--body); cursor: pointer; transition: transform .2s, border-color .2s; }
.team .card b { font: 700 18px/1.2 var(--display); }
.team .card img { width: 124px; height: 124px; margin: 8px 0 4px; border-radius: 50%; object-fit: cover; }
.team .card i { color: var(--muted); }
.team .card:hover { transform: translateY(-3px); }
.team .card[aria-expanded=true] { border-color: var(--teal); box-shadow: inset 0 -3px 0 #f6c81b; }
.team .bio { grid-row: 2; grid-column: 1 / -1; display: none; padding-top: 18px; max-width: 80ch; }
.team .person.active .bio { display: block; }

.project-map { height: 620px; background: var(--abyss); }
object.pdf { display: block; width: 100%; height: 86vh; border-radius: var(--radius); }

/* Trial form */
.form-frame { padding: 48px 24px; background: var(--tint); }
.trial-form { max-width: 720px; margin: 0 auto; padding: 32px 36px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.trial-form label { display: block; margin: 14px 0 0; font-weight: 600; }
.trial-form input, .trial-form textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font: 400 16px var(--body); }
.trial-form textarea { min-height: 110px; }
.trial-form button { width: 100%; margin-top: 18px; padding: 14px; border: 0; border-radius: 10px; background: #f6c81b; color: #06141f; font: 600 16px var(--display); cursor: pointer; }
.trial-form button:hover { background: #ffd84a; }
.trial-form .trap { position: absolute; left: -9999px; }
.form-done { font-weight: 700; color: var(--teal); }
.form-error { font-weight: 700; color: #d8261c; }

/* New and old screens */
.compare { margin: 0 0 20px; padding: 22px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.compare .pair { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.compare figure { flex: none; max-width: 100%; text-align: center; }
.compare figure h3 { margin: 0 0 8px; font: 500 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.compare figure img { display: block; height: auto; border-radius: 6px; }
.compare > p { margin: 16px 0 0; }
.compare.sources > h3 { margin: 0 0 10px; }

/* Videos */
.video-top { background: var(--abyss); padding: 32px 24px; }
.video-top video { display: block; width: 100%; max-width: 1040px; margin: 0 auto; border-radius: var(--radius); }
.channel { display: grid; grid-template-columns: 170px minmax(0, 1fr) 150px; align-items: center; gap: 36px; margin: 0 0 40px; text-align: center; font-size: 21px; line-height: 1.4; }
.channel p { margin: 0; }
.channel img { display: block; border-radius: 8px; background: #fff; }
.channel a.red { color: #d8261c; }
.channel a.green { color: var(--teal); }
.video-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); margin: 0 0 24px; background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.video-row .panel { padding: 30px 32px; background: none; color: var(--ink); align-self: center; }
.video-row h2 { margin: 0 0 10px; font-size: 24px; }
.video-row p { margin: 0; }
.video-row iframe, .video-row video { display: block; width: 100%; height: 100%; min-height: 300px; aspect-ratio: 16 / 9; border: 0; background: #000; object-fit: contain; }

/* Features */
.tabs { max-width: var(--column); margin: 0 auto; padding: 40px 24px 56px; }
.tabs [role=tablist] { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tabs [role=tab] { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 15px/1 var(--display); cursor: pointer; transition: background .15s; }
.tabs [role=tab]:hover { background: var(--tint); }
.tabs [role=tab][aria-selected=true] { border-color: var(--deep); background: var(--deep); color: #fff; }
.tabs [role=tabpanel]:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px; align-items: start; padding: 28px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.tabs .tab-text { font-size: 16px; line-height: 1.5; }
.tabs .tab-text ul { margin: 0 0 8px; padding-left: 20px; }
.tabs .tab-text p { margin: 0 0 8px 20px; }
.tabs .tab-pic img { display: block; width: 100%; height: auto; border-radius: 10px; }

/* Slideshow */
.slideshow { position: relative; overflow: hidden; background: var(--deep); min-height: 255px; }
.slideshow figure { position: absolute; inset: 0; opacity: 0; transition: opacity 0s .9s; }
.slideshow figure.on { z-index: 1; opacity: 1; transition: opacity .9s; }
.slideshow figure img { width: 100%; height: 100%; object-fit: contain; }
.page-head > .slideshow figure img { object-position: right center; }
.slideshow.cover figure img { object-fit: cover; }
.slideshow .prev, .slideshow .next { position: absolute; top: 50%; z-index: 2; width: 38px; height: 38px; margin-top: -19px; border: 0; border-radius: 50%; background: rgba(6, 20, 31, .5); cursor: pointer; opacity: 0; transition: opacity .2s; }
.slideshow:hover .prev, .slideshow:hover .next, .slideshow button:focus-visible { opacity: 1; }
.slideshow .prev { left: 10px; }
.slideshow .next { right: 10px; }
.slideshow .prev::after, .slideshow .next::after { content: ""; display: block; width: 10px; height: 10px; margin: auto; border: solid #fff; border-width: 0 0 2px 2px; }
.slideshow .prev::after { transform: translateX(2px) rotate(45deg); }
.slideshow .next::after { transform: translateX(-2px) rotate(-135deg); }
.slideshow figcaption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 8px 14px; background: rgba(6, 20, 31, .6); color: #fff; font-size: 14px; }

/* Picture viewer */
.lightbox { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; padding: 24px; background: rgba(6, 20, 31, .92); cursor: zoom-out; animation: fade .18s; }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 8px; }
.lightbox p { margin: 0; max-width: 80ch; color: #c9dadd; font-size: 15px; text-align: center; }
@keyframes fade { from { opacity: 0; } }

/* Search */
dialog.search { width: min(640px, calc(100vw - 32px)); margin: 12vh auto 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
dialog.search::backdrop { background: rgba(6, 20, 31, .6); backdrop-filter: blur(3px); }
dialog.search input { width: 100%; padding: 18px 20px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: 400 19px var(--body); outline: 0; }
dialog.search .results { list-style: none; margin: 0; padding: 6px; max-height: 56vh; overflow: auto; }
dialog.search .results:empty { display: none; }
dialog.search .results a { display: block; padding: 10px 14px; border-radius: 9px; color: var(--ink); text-decoration: none; }
dialog.search .results a b { font: 600 16px var(--display); }
dialog.search .results a span { display: block; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
dialog.search .results a:hover, dialog.search .results a.sel { background: var(--tint); }

/* Page to page */
.pager { display: flex; justify-content: space-between; gap: 16px; max-width: var(--column); margin: 0 auto; padding: 0 24px 56px; }
.pager a { display: block; flex: 0 1 300px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; font: 600 17px/1.2 var(--display); transition: border-color .15s, transform .15s; }
.pager a:hover { border-color: var(--teal); transform: translateY(-2px); }
.pager a.next { margin-left: auto; text-align: right; }
.pager a.prev::before { content: "\2190  "; color: var(--link); }
.pager a.next::after { content: "  \2192"; color: var(--link); }

/* Footer */
.site-footer { background: var(--abyss); color: #9db2b8; font-size: 15px; }
.site-footer .wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; max-width: var(--column); margin: 0 auto; padding: 28px 24px; }
.site-footer img { display: block; width: 130px; height: auto; background: #fff; border-radius: 8px; padding: 4px; }
.site-footer p { margin: 0; }
.site-footer p a { margin-right: 16px; color: #dbe8ea; text-decoration: none; }
.site-footer p a:hover { text-decoration: underline; }
.site-footer .copy { margin-left: auto; }

.draft-note { max-width: var(--column); margin: 0 auto; padding: 6px 24px; font: 500 13px var(--mono); color: var(--muted); }

/* ---------- Narrow windows ---------- */
@media (max-width: 1060px) {
  .site-header .wrap { flex-wrap: wrap; height: auto !important; min-height: 60px; padding: 8px 16px; gap: 10px; }
  .tools .menu-toggle { display: grid; width: auto !important; padding: 0 12px !important; font: 600 15px var(--display); }
  .easy-mark { display: none; }
  .site-nav { order: 3; display: none; width: 100%; flex: none; flex-direction: column; gap: 0; padding-bottom: 8px; }
  .site-nav.open { display: flex; }
  .site-nav .item { display: flex; flex-wrap: wrap; }
  .site-nav .item > a { flex: 1; padding: 11px 6px; }
  .sub-toggle { display: block; width: 44px; border: 0; background: none; color: #fff; cursor: pointer; }
  .sub-toggle::after { content: "+"; font-size: 22px; }
  .item.expanded .sub-toggle::after { content: "\2212"; }
  .site-nav .sub { position: static; display: none; width: 100%; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; }
  .site-nav .has-sub:hover .sub, .site-nav .has-sub:focus-within .sub { display: none; }
  .site-nav .item.expanded .sub { display: block; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .page-head { grid-template-columns: 1fr; min-height: 0 !important; }
  .page-head > .photo, .page-head > .slideshow { order: 0; min-height: 200px; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
  .page-head .panel { padding: 20px 16px 32px; }
  .content, .tabs { padding-left: 16px; padding-right: 16px; }
  .hero { grid-template-columns: 1fr; padding: 40px 16px; min-height: 0; }
  .scroll-cue { display: none; }
  .feature-row, .feature-row:nth-of-type(even) { grid-template-columns: 1fr; }
  .feature-row:nth-of-type(even) .panel { order: 0; }
  .feature-row .photo { order: -1; min-height: 220px; }
  .feature-row .panel { padding: 24px 20px; }
  .reveal, .video-row, .two-cols, .caption-row, .case-figure { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team .person { display: block; }
  .team .bio { display: block; padding: 10px 2px 0; }
  .figure-row { flex-direction: column; }
  .figure-row > img, .figure-row > figure, .easy2-page .figure-row > img { max-width: 100%; }
  .tabs [role=tabpanel]:not([hidden]) { grid-template-columns: 1fr; padding: 18px; }
  .content:has(> .toc) { display: block; }
  .content > .toc { position: static; max-height: none; margin-bottom: 24px; }
  .channel { grid-template-columns: 1fr; justify-items: center; font-size: 18px; }
  .site-footer .copy { margin-left: 0; }
  .pager { flex-direction: column; }
  .pager a { flex: none; }
  .facts { grid-template-columns: 1fr; }
  .video-row iframe, .video-row video { min-height: 0; height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
