/* The content pages (Learn, About, Privacy) and the landing text under the
   trainer. Same dark palette as the app; Carombo's cloth blue and ball
   colours for accents. */
:root {
  --bg: #0e1217;
  --surface: #161c24;
  --surface-2: #1d2530;
  --line: #2a3441;
  --text: #e8ecf1;
  --muted: #9aa6b4;
  --cloth: #1e5aa8;
  --cloth-hi: #2b6cc4;
  --ivory: #f7f4ec;
  --yellow: #f2c230;
  --red: #d7263d;
  --link: #8cc0ff;
}

body.site {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.site *, .landing * { box-sizing: border-box; }
.site a, .landing a { color: var(--link); text-underline-offset: 3px; }
.site a:hover, .landing a:hover { color: #b5d6ff; }

/* Header and footer */
.site-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px; border-bottom: 1px solid var(--line);
}
.site-logo { display: block; line-height: 0; }
.site-logo img { height: 26px; width: auto; }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text); text-decoration: none; font-size: 15px; padding: 6px 12px; border-radius: 8px;
}
.site-nav a:hover { background: var(--surface-2); color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--yellow); }
.site-nav a.play { background: var(--cloth); color: var(--ivory); }
.site-nav a.play:hover { background: var(--cloth-hi); }

.site-foot {
  margin-top: 64px; padding: 28px 24px 40px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px; line-height: 1.6;
}
.site-foot .cols { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--muted); }

/* Articles */
.article { max-width: 760px; margin: 0 auto; padding: 28px 20px 0; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.article h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.01em; }
.article h2 { font-size: 26px; line-height: 1.25; margin: 44px 0 12px; }
.article h3 { font-size: 20px; margin: 30px 0 8px; }
.article p, .article ul, .article ol { margin: 0 0 18px; }
.article li { margin-bottom: 8px; }
.article .lede { font-size: 20px; color: #cfd6df; }
.article strong { color: var(--ivory); }
.article blockquote {
  margin: 24px 0; padding: 14px 20px; border-left: 4px solid var(--yellow);
  background: var(--surface); border-radius: 0 10px 10px 0; color: #dfe4ea;
}
.article table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 16px; }
.article th, .article td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { color: var(--muted); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; }
.byline { color: var(--muted); font-size: 14px; margin: 0 0 26px; }

/* Key point boxes */
.tip {
  margin: 24px 0; padding: 16px 20px; border-radius: 12px;
  background: rgba(30, 90, 168, 0.18); border: 1px solid rgba(43, 108, 196, 0.55);
}
.tip > :last-child { margin-bottom: 0; }
.tip b:first-child { color: var(--yellow); }

/* Shot diagrams (js/diagram.js) */
figure.shot { margin: 26px 0 30px; }
.shot-table { position: relative; cursor: pointer; border-radius: 10px; overflow: hidden; }
.shot-table canvas { display: block; width: 100%; height: auto; }
.shot-table::after {
  content: "▶"; position: absolute; right: 12px; bottom: 10px;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(8, 10, 14, 0.7); color: var(--ivory); font-size: 14px; padding-left: 3px;
}
figure.shot.playing .shot-table::after { content: none; }
figure.shot figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); line-height: 1.5; }
figure.shot figcaption a { white-space: nowrap; }

/* Call to action and lists of pages */
.cta {
  margin: 40px 0 0; padding: 22px 24px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.cta p { margin: 0; flex: 1 1 280px; }
.button {
  display: inline-block; padding: 11px 20px; border-radius: 10px; font-weight: 600; text-decoration: none;
  background: var(--cloth); color: var(--ivory) !important; border: 1px solid var(--cloth-hi);
}
.button:hover { background: var(--cloth-hi); }
.button.ghost { background: transparent; border-color: var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 0 0 24px; padding: 0; list-style: none; }
.cards li { margin: 0; }
.cards a {
  display: block; height: 100%; padding: 16px 18px; border-radius: 12px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.cards a:hover { border-color: var(--cloth-hi); color: var(--text); }
.cards b { display: block; font-size: 17px; margin-bottom: 4px; color: var(--ivory); }
.cards span { display: block; font-size: 14px; color: var(--muted); line-height: 1.5; }
.related { margin-top: 48px; }
.related h2 { font-size: 20px; }

/* Ad placeholders in the text (the app's .ad-slot look) */
.ad-slot {
  display: grid; place-items: center; text-align: center;
  border: 1px dashed #5b6676; border-radius: 6px; color: #7d8898; font-size: 12px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 10px, transparent 10px 20px);
}
.ad-slot span { font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-right: 6px; }
.ad-slot em { font-style: normal; }
.ad-article { width: 100%; max-width: 728px; min-height: 120px; margin: 30px auto; }

/* The landing text under the trainer on the home page */
.landing { font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); }
.landing section { max-width: 1080px; margin: 0 auto; padding: 56px 24px 0; }
.landing h1 { font-size: clamp(30px, 4.5vw, 44px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.01em; }
.landing h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.25; margin: 0 0 14px; }
.landing p { margin: 0 0 16px; max-width: 760px; }
.landing .lede { font-size: 20px; color: #cfd6df; }
.landing .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; padding: 0; margin: 22px 0 0; list-style: none; }
.landing .steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.landing .steps b { display: block; color: var(--ivory); font-size: 18px; margin-bottom: 6px; }
.landing .faq dt { font-weight: 600; color: var(--ivory); margin-top: 18px; }
.landing .faq dd { margin: 6px 0 0; max-width: 760px; color: #d4dae2; }
.landing .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.landing .site-foot { margin-top: 72px; }
.landing .ad-article { margin-top: 40px; }

@media (max-width: 600px) {
  body.site { font-size: 16px; }
  .site-top { padding: 10px 14px; }
  .site-nav a { padding: 6px 8px; font-size: 14px; }
  .article { padding: 20px 16px 0; }
  .article .lede, .landing .lede { font-size: 18px; }
  .landing section { padding: 44px 16px 0; }
}
