/* ISOBAR — Parfums de Météo
   Colour is weather: --fg / --accent / --paper are retuned by the sky as you scroll. */

@property --fg { syntax: '<color>'; inherits: true; initial-value: #11141B; }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #D93A1C; }
@property --paper { syntax: '<color>'; inherits: true; initial-value: #E9E6DE; }

:root {
  --fg: #11141B;
  --accent: #D93A1C;
  --paper: #E9E6DE;
  --dim: color-mix(in srgb, var(--fg) 62%, transparent);
  --line: color-mix(in srgb, var(--fg) 22%, transparent);
  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --m: clamp(18px, 3vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  transition: --fg .9s var(--ease), --accent .9s var(--ease), --paper .9s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--fg);
  background: var(--paper);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html.no-webgl body { transition: background-color .9s var(--ease); }
::selection { background: var(--fg); color: var(--paper); }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img, svg { display: block; }
h1, h2, h3, p, dl, dd, ol, ul, figure, blockquote { margin: 0; }
ol, ul { list-style: none; padding: 0; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 4px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: var(--m); top: -60px; z-index: 200; background: var(--fg); color: var(--paper); padding: 10px 14px; transition: top .3s; }
.skip:focus { top: 12px; }

.mono { font-family: var(--mono); font-size: 11px; line-height: 1.5; letter-spacing: .07em; text-transform: uppercase; font-weight: 400; }
.display { font-family: var(--serif); font-weight: 400; line-height: .88; letter-spacing: -.018em; }
.display em, .hero__title em { font-style: italic; letter-spacing: -.03em; }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
html.no-webgl #sky { display: none; }
main, .foot { position: relative; z-index: 1; }

.hint-touch { display: none; }
@media (hover: none) { .hint-desktop { display: none; } .hint-touch { display: inline; } }

/* ---------------- Loader ---------------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 100; background: #E9E6DE; color: #11141B;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  transition: opacity .9s var(--ease) .1s, visibility 0s linear 1s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__dial { width: 132px; height: 132px; }
.loader__dial svg { width: 100%; height: 100%; overflow: visible; }
.loader__dial circle { fill: none; stroke: currentColor; stroke-width: 1; }
.loader__ticks line { stroke: currentColor; stroke-width: 1; }
.loader__needle { stroke: #D93A1C; stroke-width: 1.5; transform-origin: 100px 100px; transform: rotate(-135deg); }
.loader__hub { fill: currentColor !important; }
.loader__text { opacity: .8; font-variant-numeric: tabular-nums; }

/* ---------------- Cursor ---------------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; opacity: 0; transition: opacity .4s; }
.has-cursor .cursor.is-live { opacity: 1; }
.cursor__ring {
  position: absolute; left: -23px; top: -23px; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--fg); transition: transform .45s var(--ease), border-color .9s;
}
.cursor__l { position: absolute; left: 0; top: 0; transform: translate(-50%, -54%); font: 400 24px/1 var(--serif); color: var(--accent); }
.cursor__hpa { position: absolute; left: 30px; top: -7px; font-size: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cursor.is-hover .cursor__ring { transform: scale(1.55); }
.cursor.is-down .cursor__ring { transform: scale(.8); }
@media (hover: hover) and (pointer: fine) {
  .has-cursor, .has-cursor a, .has-cursor button, .has-cursor .baro__dial, .has-cursor .chroma__plot { cursor: none; }
  .has-cursor input { cursor: pointer; }
}

/* ---------------- Nav ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 32px;
  padding: 18px var(--m); font-size: 13px;
}
.nav__logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 13px/1 var(--sans); letter-spacing: .32em; }
.nav__logo svg { width: 30px; height: 25px; }
.nav__links { display: flex; gap: 28px; justify-self: center; }
.nav__links a, .nav__bag, .nav__menu { text-decoration: none; position: relative; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.nav__links a::after, .nav__bag::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav__links a:hover::after, .nav__bag:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__obs { color: var(--dim); font-variant-numeric: tabular-nums; }
.nav__obs span { margin-right: 6px; }
.nav__count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 5px; border-radius: 10px;
  background: var(--fg); color: var(--paper); font: 500 11px/1 var(--mono);
}
.nav__count.bump { animation: bump .6s var(--ease); }
@keyframes bump { 30% { transform: scale(1.45); } }
.nav__menu { display: none; }

.menu {
  position: fixed; inset: 0; z-index: 25; background: var(--paper); display: grid; align-content: center; padding: var(--m);
}
.menu[hidden] { display: none; }
.menu a { display: flex; align-items: baseline; gap: 16px; font: 400 clamp(44px, 11vw, 80px)/1.05 var(--serif); text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line); }
.menu a i { font-style: normal; color: var(--dim); }

/* ---------------- Gauge ---------------- */
.gauge { position: fixed; right: calc(var(--m) * .55); top: 50%; transform: translateY(-50%); z-index: 20; }
.gauge ol { display: grid; gap: 14px; }
.gauge a {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-decoration: none;
  font: 400 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
.gauge a::after { content: ""; width: 10px; height: 1px; background: currentColor; opacity: .55; transition: width .4s var(--ease), opacity .4s; }
.gauge a span, .gauge a { color: transparent; transition: color .4s; }
.gauge a::after { background: var(--fg); }
.gauge:hover a, .gauge a.is-active, .gauge a:focus-visible { color: var(--fg); }
.gauge a.is-active::after { width: 22px; opacity: 1; }

/* ---------------- Hero ---------------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; padding: 0 var(--m); display: flex; flex-direction: column; }
.hero__chart { position: absolute; left: var(--m); top: 86px; display: flex; gap: 18px; color: var(--dim); }
.hero__title {
  margin-top: auto; padding-top: 22vh;
  font: 400 clamp(68px, 13.6vw, 252px)/.84 var(--serif); letter-spacing: -.035em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__title .line > span { display: inline-block; }
.hero__title .line--indent { padding-left: 13.5vw; }
.hero__title sup { font: 400 .16em/1 var(--mono); vertical-align: top; position: relative; top: .5em; margin-left: .2em; color: var(--accent); letter-spacing: 0; }
.js .hero__title .line > span { transform: translateY(105%); transition: transform 1.5s var(--ease); }
.js .is-loaded .hero__title .line > span { transform: none; }
.js .is-loaded .hero__title .line--indent > span { transition-delay: .12s; }
.hero__foot {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: end;
  padding: 5vh 0 4.5vh; margin-top: 4vh;
}
.hero__lede { grid-column: 1 / 5; font-size: 17px; line-height: 1.45; max-width: 36ch; }
.hero__note { grid-column: 6 / 9; color: var(--dim); }
.hero__note sup { color: var(--accent); }
.hero__hint { grid-column: 9 / 13; text-align: right; color: var(--dim); }
.arrow { display: inline-block; animation: drift 2.4s var(--ease-io) infinite; }
@keyframes drift { 50% { transform: translateY(4px); } }
.js .hero__foot > * { opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease) .6s, transform 1.2s var(--ease) .6s; }
.js .is-loaded .hero__foot > * { opacity: 1; transform: none; }

.stations { position: absolute; inset: 0; pointer-events: none; }
.station { position: absolute; left: var(--x); top: var(--y); width: 92px; height: 92px; margin: -46px 0 0 -46px; overflow: visible; color: var(--fg); opacity: .78; }
.station line, .station circle { stroke: currentColor; stroke-width: 1.1; fill: none; }
.station .cover { fill: currentColor; stroke: none; }
.station text { font: 400 8.5px var(--mono); fill: currentColor; letter-spacing: .02em; }
.station .barb { transition: transform 1.2s var(--ease); }
.pmark { position: absolute; left: var(--x); top: var(--y); font: 400 52px/1 var(--serif); color: #1F4E8C; transform: translate(-50%, -50%); }
.pmark small { display: block; font: 400 10px/1 var(--mono); letter-spacing: .06em; text-align: center; margin-top: 2px; }
.pmark--l { color: var(--accent); }
.js .stations > * { opacity: 0; transition: opacity 1.4s var(--ease) 1s; }
.js .is-loaded .stations > * { opacity: .78; }
.js .is-loaded .stations > .pmark { opacity: 1; }

/* ---------------- Front divider (occluded front: triangles + semicircles) ---------------- */
.front {
  height: 20px; background-color: var(--fg); opacity: .85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='20'%3E%3Cpath d='M0 15.5h120v1H0z'/%3E%3Cpath d='M14 15.5l9-12 9 12z'/%3E%3Cpath d='M74 15.5a9 9 0 0 1 18 0z'/%3E%3C/svg%3E") repeat-x left center / 120px 20px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='20'%3E%3Cpath d='M0 15.5h120v1H0z'/%3E%3Cpath d='M14 15.5l9-12 9 12z'/%3E%3Cpath d='M74 15.5a9 9 0 0 1 18 0z'/%3E%3C/svg%3E") repeat-x left center / 120px 20px;
  transform-origin: left; transform: scaleX(var(--front, 1));
}
.js .front { --front: 0; transition: transform 2.2s var(--ease); }
.js .front.is-in { --front: 1; }

/* ---------------- Manifesto ---------------- */
.manifesto { padding: 26vh var(--m) 30vh; display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 20px; }
.manifesto .front { grid-column: 1 / -1; margin-bottom: 18vh; }
.manifesto__kicker { grid-column: 1 / 3; color: var(--dim); padding-top: 1.2em; }
.manifesto__text { grid-column: 3 / 12; font: 400 clamp(32px, 4.7vw, 82px)/1.03 var(--serif); letter-spacing: -.02em; text-wrap: pretty; }
.manifesto__text--b { grid-column: 5 / 13; margin-top: 12vh; }
.manifesto__text em { color: var(--accent); }
[data-scrub] .w { opacity: var(--o, .14); transition: opacity .25s linear; }

/* ---------------- Collection index ---------------- */
.index { padding: 14vh var(--m) 26vh; }
.index__head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: end; margin-bottom: 9vh; }
.index__head > .mono { grid-column: 1 / -1; color: var(--dim); }
.index__head h2 { grid-column: 1 / 9; font-size: clamp(76px, 12.5vw, 230px); }
.index__intro { grid-column: 9 / 13; max-width: 34ch; padding-bottom: 1.6em; }
.index__list { border-top: 1px solid var(--line); }
.index__list a {
  display: grid; grid-template-columns: 70px minmax(0, 1.25fr) minmax(0, 1.6fr) minmax(0, 1fr) 46px; align-items: center; gap: 20px;
  padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; position: relative;
  transition: padding .6s var(--ease), color .4s;
}
.index__list a::before { content: ""; position: absolute; inset: -1px 0; background: color-mix(in srgb, var(--fg) 7%, transparent); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); z-index: -1; }
.index__list a:hover::before, .index__list a:focus-visible::before { transform: none; }
.index__name { font: 400 clamp(40px, 4.6vw, 76px)/1 var(--serif); letter-spacing: -.02em; }
.index__wx { font-size: 15px; color: var(--dim); }
.index__where { color: var(--dim); }
.index__swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--c); justify-self: end; box-shadow: inset 0 0 0 1px var(--line); transition: transform .6s var(--ease); }
.index__list a:hover, .index__list a:focus-visible { padding-left: 22px; padding-right: 10px; }
.index__list a:hover .index__swatch { transform: scale(1.5); }
.index__tip { margin-top: 18px; color: var(--dim); }
@media (hover: none) { .index__tip { display: none; } }

