/* =========================================================================
   ChairSensei — design system
   Tuned for men 50+: 18px base, 48px tap targets, AA contrast throughout.
   ========================================================================= */

/* ------------------------------------------------------------------ TOKENS */
:root {
  /* Warm, confident palette — not clinical, not pastel.
     --paper is matched exactly to the cream behind the ChairSensei character art,
     so the figures sit on the page with no visible edge. --brand-cream holds that
     value in dark mode too, for the panels the artwork sits in. */
  --brand-cream:  #FCFAF6;
  --paper:        #FCFAF6;
  --paper-2:      #F3EDE5;
  --paper-3:      #E8DFD3;
  --card:         #FFFFFF;
  --ink:          #1A1512;
  --ink-2:        #4A403A;
  --ink-3:        #6F635B;
  --line:         #DDD2C5;
  --line-2:       #C9BCAC;

  --accent:       #B4451F;   /* burnt sienna — fills, buttons */
  --accent-deep:  #8F3516;   /* text on paper, hovers */
  --accent-soft:  #FBEDE6;   /* tinted backgrounds */
  --accent-ink:   #FFFFFF;   /* text on accent fills */

  --teal:         #15514B;   /* trust / safety cues */
  --teal-soft:    #E4EFED;
  --gold:         #8A6514;
  --gold-soft:    #FBF2DC;
  --danger:       #9B2C1E;
  --danger-soft:  #FCEBE8;

  --radius:       14px;
  --radius-lg:    22px;
  --radius-sm:    9px;

  --shadow-sm:    0 1px 2px rgba(26,21,18,.06), 0 2px 6px rgba(26,21,18,.05);
  --shadow:       0 2px 6px rgba(26,21,18,.07), 0 10px 26px rgba(26,21,18,.08);
  --shadow-lg:    0 6px 18px rgba(26,21,18,.10), 0 26px 60px rgba(26,21,18,.13);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Driven by the A/A+/A++ control in the header */
  --base-size:    18px;
  --tap:          48px;
  --wrap:         1180px;
}

:root[data-text="large"]  { --base-size: 20px; }
:root[data-text="xlarge"] { --base-size: 22.5px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-cream: #FCFAF6;
    --paper:       #16120F;
    --paper-2:     #1F1915;
    --paper-3:     #2A221C;
    --card:        #201A16;
    --ink:         #F5EFE8;
    --ink-2:       #CDC0B4;
    --ink-3:       #A39486;
    --line:        #382E27;
    --line-2:      #4B3E35;

    --accent:      #E2703F;
    --accent-deep: #F08B5C;
    --accent-soft: #2E1B11;
    --accent-ink:  #1A1512;

    --teal:        #6FBFB2;
    --teal-soft:   #142724;
    --gold:        #D4A845;
    --gold-soft:   #2A2213;
    --danger:      #E88C7D;
    --danger-soft: #2E1613;

    --shadow-sm:   0 1px 2px rgba(0,0,0,.4);
    --shadow:      0 2px 8px rgba(0,0,0,.45), 0 12px 30px rgba(0,0,0,.4);
    --shadow-lg:   0 8px 24px rgba(0,0,0,.5), 0 30px 70px rgba(0,0,0,.45);
  }
}

:root[data-theme="dark"] {
  --brand-cream: #FCFAF6;
  --paper:       #16120F;  --paper-2: #1F1915;  --paper-3: #2A221C;
  --card:        #201A16;
  --ink:         #F5EFE8;  --ink-2:   #CDC0B4;  --ink-3:   #A39486;
  --line:        #382E27;  --line-2:  #4B3E35;
  --accent:      #E2703F;  --accent-deep: #F08B5C;
  --accent-soft: #2E1B11;  --accent-ink:  #1A1512;
  --teal:        #6FBFB2;  --teal-soft: #142724;
  --gold:        #D4A845;  --gold-soft: #2A2213;
  --danger:      #E88C7D;  --danger-soft: #2E1613;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.4);
  --shadow:      0 2px 8px rgba(0,0,0,.45), 0 12px 30px rgba(0,0,0,.4);
  --shadow-lg:   0 8px 24px rgba(0,0,0,.5), 0 30px 70px rgba(0,0,0,.45);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--base-size);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, iframe { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: var(--paper);
  padding: .9rem 1.4rem; border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* -------------------------------------------------------------- TYPOGRAPHY */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.018em;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.25rem + 2.1vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + .7vw, 1.6rem); }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; letter-spacing: -.005em; }

