/*
 * The website's one stylesheet: landing page and privacy policy.
 * Colours, type and radii are the app's own (src/lib/theme.ts), so the page
 * and the screenshots on it read as one thing.
 */

@font-face {
  font-family: 'Sans';
  src: url('/fonts/sans.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Narrow';
  src: url('/fonts/narrow.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Condensed';
  src: url('/fonts/condensed.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --slate: #22282f;
  /* The workout screens' darker slate (focusGradient in src/lib/theme.ts). */
  --deep: #181c21;
  --card: #16181c;
  --ink: #f0ede6;
  --soft: rgba(240, 237, 230, 0.66);
  --mute: rgba(240, 237, 230, 0.44);
  --line: rgba(240, 237, 230, 0.08);
  --fill: rgba(240, 237, 230, 0.06);
  --lime: #daf070;
  --on-lime: #111215;
  --sky: #6aa9d8;
  --ember: #f0874a;
  --violet: #b09cf2;

  --sans: 'Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --narrow: 'Narrow', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --condensed: 'Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 28px;
}

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

html {
  background: var(--slate);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 500 17px/1.55 var(--sans);
  color: var(--ink);
  /* The app's screen background: slate, warming toward the very bottom. */
  background: linear-gradient(
    180deg,
    #22282f 0,
    #22282f calc(100% - 560px),
    #292e34 calc(100% - 330px),
    #35373b calc(100% - 210px),
    #454444 calc(100% - 110px),
    #57524f calc(100% - 30px),
    #605954 100%
  );
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

::selection {
  background: var(--lime);
  color: var(--on-lime);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

img {
  max-width: 100%;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  flex: none;
}

/* Type */

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

h1,
h2 {
  font-family: var(--narrow);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-wrap: balance;
}

h1 {
  font-size: clamp(44px, 7vw, 92px);
}

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

h1 > span,
h2 > span {
  display: block;
}

.accent {
  color: var(--lime);
}

/* Section labels, like the app's "Done this week". */
.eyebrow {
  margin-bottom: 14px;
  font: 700 17px/1 var(--condensed);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--mute);
}

.lede {
  max-width: 31em;
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--soft);
}

/* Header */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  padding-top: max(22px, env(safe-area-inset-top));
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 44px;
}

.top-logo {
  display: inline-flex;
  padding: 8px 0;
}

.logo {
  display: block;
  height: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
  font-size: 15px;
}

.top-link {
  color: var(--soft);
  text-decoration: none;
  transition: color 0.15s;
}

.top-link:hover {
  color: var(--ink);
}

.lang {
  padding: 7px 15px;
  border: 1px solid rgba(240, 237, 230, 0.16);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.lang:hover {
  background: var(--fill);
  border-color: rgba(240, 237, 230, 0.28);
}

/* A phone showing an app screenshot */

.phone {
  --bezel: 8px;
  position: relative;
  aspect-ratio: 780 / 1696;
  /* The display's corner radius, as a share of its width and of its height. */
  border-radius: 15.5% / 7.13%;
  overflow: hidden;
  background: #0b0c0e;
  box-shadow:
    0 0 0 var(--bezel) #0b0c0e,
    0 0 0 calc(var(--bezel) + 1px) rgba(240, 237, 230, 0.16),
    0 50px 90px -30px rgba(0, 0, 0, 0.65);
}

.phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero */

.hero {
  /* A little more than the first screen, so the bars run on past its lower edge. */
  --fold: min(100vh + 88px, 1240px);
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--fold);
  padding: clamp(120px, 15vw, 168px) 0 clamp(64px, 9vw, 120px);
  overflow: hidden;
  /* The workout screens' background; it lightens into the page's slate in the features below. */
  background: var(--deep);
}

@supports (height: 100dvh) {
  .hero {
    --fold: min(100dvh + 88px, 1240px);
  }
}

/* Across the whole hero, behind everything: training weeks as bars, fainter under the text. */
.hero-art {
  position: absolute;
  inset: 0 0 auto;
  height: var(--fold);
  display: flex;
  align-items: flex-end;
  gap: clamp(4px, 0.7vw, 10px);
  padding-inline: clamp(4px, 0.7vw, 10px);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.4), #000 55%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.4), #000 55%);
}

.hero-art i {
  flex: 1;
  min-width: 0;
  border-radius: clamp(4px, 0.6vw, 9px) clamp(4px, 0.6vw, 9px) 0 0;
  background: linear-gradient(180deg, rgba(240, 237, 230, 0.02), rgba(240, 237, 230, 0) 92%);
}

/* The week still running, as Analytics draws a planned session. */
.hero-art .is-open {
  background: none;
  border: 1px dashed rgba(240, 237, 230, 0.06);
  border-bottom: 0;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%);
  mask-image: linear-gradient(180deg, #000, transparent 90%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

/* Above the rings, which reach in from behind the phones. */
.hero-text {
  position: relative;
  z-index: 1;
}

.hero-text > * {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-text > :nth-child(2) {
  animation-delay: 0.06s;
}
.hero-text > :nth-child(3) {
  animation-delay: 0.12s;
}
.hero-text > :nth-child(4) {
  animation-delay: 0.18s;
}

.hero .lede {
  margin-top: 26px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: 36px;
}

/* The app's own floating action: lime, fully round. */
.button {
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--on-lime);
  font: 800 19px/1 var(--narrow);
  text-decoration: none;
  transition: transform 0.15s;
}

.button:hover {
  transform: translateY(-1px);
}

.soon {
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 0 24px;
  border: 1px solid rgba(240, 237, 230, 0.14);
  border-radius: 999px;
  background: var(--fill);
  font: 800 18px/1 var(--narrow);
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  text-decoration: none;
  transition: color 0.15s;
}

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

.hero-phones {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin-inline: auto;
  aspect-ratio: 1 / 1.28;
}

.hero-phone {
  position: absolute;
  animation: rise 0.9s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-phone-front {
  top: 0;
  left: 2%;
  width: 56%;
  z-index: 1;
}

.hero-phone-back {
  top: 9.5%;
  right: 2%;
  width: 49%;
  animation-delay: 0.2s;
}

.hero-phone-back .phone img {
  filter: brightness(0.74);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* Features */

.features {
  padding: clamp(56px, 8vw, 104px) 0;
  /* The hero's dark runs on behind the heading and fades out down the first cards. */
  background: linear-gradient(180deg, var(--deep) 0, var(--deep) 120px, var(--slate) 860px);
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(36px, 5vw, 56px);
}

.box {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.box h3 {
  font: 700 30px/1.08 var(--condensed);
  text-wrap: balance;
}

.box-text > p,
.box-small > p {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--soft);
}

/* A card with text beside its illustration (wide) or above it (narrow). */
.box-wide,
.box-narrow {
  display: grid;
  gap: 32px;
  padding: 36px;
}

.box-wide {
  grid-column: span 7;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: start;
}

.box-narrow {
  grid-column: span 5;
  grid-template-rows: auto 1fr;
}

.box-narrow .viz {
  align-self: end;
}

.card-energy .viz {
  align-self: center;
}

/* The condensed face draws its multiplication sign heavy; set it in the text face. */
.times {
  font: 500 0.72em/1 var(--sans);
  vertical-align: 0.12em;
}

.viz {
  min-width: 0;
}

.viz ol,
.viz ul,
.viz dl,
.viz dd {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The app's goals, or the body map's legend. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 14px;
  line-height: 1.3;
  color: var(--soft);
}

.chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

/* Plan: the week as laid out, and the next workout as written. */

.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0 9px;
  border-radius: 13px;
  background: var(--fill);
}

.day-name {
  font: 700 13px/1 var(--condensed);
  color: var(--mute);
}

.day-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.day-what {
  min-height: 11px;
  font-size: 10.5px;
  line-height: 1;
  color: var(--soft);
}

.day-done .day-mark {
  background: var(--lime);
  color: var(--on-lime);
}

.day-next {
  background: rgba(218, 240, 112, 0.1);
  box-shadow: inset 0 0 0 1px rgba(218, 240, 112, 0.45);
}

.day-next .day-mark {
  border: 2px solid var(--lime);
}

.day-next .day-name,
.day-next .day-what {
  color: var(--lime);
}

.day-run .day-mark {
  border: 2px solid var(--sky);
}

.day-rest .day-mark::after {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mute);
}

/* The app's highlight card: dark, warming toward one corner. */
.sheet {
  margin-top: 10px;
  padding: 20px 20px 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(
    155deg,
    rgba(3, 10, 13, 0.64) 37%,
    rgba(20, 24, 25, 0.64) 65%,
    rgba(48, 47, 45, 0.64) 75%,
    rgba(83, 77, 70, 0.64) 84%,
    rgba(119, 106, 95, 0.64)
  );
}

.sheet-label {
  display: block;
  font: 700 13px/1 var(--condensed);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--lime);
}

.sheet-head strong {
  display: block;
  margin-top: 5px;
  font: 800 27px/1 var(--narrow);
  text-transform: uppercase;
}

.sheet-meta {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--soft);
}

