/* Web layout, after the club's Standard practice site. Loaded after guide.css, which styles the lesson content. */
:root { --white: #FFFFFF; --band: #EEF3FA; --radius-sm: 6px; --radius-lg: 12px; --shadow-1: 0 2px 10px rgba(0,0,0,.08);
  /* Status colours: not in the club palette. Green only ever means correct/done, always with a ✓ */
  --ok: #1B7F3B; --ok-bg: #E8F5EC; --bad-bg: #FCEAEA; }
html { scroll-padding-top: 70px; }
a:hover { color: var(--brand-navy); }
:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 2px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 14px; }
.hide { display: none !important; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 50; }
.skip-link:focus { left: 8px; }
.small { font-size: 15px; } .muted { color: var(--muted); }

/* header / footer */
.site-header { background: var(--brand-navy); color: var(--white); border-bottom: 4px solid var(--brand-gold); padding: 16px 0; }
.head-in { display: flex; gap: 14px; align-items: center; }
.logo { height: 56px; width: auto; }
.site-header .kicker { font: 700 12px var(--font-heading); letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-gold); }
.site-title { font: 800 clamp(22px, 5vw, 30px)/1.2 var(--font-heading); margin: 2px 0; }
.site-title a { color: var(--white); text-decoration: none; }
.site-sub { margin: 0; font-size: 15px; opacity: .9; }
.site-footer { text-align: center; color: var(--muted); padding: 24px 0 40px; font-size: 15px; }
.site-footer p { margin: 4px 0; }

/* sticky progress bar */
.bar { position: sticky; top: 0; z-index: 10; background: var(--white); border-bottom: 1px solid var(--border); padding: 6px 0; }
.bar-in { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.prog { flex: 1; height: 8px; background: var(--band); border-radius: 6px; overflow: hidden; min-width: 60px; }
.prog i { display: block; height: 100%; background: var(--brand-blue); width: 0; transition: width .3s; }

main.wrap { max-width: 860px; padding: 18px 14px 30px; }
main:focus { outline: none; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); padding: 18px 22px; margin-bottom: 16px; }
.card > h1:first-of-type, .card > h2:first-child { margin-top: .2rem; }
.notice { border-left: 5px solid var(--brand-gold); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spread { justify-content: space-between; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; border-radius: var(--radius-md);
  padding: 10px 18px; font: 800 14px var(--font-primary); letter-spacing: .6px; text-transform: uppercase; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--brand-gold); color: var(--ink); }
.btn-primary:hover { filter: brightness(.95); color: var(--ink); }
.btn-secondary { background: var(--white); color: var(--brand-navy); border: 2px solid var(--brand-navy); }
.btn-ghost { background: transparent; color: var(--brand-blue); padding: 10px; }
.check { display: flex; gap: 10px; align-items: center; margin: 1.4rem 0 .4rem; font-weight: 700; cursor: pointer; min-height: 44px; }
.check input { width: 22px; height: 22px; }
.done-row { border-top: 1px solid var(--border); margin-top: 1.4rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }

/* contents */
.toc h3 { display: flex; gap: 10px; align-items: baseline; font: 700 16px var(--font-heading); color: var(--brand-navy); margin: 18px 0 6px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li a { display: flex; gap: 10px; padding: 6px 0; text-decoration: none; min-height: 36px; align-items: baseline; }
.toc li a::before { content: ""; flex: 0 0 1.1em; }
.toc li a[data-track]::before { content: "○"; color: var(--muted); }
.toc li a.ticked::before { content: "✓"; color: var(--ok); font-weight: 800; }
.toc .count { margin-left: auto; color: var(--muted); font-size: 14px; font-weight: 400; }

/* quizzes */
ol[data-q] { list-style: none; padding: 0; margin: 0 0 .4rem; }
.opt { display: flex; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--white); border: 2px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 14px; margin: 8px 0; cursor: pointer; align-items: flex-start; min-height: 52px; }
.opt .l { font: 800 1em var(--font-heading); color: var(--brand-navy); min-width: 22px; }
.opt .mk { margin-left: auto; font-weight: 800; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.wrong { border-color: var(--brand-red); background: var(--bad-bg); }
.explain { border-left: 4px solid var(--brand-gold); background: var(--band); padding: 10px 12px; border-radius: var(--radius-sm); margin: 6px 0 12px; }
.ok { color: var(--ok); font-weight: 700; } .no { color: var(--brand-red); font-weight: 700; }
.score { font: 700 1.1rem var(--font-heading); color: var(--brand-navy); }
.confirm { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--band); border: 1px solid var(--brand-gold); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  .site-header, .site-footer, .bar, .btn, .notice, .toc, .done-row { display: none !important; }
  .card { box-shadow: none; border: 0; padding: 0; break-before: page; }
}

/* Phones: each lesson becomes a deck of slides (site.js adds .deck). Desktop is unchanged. */
.decknav { display: none; }
.deck .off { display: none !important; }
.deck-open .decknav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; margin: 0; gap: 8px;
  justify-content: space-between; align-items: center; background: var(--white); border-top: 1px solid var(--border);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.deck-open .decknav { flex-wrap: nowrap; }
.deck-open .decknav span { flex: 1; min-width: 0; text-align: center; line-height: 1.3; font-size: 13px; }
.deck-open .decknav .btn { flex: none; padding: 10px 14px; }
.deck-open { padding-bottom: 90px; }
.deck-open .site-header { display: none; }
.deck table { display: block; overflow-x: auto; }

/* How to use this guide: screenshots taken by the Playwright tests */
.howto { margin: .4rem 0 1.4rem; }
.howto img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-1); }
.howto.phone img { max-width: 300px; }
