/* Brace site. One light look. Tokens mirror src/theme.ts, which stays the source of truth.
   Layout: a blue building screen that stays put while the cream page rises over it like a sheet. */

@font-face { font-family: Montserrat; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/montserrat-500.woff2) format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/montserrat-600.woff2) format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/montserrat-700.woff2) format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 800; font-style: normal; font-display: swap; src: url(/fonts/montserrat-800.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --bg: #F4F2EC;
  --card: #FEFDFB;
  --soft: #EFECE6;
  --ink: #35211A;
  --sub: #746A60;
  --muted: #9D948A;
  --accent: #2F6BFF;
  --accent-rgb: 47, 107, 255;
  --soft-fill: rgba(53, 33, 26, 0.055);
  --on-blue: #FFFFFF;
  --on-blue-sub: rgba(255, 255, 255, 0.88);
  --on-blue-fine: rgba(255, 255, 255, 0.76);
  --phone: #17120F;

  --grad-button: linear-gradient(135deg, #2350EE 0%, #3562FA 55%, #5273FF 100%);
  --grad-card: radial-gradient(95% 135% at 100% 0%, rgba(255, 206, 172, 0.98) 0%, rgba(255, 206, 172, 0.55) 22%, rgba(255, 206, 172, 0) 58%),
    linear-gradient(155deg, #2350EE 0%, #3562FA 55%, #5273FF 100%);
  --grad-num: linear-gradient(135deg, #2350EE 0%, #6B7AFF 100%);
  --wash: linear-gradient(180deg, rgba(58, 105, 255, 0.14) 0%, rgba(255, 206, 172, 0.10) 55%, rgba(244, 242, 236, 0) 100%);

  --shadow-card: 0 1px 1px rgba(53, 33, 26, 0.04), 0 10px 22px -14px rgba(53, 33, 26, 0.16);
  --shadow-hero-card: 0 1px 1px rgba(35, 80, 238, 0.10), 0 16px 28px -18px rgba(35, 80, 238, 0.55);
  --shadow-float: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 24px -14px rgba(35, 80, 238, 0.75);
  --shadow-sheet: 0 -12px 32px -12px rgba(38, 26, 20, 0.30);
  --shadow-glass: inset 0 0 0 1px rgba(255, 255, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 10px 26px -12px rgba(53, 33, 26, 0.30), 0 1px 2px rgba(53, 33, 26, 0.08);
  --glass-tint: rgba(255, 255, 255, 0.60);
  --glass-blur: blur(22px) saturate(170%);

  --font: Montserrat, "Avenir Next", -apple-system, system-ui, sans-serif;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --pad-l: max(16px, env(safe-area-inset-left, 0px), 4vw);
  --pad-r: max(16px, env(safe-area-inset-right, 0px), 4vw);
  --orb-w: min(100vw - 24px, 620px, (100svh - 455px) * 1.4);
  --phone-w: min(290px, 70vw);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video { max-width: 100%; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.shell {
  max-width: 1180px;
  margin-inline: auto;
  padding-left: var(--pad-l);
  padding-right: var(--pad-r);
}

.glass {
  background: var(--glass-tint);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass);
}

/* ---------- App Store button (text and link come from store.js) ---------- */

store-button { display: inline-block; }
store-note { display: block; }

.store {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 26px; border-radius: 14px;
  font: 700 16.5px/22px var(--font); letter-spacing: -0.015em;
  text-decoration: none; white-space: nowrap;
}
.store.is-link {
  background: var(--grad-button); color: var(--on-blue); box-shadow: var(--shadow-float);
  transition: transform 0.6s var(--ease);
}
.store.is-link:hover { transform: scale(1.025); }
.store.is-link:active { transform: scale(0.98); }
.store.is-soon { background: var(--soft-fill); color: var(--ink); }

.fine { font: 600 13px/18px var(--font); color: var(--sub); }

/* Desktop QR card. Empty until store.js says the store page exists. */
store-scan { display: none; }
@media (min-width: 1000px) and (hover: hover) and (pointer: fine) {
  store-scan:not(:empty) {
    position: fixed; z-index: 15; right: 20px; bottom: 20px;
    display: grid; justify-items: center; gap: 8px;
    padding: 12px 12px 10px; border-radius: 20px;
    font: 600 12.5px/16px var(--font); color: var(--ink);
  }
  store-scan img { display: block; padding: 6px; border-radius: 12px; background: var(--card); }
  store-scan button {
    position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; padding: 0;
    border: 0; border-radius: 50%; cursor: pointer;
    font: 600 15px/1 var(--font); color: var(--sub); background: var(--card); box-shadow: var(--shadow-card);
  }
}

/* ---------- Nav: one glass pill ---------- */

.nav {
  position: fixed; z-index: 20;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 50%; transform: translateX(-50%);
  width: min(100% - 32px, 520px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 7px 8px 7px 10px; border-radius: 999px;
  background: var(--glass-tint);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass);
}
.nav-brand {
  display: flex; align-items: center; gap: 9px;
  font: 700 17px/22px var(--font); letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.nav-brand img { display: block; border-radius: 8px; }
.nav .store { min-height: 36px; padding: 0 15px; border-radius: 999px; font-size: 13.5px; line-height: 18px; }
.nav .store.is-soon { background: none; padding: 0 10px 0 0; font-weight: 600; color: var(--sub); }

/* ---------- Hero: the building screen ---------- */

.hero {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  min-height: min(100svh, 940px);
  padding: calc(58px + env(safe-area-inset-top, 0px)) 0 84px;
  color: var(--on-blue);
  /* The blue to lilac band is as wide as the orb clip, so the clip's own background melts into it. */
  background:
    radial-gradient(80% 70% at 100% 0%, rgba(240, 192, 186, 0.95) 0%, rgba(196, 170, 214, 0.70) 28%, rgba(150, 146, 232, 0) 68%),
    linear-gradient(180deg, rgba(37, 82, 237, 0) 55%, rgba(39, 90, 244, 0.55) 100%),
    linear-gradient(90deg, #2552ED calc(50% - var(--orb-w) / 2), #5677F5 50%, #8B8BF4 calc(50% + var(--orb-w) / 2), #6F82F8 calc(50% + var(--orb-w) * 1.1), #5273FF 100%);
}

.hero-lights { position: absolute; inset: 0; pointer-events: none; }
.hero-lights i { position: absolute; border-radius: 50%; will-change: transform; }
.light-peach {
  width: 60vmax; height: 60vmax; right: -22vmax; top: -28vmax;
  background: radial-gradient(closest-side, rgba(255, 206, 172, 0.55), rgba(255, 206, 172, 0));
  animation: drift-a 17s ease-in-out infinite alternate;
}
.light-sky {
  width: 46vmax; height: 46vmax; left: -16vmax; top: 34%;
  background: radial-gradient(closest-side, rgba(128, 199, 255, 0.36), rgba(128, 199, 255, 0));
  animation: drift-b 21s ease-in-out infinite alternate;
}
.light-lilac {
  width: 42vmax; height: 42vmax; left: 38%; bottom: -20vmax;
  background: radial-gradient(closest-side, rgba(164, 140, 255, 0.40), rgba(164, 140, 255, 0));
  animation: drift-c 25s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(-9vmax, 7vmax, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(10vmax, -8vmax, 0) scale(0.9); } }
@keyframes drift-c { to { transform: translate3d(-14vmax, -6vmax, 0) scale(1.15); } }
.hero.is-covered .hero-lights i { animation-play-state: paused; }

.hero-in {
  position: relative; z-index: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.orb {
  position: relative; width: var(--orb-w); aspect-ratio: 590 / 480;
  margin-block: calc(var(--orb-w) * -0.09) calc(var(--orb-w) * -0.07);
}
.orb::after {
  content: ""; position: absolute; left: 50%; bottom: 7%;
  width: 30%; height: 5%; border-radius: 50%;
  background: rgba(14, 22, 90, 0.36); filter: blur(14px);
  transform: translateX(-50%);
}
.orb-video {
  position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 56%, rgba(0, 0, 0, 0.55) 76%, transparent 96%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 56%, rgba(0, 0, 0, 0.55) 76%, transparent 96%);
}

.eyebrow { font: 600 13px/18px var(--font); letter-spacing: 0.02em; color: var(--on-blue-fine); }

h1 {
  margin-top: 10px; max-width: 13ch;
  font-weight: 800; font-size: clamp(2.5rem, 1.2rem + 5.6vw, 4.5rem);
  line-height: 1.03; letter-spacing: -0.045em; text-wrap: balance;
}
.lede {
  margin-top: 16px; max-width: 36ch;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem); line-height: 1.5;
  color: var(--on-blue-sub); text-wrap: pretty;
}
.hero-cta { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

@media (min-width: 700px) {
  :root { --orb-w: min(100vw - 24px, 620px, (100svh - 520px) * 1.4); }
  .orb { margin-top: calc(var(--orb-w) * -0.04); }
  .lede { max-width: 44ch; }
}

.hero .store.is-link, .close-card .store.is-link {
  background: var(--card); color: var(--ink);
  box-shadow: 0 14px 28px -14px rgba(10, 20, 90, 0.70);
}
.hero .store.is-soon, .close-card .store.is-soon {
  background: rgba(255, 255, 255, 0.16); color: var(--on-blue);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 12px 26px -14px rgba(10, 20, 90, 0.55);
}
.hero .fine, .close-card .fine { color: var(--on-blue-fine); }
.hero :focus-visible, .close-card :focus-visible { outline-color: var(--on-blue); }

/* The hero stays put and the page rises over it. Short screens get a normal page. */
@media (min-height: 620px) {
  .home .hero { position: sticky; top: 0; height: 100svh; min-height: 0; }
}
@supports (animation-timeline: scroll()) {
  @media (min-height: 620px) and (prefers-reduced-motion: no-preference) {
    .home .hero-in {
      animation: hero-away linear both;
      animation-timeline: scroll(root block);
      animation-range: 0px 100svh;
    }
  }
}
@keyframes hero-away { to { transform: translateY(-7svh) scale(0.9); opacity: 0; } }

/* ---------- The sheet ---------- */

.sheet {
  position: relative; z-index: 2; margin-top: -56px;
  background: var(--bg); border-radius: 34px 34px 0 0;
  box-shadow: var(--shadow-sheet);
}
.sheet::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 440px;
  border-radius: inherit; background: var(--wash); pointer-events: none;
}
.sheet > * { position: relative; }

h2 {
  font-weight: 800; font-size: clamp(2rem, 1.1rem + 3.6vw, 3.5rem);
  line-height: 1.04; letter-spacing: -0.045em; text-wrap: balance;
}

/* 12 / 3 / 30 */
.plan { padding-top: clamp(44px, 7vw, 84px); text-align: center; }
.nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 860px; margin-inline: auto; }
.nums li { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.num {
  padding-inline: 0.06em;
  font-weight: 800; font-size: clamp(3.75rem, 1rem + 13vw, 9.5rem);
  line-height: 0.95; letter-spacing: -0.055em; font-variant-numeric: tabular-nums;
  background: var(--grad-num); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nums span { font: 600 clamp(0.8125rem, 0.7rem + 0.4vw, 1rem)/1.3 var(--font); color: var(--sub); }
.statement {
  margin: clamp(36px, 5vw, 64px) auto 0; max-width: 24ch;
  font-weight: 700; font-size: clamp(1.5rem, 1rem + 2.2vw, 2.5rem);
  line-height: 1.15; letter-spacing: -0.035em;
}

/* How it works: one phone, four glass cards */
.how { padding-top: clamp(84px, 11vw, 150px); }
.how > h2 { text-align: center; }
.how-stage {
  position: relative; margin-top: clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.how-lights {
  position: absolute; inset: -4% -6%; pointer-events: none;
  background:
    radial-gradient(38% 36% at 30% 28%, rgba(58, 105, 255, 0.22), rgba(58, 105, 255, 0) 70%),
    radial-gradient(34% 34% at 72% 62%, rgba(255, 206, 172, 0.50), rgba(255, 206, 172, 0) 70%),
    radial-gradient(30% 30% at 62% 18%, rgba(164, 140, 255, 0.18), rgba(164, 140, 255, 0) 70%);
}

.phone {
  position: relative; width: var(--phone-w); padding: calc(var(--phone-w) * 0.03);
  border-radius: calc(var(--phone-w) * 0.165); background: var(--phone);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10), 0 44px 60px -34px rgba(35, 80, 238, 0.50), 0 26px 40px -26px rgba(53, 33, 26, 0.55);
}
.phone-screen {
  position: relative; aspect-ratio: 660 / 1435; overflow: hidden;
  border-radius: calc(var(--phone-w) * 0.137); background: var(--bg);
}
.phone-screen::after {
  content: ""; position: absolute; top: 1.3%; left: 50%; width: 31%; height: 4.1%;
  border-radius: 999px; background: #000; transform: translateX(-50%);
}
.phone-screen img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.55s ease;
}
.phone-screen img.on { opacity: 1; }

.steps { position: relative; width: 100%; display: grid; gap: 10px; }
.step {
  position: relative; overflow: hidden; width: 100%;
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 13px; row-gap: 3px;
  padding: 16px 18px 19px; border: 0; border-radius: 20px;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  transition: background-color 0.4s ease;
}
.step-n {
  grid-row: 1 / 3; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 13px/1 var(--font); color: var(--sub); background: var(--soft-fill);
  transition: background-color 0.4s ease, color 0.4s ease;
}
.step-t { font: 700 16.5px/22px var(--font); letter-spacing: -0.02em; }
.step-d { font: 500 14px/20px var(--font); color: var(--sub); }
.step.on { background: var(--card); }
.step.on .step-n { background: var(--accent); color: var(--on-blue); }
.step::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--grad-button); transform: scaleX(0); transform-origin: left;
}
.step.run::after { animation: step-run 5200ms linear forwards; }
@keyframes step-run { to { transform: scaleX(1); } }

@media (min-width: 900px) {
  :root { --phone-w: 300px; }
  .how-stage {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: auto auto; align-items: center; gap: 22px 0;
    padding-block: 24px;
  }
  .phone { grid-column: 2; grid-row: 1 / 3; }
  .steps { display: contents; }
  .steps li { position: relative; z-index: 1; width: min(340px, 100%); }
  .steps li:nth-child(1) { grid-column: 1; grid-row: 1; justify-self: end; align-self: end; margin-right: -16px; }
  .steps li:nth-child(2) { grid-column: 1; grid-row: 2; justify-self: end; align-self: start; margin-right: 34px; }
  .steps li:nth-child(3) { grid-column: 3; grid-row: 1; justify-self: start; align-self: end; margin-left: 34px; }
  .steps li:nth-child(4) { grid-column: 3; grid-row: 2; justify-self: start; align-self: start; margin-left: -16px; }
}

/* The plan adapts: the 12 week grid */
.adapt { padding-top: clamp(84px, 11vw, 150px); }
.adapt-card {
  display: grid; gap: clamp(28px, 4vw, 64px); align-items: center;
  padding: clamp(24px, 4.4vw, 64px); border-radius: 28px;
  background: var(--card); box-shadow: var(--shadow-card);
}
.rules { margin-top: clamp(20px, 3vw, 32px); display: grid; gap: 18px; max-width: 40ch; }
.rules dt { font: 700 17px/23px var(--font); letter-spacing: -0.02em; }
.rules dd { margin-top: 2px; font-size: 15px; line-height: 22px; color: var(--sub); }

.weeks { min-width: 0; }
.weeks-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(3px, 0.6vw, 7px); }
.wk { display: grid; gap: clamp(3px, 0.6vw, 7px); min-width: 0; }
.wk i, .legend i { display: block; background: var(--accent); }
.wk i {
  aspect-ratio: 1; border-radius: 24%;
  transition: background-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 26ms);
}
.wk b { margin-top: 3px; text-align: center; font: 600 11px/14px var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
i.l0 { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), 0.22); }
i.l1 { background: rgba(var(--accent-rgb), 0.22); }
i.l2 { background: rgba(var(--accent-rgb), 0.45); }
i.l3 { background: rgba(var(--accent-rgb), 0.70); }
i.l4 { background: var(--accent); }
.js .weeks:not(.in) .wk i { background: rgba(var(--accent-rgb), 0.09); box-shadow: none; }
.weeks figcaption {
  margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
  font: 600 12.5px/18px var(--font); color: var(--sub);
}
.legend { display: inline-flex; align-items: center; gap: 4px; }
.legend i { width: 13px; height: 8px; border-radius: 2.5px; }

@media (min-width: 900px) {
  .adapt-card { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

/* 3D demos: real loops from the app */
.demos { padding-top: clamp(84px, 11vw, 150px); }
.demos-head p { margin-top: 14px; max-width: 46ch; color: var(--sub); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem); }
.demo-list {
  margin-top: clamp(24px, 3.4vw, 44px);
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 10px;
  margin-inline: calc(var(--pad-l) * -1) calc(var(--pad-r) * -1);
  padding: 4px var(--pad-r) 26px var(--pad-l);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad-l);
  scrollbar-width: none;
}
.demo-list::-webkit-scrollbar { display: none; }
.demo-list li {
  scroll-snap-align: start; min-width: 0;
  padding: 8px 8px 14px; border-radius: 20px;
  background: var(--card); box-shadow: var(--shadow-card);
}
.demo-list video {
  display: block; width: 100%; height: auto; aspect-ratio: 540 / 432; object-fit: cover;
  border-radius: 13px; background: var(--bg); cursor: pointer;
}
.demo-list b { display: block; margin: 12px 8px 0; font: 700 16px/21px var(--font); letter-spacing: -0.02em; }
.demo-list span { display: block; margin: 1px 8px 0; font: 500 13.5px/19px var(--font); color: var(--sub); }

@media (min-width: 640px) {
  .demo-list {
    grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
    margin-inline: 0; padding: 0; overflow: visible;
  }
}
@media (min-width: 900px) {
  .demo-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}

/* Good to know */
.facts { padding-top: clamp(72px, 9vw, 120px); display: grid; gap: 24px clamp(24px, 4vw, 56px); }
.facts h3 { font: 700 19px/25px var(--font); letter-spacing: -0.025em; }
.facts p { margin-top: 4px; max-width: 32ch; font-size: 15px; line-height: 22px; color: var(--sub); }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Closing card */
.close { padding-top: clamp(72px, 9vw, 120px); }
.close-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  padding: clamp(48px, 8vw, 104px) 24px; border-radius: 28px;
  color: var(--on-blue); background: var(--grad-card); box-shadow: var(--shadow-hero-card);
}
.close-card h2 { margin-bottom: 14px; }

