/* ==========================================================
   DeepSeaNet project page
   Same skeleton as /brain2vlm so the two pages read as a set.
   Palette: deep brackish water for the chrome, one fixed hue
   per detector everywhere on the page (EfficientDet orange,
   YOLOv8 blue, YOLOv5 aqua, Detectron2 yellow).
   ========================================================== */

:root {
  --bg: #ffffff;
  --bg-sunk: #f2f6f7;
  --panel: #ffffff;
  --text: #13212b;
  --text-soft: #52626e;
  --text-mute: #7a8a95;
  --rule: #dce5e9;
  --rule-strong: #b4c4cc;

  --navy: #0b4a63;       /* deep water   */
  --navy-soft: #2a6f8c;
  --cyan: #0fa39b;       /* brackish teal accent */
  --water: #0d2a33;

  --effdet: #eb6834;
  --yolov8: #2a78d6;
  --yolov5: #1baf7a;
  --d2: #eda100;
  --old: #8a97a3;

  --link: #1772d0;
  --link-hover: #f09228;
  --shadow: 0 1px 2px rgba(10, 40, 56, .08);

  --maxw: 960px;
  --wide: 1140px;
}

[data-theme="dark"] {
  --bg: #11171b;
  --bg-sunk: #162027;
  --panel: #162027;
  --text: #e2e8eb;
  --text-soft: #9aabb5;
  --text-mute: #74858f;
  --rule: #25323a;
  --rule-strong: #3a4a54;

  --navy: #8fcbe3;
  --navy-soft: #6fb3cf;
  --cyan: #3fd6cb;
  --water: #071a20;

  --effdet: #d95926;
  --yolov8: #3987e5;
  --yolov5: #199e70;
  --d2: #c98500;
  --old: #7d8a95;

  --link: #6bb4f5;
  --link-hover: #ffb35c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, .display, .statnum, .barval, .verdict, .stepname {
  font-family: 'Barlow Semi Condensed', 'Lato', Helvetica, sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { font-size: .88em; background: var(--bg-sunk); border: 1px solid var(--rule); padding: 0 5px; border-radius: 3px; }

/* ---------- top bar ---------- */

.topbar { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--rule); }
.topbar-in { max-width: var(--wide); margin: 0 auto; padding: 9px 22px; display: flex; align-items: center; gap: 16px; }
.topbar a.home { color: var(--text-soft); font-size: 14.5px; }
.topbar a.home:hover { color: var(--link-hover); }
.topbar .crumb { color: var(--text-soft); font-size: 14.5px; }
.topbar .spacer { flex: 1; }
.topbar nav { display: flex; gap: 14px; flex-wrap: wrap; }
.topbar nav a { font-size: 14.5px; color: var(--text-soft); }
.topbar nav a:hover { color: var(--link-hover); text-decoration: none; }
.topbar nav a.on { color: var(--navy); font-weight: 700; }

.theme-toggle {
  font: inherit; font-size: 13.5px; background: transparent; color: var(--text-soft);
  border: 1px solid var(--rule); border-radius: 999px; padding: 3px 12px; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--rule-strong); color: var(--text); }
[data-theme="dark"] .t-dark { display: none; }
.t-light { display: none; }
[data-theme="dark"] .t-light { display: inline; }

/* ---------- hero ---------- */

.hero { padding: 46px 0 6px; }
.venue { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--navy); font-weight: 700; }
.venue .tick { width: 26px; height: 3px; background: var(--cyan); display: inline-block; }

h1.title {
  font-size: clamp(46px, 8.6vw, 92px); font-weight: 700; letter-spacing: -.022em;
  line-height: .95; margin: 14px 0 6px; color: var(--navy);
}
.subtitle { font-size: clamp(19px, 2.6vw, 25px); line-height: 1.3; color: var(--text); max-width: 27em; margin: 0 0 22px; }
.authors { font-size: 16px; margin: 0 0 4px; }
.authors sup, .affil sup { color: var(--navy-soft); font-size: 12px; }
.affil { font-size: 13.5px; color: var(--text-soft); margin: 0 0 22px; max-width: 46em; }

.links { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 34px; }
.links a {
  font: inherit; font-size: 14.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--rule-strong);
  background: var(--panel); color: var(--text); text-decoration: none;
}
.links a:hover { border-color: var(--navy); color: var(--navy); text-decoration: none; }
.links svg { width: 15px; height: 15px; fill: currentColor; }

