/* Den Reserve, from DESIGN.md: cream paper and cocoa ink by day, neutral charcoal at night.
   If it can be pressed it sits on a lip; if it only informs, it is flat. */
:root {
  color-scheme: light dark;
  --ink: #2a1c12;
  --paper: #fbf5ea;
  --surface: #fffdf8;
  --sunken: #f4e9d6;
  --rule: #eadbc2;
  --secondary: #6e5745;
  --accent: #b5462a;
  --selection: #c24a2c;
  --selection-lip: #8f3219;
  --on-selection: #ffffff;
  --positive: #1e6658;
  --positive-tint: #d8efe9;
  --warning: #875400;
  --butter: #f2c14e;
  --butter-lip: #d9a632;
  --on-butter: #2a1c12;
  --lip: #eadbc2;
  --lip-deep: #e2d0b2;
  --card-edge: transparent;
  --glow: rgba(194, 74, 44, 0.28);
  --rim: #fffdf8;
  --rim-shadow: #e2d0b2;
  --page-max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-card: 20px;
  --radius-hero: 24px;
  --radius-action: 16px;
  --radius-chip: 12px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f5f2ec;
    --paper: #0f0f0f;
    --surface: #1b1b1b;
    --sunken: #151515;
    --rule: #2c2c2c;
    --secondary: #b8b2a8;
    --accent: #ff9a78;
    --positive: #7dd3c1;
    --positive-tint: #16302b;
    --warning: #f5c65a;
    --butter: #f5c65a;
    --butter-lip: #b88d2c;
    --lip: #070707;
    --lip-deep: #050505;
    --card-edge: #2c2c2c;
    --glow: rgba(255, 154, 120, 0.18);
    --rim: #f5f2ec;
    --rim-shadow: #2c2c2c;
  }
}

:root[data-theme="dark"] {
  --ink: #f5f2ec;
  --paper: #0f0f0f;
  --surface: #1b1b1b;
  --sunken: #151515;
  --rule: #2c2c2c;
  --secondary: #b8b2a8;
  --accent: #ff9a78;
  --positive: #7dd3c1;
  --positive-tint: #16302b;
  --warning: #f5c65a;
  --butter: #f5c65a;
  --butter-lip: #b88d2c;
  --lip: #070707;
  --lip-deep: #050505;
  --card-edge: #2c2c2c;
  --glow: rgba(255, 154, 120, 0.18);
  --rim: #f5f2ec;
  --rim-shadow: #2c2c2c;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.04;
  text-wrap: balance;
}

h1 {
  font-size: clamp(48px, 8vw, 96px);
}

h2 {
  font-size: clamp(36px, 5.4vw, 64px);
}

h3 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--page-max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: var(--radius-chip);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lede {
  color: var(--secondary);
  font-size: clamp(18px, 2vw, 21px);
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* Keys: a face that sits on a solid lip and drops onto it when pressed. */
.key {
  --key-face: var(--surface);
  --key-lip: var(--lip);
  --key-ink: var(--ink);
  --lip-size: 4px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-action);
  background: var(--key-face);
  box-shadow: 0 var(--lip-size) 0 var(--key-lip);
  color: var(--key-ink);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.key:active {
  transform: translateY(var(--lip-size));
  box-shadow: 0 0 0 var(--key-lip);
}

.key-primary {
  --key-face: var(--selection);
  --key-lip: var(--selection-lip);
  --key-ink: var(--on-selection);
  --lip-size: 5px;
  border-color: transparent;
  box-shadow: 0 var(--lip-size) 0 var(--key-lip), 0 14px 32px -8px var(--glow);
}

.key-primary:active {
  box-shadow: 0 0 0 var(--key-lip), 0 6px 18px -8px var(--glow);
}

.key-chip {
  --lip-size: 2px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-chip);
  font-size: 15px;
}

.key-small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
}

.key svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Cards: 20-point corners on a 4-point lip. */
.card {
  position: relative;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 4px 0 var(--lip);
}