.sheet-rows {
  margin-top: 16px;
}

.sheet-rows li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.sheet-num {
  padding-top: 3px;
  font: 700 12px/1 var(--condensed);
  color: var(--mute);
}

.sheet-row {
  display: grid;
  gap: 2px;
  line-height: 1.3;
}

.sheet-row strong {
  font-size: 15px;
  font-weight: 500;
}

.sheet-super {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mute);
}

.sheet-detail {
  font-size: 13px;
  color: var(--soft);
}

.sheet-tag {
  font-size: 13px;
}

.sheet-tag.is-warm {
  color: var(--ember);
}

.sheet-tag.is-drop {
  color: var(--violet);
}

/* Energy: the scale, live. */

.viz-energy {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 30px;
}

.energy-track {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 284px;
  margin-inline: 8px;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.energy-bar {
  height: 4px;
  border-radius: 2px;
}

.energy-thumb {
  position: absolute;
  inset-inline: -9px;
  height: 10px;
  margin-top: -5px;
  border: 2px solid rgba(17, 18, 21, 0.58);
  border-radius: 5px;
  background: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Kept for the keyboard and for screen readers; the pointer drags the track itself. */
.energy-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.energy-track:has(.energy-input:focus-visible) {
  outline: 2px solid var(--lime);
  outline-offset: 12px;
  border-radius: 6px;
}

.energy-value {
  display: block;
  font: 800 54px/1 var(--narrow);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.energy-label {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--mute);
}

.energy-set {
  display: grid;
  gap: 3px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--fill);
}

.energy-exercise {
  font-size: 13px;
  color: var(--soft);
}

.energy-load {
  font: 700 22px/1.1 var(--condensed);
  font-variant-numeric: tabular-nums;
}

.energy-count {
  margin-left: 6px;
  font: 500 13px/1 var(--sans);
  color: var(--soft);
}

.energy-effect {
  min-height: 3em;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--soft);
}