/* Footer */
.foot { padding-block: clamp(36px, 5vw, 56px) calc(40px + env(safe-area-inset-bottom, 0px)); }
.health { max-width: 68ch; font-size: 13.5px; line-height: 20px; color: var(--muted); }
.foot-row {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; align-items: baseline;
  font: 700 15px/20px var(--font); letter-spacing: -0.02em;
}
.foot-row nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-row a { font: 600 14px/20px var(--font); letter-spacing: 0; color: var(--sub); text-decoration: none; }
.foot-row a:hover { color: var(--ink); }

/* ---------- Legal and support pages (same markup as before) ---------- */

.wrap {
  max-width: 760px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
body:not(.home) { background: var(--bg) var(--wash) no-repeat; background-size: 100% 440px; font-size: 16px; line-height: 1.6; }
body:not(.home) a { font-weight: 600; text-decoration: none; }
body:not(.home) a:hover { text-decoration: underline; }

header.top {
  margin-top: 12px; padding: 7px 18px 7px 10px; border-radius: 999px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--glass-tint);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass);
}
header.top .brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font: 700 17px/22px var(--font); letter-spacing: -0.02em; }
header.top .brand:hover { text-decoration: none; }
header.top .brand img { width: 30px; height: 30px; border-radius: 8px; }
nav.links { display: flex; gap: 18px; font-size: 14.5px; }
nav.links a { color: var(--sub); }
nav.links a[aria-current="page"] { color: var(--ink); }

