/* Pages on app.thewodgenerator.com. Colours are the app's tokens
   (app/src/theme.ts, light and dark); the card is the app's image share card
   (app/src/components/ShareCard.tsx): the timer's Get ready face on top, then
   pattern chips, the opening line and the rep column. */

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

:root {
  color-scheme: light dark;
  --font: 'Avenir Next', Avenir, 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bg: #f2f4f8;
  --surface: #ffffff;
  --muted: #e8ecf2;
  --border: #dce1e9;
  --text: #1c2738;
  --text2: #596273;
  --text3: #667080;
  --ink: #13559e;
  --tint: #e3ecf8;
  --on-tint: #13559e;
  --accent: #e5a400;
  --on-accent: #1a1405;
  --face: #13559e;
  --on-face: #ffffff;
  --face-track: #0e3d72;
  --link: #13559e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(28, 39, 56, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1f2228;
    --muted: #2a2e35;
    --border: #2c3139;
    --text: #f3f5f8;
    --text2: #a4adbb;
    --text3: #8a93a1;
    --ink: #8db5ec;
    --tint: #1c3354;
    --on-tint: #b9d2f5;
    --accent: #e8ac12;
    --on-accent: #1a1405;
    --face: #174e8f;
    --face-track: #113867;
    --link: #8db5ec;
    --shadow: none;
  }
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
  min-height: 100vh;
}

a {
  color: var(--link);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------ stage */

.stage {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px calc(24px + env(safe-area-inset-bottom));
}

.top {
  padding: 18px 2px 10px;
}

.home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.home img {
  border-radius: 22%;
}

/* Phones: one column, the headline above the card, the call to action right
   under it. .side gives up its box so its children can sit around the card. */
.grid {
  display: flex;
  flex-direction: column;
}

.side {
  display: contents;
}

.kicker {
  order: 1;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  margin: 2px 0 2px;
}

h1 {
  order: 2;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 14px;
  hyphens: manual;
  overflow-wrap: break-word;
}

.state-body {
  order: 3;
  color: var(--text2);
  margin: -6px 0 16px;
}

.card-col {
  order: 4;
}

.cta {
  order: 5;
  margin-top: 18px;
}

.adds {
  order: 6;
}

.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--text3);
  font-size: 12.5px;
  padding: 18px 2px 0;
  margin-top: 22px;
  border-top: 1px solid var(--border);
}

