/* Anvil — styles mirror the iOS app's Forge theme: warm paper and iron surfaces, ember for actions,
   quench teal for rest, green for finished sets, and gold for records. Colors come from
   Shared/Theme/Theme+Forge.swift in the app; keep them in sync. */

:root {
  color-scheme: light dark;

  --bg: #f5f3f0;
  --card: #ffffff;
  --fill: rgba(122, 110, 98, 0.09);
  --separator: rgba(42, 36, 31, 0.12);
  --border: rgba(42, 36, 31, 0.12);
  --label: #2a241f;
  --secondary: rgba(42, 36, 31, 0.66);
  --tertiary: rgba(42, 36, 31, 0.4);

  --accent: #bf3f17;
  --on-accent: #ffffff;
  --completed: #1a7f45;
  --on-completed: #ffffff;
  --rest: #127c93;
  --record: #c48a00;
  --record-tint: #fff2c2;

  /* Set types: working sets take the quiet slate hue, warm-ups orange. */
  --hue-slate: #3f6a99;
  --hue-orange: #b35a0e;

  /* The Train tab's glow across the top of the page. */
  --glow: rgba(240, 96, 42, 0.14);
  --glow-secondary: rgba(255, 159, 90, 0.14);

  /* Shared by the Dynamic Island and Lock Screen demos, in both appearances. Live Activities draw
     with the dark-mode palette. */
  --wallpaper:
    radial-gradient(120% 90% at 20% 0%, #8a4a32 0%, transparent 60%),
    radial-gradient(100% 80% at 100% 100%, #3f5368 0%, transparent 60%),
    #1a1717;
  --la-completed: #34d17a;
  --la-rest: #4cc3d9;
  --la-slate: #7faee6;

  --radius-card: 28px;
  --radius-chip: 10px;
  --shadow: 0 1px 2px rgba(42, 36, 31, 0.04);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", var(--font);
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0d;
    --card: #151518;
    --fill: rgba(138, 128, 120, 0.22);
    --separator: rgba(247, 243, 238, 0.1);
    /* Dark cards are already lighter than the page, so the app halves the hairline around them. */
    --border: rgba(247, 243, 238, 0.05);
    --label: #f7f3ee;
    --secondary: rgba(247, 243, 238, 0.62);
    --tertiary: rgba(247, 243, 238, 0.4);

    --accent: #e0552a;
    --completed: #34d17a;
    --on-completed: #0b0b0d;
    --rest: #4cc3d9;
    --record: #ffc52e;
    --record-tint: #3b2d00;

    --hue-slate: #7faee6;
    --hue-orange: #ff9f4a;

    --glow: rgba(224, 85, 42, 0.14);
    --glow-secondary: rgba(184, 48, 26, 0.13);

    --shadow: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --secondary: rgba(42, 36, 31, 0.8);
    --tertiary: rgba(42, 36, 31, 0.55);
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --secondary: rgba(247, 243, 238, 0.8);
    --tertiary: rgba(247, 243, 238, 0.55);
  }
}

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

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

body {
  margin: 0;
  /* Like the app's tabs, a faint two-tone glow tints the top of the page. */
  background:
    radial-gradient(70% 520px at 15% 0%, var(--glow), transparent),
    radial-gradient(60% 440px at 90% 0%, var(--glow-secondary), transparent),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.wrap {
  width: min(1040px, 100% - 40px);
  margin-inline: auto;
}

.wrap.narrow {
  width: min(680px, 100% - 40px);
}

/* App icon: the ember icon gets a soft lift off the paper, and the dark icon a faint edge
   against the iron page. */

@media (prefers-color-scheme: light) {
  img[src="/icon-light.png"] {
    filter: drop-shadow(0 2px 6px rgba(122, 46, 18, 0.18));
  }
}

@media (prefers-color-scheme: dark) {
  picture img {
    filter: drop-shadow(0 0 0.5px rgba(247, 243, 238, 0.3));
  }
}

/* SF Symbols */

.sym {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: var(--symbol) center / contain no-repeat;
  mask: var(--symbol) center / contain no-repeat;
}

.sym-number { --symbol: url(/symbols/number.png); }
.sym-repeat { --symbol: url(/symbols/repeat.png); }
.sym-scalemass { --symbol: url(/symbols/scalemass-fill.png); }
.sym-checkmark { --symbol: url(/symbols/checkmark.png); }
.sym-multiply { --symbol: url(/symbols/multiply.png); }
.sym-timer { --symbol: url(/symbols/timer.png); }
.sym-trophy { --symbol: url(/symbols/trophy-fill.png); }
.sym-play { --symbol: url(/symbols/play-fill.png); }
.sym-magnifyingglass { --symbol: url(/symbols/magnifyingglass.png); }
.sym-anvil { --symbol: url(/symbols/anvil.svg); }

/* Header */

.site-header {
  padding-block: 20px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--label);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand picture,
.brand img {
  display: block;
  width: 36px;
  height: 36px;
}

/* Buttons */

.store-button {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}

.store-button:hover {
  text-decoration: none;
}

.store-button.small {
  padding: 9px 15px;
  font-size: 15px;
}

.store-button[aria-disabled="true"] {
  cursor: default;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label);
  font-size: 15px;
  font-weight: 500;
}

/* Hero */

.hero {
  padding-block: 56px 88px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(44px, 6vw, 68px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero .lede {
  margin: 0 0 32px;
  max-width: 30ch;
  color: var(--secondary);
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.4;
}

.hero .note {
  margin: 14px 0 0;
  color: var(--tertiary);
  font-size: 14px;
}

/* Cards */

.card {
  --card-padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: var(--card-padding);
}

/* Workout preview (hero) */

.hero-figure {
  margin: 0;
  min-width: 0;
}

.workout h2 {
  margin: 0 0 22px;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.exercise-name {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}

.rest {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--rest);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rest .sym {
  font-size: 13px;
}

.exercise-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

/* Every row shares one grid, so each column keeps a single width. */
.sets {
  --control: 44px;
  display: grid;
  /* Like the app, metric fields keep a fixed width beside the completion control, and the
     marker's track absorbs the remaining space. */
  grid-template-columns: minmax(var(--control), 1fr) 56px 20px 64px var(--control);
  align-items: center;
  justify-items: center;
  column-gap: 12px;
}

.sets > .col-head {
  margin-bottom: 4px;
}

/* Each set shares the columns above, and its tint runs to the card's edges like a row in the app. */
.set-row {
  grid-column: 1 / -1;
  justify-self: stretch;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  justify-items: center;
  position: relative;
  isolation: isolate;
  padding-block: 4px;
}

.set-row::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(-1 * var(--card-padding));
  /* Mixed with the card rather than transparent: while a nearby row animates, Chrome moves rows
     onto GPU layers, and a translucent tint blends a shade differently there than when painted. */
  background: color-mix(in srgb, var(--completed) 10%, var(--card));
  opacity: 0;
  transition: opacity 0.13s ease-out;
}

.set-row.done::before {
  opacity: 1;
  transition: opacity 0.2s ease-out 0.05s;
}

/* Set markers sit at the leading edge of their track. */
.sets .chip,
.sets .col-head:first-child {
  justify-self: start;
}

.sets .col-head:first-child {
  justify-content: center;
  width: var(--control);
}

.sets .col-head {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 600;
}

.sets .col-head .sym {
  font-size: 11px;
}

.chip,
.check {
  display: grid;
  place-items: center;
  width: var(--control);
  height: var(--control);
  border-radius: var(--radius-chip);
}

.chip {
  transition: background-color 0.13s ease-out;
  background: color-mix(in srgb, var(--hue-slate) 10%, transparent);
  color: var(--hue-slate);
  font-family: var(--font-rounded);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  /* Center the cap height, not the font's full line box. */
  text-box: trim-both cap alphabetic;
}

.chip.warmup {
  background: color-mix(in srgb, var(--hue-orange) 10%, transparent);
  color: var(--hue-orange);
}

/* Completed sets drop the marker's background, leaving just its colored label. */
.set-row.done .chip {
  background: transparent;
  transition: background-color 0.2s ease-out 0.05s;
}

.check {
  padding: 0;
  border: 0;
  background: var(--fill);
  color: var(--on-completed);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* Uncompleting crossfades back; release springs past resting size, as in the app. */
  transition: background-color 0.13s ease-out, scale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.check:active {
  scale: 0.9;
  transition: background-color 0.13s ease-out, scale 0.2s ease-out;
}

/* Completing fills the control at once, so the pop and checkmark lead. */
.check.done {
  background: var(--completed);
  transition: scale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.check .sym {
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.13s ease-out;
}

.check.done .sym {
  opacity: 1;
  transition: none;
}

/* Swell past resting size, spring back, and draw the checkmark on from its leading stroke. */
.check.completing {
  animation: check-pop 0.52s both;
}

.check.completing .sym {
  animation: check-draw 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.06s both;
}

@keyframes check-pop {
  0% { scale: 0.9; animation-timing-function: ease-out; }
  23% { scale: 1.12; animation-timing-function: ease-in-out; }
  52% { scale: 0.96; animation-timing-function: ease-in-out; }
  76% { scale: 1.015; animation-timing-function: ease-in-out; }
  100% { scale: 1; }
}

@keyframes check-draw {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .check,
  .check:active,
  .check.done {
    scale: none;
  }

  .check.completing,
  .check.completing .sym {
    animation: none;
  }
}

.num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.num.empty {
  color: var(--tertiary);
}

.times {
  display: grid;
  place-items: center;
  color: var(--tertiary);
  font-size: 14px;
}

.rest-divider {
  grid-column: 1 / -1;
  padding-block: 4px;
  justify-self: stretch;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rest-divider::before,
.rest-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--separator);
}

.next-exercise {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--separator);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: var(--secondary);
}

.next-exercise span {
  white-space: nowrap;
}

.next-exercise strong {
  color: var(--label);
  font-weight: 600;
}

/* Features */

.features {
  padding-bottom: 96px;
}

.section-title {
  margin: 0 0 28px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--secondary);
}

/* Demos sit right on the card; only the Live Activity demos get a wallpaper. */
.feature .demo {
  margin-top: auto;
  border-radius: 20px;
}

/* Feature demos */

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

.template {
  position: relative;
  min-height: 168px;
  padding: 16px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.template h4 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
}

.template ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.55;
}

.template ul li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template .count {
  position: absolute;
  left: 16px;
  bottom: 18px;
  color: var(--tertiary);
  font-size: 13px;
}

.play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}