.sunken {
  border-radius: 999px;
  background: var(--sunken);
  box-shadow: inset 0 2px 0 rgba(42, 28, 18, 0.06);
}

.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--sunken);
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-block: 12px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark .ward-svg {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--secondary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav a:hover {
  background: var(--sunken);
  color: var(--ink);
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }

  .header-inner .key {
    margin-left: auto;
  }
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(32px, 6vw, 72px) clamp(48px, 7vw, 96px);
}

.hero-copy {
  display: grid;
  gap: 24px;
  justify-items: start;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--secondary);
  font-size: 15px;
  font-weight: 600;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-meta svg {
  width: 16px;
  height: 16px;
  color: var(--positive);
}

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
}

.hero-blob {
  position: absolute;
  inset: 6% 2% 4%;
  border-radius: 48% 52% 46% 54% / 52% 44% 56% 48%;
  background: var(--sunken);
}

.phone {
  position: relative;
  width: min(300px, 70vw);
  padding: 10px;
  border: 1px solid var(--card-edge);
  border-radius: 52px;
  background: #1a1410;
  box-shadow: 0 6px 0 #0d0a08, 0 40px 80px -30px rgba(42, 28, 18, 0.45);
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: 42px;
}

.hero-stage .phone-front {
  transform: rotate(3deg) translateX(8%);
}

.hero-stage .phone-back {
  position: absolute;
  width: min(250px, 56vw);
  top: 12%;
  left: 4%;
  transform: rotate(-7deg);
}

.hero-pip {
  position: absolute;
  left: -2%;
  bottom: 6%;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hero-pip .ward-svg {
  width: clamp(130px, 15vw, 180px);
  height: auto;
  filter: drop-shadow(0 4px 0 var(--lip-deep));
}

.bubble {
  position: absolute;
  bottom: calc(100% - 8px);
  left: 58%;
  padding: 8px 14px;
  border: 1px solid var(--card-edge);
  border-radius: 16px 16px 16px 4px;
  background: var(--surface);
  box-shadow: 0 3px 0 var(--lip);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transform-origin: bottom left;
  animation: bubble-in 0.45s var(--spring) both;
}

.hero-badge {
  position: absolute;
  right: -2%;
  top: 58%;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  transform: rotate(-4deg);
}

.hero-badge .eyebrow {
  font-size: 11px;
}

.hero-badge strong {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.hero-badge span:last-child {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
}

.heart {
  position: absolute;
  top: 0;
  left: 50%;
  color: var(--selection);
  font-size: 28px;
  pointer-events: none;
  animation: heart-up 1.2s ease-out forwards;
}

@keyframes heart-up {
  from {
    opacity: 1;
    transform: translate(-50%, 0) scale(0.6);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -70px) scale(1.2);
  }
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

.bob {
  animation: bob 3.2s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-4px);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 0;
    padding-block: 24px 8px;
  }

  .hero-pip {
    left: 0;
  }

  .hero-badge {
    right: 0;
  }

  .hero-stage .phone-back {
    display: none;
  }

  .hero-stage .phone-front {
    transform: rotate(3deg);
  }
}

/* Paper chain of wards, like the app icon. */
.chain {
  position: relative;
  overflow: hidden;
  padding-block: 28px 20px;
  background: var(--sunken);
  border-block: 1px solid var(--rule);
}

.chain-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: chain 60s linear infinite;
}

.chain-ward {
  flex: none;
  width: 112px;
  margin-right: -14px;
  filter: drop-shadow(3px 0 0 var(--rim)) drop-shadow(-3px 0 0 var(--rim))
    drop-shadow(0 3px 0 var(--rim)) drop-shadow(0 -3px 0 var(--rim))
    drop-shadow(0 5px 0 var(--rim-shadow));
}

.chain-ward .ward-svg {
  width: 100%;
  height: auto;
}

@keyframes chain {
  to {
    transform: translateX(-50%);
  }
}

