/* Uplifty front door.
   Layout: one working week pinned beside the copy. It leaks, gets mapped, traced, redesigned and
   measured as you read, then the page settles into proof, three doors, the person and the consult.

   The one rule that carries the page: ORANGE MEANS A LEAK. It is the mark's lift colour, and on
   this page it marks wasted time and nothing else. It never decorates. Recovered time is the
   mark's indigo. The brand gradient appears once, as the line that cuts a "before" number. */

@font-face { font-family: "Charter"; src: url("fonts/charter_regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Charter"; src: url("fonts/charter_italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Charter"; src: url("fonts/charter_bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope.woff2") format("woff2-variations"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  /* Neutrals lean toward the mark's hue (230), so the page reads as Uplifty even where no
     colour is used. De-emphasis is a recomputed colour, never opacity. */
  --paper: #F6F7FC;
  --paper-glass: rgba(246, 247, 252, 0.9);
  --surface: #FFFFFF;
  --ink: #151A3B;
  --ink-2: #474E73;
  --ink-3: #7A81A3;
  --rule: #E3E6F3;
  --grid: #EEF0F8;

  /* Brand, from uplifty-brand/tokens.json */
  --primary: #4F6CF8;          /* the mark */
  --primary-deep: #3149C8;     /* the mark at text size: #4F6CF8 is under 4.5:1 on white */
  --primary-tint: #ECEFFE;
  --lift: #FF9501;             /* the lift: a leak, only */
  --lift-ink: #A24F00;
  --lift-tint: #FFE9CC;
  --lift-ring: #FFB65C;
  --cut: linear-gradient(90deg, #AC76FD 0%, #7E71FA 50%, #536CF9 100%);
  --wash:
    radial-gradient(at 20% 15%, #FBE7E5 0%, transparent 55%),
    radial-gradient(at 85% 20%, #EDEDF2 0%, transparent 55%),
    radial-gradient(at 15% 90%, #F6F6E5 0%, transparent 55%),
    radial-gradient(at 90% 88%, #E7FCF1 0%, transparent 55%),
    #DFE4FE;

  /* The closing band */
  --night: #121633;
  --night-2: #1B2048;
  --night-3: #0D1029;
  --night-line: #2E356A;
  --on-night: #EEF0FB;
  --on-night-2: #A8AED2;

  --serif: "Charter", "Bitstream Charter", Georgia, "Times New Roman", serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --t-display: clamp(2.75rem, 1.6rem + 4.2vw, 4.9rem);
  --t-h2: clamp(2rem, 1.4rem + 2.3vw, 3.15rem);
  --t-step: clamp(1.75rem, 1.35rem + 1.5vw, 2.45rem);
  --t-h3: clamp(1.4rem, 1.25rem + 0.6vw, 1.7rem);
  --t-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-eyebrow: 0.75rem;

  --shadow-float: 0 1px 2px rgba(21, 26, 59, 0.05), 0 22px 50px -22px rgba(21, 26, 59, 0.25);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --bar-h: 64px;
  --side: clamp(20px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); background: var(--paper); }
body {
  margin: 0; position: relative; isolation: isolate; overflow-x: clip;
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: var(--t-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
p { margin: 0; }
a { color: var(--primary-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.04; letter-spacing: -0.018em; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: 4px; }

.wrap {
  width: 100%; max-width: 1240px; margin-inline: auto;
  padding-left: max(var(--side), env(safe-area-inset-left, 0px));
  padding-right: max(var(--side), env(safe-area-inset-right, 0px));
}
.eyebrow { font-size: var(--t-eyebrow); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); line-height: 1.3; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.fine { font-size: var(--t-small); color: var(--ink-3); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 16px; }

/* The brand's light wash, behind the top of the page only. */
.wash {
  position: absolute; inset: 0 0 auto; height: 1150px; z-index: -1; pointer-events: none;
  background: var(--wash);
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font: 700 1rem/1 var(--sans); color: #fff; background: var(--primary);
  padding: 1em 1.4em; border: 0; border-radius: 999px; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.btn:hover { background: var(--primary-deep); transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(49, 73, 200, 0.7); }
.btn:active { transform: translateY(0); }
.btn-sm { font-size: 0.875rem; padding: 0.75em 1.1em; }
.btn-on { background: #fff; color: var(--primary-deep); }
.btn-on:hover { background: var(--primary-tint); }
.link-arrow { display: inline-flex; align-items: center; gap: 0.45em; font-weight: 700; color: var(--ink); text-decoration: none; }
.link-arrow::after { content: "→"; transition: transform 0.25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.bar.is-scrolled {
  background: var(--paper-glass);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 var(--rule);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--paper); }
.bar-in { display: flex; align-items: center; gap: 28px; height: var(--bar-h); }
.brand img { height: 27px; width: auto; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--ink-2); font-weight: 600; font-size: 0.9375rem; text-decoration: none; transition: color 0.2s; }
.nav a:hover { color: var(--ink); }
.bar .btn { margin-left: 4px; }

/* ---------- Story: hero, pinned week, steps ---------- */
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  grid-template-areas: "hero visual" "steps visual";
  column-gap: clamp(40px, 6vw, 96px);
}
.hero { grid-area: hero; padding-block: clamp(48px, 9vh, 104px) 40px; display: grid; align-content: start; gap: 0; }
.hero h1 { font-size: var(--t-display); line-height: 0.99; letter-spacing: -0.028em; margin-top: 22px; }
.hero h1 .l2 { display: block; }
.leak-word {
  position: relative; white-space: nowrap;
  background: linear-gradient(var(--lift), var(--lift)) 0 94% / 100% 0.07em no-repeat;
}
/* A single drop forms under the last letters and falls. The only motion in the headline. */
.drop {
  position: absolute; right: 0.2em; top: 96%; width: 0.13em; height: 0.13em;
  background: var(--lift); border-radius: 0 50% 50% 50%;
  transform: rotate(45deg) scale(0); transform-origin: 50% 0;
  animation: drip 3.4s var(--ease) 1.2s infinite;
}
@keyframes drip {
  0% { transform: translateY(0) rotate(45deg) scale(0); opacity: 1; }
  35% { transform: translateY(0) rotate(45deg) scale(1); opacity: 1; }
  58% { transform: translateY(0.32em) rotate(45deg) scale(0.9); opacity: 1; }
  68%, 100% { transform: translateY(0.42em) rotate(45deg) scale(0.4); opacity: 0; }
}
.hero .lead { margin-top: 26px; max-width: 31rem; font-size: var(--t-lead); line-height: 1.55; color: var(--ink-2); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 34px; }
.hero .fine { margin-top: 16px; }

.js .hero > * { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.story-visual { grid-area: visual; padding-top: clamp(40px, 8vh, 96px); padding-bottom: 14vh; }
.panel {
  position: sticky; top: calc(var(--bar-h) + 20px);
  margin: 0; padding: 18px 18px 16px; display: grid; gap: 14px;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-float);
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stage { font-size: 0.75rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.stage::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; background: var(--ink-3); vertical-align: 1px; transition: background-color 0.4s; }
.panel[data-step="0"] .stage::before,
.panel[data-step="1"] .stage::before,
.panel[data-step="2"] .stage::before { background: var(--lift); }
.panel[data-step="3"] .stage::before,
.panel[data-step="4"] .stage::before { background: var(--primary); }

.week-wrap { position: relative; }
.week {
  --slot: clamp(7px, calc((100vh - 380px) / 33), 12.5px);
  display: grid; grid-template-columns: 38px repeat(5, minmax(0, 1fr)); column-gap: 6px;
}
.axis { position: relative; margin-top: 28px; height: calc(32 * var(--slot)); }
.axis span { position: absolute; right: 6px; transform: translateY(-50%); font: 500 0.6875rem/1 var(--mono); color: var(--ink-3); }
.day { min-width: 0; }
.day-h { height: 22px; margin-bottom: 6px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); line-height: 22px; }
.day-b {
  position: relative; height: calc(32 * var(--slot));
  background: repeating-linear-gradient(to bottom, var(--grid) 0 1px, transparent 1px calc(8 * var(--slot)));
}
.blk {
  position: absolute; left: 0; right: 0;
  top: calc(var(--t) * var(--slot));
  height: max(0px, calc(var(--h) * var(--slot) - 3px));
  padding: 4px 6px; border-radius: 5px; overflow: hidden;
  font-size: 0.6875rem; line-height: 1.2;
  background: var(--primary-tint); color: var(--ink-2);
  transition: top 0.95s var(--ease), height 0.95s var(--ease), background-color 0.5s, color 0.5s, box-shadow 0.5s, padding 0.5s;
  transition-delay: var(--dl, 0ms);
}
.blk .bl { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk .bd { display: block; font-family: var(--mono); font-size: 0.625rem; color: var(--ink-3); margin-top: 1px; transition: color 0.5s; }
.blk.is-small .bl, .blk.is-small .bd, .blk.is-short .bd { visibility: hidden; }
.blk.is-small { padding-block: 0; }
.blk.meet { background: #EFF0F6; color: var(--ink-3); }
.blk .tg {
  position: absolute; right: 4px; top: 4px; width: 15px; height: 15px; border-radius: 4px;
  display: grid; place-items: center; font: 700 0.625rem/1 var(--mono);
  background: var(--lift); color: #fff; transform: scale(0); transition: transform 0.4s var(--ease);
}

/* As it feels: the leaks look like any other work. They are there, just not visible yet. */
.panel[data-step="1"] .blk.leak,
.panel[data-step="2"] .blk.leak { background: var(--lift-tint); color: var(--lift-ink); box-shadow: inset 0 0 0 1px var(--lift-ring); }
.panel[data-step="1"] .blk.leak .bd,
.panel[data-step="2"] .blk.leak .bd { color: var(--lift-ink); }
.panel[data-step="2"] .blk.leak .tg { transform: scale(1); }
.panel[data-step="2"] .blk.leak .bl { padding-right: 16px; }
/* Redesigned: what is left of a leak is a thin sliver, still orange because a leak rarely goes
   to zero. The meter counts it honestly as what is still leaking. */
.panel[data-step="3"] .blk.leak,
.panel[data-step="4"] .blk.leak {
  background: repeating-linear-gradient(135deg, #FFD49B 0 3px, var(--lift-tint) 3px 6px);
  box-shadow: inset 0 0 0 1px var(--lift-ring);
}
/* Measured: the time that came back is the mark's colour. */
.panel[data-step="4"] .blk.grew { background: var(--primary); color: #fff; }
.panel[data-step="4"] .blk.grew .bd { color: #DCE3FF; }

.drips { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.readout { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.meter { display: grid; gap: 5px; padding: 12px 14px; border-radius: 12px; background: var(--paper); min-width: 0; }
.meter .num { font-size: clamp(1.2rem, 0.95rem + 0.9vw, 1.65rem); font-weight: 700; line-height: 1.15; white-space: nowrap; }
.m-leak .num { color: var(--lift-ink); }
.m-back .num { color: var(--ink-3); transition: color 0.5s; }
.panel[data-step="3"] .m-back .num, .panel[data-step="4"] .m-back .num { color: var(--primary-deep); }
.meter .num.is-unknown { font-size: 0.9375rem; font-weight: 600; color: var(--ink-3); line-height: 1.85; }
.scale { display: block; height: 4px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.scale i { display: block; height: 100%; width: var(--w, 0%); background: var(--lift); border-radius: 2px; transition: width 0.95s var(--ease); }
.m-back .scale i { background: var(--primary); }
.per { font-size: 0.75rem; color: var(--ink-3); }
.panel figcaption { font-size: 0.75rem; color: var(--ink-3); }

.steps-wrap { grid-area: steps; }
.steps-label { padding-top: 8px; }
.steps { list-style: none; margin: 0; padding: 0 0 10vh; }
.step {
  min-height: 70vh; max-width: 33rem;
  display: flex; flex-direction: column; justify-content: center; gap: 16px; padding-block: 40px;
}
.step-n { font: 700 0.75rem/1 var(--mono); letter-spacing: 0.06em; color: var(--ink-3); }
.step h2 { font-size: var(--t-step); transition: color 0.45s; }
.step p { color: var(--ink-2); transition: color 0.45s; }
.js .step:not(.is-on) h2 { color: #B3B8D0; }
.js .step:not(.is-on) p, .js .step:not(.is-on) .causes { color: #A3A9C4; }
.js .step.is-on .step-n { color: var(--lift-ink); }
.js .step.is-on[data-step="3"] .step-n, .js .step.is-on[data-step="4"] .step-n { color: var(--primary-deep); }
.causes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; color: var(--ink); transition: color 0.45s; }
.causes li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 0.9375rem; font-weight: 600; }
.causes .hrs { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.tag { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font: 700 0.75rem/1 var(--mono); background: var(--lift); color: #fff; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 11vw, 150px); }
.sec-head { display: grid; gap: 14px; max-width: 44rem; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-head h2 { font-size: var(--t-h2); }
.sec-lead { color: var(--ink-2); font-size: 1.125rem; }

/* Results: a ledger. Before on the left, cut; after on the right. */
.results { padding-top: clamp(40px, 6vw, 80px); }
.ledger { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-float); }
.row {
  display: grid; align-items: end; column-gap: clamp(20px, 3vw, 40px); row-gap: 10px;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "k before arrow after" "k note note note";
  padding: clamp(26px, 3.4vw, 40px) clamp(22px, 3.4vw, 44px);
}
.row + .row { border-top: 1px solid var(--rule); }
.row-k { grid-area: k; align-self: start; padding-top: 6px; font-weight: 700; font-size: 0.9375rem; color: var(--ink); display: grid; gap: 6px; }
.row-k .when { font-size: 0.75rem; font-weight: 500; color: var(--ink-3); }
.before { grid-area: before; } .after { grid-area: after; }
.arrow { grid-area: arrow; font-size: 1.6rem; color: var(--ink-3); padding-bottom: 30px; }
.val { position: relative; display: inline-block; font-family: var(--serif); font-weight: 700; font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.6rem); line-height: 1; letter-spacing: -0.025em; white-space: nowrap; }
.before .val { color: var(--ink-3); }
.after .val { color: var(--primary-deep); }
.unit { display: block; margin-top: 10px; font-size: 0.875rem; color: var(--ink-3); }
.before .val::after {
  content: ""; position: absolute; left: -3%; right: -3%; top: 54%; height: 0.08em; border-radius: 2px;
  background: var(--cut); transform-origin: left center; transition: transform 0.9s var(--ease) 0.15s;
}
.js .row:not(.is-cut) .before .val::after { transform: scaleX(0); }
.row-note { grid-area: note; color: var(--ink-2); }
.row-prog { grid-template-areas: "k prog prog prog"; align-items: start; }
.prog { grid-area: prog; font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); max-width: 46rem; }

.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); margin-top: clamp(48px, 6vw, 80px); }
.q { margin: 0; display: grid; gap: 18px; align-content: start; }
.q blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem); line-height: 1.4; color: var(--ink); }
.q figcaption { display: flex; align-items: center; gap: 12px; font-size: 0.875rem; color: var(--ink-3); }
.q figcaption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.q figcaption strong { display: block; color: var(--ink); font-weight: 700; }

/* Three doors. The company door is the one that leads. */
.ways { padding-top: 0; }
.doors { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(14px, 2vw, 24px); }
.door {
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
  padding: clamp(26px, 3vw, 38px); border-radius: 22px;
  background: var(--surface); box-shadow: var(--shadow-float);
}
.door h3 { font-size: var(--t-h3); }
.door p { color: var(--ink-2); }
.door .fine { color: var(--ink-3); }
.door .go, .door .btn { margin-top: auto; align-self: flex-start; }
.door .go { padding-top: 12px; }
.door-co { background: var(--primary-deep); box-shadow: 0 24px 50px -24px rgba(49, 73, 200, 0.65); }
.door-co .eyebrow { color: #C3CCFF; }
.door-co h3 { color: #fff; }
.door-co p { color: #E2E7FF; }
.door-co .fine { color: #B9C3FB; }
.door-co .btn { margin-top: auto; }

/* Who */
.who { padding-top: 0; }
.who-grid { display: grid; grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.who picture img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; border-radius: 22px; box-shadow: var(--shadow-float); }
.who-text { display: grid; gap: 18px; max-width: 39rem; }
.who-text h2 { font-size: var(--t-h2); }
.who-text p:not(.eyebrow) { color: var(--ink-2); font-size: 1.125rem; text-wrap: pretty; }
.who-links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 6px; }

/* ---------- Consult ---------- */
.consult { background: var(--night); color: var(--on-night); padding-block: clamp(80px, 11vw, 140px); }
.consult-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.consult-copy { display: grid; gap: 20px; }
.consult .eyebrow { color: #8C93C4; }
.consult h2 { font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.4rem); color: #fff; line-height: 1; letter-spacing: -0.028em; }
.consult-copy > p:not(.eyebrow):not(.fine) { color: var(--on-night-2); font-size: 1.125rem; max-width: 28rem; }
.consult .fine { color: var(--on-night-2); font-size: 0.9375rem; }
.consult a { color: #fff; }

.form { display: grid; gap: 18px; padding: clamp(22px, 3vw, 34px); border-radius: 22px; background: var(--night-2); }
.form > label { display: grid; gap: 8px; font-size: 0.8125rem; font-weight: 700; color: var(--on-night); }
.form input[type="text"], .form input[type="email"], .form textarea {
  width: 100%; font: 500 1rem/1.4 var(--sans); color: var(--on-night);
  background: var(--night-3); border: 1px solid var(--night-line); border-radius: 12px; padding: 0.85em 0.95em;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form textarea { resize: vertical; min-height: 92px; }
.form ::placeholder { color: #6A7099; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 108, 248, 0.4); }
.form [aria-invalid="true"] { border-color: var(--lift); }
.seg { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { width: 100%; padding: 0; margin-bottom: 8px; font-size: 0.8125rem; font-weight: 700; color: var(--on-night); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label {
  padding: 0.6em 1.05em; border-radius: 999px; cursor: pointer; font-size: 0.9375rem; font-weight: 600;
  color: var(--on-night-2); background: var(--night-3); box-shadow: inset 0 0 0 1px var(--night-line);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg input:checked + label { background: var(--primary); color: #fff; box-shadow: none; }
.seg input:focus-visible + label { outline: 3px solid var(--primary); outline-offset: 3px; }
.form .btn { justify-self: start; min-width: 9rem; }
.form .btn[disabled] { cursor: default; background: var(--night-line); transform: none; box-shadow: none; }
.form-status { min-height: 1.5em; font-size: 0.9375rem; color: var(--on-night-2); }
.form-status.is-ok { color: #fff; font-weight: 600; }
.form-status.is-err { color: #FFC680; }

/* ---------- Footer ---------- */
.foot { background: var(--night); color: var(--on-night-2); border-top: 1px solid var(--night-line); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; padding-block: 52px 28px; }
.footer-org { display: grid; gap: 10px; max-width: 34rem; font-size: 0.875rem; }
.footer-org img { height: 26px; width: auto; margin-bottom: 8px; }
.footer-org a, .foot-nav a { color: var(--on-night); }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: start; gap: 12px 26px; font-size: 0.9375rem; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; }
.foot-bottom { padding-block: 0 36px; font-size: 0.8125rem; color: #7C83AD; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1080px) {
  .nav { gap: 20px; }
  .nav a[href="#results"] { display: none; }
}

@media (max-width: 900px) {
  :root { --bar-h: 58px; }
  .nav { display: none; }
  .bar .btn { margin-left: auto; }
  .brand img { height: 24px; }

  /* One column. The panel pins under the header while the steps scroll beneath it. */
  .story-grid { display: block; }
  .hero { padding-block: 36px 28px; }
  .story-visual {
    position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); z-index: 10;
    padding: 6px 0 14px; margin-inline: -4px;
    background: linear-gradient(to bottom, var(--paper) 88%, rgba(246, 247, 252, 0));
  }
  .panel { position: static; padding: 12px 12px 10px; gap: 10px; border-radius: 16px; }
  .week { --slot: clamp(6px, calc((100vh - 470px) / 32), 8.5px); grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 4px; }
  .axis { display: none; }
  .day-h { height: 16px; line-height: 16px; margin-bottom: 4px; font-size: 0.625rem; letter-spacing: 0.08em; }
  .blk { font-size: 0.625rem; padding: 3px 4px; border-radius: 4px; }
  .blk .bd { display: none; }
  .blk .tg { width: 12px; height: 12px; font-size: 0.5625rem; right: 2px; top: 2px; }
  .readout { gap: 8px; }
  .meter { padding: 8px 10px; gap: 3px; }
  .meter .num { font-size: 1.05rem; }
  .meter .num.is-unknown { font-size: 0.8125rem; line-height: 1.3; }
  .per { display: none; }
  .panel figcaption { font-size: 0.6875rem; line-height: 1.35; }
  .steps-label { padding-top: 24px; }
  .step { min-height: 62vh; justify-content: flex-start; padding-block: 28px 40px; }

  .row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "k" "before" "after" "note"; row-gap: 14px; }
  .row-prog { grid-template-areas: "k" "prog"; }
  .row-k { padding-top: 0; }
  .arrow { display: none; }
  .unit { margin-top: 6px; }
  .quotes { grid-template-columns: minmax(0, 1fr); }
  .doors { grid-template-columns: minmax(0, 1fr); }
  .who-grid { grid-template-columns: minmax(0, 1fr); }
  .who picture { max-width: 17rem; }
  .consult-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-nav { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .bar .btn { font-size: 0.8125rem; padding: 0.7em 0.95em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .drop { display: none; }
}