p { text-wrap: pretty; }
a { color: var(--accent-deep); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent); }

.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--accent-deep);
}
.lede { font-size: 1.14rem; color: var(--ink-2); line-height: 1.6; }
.muted { color: var(--ink-3); }
.small { font-size: .92rem; }

/* ------------------------------------------------------------------ LAYOUT */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { max-width: 760px; }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section-tight { padding-block: clamp(2rem, 4vw, 3.2rem); }

.section-head { margin-bottom: 2.4rem; max-width: 62ch; }
.section-head h2 { margin-top: .4rem; }
.section-head p { margin-top: .8rem; color: var(--ink-2); font-size: 1.05rem; }

.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.stack  > * + * { margin-top: 1rem; }
.stack-s > * + * { margin-top: .5rem; }
.row { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ------------------------------------------------------------------ HEADER */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(170%) blur(14px);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 72px; padding-block: .6rem;
}

.brand {
  display: inline-flex; align-items: center; gap: .65rem; min-height: 44px;
  text-decoration: none; color: var(--ink); flex-shrink: 0;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--brand-cream); overflow: hidden;
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.22rem;
  letter-spacing: -.02em; line-height: 1;
}
.brand-name span { color: var(--accent-deep); }

.nav { display: flex; gap: .15rem; margin-left: auto; align-items: center; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: .4rem .85rem; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink-2); font-weight: 550; font-size: .98rem;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-deep); background: var(--accent-soft); font-weight: 650; }

.header-tools { display: flex; gap: .4rem; align-items: center; margin-left: .6rem; }

.text-size {
  display: flex; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden;
}
.text-size button {
  min-width: 40px; min-height: 44px; border: 0; background: transparent; cursor: pointer;
  color: var(--ink-2); font-weight: 700; line-height: 1; padding: 0 .4rem;
  transition: background .15s, color .15s;
}
.text-size button:nth-child(1) { font-size: .82rem; }
.text-size button:nth-child(2) { font-size: .98rem; }
.text-size button:nth-child(3) { font-size: 1.14rem; }
.text-size button:hover { background: var(--paper-2); }
.text-size button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.icon-btn {
  width: var(--tap); height: 44px; border: 1.5px solid var(--line-2); background: transparent;
  border-radius: var(--radius-sm); cursor: pointer; display: grid; place-items: center;
  color: var(--ink-2); transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--paper-2); border-color: var(--ink-3); }
.icon-btn svg { width: 20px; height: 20px; }

.nav-toggle { display: none; }

