/* runeticapp.com. Colours, type, radii and spacing come from the Runetic design system (Runetic/DesignSystem/Colors.swift
   has the same tokens): white pages and flat cards, red means run and blue means walk, Barlow Condensed for numbers and
   capitals, Figtree for everything people read. Both fonts are in /fonts, so the pages load nothing from other sites. */

@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ground: #ffffff;
  --surface: #f4f5f1;
  --sunken: #e9ebe5;
  --line: #dfe2db;
  --ink: #141714;
  --muted: #5a615a;
  --red: #d93a28;
  --on-red: #ffffff;
  --run-ink: #b8301f;
  --walk: #3d63dd;
  --on-walk: #ffffff;
  --steady: #a82614;
  --hard: #7a1a0d;
  --positive: #1e7a4c;
  --caution: #9a5b00;
  --bezel: #0d0f0e;
  --bezel-edge: transparent;
  --shadow-float: 0 8px 28px rgba(20, 23, 20, 0.12);
  --shadow-phone: 0 40px 80px -36px rgba(20, 23, 20, 0.45);

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Figtree", -apple-system, "Helvetica Neue", sans-serif;
  --gutter: 16px;
  --radius-card: 20px;
  --radius-control: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #101211;
    --surface: #191c1a;
    --sunken: #262a27;
    --line: #323733;
    --ink: #edf0ea;
    --muted: #a2aaa2;
    --run-ink: #ff8a78;
    --walk: #7d9bff;
    --on-walk: #0e1530;
    --steady: #ff6250;
    --hard: #ff9a8a;
    --positive: #5ccb8f;
    --caution: #f2b544;
    --bezel: #050605;
    --bezel-edge: #323733;
    --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-phone: 0 40px 80px -36px rgba(0, 0, 0, 0.9);
  }
}