.is-eased .energy-effect {
  color: rgba(240, 237, 230, 0.88);
}

.energy-hint {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  color: var(--mute);
  transition: opacity 0.3s;
}

.js .energy-hint {
  display: block;
}

.is-touched .energy-hint {
  opacity: 0;
}

/* Logging: set rows and the rest timer. */

.viz-log {
  padding: 18px 18px 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #111316;
}

.log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.log-head strong {
  font: 800 22px/1 var(--narrow);
  text-transform: uppercase;
}

.rest {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 12px;
  color: var(--soft);
}

.rest b {
  font: 700 15px/1 var(--condensed);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.rest-ring {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: conic-gradient(var(--lime) 62%, rgba(240, 237, 230, 0.16) 0);
  -webkit-mask: radial-gradient(circle, transparent 5.5px, #000 6.2px);
  mask: radial-gradient(circle, transparent 5.5px, #000 6.2px);
}

.rest-skip {
  padding-left: 9px;
  border-left: 1px solid rgba(240, 237, 230, 0.14);
}

.sets {
  margin-top: 10px !important;
}

.set {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
}

.set-mark {
  font: 700 13px/1 var(--condensed);
  color: var(--mute);
}

.set.is-warm .set-mark {
  color: var(--ember);
}

.set-main b {
  display: block;
  font: 700 26px/1.05 var(--condensed);
}

.set-main small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--mute);
}

.set-reps {
  font: 700 24px/1 var(--condensed);
}

.set-check {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(240, 237, 230, 0.18);
  border-radius: 50%;
  color: transparent;
}

.set.is-done .set-check {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--on-lime);
}

.set.is-done.is-warm .set-check {
  border-color: var(--ember);
  background: var(--ember);
}

.set.is-next .set-check {
  border-color: var(--lime);
}

.set.is-todo {
  opacity: 0.36;
}

/* Balance: the body map and the sets behind its colours. */

.viz-balance {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.bodies {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 5%;
  width: 100%;
}

.bodies img {
  position: relative;
  width: 46%;
  max-width: 196px;
  height: auto;
}

/* The ground under the figures' feet. */
.bodies::before {
  content: '';
  position: absolute;
  inset: auto 4% -3% 4%;
  height: 9%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), transparent);
}

.viz-balance .chips {
  margin-top: 0;
}

.muscles {
  margin-top: 28px;
}