.triptych { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 10px; }
.tri { margin: 0; }
.tri .frame { position: relative; background: var(--water); border: 2px solid var(--rule); overflow: hidden; }
.tri img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; transition: opacity .35s; }
.tri figcaption { font-size: 12.5px; font-weight: 700; padding-top: 7px; display: flex; justify-content: space-between; gap: 8px; }
.tri figcaption .sub { font-weight: 400; color: var(--text-soft); }
.tri-ed .frame { border-color: var(--effdet); }
.tri-v5 .frame { border-color: var(--yolov5); }
.tri-v8 .frame { border-color: var(--yolov8); }

.tri-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-soft);
  border-top: 1px solid var(--rule); padding-top: 10px; margin-bottom: 40px;
}

/* ---------- sections ---------- */

section { padding: 42px 0; scroll-margin-top: 56px; }
section + section { border-top: 1px solid var(--rule); }

h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; letter-spacing: -.015em; line-height: 1.1; margin: 0 0 6px; }
h2 .num { color: var(--cyan); margin-right: 10px; font-size: .8em; vertical-align: 2px; }
h3 { font-size: 20px; margin: 30px 0 6px; font-weight: 700; }
.lede { font-size: 17.5px; color: var(--text-soft); max-width: 35em; margin: 0 0 24px; }
p { max-width: 38em; }
.note { font-size: 14px; color: var(--text-soft); max-width: 44em; }
.pull { border-left: 3px solid var(--cyan); padding: 2px 0 2px 18px; margin: 26px 0; font-size: 19px; line-height: 1.45; max-width: 32em; }

.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; vertical-align: 2px; white-space: nowrap;
}
.badge.paper { color: var(--navy-soft); }
.badge.repo { color: var(--cyan); }
.badge.illus { color: var(--text-mute); }

/* ---------- panel shell ---------- */

