/* GymBells site (issue #335). White paper, the app's own components, exercise drawings as the art.
   System font only; colours from Workouts/Assets.xcassets. */
:root {
  --page: #ffffff;
  --card: #f2f2f7;
  --card-raised: #ffffff;
  --tile: transparent;
  --label: #000000;
  --secondary: rgba(60, 60, 67, 0.72);
  --hairline: rgba(60, 60, 67, 0.16);
  --accent: #e8743a;
  --accent: color(display-p3 0.910 0.455 0.224);
  /* AccentText (#b5400a) for orange text; the fill sits between AccentBoldText and AccentText so
     white text on it passes AA (4.9:1) and it still reads as the app's orange. */
  --accent-text: #b5400a;
  --accent-fill: #c4480c;
  --on-accent: #ffffff;
  --accent-soft: #fbe3d6;
  --accent-soft-text: #8a4000;
  --done: #248a3d;            /* SetDone, high contrast: white digits pass AA */
  --done-dot: #34c759;        /* SetDone, for dots without text */
  --on-done: #ffffff;
  --pending: #ffdab0;
  --pending-text: #8a4000;
  --shot-edge: rgba(0, 0, 0, 0.10);
  --code-key: #b5400a;
  --code-str: #1f6f33;
  --code-num: #3d4fb8;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #000000;
    --card: #1c1c1e;
    --card-raised: #2c2c2e;
    /* The drawings have black equipment that disappears on dark grey, so in dark mode they sit
       on a warm light card, like a printed exercise card. */
    --tile: #ebe6df;
    --label: #ffffff;
    --secondary: rgba(235, 235, 245, 0.66);
    --hairline: rgba(84, 84, 88, 0.6);
    --accent: #ff7f3f;
    --accent-text: #ff7f3f;
    --accent-fill: #ff7f3f;
    --on-accent: #000000;
    --accent-soft: #4a2412;
    --accent-soft-text: #ffdab0;
    --done: #30d158;
    --done-dot: #30d158;
    --on-done: #000000;
    --pending: #a54709;
    --pending-text: #ffdab0;
    --shot-edge: rgba(255, 255, 255, 0.16);
    --code-key: #ff9a66;
    --code-str: #7ddc94;
    --code-num: #a8b4ff;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .badge-light { display: none; }
  :root:not([data-theme="light"]) .badge-dark { display: block; }
}
:root[data-theme="dark"] {
  --page: #000000;
  --card: #1c1c1e;
  --card-raised: #2c2c2e;
  --tile: #ebe6df;
  --label: #ffffff;
  --secondary: rgba(235, 235, 245, 0.66);
  --hairline: rgba(84, 84, 88, 0.6);
  --accent: #ff7f3f;
  --accent-text: #ff7f3f;
  --accent-fill: #ff7f3f;
  --on-accent: #000000;
  --accent-soft: #4a2412;
  --accent-soft-text: #ffdab0;
  --done: #30d158;
  --done-dot: #30d158;
  --on-done: #000000;
  --pending: #a54709;
  --pending-text: #ffdab0;
  --shot-edge: rgba(255, 255, 255, 0.16);
  --code-key: #ff9a66;
  --code-str: #7ddc94;
  --code-num: #a8b4ff;
  color-scheme: dark;
}
:root[data-theme="dark"] .badge-light { display: none; }
:root[data-theme="dark"] .badge-dark { display: block; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--card); color: var(--label); padding: 10px 14px; border-radius: 12px; z-index: 10; }
.skip:focus { top: 10px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--label); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.top nav { display: flex; gap: 18px; font-size: 15px; }
.top nav a { color: var(--secondary); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--label); }

