:root {
  color-scheme: light;
  --ink: #143031;
  --muted: #56706f;
  --faint: #8aa09f;
  --line: #dfe7e6;
  --tint: #f3f7f6;
  --accent: #2e8c8c;
  --page: #ffffff;
  --sans: "Figtree", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: 0.9em var(--mono); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

header { position: sticky; top: 0; z-index: 2; background: var(--page); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { display: block; height: 30px; width: auto; }
nav { display: flex; gap: 22px; font-size: 15px; }
nav a { color: var(--muted); white-space: nowrap; }
nav a:hover { color: var(--ink); text-decoration: none; }
nav { align-items: center; }
nav .icon { display: inline-flex; color: var(--ink); }
nav .icon + .icon { margin-left: -8px; }
nav .icon:hover { opacity: 0.75; }

.doc { max-width: 780px; padding: 8px 0 48px; font-size: 16px; line-height: 1.65; }
.doc.wide { max-width: none; }
.doc.wide p, .doc.wide pre { max-width: 780px; }
.doc h1 { font: 600 30px var(--sans); margin: 32px 0 20px; }
.doc h2 { font-size: 21px; margin: 36px 0 10px; }
.doc h3 { font-size: 17px; margin: 24px 0 8px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc li { margin: 4px 0; }
.doc pre { background: var(--tint); padding: 12px 14px; border-radius: 6px; overflow-x: auto; font-size: 13px; line-height: 1.5; }
.doc pre code { font-size: 13px; }
.codehilite .k, .codehilite .kn, .codehilite .kc, .codehilite .ow { color: var(--geozl); font-weight: 500; }
.codehilite .s, .codehilite .s1, .codehilite .s2 { color: var(--raster); }
.codehilite .mi, .codehilite .mf { color: var(--openzl); }
.codehilite .nf, .codehilite .nb { color: var(--arrays); }
.codehilite .c, .codehilite .c1 { color: var(--faint); font-style: italic; }
.codehilite .o, .codehilite .p { color: var(--muted); }
.doc table { display: block; overflow-x: auto; margin: 12px 0 18px; font-size: 14px; }
.doc th { font-weight: 600; color: var(--muted); font-size: 13px; }

section { padding: 40px 0; border-bottom: 1px solid var(--line); }
section:last-child { border-bottom: 0; }
h2 { font-size: 21px; font-weight: 600; margin: 0 0 6px; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.note { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

.results { padding: 28px 0 40px; }
.pick { display: flex; align-items: center; gap: 12px; }
select { font: 14px var(--mono); color: var(--ink); background: var(--page); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { font: 12px var(--mono); fill: var(--faint); }
.chart .axis { font: 500 17px var(--sans); fill: var(--ink); }
:root { --geozl: #2e8c8c; --openzl: #7a68c2; --raster: #d0892a; --arrays: #6d87a3; }
.chart .g-geozl { --c: var(--geozl); }
.chart .g-openzl { --c: var(--openzl); }
.chart .g-raster-files { --c: var(--raster); }
.chart .g-array-stores { --c: var(--arrays); }
.chart .g-native { --c: var(--raster); }
.chart .g-quantized { --c: var(--arrays); }
.chart .g-safeguarded { --c: var(--openzl); }
.near-pick { justify-content: flex-end; margin: 0 0 8px; }
.chart .point circle { fill: var(--c, var(--faint)); }
.chart .point.front circle:not(.hit) { stroke: var(--ink); stroke-width: 1.5; }
.chart .label { font: 12px var(--mono); fill: var(--muted); }
.chart .point.front .label { fill: var(--ink); }
.chart .pareto { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; }
.chart .reference line { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 5 5; }
.chart .reference text { font: 11px var(--mono); fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 18px; font-size: 13px; color: var(--muted); margin-bottom: -6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.chart .axes { opacity: 0; transition: opacity 0.5s ease; }
.chart .point { opacity: 0; transform: scale(0.3); transform-box: fill-box; transform-origin: center; transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 1.4, 0.4, 1); transition-delay: calc(var(--i) * 90ms + 250ms); }
.chart svg.in .axes, .chart svg.in .point { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .chart .axes, .chart .point { transition: none; }
}

table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th, table tr:first-child th { font-weight: 500; color: var(--muted); font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; align-items: start; }
.card { display: block; color: var(--ink); }
.card:hover { text-decoration: none; }
.card:hover img { outline: 2px solid var(--accent); outline-offset: 2px; }
.card img, .noimg { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; background: var(--tint); }
.cid { display: block; font: 500 13px var(--mono); margin-top: 8px; }
.meta { display: block; font-size: 12px; color: var(--muted); }

.crumbs { font-size: 13px; color: var(--muted); margin: 24px 0 8px; }
.crumbs a { color: var(--muted); }
h1 { font: 600 28px var(--mono); margin: 0 0 6px; letter-spacing: -0.01em; }
.lead { font-size: 17px; margin: 0 0 8px; }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; padding: 26px 0 8px; border-bottom: 0; font-size: 15px; }
.spec h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 6px; }
.spec p { margin: 0 0 8px; }
.folder { font-size: 14px; margin: 0 0 4px; }

.sample { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 36px; align-items: start; padding: 24px 0; border-top: 1px solid var(--line); margin-top: 16px; }
.sample h2 { margin-top: 0; }
h1 + .pick { margin: 0; justify-content: flex-end; }
.figure img { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--tint); }
.sample h2 { font-size: 16px; margin: 22px 0 6px; display: flex; align-items: center; gap: 10px; }
.button { display: inline-block; margin-top: 12px; font: 500 14px var(--sans); padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px; }
.button:hover { text-decoration: none; background: var(--tint); }
.meta-table th { width: 34%; font: 13px var(--mono); color: var(--muted); }
.meta-table td { font-size: 13px; word-break: break-word; }
.meta-table code.long { display: block; white-space: pre-wrap; font-size: 11px; margin-top: 6px; }
.meta-table summary { cursor: pointer; }
.pager { display: flex; justify-content: space-between; font: 13px var(--mono); padding: 16px 0 8px; border-top: 1px solid var(--line); }

.uc-legend { justify-content: flex-start; margin: 10px 0 0; }
.uc-panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 32px; margin-top: 12px; }
.uc-panel svg { display: block; width: 100%; height: auto; }
.uc-panel .rule { stroke: var(--line); stroke-width: 1; }
.uc-panel .tick { font: 11px var(--mono); fill: var(--faint); }
.uc-panel .title { font: 600 14px var(--sans); fill: var(--ink); }
.uc-panel polyline { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; }
.uc-panel circle { fill: var(--c); }
.uc-panel .axis { font: 12px var(--sans); fill: var(--muted); }
.uc-panels.wide { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); }
.uc-panel .label { font: 11px var(--mono); fill: var(--ink); paint-order: stroke; stroke: var(--page); stroke-width: 3px; }
.decoded h3 { margin: 24px 0 10px; font-size: 16px; }
.decoded .maps { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.decoded .maps figcaption { font-size: 12px; line-height: 1.45; }
.uc-panel .series { transition: opacity 0.15s ease; }
.uc-panel .series polyline { stroke-width: 1.2; stroke-opacity: 0.55; }
.uc-panel .series .dot { stroke: var(--page); stroke-width: 1; transform-box: fill-box; transform-origin: center; transition: transform 0.15s ease; }
.uc-panel .series .hit { fill: transparent; }
.uc-panel .series .label { opacity: 0; pointer-events: none; transition: opacity 0.15s ease; }
.uc-panel svg:has(.series:hover) .series:not(:hover) { opacity: 0.3; }
.uc-panel .series:hover polyline { stroke-width: 2.4; stroke-opacity: 1; }
.uc-panel .pt:hover .dot { transform: scale(1.9); }
.uc-panel .pt:hover .label { opacity: 1; }
.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.maps figure { margin: 0; }
.maps img { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--tint); }
.maps figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.key::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--k); margin: 0 6px 0 14px; vertical-align: -1px; }
.k-kept { --k: #f59e0b; }
.k-lost { --k: #38bdf8; }
.k-new { --k: #f43f5e; }
.sample .doc { padding: 0; }
.sample .experiment h2 { font-size: 21px; margin: 0 0 6px; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 15px; padding: 9px 22px; }
.button.primary:hover { background: var(--ink); border-color: var(--ink); }
.experiment ul { padding-left: 18px; margin: 0; }
.experiment li { margin: 8px 0; }
.results .doc { padding: 16px 0 0; }

/* The footer of the GeoZL site, with the Earth Compress partners */
footer { border-top: 1px solid var(--line); padding: 28px 0 32px; font-size: 12px; line-height: 1.2; color: var(--faint); }
.colophon .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.colophon .partners { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 40px; }
.colophon .partners a { display: inline-flex; opacity: .72; filter: grayscale(1); transition: opacity 160ms ease, filter 160ms ease; }
.colophon .partners a:hover, .colophon .partners a:focus-visible { opacity: 1; filter: none; }
.colophon .partners img { display: block; width: auto; }

@media (max-width: 760px) {
  nav { gap: 12px; font-size: 13px; }
  nav a:nth-child(3), nav a:nth-child(5) { display: none; }
  .chart .label { font-size: 11px; }
  .sample { grid-template-columns: 1fr; gap: 16px; }
  .sample.usecase { grid-template-columns: 1fr; }
  .usecase .pic { flex: none; aspect-ratio: 1; }
  .spec { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}
.doc td:first-child code { white-space: nowrap; }

.chart { position: relative; }
.chart .point circle.hit { fill: #000; fill-opacity: 0; stroke: none; cursor: pointer; }
.chart .reference line.hit { stroke: #000; stroke-opacity: 0; stroke-width: 14; stroke-dasharray: none; cursor: pointer; }
.chart .point, .chart .reference { outline: none; }
.chart .point:focus-visible circle:not(.hit) { stroke: var(--accent); stroke-width: 3; }
.chart .point text, .chart .point circle, .chart .reference text { transition: font-size 0.15s ease, opacity 0.15s ease, r 0.15s ease; }
.chart .point.active .label { font-size: 14px; fill: var(--ink); paint-order: stroke; stroke: var(--page); stroke-width: 4px; }
.chart .point.active circle:not(.hit) { r: 7; }
.chart .reference.active text { font-size: 13px; fill: var(--ink); paint-order: stroke; stroke: var(--page); stroke-width: 4px; }
.chart svg.ready .point, .chart svg.ready .reference, .chart svg.ready .pareto { transition: opacity 0.15s ease; transition-delay: 0s; }
.sample.usecase { align-items: stretch; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.usecase .figure { display: flex; flex-direction: column; }
.usecase .pic { flex: 1; min-height: 240px; border-radius: 6px; background: var(--tint) center / cover no-repeat; }
.usecase .figure .note { margin: 6px 0 0; }
.sample.usecase { padding: 18px 0 0; margin-top: 10px; }
.usecase .experiment p { margin: 0 0 10px; }
.usecase .button.primary { margin-top: 8px; }
.explain { display: block; width: 100%; max-width: 860px; height: auto; margin: 12px 0 18px; }
.explain text { font: 13px var(--sans); fill: var(--ink); }
.explain .h { font-weight: 600; font-size: 14px; }
.explain .m { font: 12px var(--mono); white-space: pre; }
.measure .doc { padding: 0; max-width: 780px; }

.lossy .chart.rd { margin-top: 4px; }
.chart .series polyline { fill: none; stroke: var(--c); stroke-width: 1.6; stroke-linejoin: round; stroke-opacity: 0.8; }
.chart .series circle { fill: var(--c); stroke: var(--page); stroke-width: 1; }
.chart .series.lead polyline { stroke-width: 3; stroke-opacity: 1; }
.chart .series:hover polyline { stroke-width: 3; stroke-opacity: 1; }
.chart .one { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .spec { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; }
.chart.spectrum { margin-top: 18px; }
.chart.spectrum .axis { font-size: 13px; fill: var(--muted); }
.viewer { padding: 28px 0 8px; margin-top: 24px; border-top: 1px solid var(--line); }
.viewer h3, .lossy > h3 { font-size: 17px; margin: 0 0 10px; }
.lossy > h3 { margin-top: 32px; }
.viewer-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 14px; }
.samples, .modes { display: flex; gap: 6px; }
.samples button, .modes button { font: 13px var(--mono); color: var(--muted); background: var(--page); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; cursor: pointer; }
.samples button[aria-pressed="true"], .modes button[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.rate { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.rate input { width: 180px; accent-color: var(--accent); }
.rate output { font: 13px var(--mono); color: var(--ink); min-width: 120px; }
.stage { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--tint); cursor: ew-resize; touch-action: none; user-select: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage.pixelated canvas { image-rendering: pixelated; }
.stage .handle { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.stage .handle span { position: absolute; top: 50%; left: -13px; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.stage .target { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); pointer-events: none; }
.stage .side { position: absolute; top: 8px; margin: 0; max-width: 46%; font: 12px/1.4 var(--mono); color: #fff; background: rgba(20, 48, 49, 0.78); padding: 4px 8px; border-radius: 4px; pointer-events: none; }
.stage .side.left { left: 8px; }
.stage .side.right { right: 8px; text-align: right; }
.mode-note { margin: 8px 0 0; }
.onefile { margin-top: 16px; }
.onefile .bar { position: relative; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #d6456b var(--read, 0%), var(--tint) var(--read, 0%)); border: 1px solid var(--line); }
.onefile .bar i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--page); }
.onefile .note { margin: 8px 0 0; font-size: 13px; }
.viewer-body { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 32px; align-items: start; }
.viewer-side h4 { font-size: 14px; font-weight: 600; margin: 22px 0 8px; }
.viewer-side .mode-note { margin: 0; }
.viewer-side .onefile, .viewer-side .chart.spectrum { margin-top: 0; }
@media (max-width: 860px) {
  .viewer-body { grid-template-columns: 1fr; }
}
.lossy-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.lossy .legend { margin-bottom: 4px; }
.lossy .near-pick { gap: 10px; }
@media (max-width: 860px) {
  .lossy-charts { grid-template-columns: 1fr; }
}
.chart .series { opacity: 0; transition: opacity 0.5s ease; transition-delay: calc(var(--i) * 120ms + 200ms); }
.chart svg.in .series { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .chart .series { transition: none; } }
.home { padding: 72px 0 88px; }
.home-intro { max-width: 760px; padding: 0 0 48px; }
.home-intro h1 { font: 600 52px/1.05 var(--sans); letter-spacing: -0.02em; margin: 0 0 18px; }
.home-intro h1 span { color: var(--accent); }
.home-intro p { margin: 0; font-size: 20px; line-height: 1.5; color: var(--muted); }
.home-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.home-deck { position: relative; flex: none; display: block; margin-bottom: 48px; color: var(--faint); transition: color 0.15s ease; }
.home-page .home-deck { margin-bottom: 28px; }
.home-deck:hover, .home-deck:focus-visible { color: var(--accent); text-decoration: none; }
.home-deck svg { display: block; width: 168px; height: auto; fill: none; stroke: currentColor; stroke-width: 1.2; }
.home-deck svg .bold { stroke-width: 5; }
.home-deck svg .fill { fill: currentColor; fill-opacity: 0.35; stroke: none; }
.home-deck::after { content: attr(data-label); position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -4px); padding: 4px 9px; background: var(--ink); color: #fff; font: 500 12px var(--sans); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease; }
.home-deck:hover::after, .home-deck:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) { .home-top { flex-direction: column; align-items: flex-start; gap: 0; } .home-deck svg { width: 120px; } }
.modes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mode { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 210px; padding: 22px 24px 22px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--page); transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.mode:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 28px -18px rgba(20, 48, 49, 0.45); }
.mode-media { position: relative; display: block; height: 180px; margin: -10px -12px 8px; border-radius: 10px; overflow: hidden; background: var(--tint); }
.mode-frame { position: absolute; inset: 0; opacity: 0; animation: mode-fade 16s infinite; animation-delay: calc(var(--i) * 4s + var(--o) * 0.9s - 16s); }
.mode-frame img { display: block; width: 100%; height: 100%; object-fit: cover; animation: mode-drift 16s linear infinite; animation-delay: inherit; }
.mode-tag { position: absolute; left: 10px; bottom: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(20, 48, 49, 0.72); color: #fff; font: 500 11px var(--mono); }
@keyframes mode-fade { 0% { opacity: 0; } 4% { opacity: 1; } 25% { opacity: 1; } 29% { opacity: 0; } 100% { opacity: 0; } }
@keyframes mode-drift { 0% { transform: scale(1.12); } 29% { transform: scale(1.02); } 100% { transform: scale(1.02); } }
.mode:hover .mode-frame img { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .mode-frame { animation: none; } .mode-frame img { animation: none; } .mode-frame:first-child { opacity: 1; } }
.mode-num { font: 500 13px var(--mono); color: var(--faint); }
.mode-name { display: flex; align-items: baseline; justify-content: space-between; font: 600 28px/1.15 var(--sans); }
.mode-arrow { font-size: 22px; color: var(--accent); opacity: 0; transform: translateX(-6px); transition: opacity 0.2s ease, transform 0.2s ease; }
.mode:hover .mode-arrow { opacity: 1; transform: none; }
.mode-text { font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 34ch; }
.mode-stat { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font: 500 13px var(--mono); color: var(--accent); }
@media (max-width: 860px) { .modes-grid { grid-template-columns: minmax(0, 1fr); } .home { padding: 40px 0 56px; } .home-intro h1 { font-size: 36px; } .home-intro p { font-size: 17px; } .mode { min-height: 0; } }

.lossy-tip { position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 12px)); display: flex; flex-direction: column; gap: 1px; padding: 8px 11px; border-radius: 8px; background: var(--ink); color: #fff; font: 12px/1.45 var(--mono); white-space: nowrap; pointer-events: none; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5); }
.lossy-tip b { font: 600 13px var(--sans); margin-bottom: 2px; }
.lossy-tip span { color: rgba(255, 255, 255, 0.82); }
.lossy-charts .chart { position: relative; }
.lossy-tip[hidden] { display: none; }
.analyses { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.analyses-label { width: 100%; font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.analyses .button { margin-top: 0; color: var(--ink); }
.analyses .button:hover { border-color: var(--accent); color: var(--accent); background: var(--page); }
.pixel-tip { position: absolute; z-index: 4; transform: translate(14px, 14px); padding: 6px 10px; border-radius: 6px; background: rgba(20, 48, 49, 0.9); color: #fff; font: 12px/1.5 var(--mono); white-space: pre; pointer-events: none; }
.pixel-tip.flip { transform: translate(calc(-100% - 14px), 14px); }
.pixel-tip[hidden] { display: none; }

/* The landing fits one screen: intro, the four modes in a row, the reference links. */
.home-page { display: flex; flex-direction: column; min-height: 100vh; }
.home-page main { flex: 1; display: flex; }
.home-page .home { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 28px 0 24px; }
.home-page .home-intro { padding-bottom: 28px; }
.home-page .home-intro h1 { font-size: clamp(36px, 4.4vw, 52px); }
.home-page .modes-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home-page .mode { min-height: 0; padding: 16px 16px 16px; gap: 8px; }
.home-page .mode-media { height: clamp(110px, 17vh, 170px); margin: -4px -4px 4px; }
.home-page .mode-name { font-size: 22px; }
.home-page .mode-text { font-size: 14px; }
.home-page .mode-stat { padding-top: 10px; font-size: 12px; }
@media (max-width: 1000px) { .home-page .modes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .home-page .modes-grid { grid-template-columns: minmax(0, 1fr); } }
.home-page footer { padding: 14px 0 18px; }
.home-page .home-intro h1 { margin: 0 0 22px; line-height: 0; }
.home-page .home-intro h1 img { display: block; width: min(560px, 80vw); height: auto; }


/* The four result modes, one click apart from any page. Icons only, the name shows on hover. */
.modes-switch { display: flex; gap: 6px; }
.modes-switch a { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; color: var(--faint); transition: background 0.15s ease, color 0.15s ease; }
.modes-switch a:hover { text-decoration: none; color: var(--ink); background: var(--tint); }
.modes-switch a[aria-current="page"] { color: var(--accent); background: var(--tint); }
.modes-switch svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.modes-switch svg .fill { fill: currentColor; stroke: none; opacity: 0.35; }
.modes-switch a::after { content: attr(data-label); position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -4px); padding: 4px 9px; border-radius: 6px; background: var(--ink); color: #fff; font: 500 12px var(--sans); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease; }
.modes-switch a:hover::after, .modes-switch a:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) { .modes-switch { display: none; } }

/* Moving between pages, the big logo of the landing flies into the header and back. */
@view-transition { navigation: auto; }
.home-page .home-intro h1 img, .brand img { view-transition-name: ec-logo; }
::view-transition-group(ec-logo) { animation-duration: 0.65s; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
::view-transition-old(ec-logo), ::view-transition-new(ec-logo) { height: 100%; width: auto; animation-duration: 0.65s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }
/* The same way, each mode picture on the landing flies into its icon in the header. */
.home-page .mode:nth-child(1) .mode-media, .modes-switch a:nth-child(1) svg { view-transition-name: ec-mode-1; }
.home-page .mode:nth-child(2) .mode-media, .modes-switch a:nth-child(2) svg { view-transition-name: ec-mode-2; }
.home-page .mode:nth-child(3) .mode-media, .modes-switch a:nth-child(3) svg { view-transition-name: ec-mode-3; }
.home-page .mode:nth-child(4) .mode-media, .modes-switch a:nth-child(4) svg { view-transition-name: ec-mode-4; }
.home-page .mode-media, .modes-switch svg { view-transition-class: ec-mode; }
::view-transition-group(*.ec-mode) { animation-duration: 0.65s; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
::view-transition-old(*.ec-mode), ::view-transition-new(*.ec-mode) { width: 100%; height: 100%; object-fit: cover; animation-duration: 0.65s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

.map-section { border-top: 1px solid var(--line); padding: 10px 0; }
.map-section summary { cursor: pointer; }
.map-section summary h2 { display: inline; margin: 0; }