.panel { background: var(--bg-sunk); border: 1px solid var(--rule); border-top: 3px solid var(--navy); padding: 20px 22px 22px; margin: 10px 0 14px; }
.panel-head { display: flex; align-items: baseline; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h3 { margin: 0; font-size: 17.5px; }
.panel-head .hint { font-size: 13.5px; color: var(--text-soft); }

.switch { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule-strong); border-radius: 999px; overflow: hidden; }
.switch button {
  font: inherit; font-size: 13.5px; font-weight: 700; padding: 5px 13px; border: 0;
  background: transparent; color: var(--text-soft); cursor: pointer;
}
.switch button + button { border-left: 1px solid var(--rule-strong); }
.switch button[aria-pressed="true"] { background: var(--navy); color: #fff; }
[data-theme="dark"] .switch button[aria-pressed="true"] { color: #10171b; }
.switch button:hover:not([aria-pressed="true"]) { color: var(--text); }

.controls { display: flex; gap: 12px 16px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.ctl-label { font-size: 13px; color: var(--text-soft); font-weight: 700; }

.slider { display: grid; grid-template-columns: 9.5em 1fr 4.2em; align-items: center; gap: 10px; font-size: 13.5px; margin: 6px 0; }
.slider label { color: var(--text-soft); font-weight: 700; }
.slider output { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--navy); }

.btn {
  font: inherit; font-size: 14px; font-weight: 700; border: 1px solid var(--rule-strong); background: var(--panel);
  color: var(--text); padding: 5px 14px; border-radius: 999px; cursor: pointer;
}
.btn:hover { border-color: var(--navy); color: var(--navy); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
[data-theme="dark"] .btn.primary { color: #10171b; }

.two { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: start; }
.two.even { grid-template-columns: 1fr 1fr; }
.two > *, .water > *, .det > *, .tree > *, .hier > * { min-width: 0; }

.readout { border-top: 1px solid var(--rule); padding-top: 4px; }
.readout .kicker { font-size: 13px; font-weight: 700; color: var(--text-soft); margin: 12px 0 2px; }
.readout .verdict { font-size: 22px; font-weight: 700; line-height: 1.2; margin: 0 0 8px; }
.readout p { font-size: 14.5px; max-width: none; margin: 6px 0; overflow-wrap: anywhere; }
.eq { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--panel); border: 1px solid var(--rule); padding: 8px 10px; margin: 8px 0; overflow-x: auto; white-space: pre; line-height: 1.5; }

/* ---------- takeaways + stat tiles ---------- */

.takeaways { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0 6px; }
.takeaway { padding: 0 20px; border-left: 2px solid var(--cyan); }
.takeaway:first-child { padding-left: 0; border-left: 0; }
.takeaway p { font-size: 14.5px; margin: 0; color: var(--text-soft); max-width: none; }
.statnum { font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1.05; display: block; margin-bottom: 6px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.tile { background: var(--bg-sunk); border: 1px solid var(--rule); padding: 12px 14px; }
.tile .statnum { font-size: 28px; margin: 0; }
.tile .lab { font-size: 13px; color: var(--text-soft); line-height: 1.35; }
.tile .src { font-size: 11.5px; color: var(--text-mute); margin-top: 4px; }

/* ---------- water playground ---------- */

.water { display: grid; grid-template-columns: 1.45fr 1fr; gap: 22px; align-items: start; }
.water canvas { width: 100%; aspect-ratio: 16 / 9; display: block; background: var(--water); }
.thumbrow { display: flex; gap: 6px; margin-top: 8px; }
.thumbrow button { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; line-height: 0; flex: 1; }
.thumbrow img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.thumbrow button[aria-pressed="true"] { border-color: var(--navy); }
.thumbrow button:hover { border-color: var(--cyan); }
.meter { margin-top: 12px; }
.meter .bartrack { height: 12px; }

/* ---------- bars ---------- */

.barrow { margin: 8px 0; }
.barlabel { font-size: 13px; color: var(--text-soft); display: flex; justify-content: space-between; gap: 10px; }
.barlabel b { color: var(--text); }
.bartrack { height: 16px; background: var(--rule); position: relative; overflow: hidden; border-radius: 0 4px 4px 0; }
.barfill { height: 100%; width: 0; background: var(--navy-soft); border-radius: 0 4px 4px 0; transition: width .6s cubic-bezier(.2,.7,.3,1); }
.barfill.ghost { position: absolute; left: 0; top: 0; background: transparent; border: 2px dashed var(--text-mute); border-left: 0; }
.barval { font-weight: 700; color: var(--text); }

/* ---------- pipeline stepper ---------- */

.stepper svg { width: 100%; height: auto; display: block; }
.stage { transition: opacity .3s; cursor: pointer; }
.stage.dim { opacity: .32; }
.stagebox { fill: var(--panel); stroke: var(--rule-strong); stroke-width: 1.5; }
.stage.active .stagebox { stroke: var(--navy); stroke-width: 2.5; }
.stagelabel { fill: var(--text); font-size: 13px; font-weight: 700; font-family: 'Lato', sans-serif; }
.stagesub { fill: var(--text-soft); font-size: 11px; font-family: 'Lato', sans-serif; }
.axistext { fill: var(--text-soft); font-size: 11.5px; font-family: 'Lato', sans-serif; }
.steptext { min-height: 104px; margin-top: 8px; }
.steptext .stepname { font-size: 20px; font-weight: 700; }
.steptext p { font-size: 15px; margin: 4px 0 0; }
.stepnav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

.steplist { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steplist li {
  counter-increment: s; position: relative; padding: 7px 10px 7px 38px; margin: 0 0 4px; cursor: pointer;
  border: 1px solid transparent; font-size: 14.5px; line-height: 1.4;
}
.steplist li::before {
  content: counter(s); position: absolute; left: 8px; top: 7px; width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--rule); color: var(--text-soft);
}
.steplist li:hover { border-color: var(--rule-strong); }
.steplist li[aria-current="true"] { background: var(--panel); border-color: var(--navy); }
.steplist li[aria-current="true"]::before { background: var(--navy); color: #fff; }
[data-theme="dark"] .steplist li[aria-current="true"]::before { color: #10171b; }
.steplist li .log { display: block; font-size: 12.5px; color: var(--text-soft); overflow-wrap: anywhere; }

/* ---------- annotation demo ---------- */

.annot { position: relative; user-select: none; touch-action: none; background: var(--water); }
.annot img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.annot .box { position: absolute; border: 2px solid var(--effdet); cursor: move; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.annot .box .tag {
  position: absolute; left: -2px; top: -22px; background: var(--effdet); color: #fff; font-size: 12px; font-weight: 700;
  padding: 1px 6px; white-space: nowrap;
}
.annot .box .grip {
  position: absolute; right: -8px; bottom: -8px; width: 16px; height: 16px; background: var(--effdet);
  border: 2px solid #fff; border-radius: 50%; cursor: nwse-resize;
}
.annot .crossx, .annot .crossy { position: absolute; background: rgba(255,255,255,.55); pointer-events: none; }
.annot .crossx { height: 1px; left: 0; right: 0; }
.annot .crossy { width: 1px; top: 0; bottom: 0; }
pre.code {
  background: var(--panel); border: 1px solid var(--rule); padding: 12px 14px; margin: 10px 0 0; overflow-x: auto;
  font-size: 12.8px; line-height: 1.55; min-height: 9.5em;
}
pre.code .k { color: var(--navy-soft); font-weight: 700; }
pre.code .c { color: var(--text-mute); }

/* ---------- charts ---------- */

.chartbox { position: relative; }
.chartbox svg { width: 100%; height: auto; display: block; overflow: visible; }
.gridline { stroke: var(--rule); stroke-width: 1; }
.axisline { stroke: var(--rule-strong); stroke-width: 1.2; }
.ticktext { fill: var(--text-soft); font-size: 11.5px; font-family: 'Lato', sans-serif; }
.serieslabel { font-size: 12.5px; font-weight: 700; font-family: 'Lato', sans-serif; fill: var(--text); }
.crosshair { stroke: var(--text-mute); stroke-width: 1; stroke-dasharray: 3 3; }

.legend { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-soft); margin-top: 10px; }
.legend span, .legend button { display: inline-flex; align-items: center; gap: 6px; }
.legend button { font: inherit; font-size: 13.5px; background: none; border: 0; cursor: pointer; color: var(--text-soft); padding: 0; }
.legend button[aria-pressed="false"] { opacity: .38; }
.swatch { width: 13px; height: 13px; display: inline-block; border-radius: 3px; }
.swatch.line { height: 3px; border-radius: 2px; width: 16px; }

.tip {
  position: absolute; pointer-events: none; opacity: 0; z-index: 5;
  background: var(--text); color: var(--bg); font-size: 12.5px; line-height: 1.45;
  padding: 6px 10px; border-radius: 4px; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; transition: opacity .1s;
}
.tip.on { opacity: 1; }
.tip b { font-weight: 700; }
.tip .row { display: flex; align-items: center; gap: 6px; }
.tip .row i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* ---------- neck explorer ---------- */

.neck svg { width: 100%; height: auto; display: block; }
.nnode { stroke-width: 2; transition: opacity .2s; cursor: pointer; }
.nedge { fill: none; stroke-width: 1.8; transition: opacity .2s, stroke-width .2s; }
.nedge.skip { stroke-dasharray: 5 4; }
.neck.tracing .nedge { opacity: .12; }
.neck.tracing .nnode { opacity: .3; }
.neck.tracing .nedge.lit { opacity: 1; stroke-width: 3; }
.neck.tracing .nnode.lit { opacity: 1; }
.nlabel { font-size: 12px; font-weight: 700; fill: var(--text); font-family: 'Lato', sans-serif; pointer-events: none; }

/* ---------- heatmap / tables ---------- */

.tablewrap { overflow-x: auto; margin: 12px 0 8px; }
table.data { border-collapse: collapse; width: 100%; font-size: 14.5px; }
table.data th, table.data td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--rule); }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { color: var(--text-soft); font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--rule-strong); }
table.data td.best { font-weight: 700; }
table.data tbody tr:hover { background: var(--bg-sunk); }
table.data .grouphead { color: var(--text-soft); font-size: 13px; font-weight: 700; text-align: left; }
table.data th button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }
table.data th button:hover { color: var(--text); }
table.heat td.cell { text-align: center; font-weight: 700; color: var(--text); min-width: 4.2em; }
table.heat td.cell.lightink { color: #fff; }
.mdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }

/* ---------- detection explorer ---------- */

.det { display: grid; grid-template-columns: 1fr 1.9fr; gap: 20px; align-items: start; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.thumbs button { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; line-height: 0; }
.thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.thumbs button[aria-pressed="true"] { border-color: var(--navy); }
.thumbs button:hover { border-color: var(--cyan); }

.compare { position: relative; user-select: none; touch-action: none; background: var(--water); }
.compare .layer { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.compare .over { position: absolute; inset: 0; overflow: hidden; width: 50%; }
.compare .over img { height: 100%; object-fit: cover; display: block; max-width: none; }
.compare .handle { position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; transform: translateX(-1.5px); cursor: ew-resize; }
.compare .knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; color: #0d2a33; font-size: 13px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.compare .tag { position: absolute; top: 8px; font-size: 12px; font-weight: 700; padding: 2px 8px; color: #fff; }
.compare .tag.l { left: 8px; background: var(--yolov5); }
.compare .tag.r { right: 8px; background: var(--yolov8); }
[data-theme="dark"] .compare .tag { color: #0b1418; }

.classkey { display: grid; grid-template-columns: repeat(3, auto); gap: 2px 14px; font-size: 13px; margin-top: 10px; color: var(--text-soft); }
.classkey b { color: var(--text); font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

.strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.strip button { padding: 0; border: 2px solid var(--effdet); background: var(--water); cursor: zoom-in; line-height: 0; }
.strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }

.diag img { width: 100%; display: block; border: 1px solid var(--rule); background: #fff; cursor: zoom-in; }

/* ---------- CAM viewer / UAP ---------- */

.camview { position: relative; background: var(--water); aspect-ratio: 1; }
.camview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.uapgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.uapgrid figure { margin: 0; }
.uapgrid canvas { width: 100%; aspect-ratio: 16 / 9; display: block; background: var(--water); }
.uapgrid figcaption { font-size: 12.5px; color: var(--text-soft); padding-top: 4px; }

/* ---------- repo tree ---------- */

.tree { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.tree ul { list-style: none; margin: 0; padding: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; }
.tree li button {
  font: inherit; width: 100%; text-align: left; background: none; border: 1px solid transparent; color: var(--text);
  padding: 5px 9px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px;
}
.tree li button span { color: var(--text-mute); font-size: 11.5px; white-space: nowrap; }
.tree li button:hover { border-color: var(--rule-strong); }
.tree li button[aria-pressed="true"] { background: var(--panel); border-color: var(--navy); }

/* ---------- figures, lightbox ---------- */

figure.fig { margin: 22px 0; }
figure.fig img { width: 100%; display: block; border: 1px solid var(--rule); background: #fff; cursor: zoom-in; }
figure.fig figcaption { font-size: 13.5px; color: var(--text-soft); padding-top: 9px; max-width: 46em; }
figure.fig figcaption b { color: var(--text); }

.lightbox { position: fixed; inset: 0; z-index: 90; display: none; background: rgba(6, 14, 18, .92); padding: 28px; cursor: zoom-out; align-items: center; justify-content: center; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; background: #fff; }

details.more { border: 1px solid var(--rule); background: var(--bg-sunk); padding: 0 16px; margin: 10px 0; }
details.more summary { cursor: pointer; font-weight: 700; padding: 10px 0; font-size: 15px; }
details.more[open] summary { border-bottom: 1px solid var(--rule); margin-bottom: 8px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; margin: 12px 0; }
.card { background: var(--panel); border: 1px solid var(--rule); padding: 12px 14px; font-size: 14px; }
.card h4 { margin: 0 0 4px; font-size: 15px; font-family: 'Barlow Semi Condensed', sans-serif; }
.card p { margin: 4px 0; max-width: none; color: var(--text-soft); }
.card .num { font-weight: 700; color: var(--navy); }

.callout { border-left: 3px solid var(--d2); background: var(--bg-sunk); padding: 12px 16px; margin: 16px 0; font-size: 15px; }
.callout p { margin: 4px 0; max-width: 46em; }
.callout ul { margin: 6px 0; padding-left: 20px; }
.callout li { margin: 4px 0; }

/* ---------- bibtex, footer ---------- */

pre.bib { background: var(--bg-sunk); border: 1px solid var(--rule); padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.5; }
.copyrow { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.copied { font-size: 13.5px; color: var(--text-soft); opacity: 0; transition: opacity .2s; }
.copied.on { opacity: 1; }

footer { border-top: 1px solid var(--rule); padding: 28px 0 60px; font-size: 14px; color: var(--text-soft); }
footer p { max-width: 46em; }

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .two, .two.even, .water, .det, .tree { grid-template-columns: 1fr; }
  .takeaways { grid-template-columns: 1fr; gap: 16px; }
  .takeaway, .takeaway:first-child { padding: 0 0 0 16px; border-left: 2px solid var(--cyan); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .topbar nav { display: none; }
  body { font-size: 16px; }
  .panel { padding: 16px 13px 18px; }
  .slider { grid-template-columns: 7.5em 1fr 3.6em; }
}
@media (max-width: 560px) {
  .triptych { grid-template-columns: 1fr; }
  .thumbs { grid-template-columns: repeat(6, 1fr); }
  .strip { grid-template-columns: repeat(3, 1fr); }
  .uapgrid { grid-template-columns: 1fr; }
  .classkey { grid-template-columns: repeat(2, auto); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