/* ---------------- Chapters ---------------- */
.chapter {
  position: relative; min-height: 175vh; padding: 16vh var(--m) 14vh;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 20px; align-items: start;
}
.chapter__vial { grid-column: 7 / 12; grid-row: 1; position: sticky; top: 14vh; height: 72vh; }
.chapter__body { grid-column: 1 / 7; grid-row: 1; padding-top: 6vh; position: relative; }
.chapter--flip .chapter__vial { grid-column: 2 / 7; }
.chapter--flip .chapter__body { grid-column: 7 / 13; padding-left: 2vw; }
.chapter__no { color: var(--dim); }
.chapter__no span { opacity: .6; }
.chapter__name { font-size: clamp(84px, 12.4vw, 236px); margin: 2vh 0 3vh -.05em; letter-spacing: -.04em; }
.chapter__def { font: 400 clamp(20px, 1.8vw, 26px)/1.3 var(--serif); max-width: 34ch; }
.chapter__def i { color: var(--dim); margin-right: .3em; }
.chapter__story { margin-top: 4vh; max-width: 44ch; font-size: 17px; line-height: 1.55; }
.fog-hint { color: var(--dim); white-space: nowrap; }
.metar {
  margin-top: 6vh; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow-x: auto; scrollbar-width: none; color: var(--accent);
}
.metar::-webkit-scrollbar { display: none; }
.obs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 20px; margin-top: 4vh; }
.obs dt { font: 400 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.obs dd { font-size: 15px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.obs b { font-weight: 400; color: var(--accent); white-space: nowrap; }

.sounding { margin-top: 7vh; position: relative; }
.sounding__t { color: var(--dim); margin-bottom: 14px; }
.sounding__row { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); position: relative; }
.sounding__row p { font: 400 clamp(22px, 2vw, 30px)/1.15 var(--serif); }
.sounding__row small { color: var(--dim); font-size: 10px; }
.sounding__row::before {
  content: ""; position: absolute; left: 96px; top: 50%; width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid currentColor; transform: translate(-50%, -50%);
}

.buy { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 6vh; padding-top: 20px; border-top: 1px solid var(--fg); }
.buy p { display: grid; gap: 2px; }
.buy strong { font: 400 44px/1 var(--serif); }

.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 24px; border: 1px solid var(--fg); background: var(--fg); color: var(--paper);
  font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  isolation: isolate; transition: color .5s var(--ease), border-color .9s, background-color .9s;
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--paper); transform: translateY(101%); transition: transform .5s var(--ease); z-index: -1; }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:hover, .btn:focus-visible { color: var(--fg); }
.btn--ghost { background: transparent; color: var(--fg); }
.btn--ghost::before { background: var(--fg); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--paper); }
.btn--big { padding: 20px 30px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]::before { display: none; }