/* Sections */
.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section-head {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head.center {
  margin-inline: auto;
  justify-items: center;
  text-align: center;
}

/* Meet the wards: routine cards as the Routines page draws them. */
.ward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.routine-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  transition: transform 0.3s var(--spring);
}

.routine-card:hover {
  transform: translateY(-4px) rotate(-0.6deg);
}

.routine-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.routine-top .ward-svg {
  width: 64px;
  height: 64px;
  flex: none;
}

.routine-top h3 {
  font-size: 21px;
}

.routine-top p {
  color: var(--secondary);
  font-size: 14px;
  font-weight: 600;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status.on-duty {
  color: var(--positive);
}

.status.scheduled {
  color: var(--ink);
}

.status.resting {
  color: var(--secondary);
}

.status.resting::before {
  background: none;
  border: 2px solid currentColor;
}

.bar {
  height: 10px;
  padding: 1px;
  border-radius: 999px;
  background: var(--sunken);
}

.bar span {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--fill, var(--selection));
  box-shadow: 0 2px 0 var(--fill-lip, var(--selection-lip));
}

.routine-card .note {
  color: var(--secondary);
  font-size: 15px;
}

.ward-promise {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 36px;
  color: var(--secondary);
  font-size: 16px;
  font-weight: 600;
}

.ward-promise span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ward-promise svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

@media (max-width: 900px) {
  .ward-grid {
    grid-template-columns: 1fr;
  }
}

/* How it works */
.how {
  background: var(--surface);
  border-block: 1px solid var(--rule);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.step {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px;
  background: var(--paper);
}

.step-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--butter);
  box-shadow: 0 2px 0 var(--butter-lip);
  color: var(--on-butter);
  font-size: 18px;
  font-weight: 900;
}

.step p {
  color: var(--secondary);
}

.step-visual {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.pill.selected {
  background: var(--butter);
  box-shadow: 0 2px 0 var(--butter-lip);
  color: var(--on-butter);
}

.pill .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Ways to stop */
.ways {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.ways-copy {
  display: grid;
  gap: 20px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--sunken);
}

.segmented button {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--secondary);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.08s ease;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button[aria-selected="true"] {
  background: var(--butter);
  box-shadow: 0 2px 0 var(--butter-lip);
  color: var(--on-butter);
}

.segmented button:active {
  transform: translateY(2px);
}

.way-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 300px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-hero);
}

.way-panel .way-ward .ward-svg {
  width: clamp(110px, 14vw, 150px);
  height: auto;
}

.way-panel h3 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
}

.way-body {
  display: grid;
  gap: 12px;
}

.way-body p {
  color: var(--secondary);
}

.way-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--sunken);
  color: var(--ink) !important;
  font-size: 15px;
  font-weight: 600;
}

.way-panel.swap .way-ward,
.way-panel.swap .way-body {
  animation: swap-in 0.35s var(--spring);
}

@keyframes swap-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.ways-note {
  color: var(--secondary);
  font-size: 15px;
}