@media (min-width: 640px) {
  :root { --gutter: 32px; }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ol, ul, figure, dl, dd { margin: 0; }
p { text-wrap: pretty; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: var(--run-ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--walk); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* Eyebrows and segment names: Barlow Condensed in capitals, like the app's `label` style. */
.label {
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.num { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }

h1, h2, h3 { font-weight: 800; text-wrap: balance; }

h2 {
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

h3 { font-size: 20px; line-height: 26px; font-weight: 700; }

.lead { font-size: clamp(18px, 1.9vw, 21px); line-height: 1.5; color: var(--muted); }

/* Buttons are pills, like a running lane. */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font: 600 16px/1 var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.pill.red { background: var(--red); color: var(--on-red); }
.pill.red:hover { background: #c73323; }
.pill.quiet { background: var(--sunken); color: var(--ink); }
.pill.quiet:hover { background: var(--line); }

.store-badge { display: inline-block; border-radius: 10px; }
.store-badge img { height: 56px; width: auto; }

@media (prefers-color-scheme: dark) {
  /* Apple's black badge with its own grey edge reads on the dark page as it is. */
  .store-badge img { outline: 1px solid #a6a6a6; outline-offset: -1px; border-radius: 10px; }
}

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
}

.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }

.nav-links { display: none; gap: 28px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.nav-links a:hover { color: var(--ink); }

@media (min-width: 860px) {
  .nav-links { display: flex; }
}

/* Hero */

.hero { padding: 40px 0 24px; overflow: hidden; }

.hero-grid { display: grid; gap: 48px; align-items: center; }

.hero h1 {
  margin-top: 16px;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero h1 .run { color: var(--run-ink); }
.hero h1 .walk { color: var(--walk); }

.hero .lead { margin-top: 20px; max-width: 34em; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.cta .more { color: var(--ink); font-weight: 600; text-decoration: none; }
.cta .more:hover { text-decoration: underline; }

.fine { margin-top: 16px; font-size: 14px; line-height: 20px; color: var(--muted); }

/* Two phones in a box of their own, so they never cover the words: the run in front on the right, Today behind it
   on the left. On a narrow screen only the run shows. */
.hero-phones { position: relative; display: flex; justify-content: flex-end; width: min(100%, 520px); margin: 0 auto; padding: 8px 0 24px; }
.hero-phones .phone.front { position: relative; z-index: 1; }
.hero-phones .phone.back { position: absolute; top: 64px; left: 0; transform: rotate(-5deg) scale(0.88); transform-origin: bottom left; }

@media (min-width: 960px) {
  .hero { padding: 64px 0 32px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .hero-phones { margin-right: 0; }
}

@media (max-width: 559px) {
  .hero-phones { justify-content: center; }
  .hero-phones .phone.back { display: none; }
}

.phone {
  width: 290px;
  max-width: 76vw;
  padding: 9px;
  border-radius: 50px;
  background: var(--bezel);
  box-shadow: 0 0 0 1px var(--bezel-edge), var(--shadow-phone);
}

.phone img { width: 100%; height: auto; border-radius: 41px; background: #fff; }

/* The interval strip: one bar per interval, width by duration, height by effort. Walks (with the warm-up and the
   cool-down) are short and blue, easy runs red, steady taller and darker, hard reps tallest. */

.strip { display: flex; align-items: flex-end; gap: 2px; height: 48px; }
.strip i { flex: 0 1 0; min-width: 2px; border-radius: 3px; }
.strip .w { height: 28%; background: var(--walk); }
.strip .r { height: 62%; background: var(--red); }
.strip .s { height: 80%; background: var(--steady); }
.strip .h { height: 100%; background: var(--hard); }
.strip .g1 { flex-grow: 1; }
.strip .g15 { flex-grow: 1.5; }
.strip .g3 { flex-grow: 3; }
.strip .g5 { flex-grow: 5; }
.strip .g6 { flex-grow: 6; }
.strip .g8 { flex-grow: 8; }
.strip .g9 { flex-grow: 9; }

/* Week 1, day 1, drawn big. Its bars rise one after another, like the session going by. */

.session { padding: 24px 0 8px; }

.session-card {
  padding: 28px 20px 24px;
  border-radius: 28px;
  background: var(--surface);
}

.session-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.session-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.session-head .total { font-size: 15px; color: var(--muted); }
.session-head .total .num { font-size: 28px; color: var(--ink); }

.session .strip { height: clamp(72px, 12vw, 128px); gap: clamp(2px, 0.4vw, 4px); margin-top: 28px; }
.session .strip i { border-radius: clamp(3px, 0.5vw, 6px); }

.parts { display: grid; grid-template-columns: 5fr 20fr 5fr; gap: 12px; margin-top: 14px; }
.parts > div { min-width: 0; }
.parts .label { font-size: 14px; }
.parts .label.walk { color: var(--walk); }
.parts .label.run { color: var(--run-ink); }
.parts p:not(.label) { margin-top: 2px; font-size: 14px; line-height: 19px; color: var(--muted); }
.parts .mid { text-align: center; }
.parts .end { text-align: right; }

@media (min-width: 640px) {
  .session-card { padding: 40px 40px 32px; }
  .parts .label { font-size: 16px; }
  .parts p:not(.label) { font-size: 15px; }
}

/* On a phone the three parts are rows under the strip, each label beside its words. */
@media (max-width: 559px) {
  .parts { grid-template-columns: 1fr; gap: 6px; margin-top: 18px; }
  .parts > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .parts .mid, .parts .end { text-align: left; }
  .parts p:not(.label) { margin-top: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .session .strip i { transform-origin: bottom; animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .session .strip i:nth-child(2) { animation-delay: 0.08s; }
  .session .strip i:nth-child(3) { animation-delay: 0.16s; }
  .session .strip i:nth-child(4) { animation-delay: 0.24s; }
  .session .strip i:nth-child(5) { animation-delay: 0.32s; }
  .session .strip i:nth-child(6) { animation-delay: 0.4s; }
  .session .strip i:nth-child(7) { animation-delay: 0.48s; }
  .session .strip i:nth-child(8) { animation-delay: 0.56s; }
  .session .strip i:nth-child(9) { animation-delay: 0.64s; }
  .session .strip i:nth-child(10) { animation-delay: 0.72s; }
  .session .strip i:nth-child(11) { animation-delay: 0.8s; }
  .session .strip i:nth-child(12) { animation-delay: 0.88s; }
  .session .strip i:nth-child(13) { animation-delay: 0.96s; }
  .session .strip i:nth-child(14) { animation-delay: 1.04s; }
  .session .strip i:nth-child(15) { animation-delay: 1.12s; }
  .session .strip i:nth-child(16) { animation-delay: 1.2s; }
  .session .strip i:nth-child(17) { animation-delay: 1.28s; }
  .session .strip i:nth-child(18) { animation-delay: 1.36s; }
}

@keyframes rise {
  from { transform: scaleY(0); }
}

/* Sections */

.section { padding: 88px 0 0; }
.section-head { max-width: 40em; }
.section-head .lead { margin-top: 16px; }

@media (min-width: 960px) {
  .section { padding-top: 120px; }
}

/* Programs */

.programs { display: grid; gap: 12px; margin-top: 40px; }

@media (min-width: 900px) {
  .programs { grid-template-columns: repeat(3, 1fr); }
}

.program {
  display: flex;
  flex-direction: column;
  padding: 24px 20px 20px;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.program-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.program-top .label { color: var(--run-ink); }
.program-top .weeks { font-size: 15px; color: var(--muted); }
.program-top .weeks .num { font-size: 22px; color: var(--ink); }
.program h3 { margin-top: 12px; font-size: 26px; line-height: 1.15; letter-spacing: -0.015em; }
.program > p { margin-top: 10px; color: var(--muted); }
.program .strip { margin-top: auto; }
.program figure { margin-top: 28px; }
.program figcaption { margin-top: 10px; font-size: 14px; line-height: 19px; color: var(--muted); }
.program figcaption b { color: var(--ink); font-weight: 600; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: flex-end; gap: 8px; }
.legend i { display: inline-block; width: 10px; border-radius: 2px; }
.legend .w { height: 6px; background: var(--walk); }
.legend .r { height: 12px; background: var(--red); }
.legend .s { height: 15px; background: var(--steady); }
.legend .h { height: 19px; background: var(--hard); }

/* A feature: words beside a phone. */

.feature { display: grid; gap: 40px; align-items: center; }
.feature .phone { margin: 0 auto; }
.feature-copy .lead { margin-top: 16px; }

@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature.flip .feature-copy { order: 2; }
}

.points { display: grid; gap: 20px; margin-top: 32px; }
.points li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.points .dot { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--surface); }
.points .dot svg { width: 20px; height: 20px; }
.points h3 { font-size: 18px; line-height: 24px; }
.points p { margin-top: 2px; color: var(--muted); font-size: 16px; line-height: 24px; }

.icon-run { color: var(--run-ink); }
.icon-walk { color: var(--walk); }
.icon-ink { color: var(--ink); }

/* How it works: three steps on cards. */

.steps { display: grid; gap: 12px; margin-top: 40px; counter-reset: step; }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step { padding: 24px 20px; border-radius: var(--radius-card); background: var(--surface); }
.step .num { display: block; font-size: 44px; line-height: 1; color: var(--run-ink); }
.step h3 { margin-top: 16px; }
.step p { margin-top: 8px; color: var(--muted); font-size: 16px; line-height: 24px; }

.fits { display: grid; gap: 12px; margin-top: 12px; }

@media (min-width: 900px) {
  .fits { grid-template-columns: repeat(3, 1fr); }
}

.fit { display: flex; gap: 12px; align-items: baseline; padding: 16px 20px; border-radius: var(--radius-control); background: var(--surface); font-size: 16px; line-height: 23px; }
.fit b { font-weight: 600; }
.fit .muted { color: var(--muted); }

/* The watch on the run section, drawn: watchOS is always dark, and RUN is a coloured word, not a coloured screen. */

.watch-row { display: flex; align-items: center; gap: 20px; margin-top: 32px; padding: 20px; border-radius: var(--radius-card); background: var(--surface); }
.watch-row p { color: var(--muted); font-size: 16px; line-height: 24px; }
.watch-row h3 { font-size: 18px; line-height: 24px; color: var(--ink); }

.watch {
  position: relative;
  flex: none;
  width: 104px;
  height: 124px;
  padding: 12px 12px 10px;
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 0 0 4px #2b2f2c, 0 10px 24px -10px rgba(0, 0, 0, 0.5);
  color: #edf0ea;
}

.watch::after {
  content: "";
  position: absolute;
  top: 34px;
  right: -8px;
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: #2b2f2c;
}

.watch .w-seg { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.06em; color: #ff8a78; }
.watch .w-time { font-family: var(--display); font-weight: 700; font-size: 46px; line-height: 0.95; font-variant-numeric: tabular-nums; }
.watch .w-hr { margin-top: 6px; font-family: var(--display); font-weight: 600; font-size: 15px; color: #a2aaa2; }
.watch .w-hr b { color: #ff8a78; font-weight: 700; }

/* Privacy */

.privacy-grid { display: grid; gap: 12px; margin-top: 40px; }

@media (min-width: 760px) {
  .privacy-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1040px) {
  .privacy-grid { grid-template-columns: repeat(4, 1fr); }
}

.privacy-grid li { padding: 24px 20px; border-radius: var(--radius-card); background: var(--surface); }
.privacy-grid svg { width: 26px; height: 26px; color: var(--ink); }
.privacy-grid h3 { margin-top: 16px; font-size: 18px; line-height: 24px; }
.privacy-grid p { margin-top: 6px; color: var(--muted); font-size: 16px; line-height: 24px; }
.privacy-more { margin-top: 20px; }

/* Closing call to action */

.close { padding: 120px 0 0; }

.close-card {
  display: grid;
  gap: 32px;
  padding: 40px 24px;
  border-radius: 32px;
  background: var(--red);
  color: var(--on-red);
  overflow: hidden;
}

.close-card h2 { max-width: 13em; }
.close-card p { margin-top: 14px; max-width: 30em; color: rgba(255, 255, 255, 0.86); font-size: 18px; }
.close-card .cta { margin-top: 28px; }
.close-card .store-badge img { outline: 1px solid rgba(255, 255, 255, 0.55); outline-offset: -1px; border-radius: 10px; }

/* The same session in white on the red card. */
.close-card .strip { height: 88px; }
.close-card .strip .w { background: rgba(255, 255, 255, 0.5); }
.close-card .strip .r { background: #ffffff; }

@media (min-width: 900px) {
  .close-card { grid-template-columns: 1.2fr 1fr; align-items: end; padding: 56px; }
  .close-card .strip { height: 140px; }
}

/* Footer */

.site-foot { margin-top: 96px; padding: 48px 0 40px; border-top: 1px solid var(--line); font-size: 15px; }

.foot-top { display: grid; gap: 40px; }
.foot-brand p { margin-top: 12px; color: var(--muted); max-width: 22em; }

.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.foot-cols div { display: flex; flex-direction: column; gap: 10px; }
.foot-cols .label { margin-bottom: 2px; }
.foot-cols a { color: var(--ink); text-decoration: none; }
.foot-cols a:hover { text-decoration: underline; }

@media (min-width: 760px) {
  .foot-top { grid-template-columns: 1fr 1.6fr; }
  .foot-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.foot-bottom { margin-top: 40px; color: var(--muted); font-size: 14px; }

/* Text pages: privacy, terms, support. */

.doc { max-width: 720px; margin: 0 auto; padding: 48px var(--gutter) 0; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.03em; }
.doc .updated { margin-top: 12px; color: var(--muted); font-size: 15px; }
.doc .intro { margin-top: 24px; font-size: 19px; line-height: 1.55; }
.doc h2 { margin-top: 48px; font-size: 24px; line-height: 30px; letter-spacing: -0.01em; }
.doc h3 { margin-top: 28px; font-size: 18px; line-height: 24px; }
.doc p, .doc ul { margin-top: 12px; }
.doc ul { padding-left: 1.2em; list-style: disc; }
.doc li { margin-top: 8px; }
.doc li::marker { color: var(--muted); }
.doc .box { margin-top: 24px; padding: 20px; border-radius: var(--radius-card); background: var(--surface); }
.doc .box p:first-child { margin-top: 0; }

.faq { margin-top: 24px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 18px 0; cursor: pointer; font-weight: 700; font-size: 18px; line-height: 24px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 26px; line-height: 22px; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details > p, .faq details > ul { margin: 0 0 20px; color: var(--muted); }

/* 404 */

.missing { display: grid; place-items: center; min-height: 100vh; padding: 32px var(--gutter); text-align: center; }
.missing .strip { width: 220px; height: 56px; margin: 0 auto 32px; }
.missing h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; }
.missing p { margin: 12px 0 28px; color: var(--muted); }