.muscles-head {
  font: 700 14px/1 var(--condensed);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--mute);
}

.muscles ul {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.muscles li {
  display: grid;
  grid-template-columns: minmax(0, 7.6em) minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--soft);
}

.muscle-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--fill);
}

.muscle-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  transform-origin: left;
}

.muscle-sets {
  text-align: right;
  font: 700 15px/1 var(--condensed);
  color: var(--ink);
}

/* Consistency: four numbers, eight weeks, one streak. */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  justify-content: space-between;
  gap: 10px;
}

.stats dt {
  display: flex;
  align-items: center;
  gap: 3px;
  font: 700 30px/1 var(--condensed);
}

.stats dd {
  display: grid;
  gap: 2px;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.25;
  color: var(--soft);
}

.stats em,
.progress em {
  font-style: normal;
  color: var(--lime);
}

.flame {
  flex: none;
}

.bars {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  height: 184px;
  margin-top: 24px;
}

.bar-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  height: 100%;
  transform-origin: bottom;
}

.bar {
  flex-shrink: 1;
  border-radius: 5px;
}

.bar-strength {
  background: var(--lime);
}

.bar-run {
  background: var(--sky);
}

.bar-planned {
  border: 1.5px dashed rgba(240, 237, 230, 0.34);
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 11px;
  color: var(--mute);
}

.bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 14px !important;
  font-size: 12px;
  color: var(--soft);
}

.bar-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.key-strength {
  background: var(--lime);
}

.key-run {
  background: var(--sky);
}

.key-planned {
  border: 1.5px dashed rgba(240, 237, 230, 0.4);
}

.streak {
  margin-top: 28px;
}

.streak-weeks {
  display: flex;
  gap: 4px;
}

.streak-weeks span {
  flex: 1;
  max-width: 14px;
  height: 20px;
  border-radius: 4px;
  background: var(--lime);
}

.streak-weeks .streak-open {
  border: 1.5px dashed rgba(240, 237, 230, 0.34);
  background: none;
}

.streak-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font: 700 17px/1 var(--condensed);
}

/* Records: the tiles, and one exercise's progress. */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tile {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 14px 13px 15px;
  border-radius: 16px;
  background: var(--fill);
}

.tile .icon {
  margin-bottom: 10px;
  color: var(--lime);
}

.tile b {
  font: 700 34px/1 var(--condensed);
}

.tile small {
  font-size: 11px;
  color: var(--soft);
}

.tile span {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.25;
}

.tile:first-child {
  background: var(--lime);
  color: var(--on-lime);
}

.tile:first-child .icon {
  color: var(--on-lime);
}

.tile:first-child small {
  color: rgba(17, 18, 21, 0.68);
}

.progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42%;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--fill);
}

.progress-name {
  display: block;
  font-size: 15px;
}

.progress small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--soft);
}

.progress em {
  display: block;
  margin-top: 6px;
  font: 700 17px/1 var(--condensed);
}

.progress svg {
  display: block;
  width: 100%;
  height: 58px;
}

.spark-line {
  stroke-dasharray: 1;
}

/* Small cards: a scrap of the app above a title and a sentence. */

.box-small {
  grid-column: span 3;
  padding: 26px;
}

.box-small h3 {
  font-size: 23px;
}

.box-small > p {
  font-size: 15px;
}

.mini {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  height: 116px;
  margin-bottom: 22px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 13px;
  line-height: 1.2;
  color: var(--soft);
}

.mini-pill.is-on {
  background: rgba(218, 240, 112, 0.1);
  color: var(--lime);
}

/* A phone's status bar: the time, four signal bars with nothing in them, flight mode. */
.mini-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 14px 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #111316;
  font: 700 15px/1 var(--condensed);
}

.mini-status-right {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.mini-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 13px;
}

.mini-bars i {
  width: 3.5px;
  border-radius: 1.5px;
  background: rgba(240, 237, 230, 0.2);
}

.mini-bars i:nth-child(1) {
  height: 5px;
}
.mini-bars i:nth-child(2) {
  height: 7.5px;
}
.mini-bars i:nth-child(3) {
  height: 10px;
}
.mini-bars i:nth-child(4) {
  height: 13px;
}

.mini-pair {
  display: flex;
}

.mini-pair span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--lime);
  color: var(--on-lime);
  font: 700 21px/1 var(--condensed);
}

.mini-pair span + span {
  margin-left: -12px;
  background: #b4b9c1;
}

/* A planned run as the week lists it, and the week it sits in. */
.mini-run {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
}