@media (max-width: 940px) {
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .6rem 20px 1.2rem; box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform .26s cubic-bezier(.4,0,.2,1);
    max-height: calc(100dvh - 72px); overflow-y: auto;
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav a { min-height: var(--tap); font-size: 1.06rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a:last-child { border-bottom: 0; }
  .nav-toggle { display: grid; margin-left: auto; }
  .header-tools { margin-left: 0; }
  .text-size { display: none; }
}

/* ----------------------------------------------------------------- BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: var(--tap); padding: .7rem 1.5rem;
  border: 1.5px solid transparent; border-radius: 100px;
  font-weight: 650; font-size: 1rem; letter-spacing: -.004em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .13s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 19px; height: 19px; flex-shrink: 0; }

.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-deep); color: var(--accent-ink); box-shadow: var(--shadow); }

.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-2); color: var(--paper); }

.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink-3); color: var(--ink); }

.btn-quiet { background: transparent; color: var(--ink-2); padding-inline: .9rem; }
.btn-quiet:hover { background: var(--paper-2); color: var(--ink); }

.btn-lg { min-height: 58px; padding: .9rem 2rem; font-size: 1.08rem; }
.btn-sm { min-height: 44px; padding: .4rem 1rem; font-size: .92rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------------- CARDS */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.card-hover:hover { box-shadow: var(--shadow); border-color: var(--line-2); transform: translateY(-2px); }
.card-flush { padding: 0; overflow: hidden; }

.pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .26rem .66rem; border-radius: 100px;
  font-size: .78rem; font-weight: 650; letter-spacing: .005em;
  background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.pill-accent { background: var(--accent-soft); color: var(--accent-deep); border-color: color-mix(in srgb, var(--accent) 24%, transparent); }
.pill-teal   { background: var(--teal-soft);   color: var(--teal);        border-color: color-mix(in srgb, var(--teal) 24%, transparent); }
.pill-gold   { background: var(--gold-soft);   color: var(--gold);        border-color: color-mix(in srgb, var(--gold) 28%, transparent); }
.pill-danger { background: var(--danger-soft); color: var(--danger);      border-color: color-mix(in srgb, var(--danger) 24%, transparent); }

/* --------------------------------------------------------------------- HERO */
.hero { position: relative; padding-block: clamp(3rem, 8vw, 6.5rem) clamp(2.5rem, 6vw, 5rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 480px at 78% -8%, var(--accent-soft), transparent 68%),
    radial-gradient(700px 420px at 4% 108%, var(--teal-soft), transparent 70%);
}
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 3.6rem); align-items: center; grid-template-columns: 1.08fr .92fr; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-top: .7rem; }
.hero .lede { margin-top: 1.1rem; font-size: clamp(1.08rem, 1rem + .5vw, 1.3rem); max-width: 54ch; }
.hero-cta { margin-top: 2rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-proof { margin-top: 2.2rem; display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-proof div strong {
  display: block; font-family: var(--font-display); font-size: 1.85rem; line-height: 1.1; color: var(--ink);
}
.hero-proof div span { font-size: .88rem; color: var(--ink-3); font-weight: 550; }

.hero-visual {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); background: var(--card);
}
.hero-visual .ratio { aspect-ratio: 16/10; background: var(--paper-3); position: relative; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .coach-promo { grid-template-columns: 1fr !important; gap: 1.8rem !important; }
}

/* ------------------------------------------------------------------ FILTERS */
.filter-bar {
  position: sticky; top: 72px; z-index: 40;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-block: 1rem;
}
.filter-group { margin-bottom: 1rem; }
.filter-group:last-child { margin-bottom: 0; }
.filter-label {
  display: block; font-size: .8rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .5rem;
}
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 44px; padding: .4rem 1rem;
  border: 1.5px solid var(--line-2); border-radius: 100px;
  background: var(--card); color: var(--ink-2);
  font-size: .95rem; font-weight: 580; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--ink-3); background: var(--paper-2); }
.chip[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
}
.chip[aria-pressed="true"]:hover { background: var(--ink-2); border-color: var(--ink-2); }
.chip-count { font-size: .8rem; opacity: .65; font-variant-numeric: tabular-nums; }