.play .sym {
  font-size: 15px;
  margin-left: 2px;
}

/* The compact Dynamic Island while resting: the anvil glyph on the leading side and the rest
   countdown on the trailing side, either side of the camera. */
.timer-demo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 250px);
  height: 37px;
  margin-inline: auto;
  padding-inline: 14px 16px;
  border-radius: 999px;
  background: #000;
  color: #f7f3ee;
}

.timer-demo .sym-anvil {
  width: 18px;
  height: 12px;
}

.timer-demo .time {
  color: var(--la-rest);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.feature .demo.island {
  padding: 28px 20px;
  background: var(--wallpaper);
}

.stat-label {
  color: var(--secondary);
  font-size: 14px;
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 2px;
}

.stat strong {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.stat span {
  color: var(--secondary);
  font-size: 15px;
}

.delta {
  margin: 0;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}

.chart {
  display: block;
  width: 100%;
  height: 96px;
  margin-top: 12px;
  color: var(--accent);
}

.record {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--separator);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.record .title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
}

.record .title span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record .title small {
  color: var(--secondary);
  font-size: 14px;
  font-weight: 400;
}

.record .title .sym {
  font-size: 18px;
  color: var(--record);
}

.record .gain {
  color: var(--record);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.library-demo {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--fill);
  color: var(--tertiary);
  font-size: 16px;
}

.search .sym {
  font-size: 16px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters .pill {
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 14px;
  padding: 6px 13px;
}

.filters .pill.on {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}

.exercise-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.exercise-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-block: 12px;
  font-size: 16px;
}

.exercise-list li + li {
  border-top: 1px solid var(--separator);
}

.exercise-list li span {
  color: var(--secondary);
  font-size: 14px;
}

/* Typing an exercise into a workout, with the app's suggestions dropping down below the name. */

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.15em;
  border-radius: 1px;
  background: var(--accent);
  animation: caret-blink 1.06s steps(1) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .caret {
    animation: none;
  }
}

