/* The app's look (UI/Theme.swift): a near-white page with a breath of mint, white cards
   with a mint hairline, the mint accent, and cyan for a rest. Light only. */
:root {
  --accent: #0A8E96;
  --rest: #0088A8;
  --page: #EEF6F7;
  --card: #fff;
  --hair: rgba(10, 142, 150, .16);
  --ink: #10292b;
  --muted: #4d6668;
  --faint: #cfe3e5;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Noto Sans SC", sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: clamp(28px, 5vw, 40px); letter-spacing: -.01em; }
h2 { font-size: 22px; margin: 36px 0 14px; }
h3 { font-size: 18px; }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; }

/* the bar */
.top { background: rgba(255, 255, 255, .8); border-bottom: 1px solid var(--hair); position: sticky; top: 0; z-index: 2; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 50%; border: 4px solid var(--accent); border-right-color: var(--faint); transform: rotate(-45deg); }
.langs { position: relative; font-size: 15px; }
.langs summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--hair); background: #fff; color: var(--ink); cursor: pointer; user-select: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ""; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); margin-left: 2px; }
.langs[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.langs summary svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.6; }
.langs nav { position: absolute; right: 0; top: calc(100% + 6px); display: flex; flex-direction: column; min-width: 160px; padding: 6px; background: #fff; border: 1px solid var(--hair); border-radius: 14px; box-shadow: 0 10px 30px rgba(10, 60, 64, .14); }
.lang { padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--ink); }
.lang:hover { background: var(--page); }
.lang.current { background: var(--accent); color: #fff; }

/* the catalog */
.hero { padding: 36px 0 0; max-width: 720px; }
.hero .lead { max-width: 600px; }
.shelf h2 { margin-top: 36px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.ex-card { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.ex-card:hover { box-shadow: 0 6px 20px rgba(10, 60, 64, .1); transform: translateY(-2px); }
.ex-pic { position: relative; aspect-ratio: 4 / 3; background: #fff; display: grid; place-items: center; border-bottom: 1px solid var(--hair); }
/* pinned to the box: a percentage height in an auto-sized row is the picture's own, and cut */
.ex-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.ex-letter { width: 72px; height: 72px; border-radius: 50%; border: 8px solid var(--faint); }
.ex-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.ex-body p { margin: 0; font-size: 15px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 14px; margin-top: auto !important; }
.meta.big { font-size: 16px; margin-top: 12px !important; }
.meta.big span + span::before { content: "·"; margin-right: 14px; }
.diff { display: inline-flex; align-items: center; gap: 6px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.dots i.on { background: var(--accent); }
.empty { padding: 40px 0; }

/* try it in the app — not a link yet */
.try { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; margin: 28px 0; border-color: rgba(10, 142, 150, .35); background: linear-gradient(135deg, #fff 60%, #e3f4f5); }
.try h2 { margin: 0 0 6px; }
.try p { margin: 0 0 12px; }
.try-text { flex: 1 1 380px; }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.how li { display: flex; gap: 12px; align-items: flex-start; }
.how svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; margin-top: 1px; }
.how div { display: flex; flex-direction: column; font-size: 15px; }
.how span { color: var(--muted); }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: #9fb3b5; color: #fff; font-weight: 600; font-size: 15px; cursor: not-allowed; user-select: none; }
.store svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }

/* one exercise */
.back { margin: 22px 0 0; font-size: 15px; }
.back a { text-decoration: none; }
.ex-hero { display: grid; grid-template-columns: 150px 1fr; column-gap: 24px; align-items: center; padding: 18px 0 4px; }
.ex-hero > * { grid-column: 2; }
.ex-hero .ex-cover { grid-column: 1; grid-row: 1 / span 3; }
.ex-hero h1 { align-self: end; }
.ex-hero .meta { align-self: start; }
h1, h3, .lead { overflow-wrap: anywhere; }
.ex-cover { width: 150px; height: 150px; object-fit: contain; background: #fff; border-radius: 50%; border: 6px solid var(--accent); padding: 14px; }
.lead { font-size: 18px; margin: 10px 0 0; color: var(--muted); }
.locked { padding: 16px 20px; margin-top: 24px; }
.locked h2 { margin: 0 0 6px; font-size: 17px; }
.locked ul { margin: 0; padding-left: 20px; }

/* the ways: a line each — what it is, how long, how hard */
.ways { list-style: none; margin: 0; padding: 4px 0; max-width: 640px; }
.ways li { display: grid; grid-template-columns: 1fr auto 7.5em; align-items: center; gap: 12px; padding: 12px 18px; }
.ways li + li { border-top: 1px solid var(--hair); }
.way-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.way-len { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ways .diff { color: var(--muted); font-size: 14px; }
.mark { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: inline-grid; place-items: center; }

/* the poses: their slides a row, swiped sideways where they do not fit */
.pose { margin-bottom: 28px; }
.pose h3 { display: flex; align-items: center; gap: 10px; }
.slides { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 300px); gap: 14px; margin: 12px -20px 0; padding: 2px 20px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides figure { margin: 0; overflow: hidden; scroll-snap-align: start; display: flex; flex-direction: column; }
.slides img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; border-bottom: 1px solid var(--hair); }
.slides figcaption { padding: 10px 14px 12px; font-size: 15px; }

.foot { color: var(--muted); font-size: 13px; padding-top: 30px; padding-bottom: 40px; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 14px; }
  .try { padding: 18px; }
  .hero { padding-top: 24px; }
  .lead { font-size: 16px; }
  /* a card a row: the picture beside the words, so a phone shows several at once */
  .cards { gap: 10px; }
  .ex-card { flex-direction: row; }
  .ex-pic { flex: none; width: 104px; aspect-ratio: 1; border-bottom: 0; border-right: 1px solid var(--hair); }
  .ex-pic img { padding: 6px; }
  .ex-letter { width: 48px; height: 48px; border-width: 6px; }
  .ex-body { padding: 10px 14px; gap: 3px; justify-content: center; }
  .ex-body h3 { font-size: 17px; }
  .ex-body p { font-size: 14px; }
  .clamp { -webkit-line-clamp: 2; }
  .meta { font-size: 13px; }
  .ex-hero { grid-template-columns: 88px 1fr; column-gap: 16px; padding-top: 12px; }
  .ex-hero .ex-cover { grid-row: 1; }
  .ex-hero .lead, .ex-hero .meta { grid-column: 1 / -1; }
  .ex-hero h1 { align-self: center; font-size: 26px; }
  .ex-cover { width: 88px; height: 88px; border-width: 4px; padding: 8px; }
  .ways li { grid-template-columns: 1fr auto; padding: 10px 14px; row-gap: 2px; }
  .ways .diff { grid-column: 1 / -1; }
  .slides { grid-auto-columns: 78%; margin: 12px -14px 0; padding: 2px 14px 10px; scroll-padding: 0 14px; }
}