.doc { padding: 36px 0 40px; }
.doc h1 { margin: 0 0 6px; max-width: none; font-size: clamp(2rem, 1.4rem + 2.6vw, 2.75rem); line-height: 1.08; letter-spacing: -0.04em; }
.doc .date { margin: 0 0 28px; color: var(--sub); }
.doc h2 { margin: 36px 0 8px; font-weight: 700; font-size: 20px; line-height: 1.3; letter-spacing: -0.025em; }
.doc p { margin: 0 0 14px; }
.doc p, .doc li { max-width: 68ch; }
.doc ul { margin: 0 0 14px; padding-left: 20px; list-style: disc; }
.doc li { margin: 6px 0; }
.card { margin: 18px 0; padding: 20px 22px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-card); }
.card p { margin: 0; }

.wrap > footer {
  margin-top: 24px; padding: 22px 0 calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between;
  border-top: 1px solid rgba(53, 33, 26, 0.09);
  color: var(--sub); font-size: 14px;
}
.wrap > footer nav { display: flex; gap: 16px; }
.wrap > footer a { color: var(--sub); }

/* ---------- Preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-lights i { animation: none; }
  .store.is-link, .wk i, .step, .step-n { transition: none; }
  .step.run::after { animation: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .glass, .nav, header.top { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hero .store.is-soon, .close-card .store.is-soon { background: #4A6CF2; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .nav, header.top { background: rgba(254, 253, 251, 0.94); }
}