@media (max-width: 900px) {
  .ways {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .way-panel {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

/* Focus card, as Home draws it. */
.progress-section {
  background: var(--surface);
  border-block: 1px solid var(--rule);
}

.progress-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.focus-card {
  display: grid;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius-hero);
  background: var(--paper);
}

.focus-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ring {
  position: relative;
  flex: none;
  width: 184px;
  height: 184px;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: none;
}

.ring svg.ring-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ring .ward-holder {
  position: absolute;
  inset: 30px;
  display: grid;
  place-items: center;
}

.ring .ward-svg {
  width: 100%;
  height: auto;
}

.ring-fill {
  transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.score {
  display: grid;
  gap: 4px;
}

.score strong {
  font-size: 88px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.change {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 600;
}

.change b {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--positive-tint);
  color: var(--positive);
  font-weight: 700;
}

.focus-rule {
  height: 1px;
  background: var(--rule);
}

.focus-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 16px;
  font-weight: 700;
}

.focus-stats span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.focus-stats svg {
  width: 20px;
  height: 20px;
}

.flame {
  color: var(--selection);
}

.progress-points {
  display: grid;
  gap: 18px;
  margin-top: 8px;
  padding: 0;
  list-style: none;
}

.progress-points li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
}

.progress-points strong {
  display: block;
  font-size: 18px;
}

.progress-points p {
  color: var(--secondary);
  font-size: 16px;
}

.tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--tile, #9fd6cc);
  box-shadow: 0 2px 0 var(--tile-lip, #7fbfb3);
  color: #2a1c12;
}

.tile svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 900px) {
  .progress-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .focus-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Wardrobe */
.wardrobe {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: stretch;
}

.wardrobe-preview {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 32px 24px;
  border-radius: var(--radius-hero);
  text-align: center;
}

.wardrobe-preview .preview-well {
  display: grid;
  place-items: center;
  width: min(280px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sunken);
}

.wardrobe-preview .preview-well .ward-svg {
  width: 72%;
  height: auto;
}

.wardrobe-preview .reveal-name {
  font-size: 28px;
  font-weight: 900;
}

.wardrobe-preview .reveal-line {
  color: var(--secondary);
  font-size: 15px;
  min-height: 1.5em;
}

.wardrobe-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-hero);
}

.wardrobe-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.wardrobe-tile {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 6px 8px;
  border: 1px solid var(--card-edge);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 2px 0 var(--lip);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.2s ease;
}

.wardrobe-tile:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 var(--lip);
}

.wardrobe-tile[aria-pressed="true"] {
  background: var(--butter);
  box-shadow: 0 2px 0 var(--butter-lip);
  color: var(--on-butter);
}

.wardrobe-tile .ward-svg {
  width: 60px;
  height: 60px;
}

.wardrobe-tile .tile-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.wardrobe-tile .tile-milestone {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.7;
  line-height: 1.2;
}

.wardrobe-note {
  color: var(--secondary);
  font-size: 15px;
}

@media (max-width: 900px) {
  .wardrobe {
    grid-template-columns: 1fr;
  }
}

/* Insights */
.insights {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.insight-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.insight {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
}

.insight p {
  color: var(--secondary);
  font-size: 15px;
}

.insight h3 {
  font-size: 18px;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
}

.chart span {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 3px 3px;
  background: var(--selection);
  box-shadow: 0 2px 0 var(--selection-lip);
}

.chart span.today {
  background: var(--butter);
  box-shadow: 0 2px 0 var(--butter-lip);
}

.insights .phone {
  width: min(300px, 76vw);
  transform: rotate(-2.5deg);
}

@media (max-width: 900px) {
  .insights {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .insights > div:first-child {
    justify-self: stretch;
  }
}

@media (max-width: 560px) {
  .insight-list {
    grid-template-columns: 1fr;
  }
}

/* Calculator */
.time-section {
  background: var(--selection);
  color: var(--on-selection);
}

.time-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.time-section .eyebrow {
  color: #ffe1a8;
}

.time-section .lede {
  color: rgba(255, 255, 255, 0.86);
}

.time-copy {
  display: grid;
  gap: 18px;
}

.calculator {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius-hero);
  background: var(--surface);
  box-shadow: 0 6px 0 var(--selection-lip);
  color: var(--ink);
}

.calculator label {
  color: var(--secondary);
  font-weight: 700;
}

.range-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.range-value output {
  color: var(--accent);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}

.range-value span {
  color: var(--secondary);
  font-weight: 700;
}

input[type="range"] {
  --pct: 21%;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--selection) var(--pct), var(--sunken) var(--pct));
  box-shadow: inset 0 2px 0 rgba(42, 28, 18, 0.08);
}

input[type="range"]::-moz-range-track {
  height: 14px;
  border-radius: 999px;
  background: var(--sunken);
}

input[type="range"]::-moz-range-progress {
  height: 14px;
  border-radius: 999px;
  background: var(--selection);
}

