/* Exercise library pages (generated by scripts/generate_exercise_pages.dart).
   Colours match the landing page in index.html. */
:root {
  --bg: #0a0c10;
  --surface: #12151c;
  --surface-2: #1a1e28;
  --accent: #00e5ff;
  --accent-2: #7c4dff;
  --text: #e8eaed;
  --text-muted: #8a8f9a;
  --border: rgba(255, 255, 255, 0.08);
  --media-bg: #ffffff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 12, 16, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 56px;
}
.brand {
  font-size: 20px; font-weight: 800; letter-spacing: -0.5px; text-decoration: none;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-link {
  color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-link:hover { color: var(--accent); }

/* Breadcrumbs and headings */
.crumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0;
  margin: 24px 0 12px; font-size: 13px; color: var(--text-muted);
}
.crumbs li + li::before { content: '›'; margin: 0 8px; }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
h1 {
  font-size: clamp(28px, 5vw, 44px); font-weight: 800;
  line-height: 1.15; letter-spacing: -0.5px;
  margin-bottom: 24px; overflow-wrap: anywhere;
}
h2 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; }
.intro { color: var(--text-muted); max-width: 720px; margin-bottom: 32px; }

/* Exercise page */
.exercise {
  display: grid; grid-template-columns: 288px minmax(0, 1fr);
  gap: 40px; align-items: start;
}
.media { position: sticky; top: 80px; }
.demo, .media img {
  display: block; width: 100%; height: auto;
  border-radius: 16px; background: var(--media-bg);
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.demo { aspect-ratio: 9 / 16; object-fit: contain; }
.demo-placeholder { background: #394150; }
.facts {
  display: grid; grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 20px; padding: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  font-size: 14px;
}
.facts dt { color: var(--text-muted); }
.facts dd a { text-decoration: none; }
.details > h2:first-of-type { margin-top: 28px; }
.steps, .cues { padding-left: 1.4em; }
.steps li, .cues li { margin-bottom: 10px; padding-left: 4px; }
.steps li::marker { color: var(--accent); font-weight: 700; }
.cues li::marker { color: var(--accent); }
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px; margin-top: 40px;
}
.gallery img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: cover; border-radius: 12px; background: var(--media-bg);
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}

/* App pitch */
.cta {
  margin: 48px 0 8px; padding: 28px;
  border-radius: 16px; border: 1px solid rgba(0, 229, 255, 0.2);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(124, 77, 255, 0.1));
}
.cta h2 { margin: 0 0 8px; }
.cta p { color: var(--text-muted); margin-bottom: 20px; max-width: 640px; }
.cta-button {
  display: inline-block; padding: 12px 24px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #000; font-weight: 700; text-decoration: none;
}
.cta-button:hover { filter: brightness(1.1); }

/* Cards (similar exercises, library and category indexes) */
.cards {
  list-style: none; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
}
.card {
  display: block; height: 100%; overflow: hidden; text-decoration: none;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 14px;
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(0, 229, 255, 0.3); }
.card img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: cover; background: var(--media-bg);
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.card span { display: block; padding: 10px 12px 2px; font-size: 14px; font-weight: 600; }
.card small { display: block; padding: 0 12px 12px; font-size: 12px; color: var(--text-muted); }

/* Footer */
.site-footer {
  margin-top: 64px; padding: 32px 0 40px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
}
.langs, .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover, .langs a[aria-current] { color: var(--accent); }
.notice { margin-top: 16px; font-size: 12px; line-height: 1.6; max-width: 820px; }

@media (max-width: 760px) {
  .exercise { grid-template-columns: 1fr; gap: 24px; }
  .media { position: static; max-width: 220px; width: 100%; margin: 0 auto; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 28px; }
  .cta { padding: 22px; }
}