.search-field { position: relative; }
.search-field svg {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--ink-3); pointer-events: none;
}
.input, .search-field input, select.input, textarea.input {
  width: 100%; min-height: var(--tap);
  padding: .7rem 1rem; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.search-field input { padding-left: 3rem; }
.input:focus, .search-field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.input::placeholder { color: var(--ink-3); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.55; }

.results-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-block: 1.8rem 1.3rem;
}
.results-count { font-weight: 650; color: var(--ink-2); }
.results-count b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ VIDEO / ITEM */
.video-card { display: flex; flex-direction: column; height: 100%; }
.thumb {
  position: relative; display: block; aspect-ratio: 16/9;
  background: var(--paper-3); overflow: hidden; border-bottom: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card-hover:hover .thumb img { transform: scale(1.04); }
.thumb-time {
  position: absolute; right: .55rem; bottom: .55rem;
  background: rgba(10,8,6,.86); color: #fff; font-size: .8rem; font-weight: 650;
  padding: .2rem .5rem; border-radius: 6px; font-variant-numeric: tabular-nums;
  backdrop-filter: blur(2px);
}
.thumb-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10,8,6,.18); opacity: 0; transition: opacity .2s;
}
.card-hover:hover .thumb-play { opacity: 1; }
.thumb-play span {
  width: 58px; height: 58px; border-radius: 50%; background: var(--accent);
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.thumb-play svg { width: 24px; height: 24px; color: #fff; margin-left: 3px; }

.card-body { padding: 1.15rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.card-body h3 { font-size: 1.1rem; line-height: 1.28; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--accent-deep); }
.card-body .blurb { font-size: .95rem; color: var(--ink-2); line-height: 1.52; }
.card-tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: auto; padding-top: .3rem; }

/* ------------------------------------------------------- EXERCISE ACCORDION */
.ex-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: .7rem; overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
.ex-item:hover { border-color: var(--line-2); }
.ex-item[open] { border-color: var(--accent); box-shadow: var(--shadow-sm); }

.ex-summary {
  display: flex; align-items: center; gap: 1rem; padding: 1.05rem 1.25rem;
  cursor: pointer; list-style: none; min-height: 64px;
}
.ex-summary::-webkit-details-marker { display: none; }
.ex-summary:hover { background: var(--paper-2); }
.ex-num {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent-deep);
  display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  font-variant-numeric: tabular-nums;
}
.ex-summary-main { flex: 1; min-width: 0; }
.ex-summary-main h3 { font-size: 1.06rem; font-family: var(--font-body); font-weight: 650; letter-spacing: -.004em; }
.ex-summary-meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .35rem; }
.ex-chevron { flex-shrink: 0; color: var(--ink-3); transition: transform .2s; }
.ex-item[open] .ex-chevron { transform: rotate(180deg); }
.ex-chevron svg { width: 20px; height: 20px; }

.ex-detail { padding: 0 1.25rem 1.4rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.ex-detail .setup {
  background: var(--paper-2); border-left: 3px solid var(--line-2);
  padding: .8rem 1rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .97rem; color: var(--ink-2); margin-bottom: 1.1rem;
}
.ex-steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 1.1rem; }
.ex-steps li {
  counter-increment: s; position: relative; padding-left: 2.4rem; margin-bottom: .75rem;
  line-height: 1.58;
}
.ex-steps li::before {
  content: counter(s); position: absolute; left: 0; top: .1rem;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-size: .82rem; font-weight: 700;
}
.ex-cue {
  display: flex; gap: .7rem; align-items: flex-start;
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 26%, transparent);
  padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.1rem;
}
.ex-cue svg { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.ex-cue p { font-size: .96rem; color: var(--ink); }
.ex-cue strong { color: var(--gold); }

.ex-scale { display: grid; gap: .7rem; grid-template-columns: 1fr 1fr; margin-bottom: 1.1rem; }
@media (max-width: 560px) { .ex-scale { grid-template-columns: 1fr; } }
.ex-scale div { background: var(--paper-2); padding: .75rem .9rem; border-radius: var(--radius-sm); font-size: .94rem; }
.ex-scale strong { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin-bottom: .25rem; }

.ex-warn {
  display: flex; gap: .7rem; align-items: flex-start;
  background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent);
  padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.1rem; font-size: .95rem;
}
.ex-warn svg { width: 20px; height: 20px; color: var(--danger); flex-shrink: 0; margin-top: 2px; }