/* Hero */
.hero { text-align: center; padding-top: 36px; }
.eyebrow { color: var(--secondary); font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.eyebrow b { color: var(--accent-text); font-weight: 600; }
h1 { font-size: clamp(34px, 8vw, 60px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 800; margin: 0 auto 16px; max-width: 20ch; text-wrap: balance; }
.lede { color: var(--secondary); font-size: clamp(17px, 2.4vw, 20px); max-width: 32em; margin: 0 auto 10px; }
.lede strong { color: var(--label); font-weight: 600; }

/* The official App Store badge. Apple: at least 40 px high, clear space of a quarter of its height. */
.store { display: inline-block; padding: 14px; margin: 0; }
.store a { display: block; border-radius: 10px; }
.store img { width: 162px; height: 54px; }
.badge-dark { display: none; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; color: var(--secondary); font-size: 14px; }
.facts li { white-space: nowrap; }

/* Drawing pairs: the start and end of a real exercise from the app */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.pair figure { margin: 0; text-align: center; }
.pair img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--tile); border-radius: 24px; }
.pair figcaption { color: var(--secondary); font-size: 13px; margin-top: 6px; }
.hero-pair { max-width: 640px; margin: 28px auto 0; }
.ex-name { display: flex; align-items: center; justify-content: center; gap: 8px 10px; flex-wrap: wrap; margin-top: 14px; }
.ex-name b { font-size: 20px; font-weight: 600; }
.star { color: var(--accent); font-size: 18px; line-height: 1; }
.meta { color: var(--secondary); }
.weight { display: inline-block; background: var(--accent-soft); color: var(--accent-soft-text); font-weight: 600; font-size: 17px; padding: 5px 14px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pair-name { color: var(--secondary); font-size: 14px; text-align: center; margin: 8px 0 0; }

/* Rhythm: a row of set circles between sections */
.rhythm { display: flex; justify-content: center; gap: 10px; padding: 56px 0; }
.rhythm i { width: 12px; height: 12px; border-radius: 50%; background: var(--pending); }
.rhythm i.d { background: var(--done-dot); }
.rhythm i.c { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }

/* Section heads */
h2 { font-size: clamp(28px, 5vw, 40px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 12px; text-wrap: balance; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; margin: 0; }
.kicker { color: var(--accent-text); font-weight: 600; font-size: 15px; margin: 0 0 8px; }
.sub { color: var(--secondary); margin: 0 0 20px; max-width: 34em; }
.sub strong { color: var(--label); font-weight: 600; }
.center { text-align: center; }
.center .sub { margin-left: auto; margin-right: auto; }

/* Plan, Train, Log, Done */
.steps { list-style: none; margin: 44px auto 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; max-width: 900px; text-align: left; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 0 10px; }
.steps li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; margin-top: 5px; background: var(--done-dot); }
.steps li:nth-child(3)::before { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }
.steps li:nth-child(4)::before { background: var(--pending); }
.steps b { display: block; font-size: 17px; }
.steps span { grid-column: 2; color: var(--secondary); font-size: 15px; }

/* Live demo: a workout row, as in the app */
.demo { max-width: 560px; margin: 0 auto; }
.ex { background: var(--card); border-radius: 26px; padding: 18px 18px 16px; }
.ex-head { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; }
.ex-head img { width: 64px; height: 64px; object-fit: contain; background: var(--tile); border-radius: 14px; }
.ex-head b { font-weight: 600; font-size: 18px; display: block; line-height: 1.2; }
.ex-head .meta { font-size: 15px; }
.ex-last { color: var(--secondary); font-size: 13px; margin: 12px 0 10px; }
.sets { display: flex; gap: 10px; flex-wrap: wrap; }
.set { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.set button {
  width: 46px; height: 46px; border-radius: 50%; border: 0; padding: 0;
  font: 600 18px/1 var(--font); font-variant-numeric: tabular-nums; cursor: pointer;
  background: var(--pending); color: var(--pending-text);
  transition: background-color .2s, transform .15s;
}
.set button[aria-pressed="true"] { background: var(--done); color: var(--on-done); }
.set button.current { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.set button:active { transform: scale(.94); }
.set button:focus-visible { border-radius: 50%; }
.set small { font-size: 12px; color: var(--label); font-variant-numeric: tabular-nums; }
.set small.p { color: var(--secondary); }
.set .add { background: transparent; color: var(--accent-text); border: 2px dashed var(--accent); font-size: 24px; font-weight: 400; }

.rest { background: var(--card); border-radius: 22px; padding: 16px 18px; margin-top: 12px; }
.rest[hidden] { display: none; }
.rest-top { display: flex; justify-content: space-between; align-items: baseline; }
.rest-time { font-size: 44px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; line-height: 1; }
.rest-total { color: var(--secondary); font-size: 17px; font-variant-numeric: tabular-nums; }
.bar { height: 5px; border-radius: 3px; background: var(--hairline); margin: 14px 0; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; }
.rest-btns { display: flex; justify-content: center; gap: 10px; }
.rest-btns button {
  font: 500 17px/1 var(--font); font-variant-numeric: tabular-nums; padding: 11px 16px; border-radius: 999px; min-height: 44px; cursor: pointer;
  background: var(--card-raised); color: var(--accent-text); border: 1px solid var(--hairline);
}
.rest-btns .skip-rest { background: var(--accent-fill); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.demo-note { color: var(--secondary); font-size: 15px; text-align: center; margin: 14px 0 0; min-height: 1.47em; }

/* Feature rows */
.feature { display: grid; gap: 28px; align-items: center; padding-top: 40px; padding-bottom: 40px; }
.feature ul, .bullets { list-style: none; padding: 0; margin: 0 0 22px; }
.feature li, .bullets li { position: relative; padding-left: 22px; margin: 8px 0; color: var(--secondary); }
.feature li::before, .bullets li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 50%; background: var(--done-dot); }
.feature .pair { max-width: 400px; }
.note { color: var(--secondary); font-size: 14px; margin: 0 0 20px; }
.unlock-tag { display: inline-block; color: var(--accent-soft-text); background: var(--accent-soft); font-size: 14px; font-weight: 600; padding: 4px 12px; border-radius: 999px; margin: 0 0 20px; }
.shot { width: min(300px, 78vw); margin: 0 auto; border-radius: 30px; box-shadow: 0 0 0 1px var(--shot-edge); }
.shot-wide { width: min(460px, 100%); margin: 0 auto; border-radius: 22px; box-shadow: 0 0 0 1px var(--shot-edge); }

/* Apple Watch */
.watches { display: flex; justify-content: center; gap: 14px; }
.watches img { width: min(200px, 42vw); border-radius: 34px; box-shadow: 0 0 0 1px var(--shot-edge); }

/* Free and Unlock */
.plans { display: grid; gap: 14px; margin-top: 8px; }
.plan { background: var(--card); border-radius: 26px; padding: 22px 20px 10px; }
.plan .meta { font-size: 15px; margin: 2px 0 10px; }
.plan ul { list-style: none; margin: 0; padding: 0; }
.plan li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid var(--hairline); font-size: 16px; }
.plan li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; background: var(--done-dot); }
.plan.unlock li::before { background: var(--pending); box-shadow: inset 0 0 0 2px var(--accent); }
.plan li span { color: var(--secondary); }
.price { color: var(--secondary); font-size: 14px; margin: 14px 0 0; text-align: center; }
.library { display: grid; gap: 24px; align-items: center; margin-top: 40px; }
.library .shot { width: min(240px, 70vw); }
.library h3 { margin-bottom: 6px; }
.library p { color: var(--secondary); margin: 0; max-width: 30em; }

/* Bring your own program */
.code { background: var(--card); border-radius: 22px; margin: 0; padding: 18px 18px 14px; min-width: 0; }
.code pre { margin: 0; overflow-x: auto; font: 13px/1.55 var(--mono); color: var(--label); }
.code .k { color: var(--code-key); }
.code .s { color: var(--code-str); }
.code .n { color: var(--code-num); }
.code figcaption { color: var(--secondary); font-size: 13px; margin-top: 12px; }

/* Languages */
.langs { list-style: none; padding: 0; margin: 4px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 760px; }
.langs li { background: var(--card); border-radius: 999px; padding: 6px 14px; font-size: 15px; }

/* Privacy strip */
.private { text-align: center; padding-top: 72px; }
.private .sub { margin-left: auto; margin-right: auto; }
.private h2 span { display: inline-block; }

/* Footer */
footer { border-top: 1px solid var(--hairline); margin-top: 72px; padding: 28px 0 44px; color: var(--secondary); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; justify-content: space-between; }
footer .brand { font-size: 16px; }
footer .brand img { width: 24px; height: 24px; border-radius: 6px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
footer a { color: var(--secondary); }

/* Support and Privacy pages */
.page { max-width: 720px; margin: 0 auto; padding: 32px 16px 0; }
.page h1 { font-size: clamp(34px, 7vw, 48px); margin: 0 0 14px; max-width: none; text-align: left; }
.page .lede { margin: 0 0 8px; text-align: left; max-width: none; }
.page h2 { font-size: 24px; margin: 40px 0 10px; }
.page p, .page li { color: var(--secondary); }
.page p strong, .page li strong { color: var(--label); font-weight: 600; }
.page ul { padding-left: 0; list-style: none; }
.page ul li { position: relative; padding-left: 22px; margin: 8px 0; }
.page ul li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 50%; background: var(--done-dot); }
.page .kicker { color: var(--accent-text); }
.updated { font-size: 14px; margin: 0 0 18px; }
.qa { background: var(--card); border-radius: 22px; padding: 18px 20px 4px; margin: 12px 0; }
.qa h3 { font-size: 17px; font-weight: 600; letter-spacing: 0; }
.qa p { margin: 6px 0 14px; }

@media (min-width: 760px) {
  .hero { padding-top: 60px; }
  .pair { gap: 20px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .feature { grid-template-columns: 1.1fr .9fr; gap: 56px; padding-top: 56px; padding-bottom: 56px; }
  .feature.flip > :first-child { order: 2; }
  .plans { grid-template-columns: 1fr 1fr; }
  .library { grid-template-columns: auto 1fr; gap: 48px; max-width: 760px; margin-left: auto; margin-right: auto; }
  .feature.import { grid-template-columns: .85fr 1.15fr; }
  .rhythm { padding: 72px 0; }
}
@media (max-width: 440px) {
  .top nav { gap: 14px; }
  .top nav .opt { display: none; }
  .ex { padding: 16px 14px 14px; }
  .set button { width: 44px; height: 44px; }
  .sets { gap: 8px; }
  .pair img { border-radius: 20px; }
}
@media (max-width: 380px) {
  .top nav { gap: 10px; font-size: 14px; }
  .brand { font-size: 17px; gap: 8px; }
  .top .brand img { width: 28px; height: 28px; }
  .set button { width: 38px; height: 38px; font-size: 16px; }
  .sets { gap: 6px; }
  .set small { font-size: 11px; }
  .rest-btns { gap: 8px; }
  .rest-btns button { padding: 11px 12px; }
  .ex-head { grid-template-columns: 52px 1fr auto; }
  .ex-head img { width: 52px; height: 52px; }
  .steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .set button:active { transform: none; }
}