input[type="range"]::-webkit-slider-thumb {
  width: 32px;
  height: 32px;
  margin-top: -9px;
  border: 1px solid var(--card-edge);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 3px 0 var(--lip-deep), 0 2px 8px rgba(0, 0, 0, 0.15);
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border: 1px solid var(--card-edge);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 3px 0 var(--lip-deep), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.range-limits {
  display: flex;
  justify-content: space-between;
  margin-top: -10px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
}

.time-result {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  background: var(--sunken);
}

.time-result .ward-svg {
  width: 64px;
  height: 64px;
}

.time-result strong {
  display: block;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
}

.time-result p {
  color: var(--secondary);
  font-size: 15px;
}

.calculation-note {
  color: var(--secondary);
  font-size: 13px;
}

@media (max-width: 900px) {
  .time-layout {
    grid-template-columns: 1fr;
  }
}

/* Privacy promises */
.promises {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.promise {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
}

.promise p {
  color: var(--secondary);
  font-size: 15px;
}

.promise h3 {
  font-size: 18px;
}

@media (max-width: 960px) {
  .promises {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .promises {
    grid-template-columns: 1fr;
  }
}

/* FAQ */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.faq .section-head {
  position: sticky;
  top: 96px;
}

.questions {
  display: grid;
  gap: 10px;
}

.questions details {
  border: 1px solid var(--card-edge);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 3px 0 var(--lip);
}

.questions summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px 20px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.questions summary::-webkit-details-marker {
  display: none;
}

.questions summary::after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--sunken)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b5462a' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E")
    center / 14px no-repeat;
  transition: transform 0.3s var(--spring);
}

.questions details[open] summary::after {
  transform: rotate(45deg);
}

.questions details p {
  padding: 0 20px 18px;
  color: var(--secondary);
}

@media (max-width: 900px) {
  .faq {
    grid-template-columns: 1fr;
  }

  .faq .section-head {
    position: static;
  }
}

/* Closing */
.closing {
  padding-block: clamp(80px, 10vw, 128px);
  text-align: center;
}

.closing-inner {
  display: grid;
  justify-items: center;
  gap: 20px;
}

.crew {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 8px;
}

.crew > span {
  margin-inline: -6px;
  transition: transform 0.3s var(--spring);
}

.crew > span:hover {
  transform: translateY(-10px) rotate(-4deg);
}

.crew .ward-svg {
  width: clamp(64px, 11vw, 112px);
  height: auto;
}

.crew > span:nth-child(3) .ward-svg {
  width: clamp(84px, 14vw, 144px);
}

.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 16px;
  background: var(--butter);
  box-shadow: 0 4px 0 var(--butter-lip);
  color: var(--on-butter);
  font-weight: 800;
}

.coming-soon svg {
  width: 20px;
  height: 20px;
}

.closing-note {
  color: var(--secondary);
  font-size: 14px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding-block: 32px;
  color: var(--secondary);
  font-size: 15px;
}

.footer-inner .wordmark {
  color: var(--ink);
  font-size: 18px;
}

.footer-inner a {
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--ink);
}

.footer-inner .spacer {
  flex: 1;
}

.theme-picker {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--sunken);
}

.theme-picker button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.theme-picker button[aria-pressed="true"] {
  background: var(--butter);
  box-shadow: 0 2px 0 var(--butter-lip);
  color: var(--on-butter);
}

/* Sections settle into place the first time they appear. */
.rise {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.6s ease, translate 0.6s var(--spring), transform 0.3s var(--spring);
  transition-delay: var(--delay, 0s);
}

.rise.in {
  opacity: 1;
  translate: 0 0;
}

.no-js .rise {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .chain-track,
  .bob {
    animation: none;
  }

  .rise {
    translate: 0 0;
    transition: opacity 0.3s ease;
  }

  .routine-card:hover,
  .crew > span:hover {
    transform: none;
  }

  .way-panel.swap .way-ward,
  .way-panel.swap .way-body,
  .bubble {
    animation: fade 0.2s ease;
  }

  .key:active,
  .wardrobe-tile:active,
  .segmented button:active {
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}