/* ---------------------------------------------------------------- PROGRAMS */
.program-card { display: flex; flex-direction: column; gap: 1rem; height: 100%; position: relative; }
.program-card .card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.program-stat {
  display: flex; gap: 1.3rem; padding-block: .9rem; margin-block: .2rem;
  border-block: 1px solid var(--line);
}
.program-stat div span { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 650; }
.program-stat div strong { font-size: 1.05rem; font-weight: 650; }
.locked-badge {
  position: absolute; top: -10px; right: 14px;
  background: var(--gold); color: #fff; font-size: .72rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 100px;
}

.session-list { list-style: none; padding: 0; }
.session-list li {
  display: flex; gap: .8rem; align-items: baseline;
  padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .97rem;
}
.session-list li:last-child { border-bottom: 0; }
.session-list b { color: var(--accent-deep); font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ------------------------------------------------------------------- COACH */
.coach-shell { display: grid; grid-template-columns: 420px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 980px) { .coach-shell { grid-template-columns: 1fr; } }

.coach-form { position: sticky; top: 92px; }
@media (max-width: 980px) { .coach-form { position: static; } }

.field { margin-bottom: 1.3rem; }
.field > label,
.field > .field-label {
  display: block; font-weight: 650; margin-bottom: .5rem; font-size: 1rem;
}

/* ---- self-assessment ---------------------------------------------------- */
.test-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
             padding: clamp(1.2rem, 3vw, 1.9rem); margin-bottom: 1.3rem; }
.test-card h3 { font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem); }
.test-num { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
            border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 700;
            font-size: .95rem; flex: none; }
.test-steps { list-style: none; padding: 0; margin: .9rem 0 0; counter-reset: s; }
.test-steps li { position: relative; padding-left: 2.1rem; margin-bottom: .55rem; counter-increment: s;
                 line-height: 1.55; }