.foot a {
  color: var(--text3);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

/* Desktop and wide windows: the card left, the headline, badges and QR right. */
@media (min-width: 900px) {
  .stage {
    padding: 0 48px 32px;
  }

  .top {
    padding: 24px 0 18px;
  }

  .grid {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
    padding-top: 12px;
  }

  .side {
    display: block;
    padding-top: 18px;
  }

  h1 {
    font-size: 44px;
    margin: 6px 0 10px;
  }

  .kicker {
    font-size: 14px;
  }

  .state-body {
    margin: 0 0 16px;
    font-size: 18px;
  }

  .foot {
    margin-top: 40px;
  }

  /* back in DOM order: the card left, the side right */
  .card-col,
  .side {
    order: 0;
  }
}

/* German compounds break only with hyphenation; the other languages read
   better without it. */
:lang(de) .name,
:lang(de) .digits {
  hyphens: auto;
}

/* ------------------------------------------------------------ the card */

.card {
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

@media (prefers-color-scheme: dark) {
  .card {
    border: 1px solid var(--border);
  }
}

.face {
  background: var(--face);
  color: var(--on-face);
}

.track {
  height: 6px;
  background: var(--face-track);
}

.face-in {
  padding: 14px 20px 16px;
}

.face-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 26px;
}

.word {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.brand img {
  border-radius: 4px;
}

.digits {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: 6px 0 2px;
  overflow-wrap: anywhere;
  hyphens: manual;
}

.digits.xl {
  font-size: clamp(56px, 19vw, 84px);
  letter-spacing: -1px;
}

.digits.l {
  font-size: clamp(40px, 12vw, 56px);
}

.digits.m {
  font-size: clamp(28px, 8vw, 38px);
}

.sub {
  font-size: 17px;
  line-height: 1.3;
}

.card .body {
  padding: 14px 20px 10px;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--tint);
  color: var(--on-tint);
  border-radius: 999px;
  padding: 4px 11px 4px 7px;
  font-size: 13px;
  line-height: 18px;
}

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

.guidance {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 4px;
}

.lines {
  list-style: none;
}

.line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.line:last-child {
  border-bottom: 0;
}

.line-label {
  flex-basis: 100%;
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 2px;
}

.amount {
  flex: none;
  width: 64px;
  text-align: right;
  color: var(--ink);
  font-weight: 800;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.name {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  overflow-wrap: break-word;
  hyphens: manual;
}

.line.rest .name,
.line.spacer .name {
  color: var(--text2);
}

.line.text .name {
  font-size: 16px;
}

.detail {
  color: var(--text3);
  font-size: 14.5px;
  white-space: nowrap;
}

/* A face with no workout: a bad or old link. */
.card.muted .face {
  background: var(--muted);
  color: var(--text3);
}

.card.muted .track {
  background: var(--border);
}

/* Before the decoder arrives. */
.skeleton .bar {
  height: 18px;
  border-radius: 6px;
  background: var(--muted);
  margin: 12px 0;
}

.skeleton .bar.short {
  width: 60%;
}

.skeleton .digits {
  opacity: 0.35;
}

/* ------------------------------------------------------------ calls to action */

.btn {
  display: block;
  text-align: center;
  border-radius: 999px;
  padding: 15px 20px;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.25;
  text-decoration: none;
}

.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
}

.fine {
  text-align: center;
  color: var(--text2);
  font-size: 14px;
  margin-top: 10px;
}

.lnk {
  color: var(--link);
  font-weight: 600;
  text-underline-offset: 2px;
}

.after {
  color: var(--text3);
  font-size: 13.5px;
  margin-top: 14px;
  text-align: center;
}

.lede {
  color: var(--text2);
  font-size: 18px;
  margin-bottom: 12px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 172px;
  padding: 8px 18px 9px 14px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  border: 1px solid #a6a6a6;
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.05;
}

.badge span {
  display: flex;
  flex-direction: column;
}

.badge small {
  font-size: 11px;
  font-weight: 500;
}

.qr {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.qr-code {
  width: 124px;
  height: 124px;
  flex: none;
  border-radius: 8px;
}

.qr p {
  color: var(--text2);
  font-size: 15px;
  max-width: 200px;
}

.cta.desktop {
  margin-top: 10px;
}

/* ------------------------------------------------------------ in the app */

.adds {
  margin-top: 26px;
}

.adds h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text3);
  font-weight: 600;
  margin-bottom: 10px;
}

.adds ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.adds li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  color: var(--ink);
  min-width: 0;
}

.adds svg {
  flex: none;
}

.adds li span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--text);
  overflow-wrap: break-word;
  hyphens: manual;
}

.adds b {
  font-size: 14.5px;
  font-weight: 600;
}

.adds small {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.35;
}

@media (max-width: 359px) {
  .adds ul {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .adds {
    margin-top: 36px;
  }

  .adds li {
    background: transparent;
    padding: 6px 0;
  }
}

.noscript {
  margin: 20px 0;
  color: var(--text2);
}

/* ------------------------------------------------------------ the plain landing (/) */

.home-page .hero-copy {
  order: 1;
}

.home-page .hero-copy h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.home-page .hero-copy .lede {
  margin-bottom: 18px;
}

.home-page .card-col {
  order: 3;
  margin-top: 26px;
}

.home-page .card-caption {
  color: var(--text3);
  font-size: 13px;
  margin-bottom: 8px;
}

.home-page .online {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
}

@media (min-width: 900px) {
  .home-page .grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    align-items: center;
    padding-top: 40px;
  }

  .home-page .hero-copy h1 {
    font-size: 52px;
  }

  .home-page .card-col {
    margin-top: 0;
  }

  .home-page .adds ul {
    grid-template-columns: repeat(4, 1fr);
  }
}