.mini-run-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(106, 169, 216, 0.14);
  color: var(--sky);
}

.mini-run b {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
}

.mini-run small {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--soft);
}

.mini-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.mini-week span {
  display: grid;
  justify-items: center;
  gap: 5px;
  font: 700 11px/1 var(--condensed);
  color: var(--mute);
}

.mini-week span::after {
  content: '';
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--fill);
}

.mini-week .is-lift::after {
  background: var(--lime);
}

.mini-week .is-run::after {
  background: var(--sky);
}

.mini-week .is-run {
  color: var(--sky);
}

/* A push notification, the way one lands on the lock screen: on top of a stack. */
.mini-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font: 700 13px/1 var(--condensed);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}

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

.mini-label time {
  font: 500 11px/1 var(--sans);
  letter-spacing: 0;
  text-transform: none;
}

.mini-stack {
  position: relative;
  width: 100%;
  margin-bottom: 9px;
}

.mini-stack::before,
.mini-stack::after {
  content: '';
  position: absolute;
  inset: auto 5% -5px;
  height: 20px;
  border-radius: 0 0 14px 14px;
  background: #24262a;
}

.mini-stack::before {
  inset: auto 10% -9px;
  background: #1d1f23;
}

.mini-push {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 17px;
  background: #2d2f33;
}

.mini-push img {
  display: block;
  border-radius: 9px;
}

.mini-push b {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}

.mini-push small {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--soft);
}

/*
 * Cards play in when they scroll into view. Everything above is the finished
 * state; these rules only hold it back until site.js marks the card as seen,
 * so without the script nothing is hidden.
 */

.js .reveal {
  transition:
    opacity 0.6s,
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(16px);
}

.js .sheet-rows li,
.js .tile {
  transition:
    opacity 0.5s calc(0.25s + var(--i) * 0.11s),
    transform 0.5s calc(0.25s + var(--i) * 0.11s) cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal:not(.is-in) .sheet-rows li,
.js .reveal:not(.is-in) .tile {
  opacity: 0;
  transform: translateY(10px);
}

.js .set-check {
  transition:
    background 0.25s calc(0.4s + var(--i) * 0.28s),
    border-color 0.25s calc(0.4s + var(--i) * 0.28s),
    color 0.25s calc(0.4s + var(--i) * 0.28s),
    transform 0.35s calc(0.4s + var(--i) * 0.28s) cubic-bezier(0.3, 1.6, 0.5, 1);
}

.js .reveal:not(.is-in) .set.is-done .set-check {
  border-color: rgba(240, 237, 230, 0.18);
  background: none;
  color: transparent;
  transform: scale(0.8);
}

.js .muscle-bar span,
.js .bar-col,
.js .streak-weeks span {
  transition: transform 0.7s calc(0.2s + var(--i, 0) * 0.07s) cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal:not(.is-in) .muscle-bar span {
  transform: scaleX(0);
}

.js .reveal:not(.is-in) .bar-col {
  transform: scaleY(0);
}

.js .streak-weeks span {
  transition-duration: 0.3s;
  transition-delay: calc(0.3s + var(--i, 13) * 0.05s);
}

.js .reveal:not(.is-in) .streak-weeks span {
  transform: scaleY(0.2);
}

.js .spark-line {
  transition: stroke-dashoffset 1.2s 0.4s ease-out;
}

.js .reveal:not(.is-in) .spark-line {
  stroke-dashoffset: 1;
}

/* Questions */

.faq {
  padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 6vw, 72px);
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px 48px;
  align-items: start;
}

.faq-list {
  border-top: 1px solid var(--line);
}

details {
  border-bottom: 1px solid var(--line);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font: 700 23px/1.15 var(--condensed);
  cursor: pointer;
  list-style: none;
}

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

.faq-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--fill);
  color: var(--soft);
  transition:
    transform 0.2s,
    color 0.2s;
}

summary:hover .faq-mark {
  color: var(--ink);
}

details[open] .faq-mark {
  transform: rotate(45deg);
  color: var(--lime);
}

details p {
  max-width: 62ch;
  padding: 0 54px 26px 0;
  color: var(--soft);
}

details a,
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* Footer */