.test-steps li::before { content: counter(s); position: absolute; left: 0; top: .1rem; width: 1.5rem;
  height: 1.5rem; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.score-row { display: flex; align-items: flex-end; gap: .9rem; flex-wrap: wrap;
             margin-top: 1.3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.score-row .input { max-width: 150px; }
.verdict { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .9rem; border-radius: 999px;
           font-weight: 650; font-size: .95rem; }
.v-below { background: var(--danger-soft); color: var(--danger); }
.v-in    { background: var(--paper-2);     color: var(--ink-2); }
.v-above { background: var(--teal-soft);   color: var(--teal); }
.v-none  { background: var(--paper-2);     color: var(--ink-3); }
.result-row { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center;
              padding: 1rem 0; border-bottom: 1px solid var(--line); }
.result-row:last-child { border-bottom: 0; }
.result-score { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .result-row { grid-template-columns: 1fr auto; row-gap: .5rem; }
}
.delta-up   { color: var(--teal);   font-weight: 650; }
.delta-down { color: var(--danger); font-weight: 650; }
.delta-same { color: var(--ink-3);  font-weight: 650; }
.field .hint { font-size: .88rem; color: var(--ink-3); margin-bottom: .55rem; }

.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
@media (max-width: 480px) { .checkbox-grid { grid-template-columns: 1fr; } }
.check {
  display: flex; align-items: center; gap: .6rem; min-height: var(--tap);
  padding: .5rem .85rem; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  cursor: pointer; font-size: .96rem; transition: border-color .15s, background .15s;
}
.check:hover { background: var(--paper-2); border-color: var(--ink-3); }
.check input { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.coach-output { min-height: 420px; }
.coach-empty {
  display: grid; place-items: center; text-align: center; min-height: 420px;
  border: 2px dashed var(--line-2); border-radius: var(--radius-lg); padding: 2.5rem 1.5rem;
  color: var(--ink-3);
}
.coach-empty svg { width: 54px; height: 54px; margin-bottom: 1rem; color: var(--line-2); }
.coach-empty h3 { color: var(--ink-2); margin-bottom: .5rem; }

.thinking { display: flex; align-items: center; gap: .9rem; color: var(--ink-2); font-weight: 550; }
.spinner {
  width: 22px; height: 22px; border: 2.5px solid var(--line-2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.plan-head {
  background: linear-gradient(140deg, var(--ink), #2E2520);
  color: var(--paper); padding: 1.8rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.plan-head h2 { color: #fff; font-size: 1.7rem; }
.plan-head p { color: rgba(255,255,255,.76); margin-top: .5rem; font-size: 1rem; }
.plan-head .row { margin-top: 1.1rem; }
.plan-head .pill { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.22); }

.plan-body {
  background: var(--card); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: 1.6rem;
}
.plan-block { margin-bottom: 1.6rem; }
.plan-block:last-child { margin-bottom: 0; }
.plan-block > h3 {
  font-family: var(--font-body); font-size: .82rem; font-weight: 750;
  text-transform: uppercase; letter-spacing: .11em; color: var(--accent-deep);
  padding-bottom: .5rem; border-bottom: 2px solid var(--accent-soft); margin-bottom: .9rem;
}
.plan-ex {
  display: flex; gap: .9rem; padding: .85rem 0; border-bottom: 1px solid var(--line);
}
.plan-ex:last-child { border-bottom: 0; }
.plan-ex-num {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--paper-2); color: var(--ink-2); display: grid; place-items: center;
  font-size: .85rem; font-weight: 700;
}
.plan-ex-main { flex: 1; min-width: 0; }
.plan-ex-main strong { display: block; font-size: 1.02rem; }
.plan-ex-main .dose { font-size: .9rem; color: var(--accent-deep); font-weight: 600; margin-top: .1rem; }
.plan-ex-main .note { font-size: .93rem; color: var(--ink-2); margin-top: .35rem; line-height: 1.5; }

.notice {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: 1rem 1.15rem; border-radius: var(--radius-sm); font-size: .96rem; line-height: 1.55;
}
.notice svg { width: 21px; height: 21px; flex-shrink: 0; margin-top: 2px; }
.notice-info   { background: var(--teal-soft);   border: 1px solid color-mix(in srgb, var(--teal) 24%, transparent); color: var(--ink); }
.notice-info svg { color: var(--teal); }
.notice-warn   { background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent); color: var(--ink); }
.notice-warn svg { color: var(--danger); }
.notice-gold   { background: var(--gold-soft);   border: 1px solid color-mix(in srgb, var(--gold) 26%, transparent); color: var(--ink); }
.notice-gold svg { color: var(--gold); }

/* -------------------------------------------------------------- PRODUCTS */
.product-card { display: flex; flex-direction: column; height: 100%; position: relative; overflow: hidden; }
.product-cover {
  aspect-ratio: 4/3; display: grid; place-items: center; padding: 1.5rem;
  background: linear-gradient(150deg, var(--ink), #322822);
  position: relative; overflow: hidden;
}
.product-cover::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 220px at 76% 12%, color-mix(in srgb, var(--accent) 36%, transparent), transparent 66%);
}
.product-cover-inner { position: relative; z-index: 1; text-align: center; color: #fff; }
.product-cover-inner .kicker {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); font-weight: 750; margin-bottom: .5rem;
}
.product-cover-inner h3 { font-size: 1.38rem; color: #fff; line-height: 1.15; }
.product-cover-inner .sub { font-size: .84rem; color: rgba(255,255,255,.62); margin-top: .5rem; }

.price { display: flex; align-items: baseline; gap: .5rem; }
.price b { font-family: var(--font-display); font-size: 1.9rem; letter-spacing: -.02em; }
.price s { color: var(--ink-3); font-size: 1.02rem; }
.price .free { color: var(--teal); }

.benefit-list { list-style: none; padding: 0; }
.benefit-list li {
  display: flex; gap: .65rem; align-items: flex-start; padding: .4rem 0; font-size: .97rem; line-height: 1.5;
}
.benefit-list svg { width: 19px; height: 19px; color: var(--teal); flex-shrink: 0; margin-top: 4px; }

/* ------------------------------------------------------------------ MODAL */
.modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(14,11,9,.72); backdrop-filter: blur(5px);
}
.modal[data-open="true"] { display: flex; }
.modal-panel {
  background: var(--card); border-radius: var(--radius-lg); width: min(880px, 100%);
  max-height: 90dvh; overflow: auto; box-shadow: var(--shadow-lg); position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(14,11,9,.62); color: #fff; display: grid; place-items: center;
}
.modal-close:hover { background: rgba(14,11,9,.85); }
.modal-video { aspect-ratio: 16/9; background: #000; }
.modal-video iframe { width: 100%; height: 100%; border: 0; }
.modal-body { padding: 1.5rem; }

/* ------------------------------------------------------------------ FOOTER */
.site-footer {
  background: var(--ink); color: rgba(245,239,232,.72);
  padding-block: 3.5rem 2rem; margin-top: 5rem;
}
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; }
.site-footer a { color: rgba(245,239,232,.72); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { padding: .3rem 0; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { font-size: .95rem; margin-top: .9rem; max-width: 38ch; line-height: 1.6; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(245,239,232,.14);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem;
}

.disclaimer {
  background: var(--paper-2); border-top: 1px solid var(--line);
  padding-block: 1.6rem; font-size: .9rem; color: var(--ink-3); line-height: 1.6;
}

/* ----------------------------------------------------------------- UTILITY */
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.empty-state { text-align: center; padding: 4rem 1.5rem; color: var(--ink-3); }
.empty-state svg { width: 52px; height: 52px; margin-bottom: 1rem; color: var(--line-2); }
.empty-state h3 { color: var(--ink-2); margin-bottom: .5rem; }

@media print {
  .site-header, .site-footer, .filter-bar, .btn, .no-print { display: none !important; }
  body { font-size: 12pt; background: #fff; color: #000; }
  .card, .ex-item { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
  .ex-item[open] .ex-detail { display: block !important; }
  a[href]::after { content: ""; }
}

/* ------------------------------------------------------------ BRAND ART */
/* The character artwork ships on its own cream. These rules keep that cream
   as the surface in both themes so the figure never sits on a hard edge. */
.brand-mark img { width: 100%; height: 100%; border-radius: inherit; display: block; }

.figure-panel {
  background: var(--brand-cream);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  place-items: end center;
  position: relative;
}
.figure-panel img { width: 100%; height: auto; display: block; }
:root[data-theme="dark"] .figure-panel,
:root:not([data-theme="light"]) .figure-panel { box-shadow: var(--shadow-lg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .figure-panel { box-shadow: var(--shadow-lg); }
}

/* Hero figure: framed deliberately as a portrait panel, on the artwork's own
   cream, so it reads the same in light and dark rather than half-blending. */
.hero-figure { position: relative; display: flex; justify-content: center; align-items: flex-end; }
.hero-figure .frame {
  background: var(--brand-cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  width: 100%; max-width: 520px;
}
.hero-figure img { width: 100%; height: auto; display: block; }
.hero-figure .float-card {
  position: absolute; left: -14px; bottom: 22px; width: min(272px, 70%);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .85rem 1rem; box-shadow: var(--shadow-lg);
}
.hero-figure .float-card strong { display: block; font-size: .96rem; line-height: 1.3; }
@media (max-width: 900px) {
  .hero-figure { flex-direction: column; align-items: stretch; }
  .hero-figure .frame { max-width: 420px; margin-inline: auto; }
  .hero-figure .float-card { position: static; width: 100%; margin-top: 1rem; }
}

/* ------------------------------------------------- EXERCISE ANIMATIONS */
/* The source animations are rendered on the brand cream, so their container
   keeps that cream in both themes rather than fighting it. */
.ex-thumb {
  width: 54px; height: 54px; border-radius: 10px; flex-shrink: 0;
  object-fit: cover; background: var(--brand-cream);
  border: 1px solid var(--line);
}
.ex-clip {
  float: right; margin: 0 0 1rem 1.3rem; width: 210px; max-width: 42%;
  background: var(--brand-cream); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-align: center;
}
.ex-clip img, .ex-clip video {
  width: 100%; height: auto; display: block; background: var(--brand-cream);
}
.ex-clip figcaption {
  font-size: .76rem; color: var(--ink-3); padding: .4rem .5rem;
  border-top: 1px solid var(--line); background: var(--card);
}
@media (max-width: 620px) {
  .ex-clip { float: none; width: 100%; max-width: 260px; margin: 0 auto 1.1rem; }
}
@media print {
  .ex-clip video { display: none; }
  .ex-clip { float: right; width: 150px; }
}

/* Branded stand-in when a YouTube thumbnail cannot be fetched */
.thumb.is-missing {
  background:
    radial-gradient(420px 220px at 72% 10%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 68%),
    linear-gradient(150deg, var(--ink), #322822);
}
.thumb.is-missing::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/sensei-avatar-180.png") center/88px 88px no-repeat;
  opacity: .9;
}
.thumb.is-missing .thumb-time { background: rgba(0,0,0,.72); }

/* Footer link lists are navigation, not prose — give them real tap targets.
   Inline links inside sentences keep their natural text height, which is
   correct: WCAG exempts links embedded in a block of text. */
.footer-grid li { padding: 0; }
.footer-grid li a {
  display: inline-flex; align-items: center; min-height: 44px; padding: .1rem 0;
}
.site-footer .footer-bottom a { display: inline; min-height: 0; }

/* ------------------------------------------------- MOBILE FILTER PANEL */
@media (max-width: 900px) {
  /* Not sticky on a phone: the bar is taller than the viewport, so sticking it
     would cover the results it is filtering. */
  .filter-bar { position: static; }
  .filter-panel { display: none; margin-top: .9rem; }
  .filter-panel.is-open { display: block; }
  .filter-toggle {
    display: flex; align-items: center; gap: .5rem;
    min-height: 48px; width: 100%; margin-top: .8rem; padding: .5rem 1.1rem;
    border: 1.5px solid var(--line-2); border-radius: 100px;
    background: var(--card); color: var(--ink);
    font: inherit; font-weight: 650; cursor: pointer;
  }
  .filter-toggle .filter-caret { margin-left: auto; transition: transform .2s; display: flex; }
  .filter-toggle .filter-caret svg { width: 20px; height: 20px; }
  .filter-toggle.is-open .filter-caret { transform: rotate(180deg); }
  .filter-count {
    display: inline-grid; place-items: center; min-width: 24px; height: 24px;
    padding: 0 .4rem; border-radius: 100px;
    background: var(--accent); color: var(--accent-ink);
    font-size: .8rem; font-weight: 700;
  }
}
@media (min-width: 901px) {
  .filter-toggle { display: none; }
  .filter-panel { display: block !important; }
}

/* ----------------------------------------------------- PROGRAM / GUIDE ART */
.program-cover {
  aspect-ratio: 16 / 7; background: var(--brand-cream);
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.program-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-hover:hover .program-cover img { transform: scale(1.03); transition: transform .35s ease; }

/* A product cover with artwork: the image fills the tile and the title sits on
   a scrim, so the text stays readable whatever the image looks like. */
.product-cover.has-img {
  background-size: cover; background-position: center;
  place-items: end stretch; padding: 0;
}
.product-cover.has-img::after {
  background: linear-gradient(to top, rgba(12,9,7,.92) 0%, rgba(12,9,7,.55) 42%, rgba(12,9,7,.08) 100%);
}
.product-cover.has-img .product-cover-inner { text-align: left; padding: 1.1rem 1.2rem; }
.product-cover.has-img .product-cover-inner h3 { font-size: 1.25rem; }