/* Reveal */
.js [data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 1.1s var(--ease), transform 1.3s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Label that rides on the WebGL flacon */
.vial-label {
  position: fixed; left: 0; top: 0; z-index: 0; pointer-events: none; opacity: 0;
  width: 120px; height: 96px;
  display: grid; align-content: center; justify-items: center; gap: 4px; text-align: center;
  background: #F2F0E9; color: #11141B; padding: 8px;
  box-shadow: 0 0 0 .5px rgba(17, 20, 27, .3), 0 1px 0 rgba(0,0,0,.05);
  transform-origin: 0 0; will-change: transform, opacity;
}
.vial-label__brand { font: 500 9px/1 var(--sans); letter-spacing: .38em; padding-left: .38em; }
.vial-label__no { font: 400 9px/1 var(--mono); letter-spacing: .1em; margin-top: 6px; color: #D93A1C; }
.vial-label__name { font: 400 italic 26px/1 var(--serif); letter-spacing: -.01em; }
.vial-label__meta { font: 400 7.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.vial-label.swap > * { animation: labelswap .7s var(--ease); }
@keyframes labelswap { 0% { opacity: 0; transform: translateY(5px); } 100% { opacity: 1; transform: none; } }

/* CSS flacon fallback when WebGL is unavailable */
html.no-webgl [data-vial]::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(42%, 220px); aspect-ratio: 1 / 1.9; transform: translate(-50%, -50%);
  border-radius: 12px; background: linear-gradient(to top, var(--liq, #9DB7A4) 62%, rgba(255,255,255,.25) 62%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.6), 0 30px 40px -30px rgba(0,0,0,.5);
}
html.no-webgl [data-vial] { position: relative; }

/* ---------------- Method ---------------- */
.method { padding: 20vh var(--m) 22vh; }
.method .front { margin-bottom: 14vh; }
.method__head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; margin-bottom: 10vh; }
.method__head .mono { grid-column: 1 / 3; color: var(--dim); padding-top: 1.4em; }
.method__head h2 { grid-column: 3 / 13; font-size: clamp(68px, 10.5vw, 196px); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { border-top: 1px solid var(--fg); padding-top: 18px; }
.steps .mono { color: var(--accent); }
.steps h3 { font: 400 clamp(28px, 2.4vw, 38px)/1.05 var(--serif); margin: 26px 0 14px; letter-spacing: -.01em; }
.steps p { color: var(--dim); font-size: 15px; max-width: 32ch; }

.chroma { margin-top: 16vh; }
.chroma__cap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; font-size: 15px; }
.chroma__cap .mono { color: var(--dim); }
.chroma__plot { position: relative; height: clamp(240px, 36vh, 380px); border-bottom: 1px solid var(--fg); touch-action: pan-y; cursor: crosshair; }
.chroma__plot:focus-visible { outline-offset: 10px; }
.chroma__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chroma__grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chroma__line { fill: none; stroke: var(--fg); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.chroma__fill { fill: color-mix(in srgb, var(--fg) 7%, transparent); }
.chroma__scan { stroke: var(--accent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chroma__axis { display: flex; justify-content: space-between; margin-top: 10px; color: var(--dim); }
/* The readout is placed beside its peak by JS (flipping or clamping to stay inside the plot). */
.chroma__stage { position: relative; }
.chroma__tip {
  position: absolute; top: 0; left: 0; z-index: 1; width: 260px; pointer-events: none;
  display: grid; gap: 6px; transition: left .35s var(--ease);
}
.chroma__tip.is-left { text-align: right; }
.chroma__dot {
  position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--accent);
  transform: translate(-50%, -50%); pointer-events: none; transition: left .3s var(--ease), top .3s var(--ease);
}
.chroma__rt { color: var(--accent); }
.chroma__mol { font: 400 34px/1 var(--serif); font-weight: 400; }
.chroma__desc { font-size: 14px; color: var(--dim); line-height: 1.4; }

/* ---------------- Forecast instrument ---------------- */
.forecast { padding: 22vh var(--m) 22vh; }
.forecast__head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; margin-bottom: 9vh; align-items: end; }
.forecast__head .mono { grid-column: 1 / -1; color: var(--dim); }
.forecast__head h2 { grid-column: 1 / 9; font-size: clamp(64px, 9.4vw, 176px); }
.forecast__head p:last-child { grid-column: 9 / 13; max-width: 36ch; padding-bottom: 1em; }
.noscript { margin-bottom: 6vh; max-width: 44ch; color: var(--dim); }
.forecast__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: center; }
.baro { grid-column: 1 / 6; display: grid; justify-items: center; gap: 14px; }
.baro__dial { position: relative; width: min(100%, 470px); aspect-ratio: 1; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 50%; cursor: grab; }
.baro__dial:active { cursor: grabbing; }
.baro__dial svg { width: 100%; height: 100%; overflow: visible; }
.baro__face { fill: color-mix(in srgb, var(--paper) 55%, transparent); stroke: var(--fg); stroke-width: 1; }
.baro__inner { fill: none; stroke: var(--line); stroke-width: 1; }
.baro__ticks line { stroke: var(--fg); stroke-width: 1; }
.baro__ticks text { font: 400 10px var(--mono); fill: var(--dim); }
.baro__words text { font: 400 italic 21px var(--serif); fill: var(--fg); letter-spacing: .01em; }
.baro__needle { transform-origin: 200px 200px; }
.baro__needle line { stroke: var(--accent); stroke-width: 1.6; }
.baro__needle path { fill: var(--accent); }
.baro__hub { fill: var(--fg); }
.baro__read { position: absolute; left: 50%; top: 66%; transform: translateX(-50%); display: grid; justify-items: center; pointer-events: none; }
.baro__val { font: 400 46px/1 var(--serif); font-variant-numeric: tabular-nums; }
.baro__help { color: var(--dim); }

.controls { grid-column: 6 / 10; display: grid; gap: 26px; padding-left: 1vw; }
.ctl { display: grid; gap: 12px; }
.ctl > span { display: flex; justify-content: space-between; color: var(--dim); }
.ctl__out { color: var(--fg); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: var(--fg); }
input[type=range]::-moz-range-track { height: 1px; background: var(--fg); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 1px solid var(--fg); margin-top: -9px; transition: transform .3s var(--ease); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 1px solid var(--fg); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.3); background: var(--accent); }
#locate { justify-self: start; }
.controls__msg { color: var(--dim); min-height: 1.5em; margin-top: -12px; }
.result { border-top: 1px solid var(--fg); padding-top: 18px; display: grid; gap: 12px; }
.result__k { color: var(--dim); }
.result__name { font-size: clamp(48px, 5vw, 84px); }
.result__no { font: 400 12px var(--mono); letter-spacing: .08em; vertical-align: top; color: var(--accent); }
.result__why { font-size: 15px; max-width: 40ch; }
.result__bars { display: grid; gap: 6px; margin: 4px 0 8px; }
.result__bars li { display: grid; grid-template-columns: 74px 1fr 38px; gap: 10px; align-items: center; font: 400 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.result__bars i { display: block; height: 3px; background: var(--line); position: relative; }
.result__bars i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--fg); transition: width .8s var(--ease); }
.result__bars li.is-top i::after { background: var(--accent); }
.result__bars b { font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; }
.result.flash .result__name { animation: labelswap .7s var(--ease); }
#result-link { justify-self: start; }
.forecast__vial { grid-column: 10 / 13; height: 70vh; position: relative; }

/* ---------------- Discovery set ---------------- */
.set { padding: 20vh var(--m); display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: center; }
.set__visual { grid-column: 1 / 7; perspective: 1400px; }
.case {
  position: relative; aspect-ratio: 5 / 4; background: #F3F1EA; color: #11141B; overflow: hidden;
  box-shadow: 0 50px 80px -40px rgba(17, 20, 27, .45), 0 0 0 1px rgba(17, 20, 27, .12);
  transform: rotateX(var(--rx, 8deg)) rotateY(var(--ry, -10deg)); transition: transform .9s var(--ease);
  transform-style: preserve-3d;
}
.case__chart {
  position: absolute; inset: 0;
  background:
    repeating-radial-gradient(ellipse 60% 48% at 70% 38%, transparent 0 22px, rgba(17,20,27,.34) 22px 23px),
    repeating-radial-gradient(ellipse 40% 60% at 12% 92%, transparent 0 19px, rgba(17,20,27,.22) 19px 20px);
  -webkit-mask: linear-gradient(#000, #000); opacity: .9;
}
.case__chart::after { content: "L"; position: absolute; left: 68%; top: 34%; font: 400 40px/1 var(--serif); color: #D93A1C; }
.case__stamp { position: absolute; left: 22px; top: 18px; font-size: 10px; }
.case__vials { position: absolute; left: 0; right: 0; bottom: 9%; display: flex; justify-content: center; gap: 4.5%; }
.case__vials span {
  width: 9%; aspect-ratio: 1 / 4.4; border-radius: 4px 4px 7px 7px; position: relative;
  background: linear-gradient(90deg, rgba(255,255,255,.55), transparent 22% 70%, rgba(255,255,255,.35) 82%, transparent),
              linear-gradient(to top, var(--c) 0 68%, rgba(255,255,255,.4) 68%);
  box-shadow: inset 0 0 0 1px rgba(17,20,27,.25), 0 14px 18px -12px rgba(17,20,27,.5);
  font: 400 8px/1 var(--mono); display: grid; place-items: end center; padding-bottom: 14%; color: rgba(17,20,27,.8);
}
.case__vials span::before { content: ""; position: absolute; left: 12%; right: 12%; top: -16%; height: 17%; background: linear-gradient(90deg, #111, #444 40%, #111); border-radius: 2px; }
.set__copy { grid-column: 8 / 13; display: grid; gap: 22px; }
.set__copy > .mono { color: var(--dim); }
.set__copy h2 { font-size: clamp(68px, 8.6vw, 160px); }
.set__lede { font-size: 18px; max-width: 40ch; }
.set__facts { display: grid; border-top: 1px solid var(--line); }
.set__facts li { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set__facts li span:first-child { color: var(--dim); }
.buy--set { margin-top: 0; border-top: 0; padding-top: 0; }
.buy--set strong { font-size: 64px; }

/* ---------------- Atelier ---------------- */
.atelier { padding: 24vh var(--m) 0; }
.atelier__head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; margin-bottom: 12vh; }
.atelier__head .mono { grid-column: 1 / -1; color: var(--dim); }
.atelier__head h2 { grid-column: 1 / 12; font-size: clamp(64px, 10vw, 190px); }
.atelier__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 40px 20px; }
.atelier__quote { grid-column: 1 / 7; }
.atelier__quote p { font: 400 clamp(30px, 3.2vw, 54px)/1.08 var(--serif); letter-spacing: -.015em; text-indent: -.4em; }
.atelier__quote footer { margin-top: 24px; color: var(--dim); }
.atelier__story { grid-column: 8 / 13; display: grid; gap: 1.1em; font-size: 16px; color: var(--dim); }
.atelier__story p:first-child { color: var(--fg); font-size: 18px; }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 10vh; }
.stats div { border-top: 1px solid var(--fg); padding-top: 14px; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 12px; }
.stats dt { color: var(--dim); }
.stats dd { font: 400 clamp(64px, 8vw, 140px)/.85 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.log { margin-top: 16vh; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 16px 0; margin-left: calc(var(--m) * -1); margin-right: calc(var(--m) * -1); }
.log__track { display: flex; gap: 64px; width: max-content; animation: log 80s linear infinite; color: var(--dim); }
.log__track span::before { content: "●"; color: var(--accent); margin-right: 12px; font-size: 8px; vertical-align: 2px; }
.log:hover .log__track { animation-play-state: paused; }
@keyframes log { to { transform: translateX(-50%); } }

/* ---------------- Footer ---------------- */
.foot { padding: 26vh var(--m) 28px; }
.foot__news { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: end; }
.foot__news > .mono { grid-column: 1 / -1; color: var(--dim); }
.foot__news h2 { grid-column: 1 / 8; font-size: clamp(52px, 6.4vw, 118px); }
.foot__news > p:not(.mono) { grid-column: 8 / 13; max-width: 36ch; color: var(--dim); }
.news { grid-column: 8 / 13; display: flex; border-bottom: 1px solid var(--fg); }
.news input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 16px 0; font-size: 18px; outline: none; }
.news input::placeholder { color: var(--dim); }
.news .btn { margin-bottom: -1px; }
.foot__news > .news__note { grid-column: 8 / 13; color: var(--dim); margin-top: -8px; }
.news.is-bad { border-color: var(--accent); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.foot__mark { margin: 14vh calc(var(--m) * -.4) 0; }
.foot__mark svg { width: 100%; height: auto; overflow: visible; }
.foot__mark text { font: 400 238px/1 var(--serif); letter-spacing: -6px; fill: transparent; stroke: var(--fg); stroke-width: 1; stroke-dasharray: 1600; stroke-dashoffset: 1600; transition: stroke-dashoffset 4s var(--ease), fill 2s var(--ease) 2.4s; }
.foot__mark.is-in text { stroke-dashoffset: 0; fill: color-mix(in srgb, var(--fg) 8%, transparent); }
.foot__base { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 20px; margin-top: 6vh; padding-top: 18px; border-top: 1px solid var(--line); color: var(--dim); }
.foot__credit { text-transform: none; letter-spacing: .02em; }

/* ---------------- Bag + toast ---------------- */
.bag { position: fixed; inset: 0; z-index: 80; background: rgba(10, 12, 16, .35); display: flex; justify-content: flex-end; }
.bag[hidden] { display: none; }
.bag__panel {
  width: min(440px, 100%); height: 100%; background: #F2F0E9; color: #11141B; padding: 28px; display: flex; flex-direction: column; gap: 22px;
  animation: slidein .6s var(--ease);
  --fg: #11141B; --paper: #F2F0E9; --line: rgba(17,20,27,.18); --dim: rgba(17,20,27,.6);
}
@keyframes slidein { from { transform: translateX(100%); } }
.bag__panel header { display: flex; justify-content: space-between; align-items: baseline; }
.bag__panel h2 { font-size: 52px; }
.bag__close { background: none; border: 0; cursor: pointer; font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; text-decoration: underline; }
.bag__items { flex: 1; overflow: auto; border-top: 1px solid var(--line); }
.bag__items li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.bag__items button { background: none; border: 0; cursor: pointer; font: 400 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.bag__empty { color: var(--dim); }
.bag__panel footer { display: grid; gap: 14px; }
.bag__panel footer p { display: flex; justify-content: space-between; align-items: baseline; }
.bag__total { font: 400 34px var(--serif); }
.bag__note { color: var(--dim); text-align: center; }
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 95; transform: translate(-50%, 140%); opacity: 0;
  background: var(--fg); color: var(--paper); padding: 13px 18px; transition: transform .6s var(--ease), opacity .6s; max-width: calc(100% - 32px);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .nav__obs { display: none; }
  .nav { grid-template-columns: auto 1fr auto; }
  .obs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controls { grid-column: 6 / 13; }
  .forecast__vial { grid-column: 1 / -1; height: 56vh; order: 3; }
}
@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto auto; gap: 20px; }
  .nav__links { display: none; }
  .nav__menu { display: inline-block; }
  .gauge { display: none; }
  .hero__chart { top: 74px; flex-direction: column; gap: 0; }
  .hero__title { padding-top: 30vh; font-size: clamp(60px, 19vw, 140px); }
  .hero__title .line--indent { padding-left: 8vw; }
  .hero__foot { grid-template-columns: 1fr; gap: 16px; }
  .hero__lede, .hero__note, .hero__hint { grid-column: 1; text-align: left; }
  .station:nth-of-type(2), .station:nth-of-type(4) { display: none; }
  .station { width: 74px; height: 74px; margin: -37px 0 0 -37px; }
  .manifesto { display: block; padding-top: 16vh; }
  .manifesto__kicker { margin-bottom: 4vh; }
  .manifesto__text--b { margin-top: 8vh; }
  .index__head { grid-template-columns: 1fr; }
  .index__head h2, .index__intro { grid-column: 1; }
  .index__list a { grid-template-columns: 44px 1fr 30px; row-gap: 4px; }
  .index__wx { grid-column: 2; grid-row: 2; font-size: 14px; }
  .index__where { display: none; }
  .index__swatch { grid-column: 3; grid-row: 1; width: 22px; height: 22px; }
  .chapter { display: block; min-height: 0; padding: 12vh var(--m); }
  .chapter__vial { position: relative; top: 0; height: 64vh; }
  .chapter--flip .chapter__body { padding-left: 0; }
  .chapter__body { padding-top: 2vh; }
  .obs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sounding__row { grid-template-columns: 92px 1fr; }
  .sounding__row::before { left: 74px; }
  .buy { flex-wrap: wrap; }
  .method__head, .forecast__head, .atelier__head { grid-template-columns: 1fr; }
  .method__head > *, .forecast__head > *, .atelier__head > * { grid-column: 1 !important; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .chroma__tip { width: 220px; }
  .chroma__mol { font-size: 26px; }
  .forecast__grid { grid-template-columns: 1fr; }
  .baro, .controls, .forecast__vial { grid-column: 1; }
  .controls { padding-left: 0; }
  .set { grid-template-columns: 1fr; }
  .set__visual, .set__copy { grid-column: 1; }
  .set__visual { margin-bottom: 6vh; }
  .atelier__grid { grid-template-columns: 1fr; }
  .atelier__quote, .atelier__story, .stats { grid-column: 1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .foot__news { grid-template-columns: 1fr; }
  .foot__news > * { grid-column: 1 !important; }
  .foot__base { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* Phones: the readout sits in the flow above the trace, where a dragging thumb won't cover it.
     The fixed min-height keeps the trace from shifting under the finger as descriptions change. */
  .chroma__tip { position: static; width: auto; min-height: 7.6em; margin-bottom: 14px; align-content: start; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .obs dd { font-size: 14px; }
  .buy--set { flex-direction: column; align-items: stretch; }
  .buy--set .btn { width: 100%; }
  .chroma__cap { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .log__track { animation: none; }
}