.foot {
  margin-top: clamp(48px, 8vw, 96px);
  padding: 44px 0 max(36px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px 48px;
}

.foot-brand p {
  max-width: 24em;
  margin-top: 14px;
  color: var(--soft);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}

.foot-nav a {
  color: var(--soft);
  text-decoration: none;
  transition: color 0.15s;
}

.foot-nav a:hover {
  color: var(--ink);
}

.foot-end {
  margin-top: 56px;
  font-size: 13px;
  color: var(--mute);
}

/* Privacy policy */

.prose {
  max-width: calc(760px + var(--gutter) * 2);
  padding-top: clamp(124px, 15vw, 170px);
  padding-bottom: 40px;
}

.prose h1 {
  font-size: clamp(40px, 6.4vw, 68px);
  hyphens: manual;
}

.prose-date {
  margin-top: 18px;
  font-size: 15px;
  color: var(--mute);
}

.prose-summary {
  margin-top: 36px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  list-style: none;
}

.prose-summary li {
  position: relative;
  padding-left: 24px;
}

.prose-summary li + li {
  margin-top: 12px;
}

.prose-summary li::before {
  content: '';
  position: absolute;
  top: 0.6em;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

.prose section {
  margin-top: 60px;
  scroll-margin-top: 24px;
}

.prose h2 {
  font: 700 30px/1.1 var(--condensed);
  letter-spacing: 0;
  text-transform: none;
}

.prose h3 {
  margin-top: 30px;
  font: 700 21px/1.2 var(--condensed);
}

.prose p,
.prose section ul {
  margin-top: 14px;
  color: rgba(240, 237, 230, 0.8);
}

.prose section ul {
  padding-left: 22px;
}

.prose section li + li {
  margin-top: 8px;
}

.prose section li::marker {
  color: var(--mute);
}

.prose strong {
  font-weight: 500;
  color: var(--ink);
}

.prose address {
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  font-style: normal;
}

.table {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

th,
td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
}

thead th {
  font: 700 15px/1.2 var(--condensed);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--mute);
}

tbody tr {
  border-top: 1px solid var(--line);
}

tbody th {
  font-weight: 500;
  white-space: nowrap;
}

tbody td {
  color: rgba(240, 237, 230, 0.8);
}

/* Not found */

.lost {
  padding: clamp(160px, 22vw, 240px) 0 80px;
}

.lost .lede {
  margin: 22px 0 30px;
}

/* Narrower screens */

@media (max-width: 1040px) {
  .box-wide,
  .box-narrow {
    grid-column: span 12;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    grid-template-rows: none;
    align-items: start;
  }

  .box-narrow .viz {
    align-self: start;
  }

  .box-small {
    grid-column: span 6;
  }
}

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

  .hero-phones {
    max-width: 440px;
  }

  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  /* Every second week, so the bars keep some width. */
  .hero-art i:nth-child(odd) {
    display: none;
  }

  body {
    font-size: 16px;
  }

  .top-link {
    display: none;
  }

  .box-wide,
  .box-narrow {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 28px 22px;
  }

  .box h3 {
    font-size: 28px;
  }

  .viz-energy {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 24px;
  }

  .energy-track {
    height: 240px;
  }

  .bodies img {
    max-width: 150px;
  }

  .box-small {
    padding: 24px 22px;
  }

  summary {
    font-size: 21px;
  }

  details p {
    padding-right: 0;
  }

  .foot-row {
    flex-direction: column;
  }
}

/* Two small cards side by side get too narrow for their pills below this. */
@media (max-width: 640px) {
  /* The table has no room for three columns: one block per company, each cell under its heading. */
  table {
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  tbody tr {
    display: block;
    padding: 16px 18px 18px;
  }

  tbody tr:first-child {
    border-top: 0;
  }

  tbody th,
  tbody td {
    display: block;
    padding: 0;
  }

  tbody th {
    font-size: 16px;
    white-space: normal;
  }

  tbody td {
    margin-top: 10px;
  }

  tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font: 700 13px/1.2 var(--condensed);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--mute);
  }

  .box-small {
    grid-column: span 12;
  }

  .mini {
    height: auto;
    min-height: 64px;
  }
}

/* Three record tiles no longer hold their labels: one row each, name and unit left, number right. */
@media (max-width: 420px) {
  .tiles {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .tile {
    grid-template: 'icon name value' auto 'icon unit value' auto / auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1px 12px;
    padding: 11px 16px 11px 14px;
  }

  .tile .icon {
    grid-area: icon;
    margin-bottom: 0;
  }

  .tile b {
    grid-area: value;
    font-size: 30px;
  }

  .tile small {
    grid-area: unit;
  }

  .tile span {
    grid-area: name;
    margin-top: 0;
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .energy-value {
    font-size: 44px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