.suggestions {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(42, 36, 31, 0.1);
  overflow: hidden;
}

.suggestions li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding-inline: 12px;
  font-size: 16px;
  white-space: nowrap;
}

.suggestions li + li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 52px;
  right: 0;
  height: 1px;
  background: var(--separator);
}

.suggestions .hit {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.suggestions .hit .sym {
  font-size: 13px;
}

@media (prefers-color-scheme: dark) {
  .suggestions {
    background: #1f1f24;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

/* Lock Screen Live Activity */

.feature.wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

.feature.wide .demo {
  margin-top: 0;
}

.feature .demo.lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 24px;
  background: var(--wallpaper);
  color: #f7f3ee;
}

.lock-date {
  font-size: 17px;
  font-weight: 600;
  opacity: 0.85;
}

.lock-time {
  margin: -6px 0 22px;
  font-family: var(--font-rounded);
  font-size: 84px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  opacity: 0.92;
}

.activity {
  width: min(100%, 380px);
  padding: 16px;
  border-radius: 24px;
  background: rgba(21, 21, 24, 0.62);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.la-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.la-header .sym {
  width: 20px;
  height: 13px;
}

.la-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.la-elapsed {
  color: rgba(247, 243, 238, 0.62);
  font-variant-numeric: tabular-nums;
}

.la-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.la-summary {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
}

.la-summary strong {
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.la-summary b {
  font-weight: 600;
  white-space: nowrap;
}

/* Like the app, "Up Next" takes the rest timer's color. */
.la-badge {
  color: var(--la-rest);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.la-rest {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--la-rest);
}

.la-rest-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}

.la-rest-time {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.la-track {
  display: flex;
  gap: 4px;
}

.seg {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(247, 243, 238, 0.62);
  font-size: 11px;
  font-weight: 700;
}

.seg i {
  align-self: stretch;
  height: 6px;
  border-radius: 3px;
  background: currentColor;
}

.seg .sym {
  font-size: 10px;
  margin-block: 2px;
}

.seg.done {
  color: var(--la-completed);
}

.seg.current {
  color: var(--la-slate);
}

/* The next set's capsule is taller, overflowing its row instead of growing it. */
.seg.current i {
  height: 10px;
  margin-block: -2px;
  border-radius: 5px;
}

/* Closing */

.closing {
  padding-bottom: 96px;
}

.closing .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 56px 28px;
  text-align: center;
}

.closing img {
  display: block;
  width: 96px;
  height: 96px;
}

.closing h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.closing p {
  margin: 0;
  max-width: 44ch;
  color: var(--secondary);
}

/* Footer */

.site-footer {
  padding-block: 28px 48px;
  color: var(--tertiary);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--separator);
  padding-top: 24px;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer a {
  color: var(--secondary);
}

/* Simple pages (privacy, 404, shared workout states) */

.page {
  padding-block: 32px 96px;
}

.page h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 5vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.page .updated,
.page .subtitle {
  margin: 0 0 32px;
  color: var(--secondary);
}

.page .card + .card {
  margin-top: 20px;
}

.page h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.page .card p {
  margin: 0;
  color: var(--secondary);
}

.page .card p + p {
  margin-top: 12px;
}

/* Support: FAQ rows read like an inset grouped list: a separator between questions
   and a chevron that turns down when a question is open. */
.faq h2 {
  margin-bottom: 4px;
}

.faq details + details {
  border-top: 1px solid var(--separator);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid var(--tertiary);
  border-bottom: 2px solid var(--tertiary);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

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

.faq details > p:last-child {
  padding-bottom: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after {
    transition: none;
  }
}

.message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 64px 28px;
  text-align: center;
}

.message img {
  display: block;
  width: 80px;
  height: 80px;
}

.message h1 {
  margin: 0;
  font-size: 28px;
}

.message p {
  margin: 0;
  max-width: 38ch;
  color: var(--secondary);
}

/* Layout breakpoints */

@media (max-width: 860px) {
  .hero {
    padding-block: 24px 64px;
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

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

  .feature.wide {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 520px) {
  .template-demo {
    grid-template-columns: minmax(0, 1fr);
  }

  .template + .template {
    display: none;
  }
}

@media (max-width: 420px) {
  .card {
    --card-padding: 22px;
  }

  .sets {
    grid-template-columns: minmax(var(--control), 1fr) 44px 16px 52px var(--control);
    column-gap: 6px;
  }

  .lock-time {
    font-size: 68px;
  }

  .store-button.small .long {
    display: none;
  }
}
