/* =========================================================
   Diet Coke Esq. — Bar Prep Materials
   Design system: Cinderella light blue + crimson accents
   Plain CSS, no build step.
   ========================================================= */

:root {
  /* Brand palette — Little Mermaid: purple + seafoam/aqua + green (Ariel's tail) + Diet Coke crimson */
  --red:        #d81f3f;   /* crimson accent (var name kept = "the accent") */
  --red-dark:   #b3172f;
  --crimson:    #d81f3f;
  --ink:        #2a2148;   /* deep navy text */
  --ink-soft:   #5f5682;
  --silver:     #a8e2dc;   /* seafoam, mid */
  --silver-2:   #dff4fb;   /* aqua, tint */
  --paper:      #eef9fd;   /* icy aqua paper */
  --white:      #ffffff;
  --line:       #e5def3;   /* lavender hairline */
  --gold:       #9cd1d0;   /* seafoam-teal for gradients */
  --blue:       #b385dc;   /* signature mermaid purple */
  --blue-deep:  #594597;   /* deep mermaid purple (her palette) for dark sections */

  --shadow-sm:  0 1px 2px rgba(42,33,72,.06), 0 2px 6px rgba(42,33,72,.06);
  --shadow-md:  0 6px 18px rgba(42,33,72,.12), 0 2px 6px rgba(42,33,72,.06);
  --shadow-lg:  0 20px 50px rgba(42,33,72,.20);

  --radius:     14px;
  --radius-lg:  22px;
  --maxw:       1120px;

  --font-body:  'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-disp:  'Fraunces', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-disp); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; margin: 0 0 .4em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.28rem; }
p  { margin: 0 0 1rem; }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .76rem; font-weight: 700; color: var(--red);
  margin: 0 0 .7rem;
}
.eyebrow-light { color: #ffc0cb; }

.section { padding: 88px 0; }
.section-alt { background: var(--paper); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-sub { color: var(--ink-soft); font-size: 1.08rem; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  padding: .8em 1.4em; border-radius: 999px; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(216,31,63,.30); }
.btn-accent:hover { background: var(--red-dark); box-shadow: 0 8px 24px rgba(216,31,63,.36); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--blue); }
.btn-ghost:hover { border-color: var(--ink); background: var(--silver-2); }
.btn-dark { background: var(--blue-deep); color: #fff; }
.btn-dark:hover { background: #3c2668; }
.btn-lg { font-size: 1.05rem; padding: .95em 1.7em; }
.btn-block { width: 100%; }

/* Painted (paintbrush) fill for the primary filled buttons — matches the nav/chips */
.btn-accent, .btn-dark { position: relative; z-index: 0; background: transparent; border-radius: 0; box-shadow: none; }
.btn-accent::before, .btn-dark::before { content: ""; position: absolute; inset: 0; z-index: -1; transition: filter .15s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 60' preserveAspectRatio='none'%3E%3Cpath d='M7,31 C4,18 17,11 47,10 C112,7 171,9 227,13 C239,16 240,35 233,45 C225,56 150,52 96,51 C57,50 22,53 12,45 C6,40 9,37 7,31 Z' fill='%23000'/%3E%3C/svg%3E") center/100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 60' preserveAspectRatio='none'%3E%3Cpath d='M7,31 C4,18 17,11 47,10 C112,7 171,9 227,13 C239,16 240,35 233,45 C225,56 150,52 96,51 C57,50 22,53 12,45 C6,40 9,37 7,31 Z' fill='%23000'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
.btn-accent::before { background-color: var(--red); }
.btn-accent:hover { background: transparent; box-shadow: none; }
.btn-accent:hover::before { filter: brightness(.9); }
.btn-dark::before { background-color: var(--blue-deep); }
.btn-dark:hover { background: transparent; }
.btn-dark:hover::before { filter: brightness(.86); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid rgba(216,31,63,.28); /* subtle Diet Coke red hairline */
  box-shadow: 0 1px 5px rgba(40,72,80,.05);
}
/* little Diet Coke can tucked before the wordmark */
.site-header .brand { font-size: 1.62rem; }
.site-header .brand .brand-diet { color: var(--red); }
.site-header .brand .brand-esq { color: #37383c; } /* charcoal */
.site-header .brand::before {
  content: ""; flex: none; align-self: center;
  width: 22px; height: 28px; margin-right: 5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='c' x1='0' x2='1' y1='0' y2='0'%3E%3Cstop offset='0' stop-color='%23b7c1c5'/%3E%3Cstop offset='.34' stop-color='%23f4f8f9'/%3E%3Cstop offset='.62' stop-color='%23dfe9eb'/%3E%3Cstop offset='1' stop-color='%23a9b6bb'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='7' y='3.6' width='10' height='16.8' rx='2.3' fill='url(%23c)' stroke='%2397a6aa' stroke-width='.5'/%3E%3Cellipse cx='12' cy='3.9' rx='5' ry='1.25' fill='%23d3dcdf' stroke='%2397a6aa' stroke-width='.4'/%3E%3Crect x='7' y='9' width='10' height='6' fill='%23d81f3f'/%3E%3Crect x='7' y='9' width='10' height='1' fill='%23ee5670'/%3E%3Crect x='8.5' y='5.2' width='1.2' height='12.6' rx='.6' fill='%23ffffff' opacity='.45'/%3E%3C/svg%3E") no-repeat center / contain;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: baseline; gap: .12em; font-family: var(--font-disp); font-weight: 600; font-size: 1.32rem; }
.brand .brand-diet { color: var(--ink); }
.brand .brand-coke { color: var(--red); }
.brand .brand-esq {
  font-family: 'Dancing Script', cursive; font-style: normal; font-weight: 700;
  color: var(--crimson); font-size: 1.32em; line-height: 1;
}
.nav { display: flex; align-items: center; gap: 6px; }
/* Simple text nav; current page gets a small red underline. */
.nav a { position: relative; font-size: .92rem; font-weight: 500; color: var(--ink); padding: .3em .52em; transition: color .15s; }
.nav a:hover { color: var(--red); }
.nav a[aria-current="page"] { color: var(--red); font-weight: 600; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: .52em; right: .52em; bottom: -.05em; height: 2px; border-radius: 2px; background: var(--red); }
/* grouped dropdown nav */
.nav-group { position: relative; }
.nav-drop { position: relative; font: inherit; font-size: .92rem; font-weight: 500; letter-spacing: inherit; color: var(--ink); background: none; border: 0; cursor: pointer; padding: .3em .52em; transition: color .15s; }
.nav-drop:hover, .nav-group.open .nav-drop, .nav-group:focus-within .nav-drop { color: var(--red); }
.nav-group.has-current .nav-drop { color: var(--red); font-weight: 600; }
.nav-group.has-current .nav-drop::after { content: ""; position: absolute; left: .52em; right: .52em; bottom: -.05em; height: 2px; border-radius: 2px; background: var(--red); }
.nav-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); min-width: 186px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px; margin-top: 8px; display: none; z-index: 60; }
.nav-menu::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; } /* hover bridge */
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu, .nav-group.open .nav-menu { display: block; }
.nav-menu a { display: block; padding: 7px 12px; border-radius: 8px; font-size: .88rem; white-space: nowrap; }
.nav-menu a:hover { background: var(--silver-2); }
.nav-menu a[aria-current="page"]::after { display: none; }
.nav-menu a[aria-current="page"] { background: #fdeef1; }
@media (max-width: 700px) {
  .nav-group { display: contents; } /* flatten: menus render inline in the wrap */
  .nav-drop { display: none; }
  .nav-menu { position: static; transform: none; display: contents; border: 0; box-shadow: none; padding: 0; margin: 0; background: transparent; }
  .nav-menu::before { display: none; }
  .nav-menu a { display: inline-block; padding: .3em .52em; white-space: normal; }
}
.nav .nav-cta { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 42px; height: 42px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px auto; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
/* ---------- Hero (compact, functional landing) ---------- */
.hero-lite {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1000px 460px at 82% -20%, rgba(156,209,208,.7), transparent 60%),
    radial-gradient(760px 420px at 8% 120%, rgba(83,178,136,.26), transparent 62%),
    linear-gradient(180deg, #e6f7fd 0%, #eef9fd 100%);
  padding: 64px 0 52px; text-align: center;
}
.hero-lite h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 .3em; }
.hero-lite .lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; margin: 0 auto; }
.hero-lite .hero-actions { justify-content: center; margin: 24px 0 6px; }
.tool-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; padding: 0; margin: 18px 0 0; }
.tool-links a { display: inline-block; font-size: .9rem; font-weight: 600; color: var(--blue-deep); background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 999px; padding: .42em 1em; }
.tool-links a:hover { border-color: var(--blue); color: var(--red); }

.hero { position: relative; overflow: hidden; background:
    radial-gradient(1200px 560px at 80% -14%, rgba(156,209,208,.75), transparent 60%),
    radial-gradient(820px 460px at 10% 112%, rgba(83,178,136,.30), transparent 62%),
    radial-gradient(680px 340px at 4% 6%, rgba(216,31,63,.07), transparent 60%),
    linear-gradient(180deg, #e6f7fd 0%, #cfeaf5 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 82px 0 78px; }
.hero h1 .hl { color: var(--red); font-style: italic; }
.hero .lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 34ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 22px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 18px; list-style: none; padding: 0; margin: 8px 0 0; }
.hero-badges li { font-size: .92rem; color: var(--ink-soft); display: flex; align-items: center; gap: .45em; }
.hero-badges li::before { content: "✓"; color: #378d68; font-weight: 800; }

/* Hero visual — a "card" motif */
.hero-visual { position: relative; display: flex; justify-content: center; }
.can-card {
  background: linear-gradient(160deg, #fff, var(--silver-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 26px; width: 100%; max-width: 360px;
  transform: rotate(-2deg);
}
.can-card .cc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.can-tag { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.cc-strip { height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--crimson), var(--blue), #53b288); margin-bottom: 18px; }
.cc-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.cc-row:last-of-type { border-bottom: 0; }
.cc-row span { color: var(--ink-soft); font-size: .92rem; }
.cc-row b { font-family: var(--font-disp); }
.cc-foot { margin-top: 16px; }

/* ---------- Stats strip ---------- */
.strip { background: linear-gradient(120deg, var(--blue-deep), #3c2668); color: #fff; }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 26px 0; text-align: center; }
.strip-item { display: flex; flex-direction: column; gap: 3px; }
.strip-num { font-family: var(--font-disp); font-size: 1.5rem; color: #fff; }
.strip-item span:last-child { font-size: .84rem; color: #c6bce4; }

/* ---------- Materials library ---------- */
.mat-search { max-width: 460px; margin: -8px auto 18px; }
.mat-search input {
  width: 100%; font: inherit; padding: .8em 1.1em; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); box-shadow: var(--shadow-sm);
}
.mat-search input::placeholder { color: var(--ink-soft); }
.mat-search input:focus { outline: none; border-color: var(--red); }
.mat-empty { text-align: center; color: var(--ink-soft); margin: 8px 0 0; }
.linklike { background: none; border: none; padding: 0; font: inherit; color: var(--red); font-weight: 600; cursor: pointer; text-decoration: underline; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 34px; }
.chip {
  position: relative; z-index: 0; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  padding: .5em 1.05em .6em; border: none; background: transparent; color: var(--ink); transition: .16s;
}
.chip::before { content: ""; position: absolute; inset: 0; z-index: -1; background-color: #a8e2dc; opacity: .5; transition: opacity .16s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 60' preserveAspectRatio='none'%3E%3Cpath d='M7,31 C4,18 17,11 47,10 C112,7 171,9 227,13 C239,16 240,35 233,45 C225,56 150,52 96,51 C57,50 22,53 12,45 C6,40 9,37 7,31 Z' fill='%23000'/%3E%3C/svg%3E") center/100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 60' preserveAspectRatio='none'%3E%3Cpath d='M7,31 C4,18 17,11 47,10 C112,7 171,9 227,13 C239,16 240,35 233,45 C225,56 150,52 96,51 C57,50 22,53 12,45 C6,40 9,37 7,31 Z' fill='%23000'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
.chip:hover::before { opacity: .8; }
.chip.active { font-weight: 700; }
.chip.active::before { opacity: 1; }
.chip[data-filter="all"]::before       { background-color: #a497c4; }
.chip[data-filter="rules"]::before     { background-color: #d0b6eb; }
.chip[data-filter="checklist"]::before { background-color: #a8e2dc; }
.chip[data-filter="recall"]::before    { background-color: #c6e8be; }
.chip[data-filter="guide"]::before     { background-color: #c7effb; }
.chip[data-filter="essay"]::before     { background-color: #b385dc; }
.chip[data-filter="mee"]::before       { background-color: #9cd1d0; }

/* ---------- Rule Game ---------- */
.game-setup { text-align: center; background: linear-gradient(160deg, var(--silver-2), #fff); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 24px; margin: 8px 0 20px; }
.game-setup-label { font-weight: 600; color: var(--ink); margin: 0 0 14px; }
.game-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
.game-chip { font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; padding: .45em 1em; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft); transition: .15s; }
.game-chip:hover { border-color: var(--blue); }
.game-chip.on { background: var(--blue-deep); color: #fff; border-color: var(--blue-deep); }

.game-hud { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.game-hud-r { display: flex; gap: 14px; }
.game-bar { height: 8px; background: var(--silver-2); border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.game-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--blue), #53b288); transition: width .3s; }

.game-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 300px; padding: 34px 26px; cursor: pointer; text-align: center; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(160deg, #fff, var(--silver-2)); box-shadow: var(--shadow-md); transition: transform .12s, box-shadow .18s; font: inherit; }
.game-card:hover { box-shadow: var(--shadow-lg); }
.game-card:active { transform: scale(.99); }
.game-card.is-flipped { background: linear-gradient(160deg, #eef9fd, #e9e0f7); border-color: var(--blue); }
.game-card-subject { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--red); }
.game-card-face { font-family: var(--font-disp); font-size: 1.55rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
.game-card.is-flipped .game-card-face { font-family: var(--font-body); font-size: 1.12rem; font-weight: 400; line-height: 1.55; }
.game-card-hint { font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; }

.game-actions { display: flex; gap: 12px; margin-top: 18px; }
.game-actions .btn { flex: 1; }
/* Got it = clean green pill (the brush mask renders lopsided at this size) */
.game-got { background: #53b288 !important; border-radius: 999px !important; box-shadow: 0 6px 18px rgba(83,178,136,.3) !important; }
.game-got::before { display: none; }
.game-got:hover { background: #378d68 !important; }
.game-actions .btn:active { transform: scale(.96); }
.game-keys { text-align: center; font-size: .78rem; color: var(--ink-soft); margin: 14px 0 0; }

/* Type-the-rule mode */
.game-type { margin-top: 14px; }
.game-type textarea { display: block; width: 100%; font: inherit; font-size: .95rem; line-height: 1.55; color: var(--ink); background: #fff; border: 1.5px solid #93c9e6; border-radius: 12px; padding: 12px 14px; resize: vertical; }
.game-type textarea:focus { outline: none; border-color: var(--blue-deep); box-shadow: 0 0 0 3px rgba(89,69,151,.12); }
.game-type textarea:disabled { background: var(--silver-2); color: var(--ink-soft); }
.game-type .btn { margin-top: 10px; }
.game-type .btn[hidden] { display: none !important; } /* .btn sets display, which would defeat [hidden] */
.type-result { margin-top: 14px; background: #fbfcfe; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.type-score { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.type-pct { font-family: var(--font-disp); font-size: 1.9rem; font-weight: 600; color: var(--blue-deep); }
.type-verdict { font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.type-meter { height: 9px; background: var(--silver-2); border-radius: 6px; overflow: hidden; margin: 8px 0 12px; }
.type-meter span { display: block; height: 100%; width: 0; border-radius: 6px; transition: width .4s; }
.type-meter .m-high { background: linear-gradient(90deg, #a6d391, #53b288); }
.type-meter .m-mid { background: linear-gradient(90deg, #f2d38b, #e0a94f); }
.type-meter .m-low { background: linear-gradient(90deg, #f0a9b6, var(--red)); }
.type-model-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--blue-deep); margin: 0 0 6px; }
.type-model { font-size: .95rem; line-height: 1.75; margin: 0; }
.type-model mark { border-radius: 5px; padding: 1px 4px; background: transparent; }
.type-model mark.t-hit { background: #e3f3da; color: #2f6b34; font-weight: 600; }
.type-model mark.t-miss { background: #fdeef1; color: var(--red-dark); font-weight: 600; text-decoration: underline dashed; text-underline-offset: 3px; }

.game-win { text-align: center; background: linear-gradient(160deg, var(--silver-2), #fff); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px 26px; }
.game-win-emoji { font-size: 3.4rem; }
.game-win h2 { margin: .2em 0 .3em; }
.game-win p { color: var(--ink-soft); max-width: 44ch; margin: 0 auto 20px; }
.game-win-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Attack Guides ---------- */
.ag-toc { list-style: none; margin: 0 0 40px; padding: 18px 20px; background: var(--silver-2); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; counter-reset: agt; }
.ag-toc li { counter-increment: agt; }
.ag-toc a { display: flex; gap: 10px; align-items: baseline; color: var(--ink); text-decoration: none; padding: 5px 0; font-weight: 500; }
.ag-toc a::before { content: counter(agt); flex: none; width: 22px; height: 22px; font-size: .72rem; font-weight: 700; color: var(--blue-deep); background: #fff; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; }
.ag-toc a:hover { color: var(--red); }

.ag-topic { margin: 0 0 40px; scroll-margin-top: 90px; }
.ag-head { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--line); }
.ag-num { flex: none; width: 40px; height: 40px; display: grid; place-items: center; font-family: var(--font-disp); font-size: 1.2rem; font-weight: 600; color: #fff; background: var(--blue-deep); border-radius: 50%; }
.ag-head h2 { margin: 0; font-size: 1.5rem; }
.ag-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--red); margin: 22px 0 10px; }
.ag-seq { margin: 0; padding: 0; list-style: none; counter-reset: ags; }
.ag-seq li { counter-increment: ags; position: relative; padding: 0 0 14px 40px; }
.ag-seq li::before { content: counter(ags); position: absolute; left: 0; top: 0; width: 26px; height: 26px; font-size: .8rem; font-weight: 700; color: var(--blue-deep); background: var(--silver-2); border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; }
.ag-seq li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 27px; bottom: 2px; width: 2px; background: var(--line); }
.ag-seq strong { color: var(--ink); }
.ag-rules { margin: 0; padding: 0; list-style: none; }
.ag-rules li { position: relative; padding: 0 0 10px 24px; color: var(--ink-soft); }
.ag-rules li::before { content: "▸"; position: absolute; left: 4px; top: 0; color: var(--red); font-weight: 700; }
.ag-rules li strong, .ag-rules b { color: var(--ink); }
.ag-flow { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 600; font-size: .92rem; color: var(--blue-deep); background: var(--silver-2); border: 1px solid var(--silver); border-radius: 999px; padding: .5em 1.1em; text-decoration: none; transition: .15s; }
.ag-flow:hover { border-color: var(--blue); color: var(--red); }

/* ===== MEE Guides hub (downloadable PDFs, grouped by subject) ===== */
.mee-sec { margin: 0 0 34px; }
.mee-sec h2 { display: flex; align-items: center; gap: 11px; font-size: 1.3rem; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.mee-sec-ic { display: inline-flex; width: 36px; height: 36px; flex: none; align-items: center; justify-content: center; color: var(--red); background: #fff; border: 1.5px solid var(--line); border-radius: 50%; box-shadow: var(--shadow-sm); }
.mee-sec-ic svg { width: 21px; height: 21px; }
/* "Anatomy of a guide" — a stylized miniature page */
.mee-anat { max-width: 520px; margin: 0 auto 38px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 22px 20px; }
.mee-anat-label { margin: 0 0 12px; text-align: center; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.mee-anat-sec { margin: 0 0 12px; }
.mee-anat-tag { display: inline-block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #fff; background: var(--blue-deep); border-radius: 999px; padding: 2px 10px; margin-bottom: 6px; }
.mee-anat-src { margin: -8px 0 14px; text-align: center; font-size: .78rem; color: var(--ink-soft); }
.mee-anat-src a { color: var(--blue-deep); font-weight: 600; }
.mee-anat-x { margin: 4px 0 2px; font-size: .8rem; line-height: 1.5; color: var(--ink-soft); }
.mee-irac-row .mee-anat-x { margin: 0; padding-top: 1px; }
.mee-anat-note { display: block; font-family: 'Dancing Script', cursive; font-size: 1.05rem; font-weight: 600; color: #1e7f7b; margin: 1px 0 3px; }
.mee-anat-note.is-right { text-align: right; }
.mee-irac { margin: 2px 0 12px; }
.mee-irac-row { display: flex; gap: 10px; align-items: flex-start; margin: 7px 0; }
.mee-irac-l { flex: none; display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 800; }
.mee-irac-l.l-i { background: var(--blue-deep); }
.mee-irac-l.l-r { background: var(--red); }
.mee-irac-l.l-a { background: #1e7f7b; }
.mee-irac-l.l-c { background: #4b9a5c; }
.mee-anat-frame { text-align: center; font-size: .82rem; font-weight: 600; color: #2f6b34; background: linear-gradient(165deg, #ddf1d2, #c3e5b0); border: 1.5px solid #9dcf86; border-radius: 999px; padding: 8px 18px; }
.mee-sec-n { font-family: var(--font-body); font-size: .72rem; font-weight: 700; color: var(--blue-deep); background: var(--silver-2); border-radius: 999px; padding: .15em .6em; }
.mee-dl-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mee-g { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 13px 16px; }
.mee-g-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mee-g-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mee-g-pdf { flex: none; font-size: .8rem; font-weight: 700; letter-spacing: .03em; color: var(--red); padding: .35em .3em; text-decoration: none; transition: .15s; }
.mee-g-pdf::before { content: "🦞 "; } /* Sebastian fetches the PDF */
.mee-g-read::before { content: "🐠 "; } /* Flounder reads along */
.mee-g-pdf:hover { color: #b3182f; text-decoration: underline; text-underline-offset: 3px; }
.mee-g-peek { flex: 1; display: flex; flex-direction: column; margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.mee-g-peek summary { cursor: pointer; font-size: .78rem; font-weight: 700; color: #5f7fc4; list-style: none; } /* ocean blue (matches the .sw-issue swatch) */
.mee-g-peek summary::-webkit-details-marker { display: none; }
.mee-g-peek summary::after { content: " ▾"; }
.mee-g-peek[open] summary::after { content: " ▴"; }
.mee-g-peek[open]::details-content { display: flex; flex-direction: column; flex: 1; }
.mee-peek-body { flex: 1; display: flex; flex-direction: column; padding-top: 10px; }
.mee-peek-body .mee-anat-x { font-size: .78rem; }
.mee-peek-body .mee-irac-row { margin: 6px 0; }
.mee-peek-body .mee-anat-note { font-size: .96rem; }
.mee-peek-body .mee-anat-frame { font-size: .74rem; padding: 7px 14px; margin-top: auto; }
.mee-peek-body .mee-irac-row:last-of-type { margin-bottom: 9px; }
.mee-dl-t { font-weight: 600; color: var(--ink); line-height: 1.3; }
.mee-dl-d { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--red); }
@media (max-width: 620px) { .mee-dl-list { grid-template-columns: 1fr; } }

/* ===== Mixed Sets page ===== */
/* "How it works" — light three-step strip, no box */
.mset-how { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 26px; margin: 26px 0 30px; }
.mh-step { min-width: 0; }
.mh-n { display: inline-flex; width: 25px; height: 25px; align-items: center; justify-content: center; background: var(--red); color: #fff; border-radius: 50%; font-weight: 700; font-size: .82rem; margin-bottom: 9px; }
.post .mh-step h2 { font-size: 1.02rem; margin: 0 0 5px; }
.post .mh-step p { font-size: .86rem; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.mh-key { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .78rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 13px; margin: 10px 0 0; }
.mh-key .sw { margin-left: 12px; }
.mh-key .sw:first-child { margin-left: 0; }
.sw { flex: none; width: 20px; height: 13px; border-radius: 4px; }
.sw-issue { background: #5f7fc4; }
.sw-q { background: #c7effb; border: 1px solid #93c9e6; }
.sw-wrong { background: transparent; border: 2px dashed var(--red); }
.sw-right { background: #53b288; }
@media (max-width: 700px) { .mset-how { grid-template-columns: 1fr; gap: 18px; } .mh-key { padding-top: 12px; } }
.mset-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.mset-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mset-card-top h2 { margin: 0; font-size: 1.3rem; }
.mset-badge { flex: none; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--blue-deep); border-radius: 999px; padding: .3em .8em; }
.mset-card > p { color: var(--ink-soft); margin: 8px 0 16px; }
.mset-subjects { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; }
.mset-subjects li { display: flex; justify-content: space-between; font-size: .92rem; color: var(--ink); border-bottom: 1px dotted var(--line); padding-bottom: 4px; }
.mset-subjects b { color: var(--red); }
.mset-more { text-align: center; color: var(--ink-soft); font-size: .9rem; margin-top: 22px; }
.mset-pdf { display: inline-block; margin-left: 16px; font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.mset-pdf:hover { color: var(--red); }
@media (max-width: 560px) { .mset-subjects { grid-template-columns: 1fr; } }

/* ===== Mixed Set interactive quiz ===== */
.ms-bar { position: sticky; top: 60px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; margin: 0 0 18px; }
.ms-stat { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .88rem; font-weight: 600; color: var(--ink); }
.ms-pbar { width: 90px; height: 8px; background: var(--silver-2); border-radius: 6px; overflow: hidden; }
.ms-pbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #53b288); transition: width .3s; }
.ms-score { color: #2f7d5c; }
.ms-reset { flex: none; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 999px; padding: .35em .9em; }
.ms-reset:hover { border-color: var(--red); color: var(--red); }
.ms-q { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 18px; box-shadow: var(--shadow-sm); }
.ms-q-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ms-num { flex: none; width: 30px; height: 30px; display: grid; place-items: center; font-family: var(--font-disp); font-weight: 600; color: #fff; background: var(--blue-deep); border-radius: 50%; font-size: .95rem; }
.ms-subj { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.ms-stem { color: var(--ink); line-height: 1.6; margin: 0 0 16px; }
.ms-choices { display: grid; gap: 9px; }
.ms-choice { font: inherit; font-size: .95rem; text-align: left; cursor: pointer; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: .7em 1em; color: var(--ink); line-height: 1.45; transition: .13s; display: flex; gap: .6em; align-items: baseline; }
.ms-choice b { flex: none; color: var(--blue-deep); }
.ms-choice:hover { border-color: var(--blue); background: var(--silver-2); }
.ms-answered .ms-choice { cursor: default; }
.ms-answered .ms-choice:hover { border-color: var(--line); background: #fff; }
.ms-choice.ms-correct { border-color: #53b288; background: #eef8f2; }
.ms-choice.ms-correct b { color: #2f7d5c; }
.ms-choice.ms-wrong { border-color: var(--red); background: #fdeef1; }
.ms-choice.ms-wrong b { color: var(--red-dark); }
.ms-explain { margin-top: 16px; padding: 14px 18px; background: var(--silver-2); border-left: 3px solid var(--blue-deep); border-radius: 0 var(--radius) var(--radius) 0; }
.ms-explain p { margin: 0 0 10px; line-height: 1.55; font-size: .95rem; color: var(--ink); }
.ms-verdict { font-weight: 700; }
.ms-verdict.is-right { color: #2f7d5c; }
.ms-verdict.is-wrong { color: var(--red-dark); }
/* practice exam: study/exam mode bar, picked state, score report */
.exam-modebar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 14px; }
.exam-modenote { flex-basis: 100%; order: 3; margin: 0; font-size: .82rem; color: var(--ink-soft); }
.exam-timer { font-size: .85rem; font-weight: 700; color: var(--blue-deep); font-variant-numeric: tabular-nums; }
.exam-finish { margin-left: auto; }
.exam-finish[hidden], .exam-timer[hidden], .exam-result[hidden] { display: none !important; } /* .btn display defeats [hidden] */
.ms-choice.ms-picked { border-color: var(--blue-deep); background: #f1edfa; box-shadow: inset 0 0 0 1px var(--blue-deep); }
.ms-choice.ms-picked b { color: var(--blue-deep); }
.exam-result { background: linear-gradient(160deg, var(--silver-2), #fff); border: 1px solid var(--line); border-left: 4px solid var(--blue-deep); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 20px; }
.exam-result h2 { margin: 0 0 6px; font-size: 1.7rem; color: var(--blue-deep); }
.exam-result .exam-result-sub { margin: 0 0 12px; font-size: .92rem; color: var(--ink-soft); }
.exam-result .dd-table { margin: 0; }

/* exam-tactics teaching points box on the practice exam */
.ms-tips { margin-top: 12px; padding: 12px 16px; background: linear-gradient(180deg, #fff8ec, #fdf0d7); border: 1px solid #e8ce97; border-radius: var(--radius); }
.ms-tips h4 { margin: 0 0 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8a6a2f; }
.ms-tips ul { margin: 0; padding-left: 18px; }
.ms-tips li { font-size: .9rem; line-height: 1.55; color: var(--ink); margin-bottom: 6px; }
.ms-tips li:last-child { margin-bottom: 0; }
.ms-path { margin-top: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.ms-path h4 { margin: 0 0 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.ms-path p { font-size: .9rem; margin: 0 0 7px; }
.ms-path p:last-child { margin-bottom: 0; }
/* interactive decision-path walker inside a quiz answer */
.ms-tree { margin: 0 0 16px; padding: 14px 16px; background: #fbfcfe; border: 1px solid var(--line); border-radius: var(--radius); }
.ms-tree-head { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--red); margin-bottom: 10px; }
/* issue = purple terminator (stadium), matching the flowcharts page */
.ms-tree-issue { background: linear-gradient(165deg, #6a55ab, var(--blue-deep) 60%, #4c3a82); border: 1px solid #47367a; color: #fff; text-align: center; font-weight: 600; font-size: .92rem; border-radius: 999px; padding: 11px 22px; margin-bottom: 4px; }
.ms-tree-body { display: flex; flex-direction: column; align-items: stretch; }
/* connector = real arrow (the "↓" text the JS inserts is hidden) */
.ms-tree-arrow { position: relative; height: 24px; margin: 2px 0; font-size: 0; color: transparent; }
.ms-tree-arrow::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 6px; width: 2px; background: #79b8b6; transform: translateX(-50%); }
.ms-tree-arrow::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid #79b8b6; }
/* question = aqua decision node with diamond marker */
.ms-tree-q { background: linear-gradient(180deg, #f4fbfd, #dff4fb); border: 1.5px solid #93c9e6; color: var(--ink); text-align: center; font-weight: 600; border-radius: 12px; padding: 10px 16px; margin: 0 0 10px; }
.ms-tree-q::before { content: "🐚"; display: inline-block; font-size: .85em; margin-right: 7px; vertical-align: 0; }
.ms-tree-opts { display: grid; gap: 8px; }
.ms-tree-opt { font: inherit; font-size: .9rem; cursor: pointer; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: .6em .9em; color: var(--ink); line-height: 1.4; transition: .13s; }
.ms-tree-opt:hover { border-color: #93c9e6; background: #f4fbfd; }
.ms-tree-res { text-align: center; font-weight: 600; border-radius: 10px; padding: 11px 14px; margin: 4px 0 10px; }
/* correct answer = green terminator; wrong turn = dashed red branch box */
.ms-tree-res.is-right { background: linear-gradient(165deg, #ddf1d2, #c3e5b0); border: 1.5px solid #9dcf86; color: #2f6b34; border-radius: 999px; padding: 12px 24px; }
.ms-tree-res.is-wrong { background: #fbdfe4; border: 1.5px dashed #dd8d9c; color: var(--red-dark); }
.ms-tree-restart { align-self: flex-start; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 999px; padding: .3em .9em; }
.ms-tree-restart:hover { border-color: var(--red); color: var(--red); }
.ms-tree-note { font-size: .78rem; color: var(--ink-soft); text-align: center; margin: 2px 0 8px; }
/* view toggle (full path vs. walk it) */
.ms-tree-mode { margin: 0 0 12px; }
/* static "whole path" rendering */
.ms-static[hidden], .ms-walk[hidden] { display: none !important; } /* .ms-static sets display:flex, which would otherwise defeat the [hidden] attribute */
.ms-static { display: flex; flex-direction: column; align-items: stretch; }
.ms-static .ms-tree-q { margin: 0 0 6px; }
/* wrong turn = branch box hanging off a dashed elbow (mirrors .flow-exit) */
.ms-static-branch { position: relative; align-self: flex-end; width: 86%; background: #fdeef1; border: 1.5px dashed #e2a4b2; border-radius: 10px; padding: 8px 12px; margin: 2px 0 8px; font-size: .8rem; line-height: 1.4; color: var(--red-dark); }
.ms-static-branch::before { content: ""; position: absolute; left: -24px; top: -12px; width: 23px; height: calc(50% + 12px); border-left: 2px dashed #d98a99; border-bottom: 2px dashed #d98a99; border-bottom-left-radius: 9px; }
.ms-static-branch .b-opt { font-weight: 700; }
.ms-static-branch .b-res { display: block; color: var(--ink-soft); margin-top: 2px; }
/* the correct-path label rides a real arrow: line above, chip, arrowhead below */
.ms-static-cont { position: relative; width: fit-content; max-width: 86%; margin: 9px auto 21px; text-align: center; font-size: .78rem; font-weight: 600; color: #22635f; background: #d9f0ef; border: 1px solid #9cd1d0; border-radius: 999px; padding: 3px 13px; }
.ms-static-cont::before { content: ""; position: absolute; left: 50%; top: -10px; height: 9px; width: 2px; background: #79b8b6; transform: translateX(-50%); }
.ms-static-cont::after { content: ""; position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid #79b8b6; }
/* clickable Attack Sequence / Playbook labels */
.ms-path-link { font-weight: 700; color: var(--blue-deep); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; text-decoration-color: rgba(41,98,160,.4); }
.ms-path-link:hover { color: var(--red); text-decoration-color: currentColor; }
.ms-path-link::after { content: " ↗"; font-size: .8em; text-decoration: none; display: inline-block; }

/* "Where the points are" callout on each subject guide */
.ag-tips { background: linear-gradient(180deg, #f2faf5, #eaf6ef); border: 1px solid #cfe9da; border-left: 4px solid #53b288; border-radius: var(--radius); padding: 18px 22px 6px; margin: 0 0 34px; }
.ag-tips h2 { font-size: 1.05rem; margin: 0 0 4px; color: #2f7d5c; }
.ag-tips .ag-tips-sub { font-size: .82rem; color: var(--ink-soft); margin: 0 0 14px; }
.ag-tips dl { margin: 0; display: grid; gap: 12px; }
.ag-tips dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #378d68; margin-bottom: 3px; }
.ag-tips dd { margin: 0; color: var(--ink); font-size: .96rem; line-height: 1.55; }
.ag-tips dd strong { color: var(--ink); }

/* Featured strategy banner on the attack-guides hub */
.ag-strategy { position: relative; overflow: hidden; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: radial-gradient(135% 130% at 8% 4%, rgba(255,255,255,.16), rgba(255,255,255,0) 46%), linear-gradient(122deg, #4a3a86 0%, #594597 32%, #6a5fb6 60%, #3f9fa2 100%); color: #fff; border-radius: var(--radius-lg); padding: 24px 28px; margin: 0 0 30px; box-shadow: 0 14px 34px rgba(57,45,110,.28); }
.ag-strategy .ag-strat-txt { position: relative; max-width: 560px; }
.ag-strategy .ag-strat-txt h2 { margin: 0 0 6px; color: #fff; font-size: 1.4rem; }
.ag-strategy .ag-strat-txt p { margin: 0; color: rgba(255,255,255,.92); font-size: .95rem; }
.ag-strategy .btn { position: relative; flex: none; background: #fff; color: var(--blue-deep); box-shadow: 0 6px 16px rgba(0,0,0,.16); }
.ag-strategy .btn:hover { background: #fff; color: var(--red); transform: translateY(-1px); }

.ag-hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 24px; }
.ag-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; text-decoration: none; box-shadow: var(--shadow-sm); transition: .16s; }
.ag-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--blue); }
.ag-card-ic { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; color: var(--red); background: #fff; border: 1.5px solid var(--line); border-radius: 50%; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.ag-card-ic svg { width: 26px; height: 26px; }
.ag-card h3 { margin: 0 0 6px; color: var(--ink); }
.ag-card p { margin: 0 0 12px; color: var(--ink-soft); font-size: .92rem; }
.ag-card-more { font-weight: 600; color: var(--red); font-size: .9rem; }
@media (max-width: 620px) {
  .ag-toc, .ag-hub-grid { grid-template-columns: 1fr; }
}

/* ---------- Flowcharts ---------- */
.flow-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 18px; padding: 14px 16px; background: var(--silver-2); border: 1px solid var(--line); border-radius: var(--radius); }
.flow-tip { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.flow-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 42px; }
.flow-jump a { font-size: .85rem; font-weight: 600; color: var(--ink-soft); background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: .45em 1em; text-decoration: none; transition: .16s; }
.flow-jump a:hover { border-color: var(--blue); color: var(--blue-deep); }

.flow-block { margin: 0 0 56px; scroll-margin-top: 90px; }
.flow-head { text-align: center; margin: 0 0 26px; }
.flow-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin: 0 auto 10px; color: var(--red); background: #fff; border: 1.5px solid var(--line); border-radius: 50%; box-shadow: var(--shadow-sm); }
.flow-icon svg { width: 26px; height: 26px; }
.flow-subject { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--red); margin-bottom: 6px; }
.flow-head h2 { margin: 0 0 .3em; }
.flow-head p { margin: 0; color: var(--ink-soft); }

.flowchart { max-width: 560px; margin: 0 auto; }
.flow-step { padding: 0; }
.flow-step h3 { margin: 0 0 .3em; font-size: 1.15rem; }
.flow-step p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
/* START — terminator (stadium) node in the mermaid purple */
.flow-step.is-start { text-align: center; background: linear-gradient(165deg, #6a55ab, var(--blue-deep) 60%, #4c3a82); border: 1px solid #47367a; border-radius: 999px; padding: 20px 34px; box-shadow: var(--shadow-sm); }
.flow-step.is-start h3 { color: #fff; }
.flow-step.is-start p { color: rgba(255,255,255,.82); }
.flow-step.is-start p strong, .flow-step.is-start p em { color: #fff; }
/* END — matching terminator node (purple, like the start; outcome colors live on the branches) */
.flow-step.is-end { text-align: center; background: linear-gradient(165deg, #4c3a82, var(--blue-deep) 45%, #6a55ab); border: 1px solid #47367a; border-radius: 999px; padding: 20px 34px; box-shadow: var(--shadow-sm); }
.flow-step.is-end h3 { color: #fff; }
.flow-step.is-end p { color: rgba(255,255,255,.82); }
.flow-step.is-end p strong, .flow-step.is-end p em { color: #fff; }
.flow-step.is-end.is-rational { background: #fff; border: 1px solid var(--line); }
.flow-step.is-end.is-rational h3 { color: var(--ink); }
.flow-step.is-end.is-rational p { color: var(--ink-soft); }
/* QUESTION — the card dissolves; the ask itself is the decision node (aqua, diamond marker) */
.flow-step.is-q { background: none; border: none; box-shadow: none; }
.flow-step.is-q .flow-ask { display: block; text-align: center; background: linear-gradient(180deg, #f4fbfd, #dff4fb); border: 1.5px solid #93c9e6; border-radius: 13px; padding: 14px 20px; box-shadow: var(--shadow-sm); }
.flow-step.is-q .flow-ask::before { content: "🐚"; display: inline-block; font-size: .9em; margin-right: 8px; vertical-align: 0; }
.flow-step.is-q .flow-why { display: table; margin: 9px auto 0; }
.flow-ask { font-family: var(--font-disp); font-size: 1.08rem; font-weight: 600; color: var(--ink); line-height: 1.25; margin: 0 !important; }
.flow-ask em { font-style: italic; }

/* off-ramp / exit box */
/* OFF-RAMPS — branch boxes hanging off the decision node on a dashed elbow */
.flow-exit { position: relative; margin: 16px 0 0 13%; display: flex; gap: 11px; align-items: flex-start; background: #fdeef1; border: 1.5px dashed #e2a4b2; border-radius: 11px; padding: 12px 14px; text-align: left; }
.flow-exit::before { content: ""; position: absolute; left: -26px; top: -14px; width: 25px; height: calc(50% + 14px); border-left: 2px dashed #d98a99; border-bottom: 2px dashed #d98a99; border-bottom-left-radius: 10px; }
.flow-exit p { margin: 0; font-size: .92rem; color: var(--ink); }
.flow-exit.is-in { background: #e3f3da; border-color: #a6d391; }
.flow-exit.is-in::before { border-color: #8cbd75; }
.flow-exit.is-strict { background: #fbdfe4; border-color: #dd8d9c; }
.flow-exit.is-strict::before { border-color: #d47a8b; }
.flow-exit.is-mid { background: #fef5ea; border-color: #e8c188; }
.flow-exit.is-mid::before { border-color: #dcae67; }
.flow-lbl { flex: none; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: var(--red); border-radius: 999px; padding: 4px 11px; margin-top: 1px; }
.flow-lbl.is-in { background: #4b9a5c; }
.flow-lbl.is-strict { background: var(--red); }
.flow-lbl.is-mid { background: #d98a2b; }
.flow-lbl.is-neutral { background: var(--ink-soft); }
/* routing steps: two branches side by side, no elbow */
.flow-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.flow-two .flow-exit { margin: 0; }
.flow-two .flow-exit::before { display: none; }

/* connector between steps */
/* connector — a real arrow: vertical line + arrowhead, label chip riding it */
.flow-conn { position: relative; text-align: center; padding: 15px 0 17px; }
.flow-conn::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 6px; width: 2px; background: #79b8b6; transform: translateX(-50%); }
.flow-conn::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid #79b8b6; }
.flow-conn span { position: relative; display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #22635f; background: #d9f0ef; border: 1px solid #9cd1d0; border-radius: 999px; padding: 3px 12px; }

/* "🤔 What does this mean?" trigger + explanation popup */
.flow-why { display: inline-block; margin: 12px 0 0; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--red); background: #fdeef1; border: 1px solid #f3c9d3; border-radius: 999px; padding: .35em .9em; transition: .15s; }
.flow-why:hover { background: #fbdfe5; }
.fw-q .flow-why { margin-bottom: 18px; }
.fx-overlay { position: fixed; inset: 0; background: rgba(42,33,72,.5); z-index: 90; }
.fx-pop { position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%,-50%); width: calc(100% - 40px); max-width: 440px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 26px 26px 28px; }
.fx-close { position: absolute; top: 10px; right: 12px; border: none; background: none; font-size: 1.7rem; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.fx-close:hover { color: var(--ink); }
.fx-title { font-family: var(--font-disp); font-size: 1.35rem; font-weight: 600; color: var(--ink); margin: 0 26px .5em 0; }
.fx-body { color: var(--ink-soft); line-height: 1.6; }
.fx-body strong { color: var(--ink); }

/* "read the full outline" footer under each chart */
.flow-more { text-align: center; font-size: .92rem; color: var(--ink-soft); margin: 16px 0 0; }
.flow-more a { color: var(--red); font-weight: 600; white-space: nowrap; }

/* "walk the flowchart" callout on outline pages */
.flow-link { display: flex; gap: 12px; align-items: flex-start; background: #e1f6fc; border: 1px solid var(--silver); border-left: 4px solid var(--blue-deep); border-radius: var(--radius); padding: 13px 16px; margin: 16px 0 4px; }
.flow-link-ic { font-size: 1.25rem; line-height: 1.4; flex: none; }
.flow-link p { margin: 0; color: var(--ink); font-size: .95rem; }
.flow-link a { color: var(--red); font-weight: 600; }

.flow-cta { text-align: center; background: linear-gradient(160deg, var(--silver-2), #fff); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px 26px; margin: 46px 0 24px; }
.flow-cta h2 { margin: 0 0 .3em; }
.flow-cta p { margin: 0 auto 18px; color: var(--ink-soft); max-width: 52ch; }
.flow-cta-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.flow-foot { text-align: center; font-size: .82rem; color: var(--ink-soft); margin: 8px 0 0; }

/* interactive "Walk it" mode */
.flow-mode { display: flex; justify-content: center; margin: 0 0 20px; }
.fw-seg { display: inline-flex; background: var(--silver-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.fw-toggle { font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; border: none; background: none; color: var(--ink-soft); padding: .45em 1.1em; border-radius: 999px; transition: .15s; }
.fw-toggle:hover { color: var(--blue-deep); }
.fw-toggle.is-on { background: #fff; color: var(--blue-deep); box-shadow: var(--shadow-sm); }

.flow-walk { max-width: 560px; margin: 0 auto; }
.fw-progress { text-align: center; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-soft); margin: 0 0 12px; }

.fw-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); padding: 24px 22px; }
.fw-q { text-align: center; background: linear-gradient(180deg, #f4fbfd, #dff4fb); border: 1.5px solid #93c9e6; }
.fw-ask { font-family: var(--font-disp); font-size: 1.28rem; font-weight: 600; color: var(--ink); line-height: 1.25; margin: 0 0 20px; }
.fw-ask::before { content: "🐚"; display: inline-block; font-size: .95em; margin-right: 9px; vertical-align: 0; }
.fw-ask em { font-style: italic; }
.fw-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.fw-ans { font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; min-width: 128px; padding: .7em 1.4em; border-radius: 999px; transition: .15s; border: 2px solid var(--blue-deep); }
.fw-yes { background: var(--blue-deep); color: #fff; }
.fw-yes:hover { background: #3c2668; }
.fw-no { background: #fff; color: var(--blue-deep); }
.fw-no:hover { background: var(--silver-2); }

.fw-note { background: #f4fbfd; border: 1.5px solid #93c9e6; }
.fw-note p { margin: 0 0 16px; color: var(--ink); }
.fw-note p:last-of-type { margin-bottom: 16px; }
.fw-continue { font: inherit; font-weight: 700; cursor: pointer; background: var(--blue-deep); color: #fff; border: none; border-radius: 999px; padding: .6em 1.4em; }
.fw-continue:hover { background: #3c2668; }

.fw-result { position: relative; }
.fw-result p { margin: 0 0 8px; color: var(--ink); }
.fw-result h3 { margin: 0 0 .3em; }
.fw-badge { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 11px; border-radius: 999px; margin-bottom: 12px; background: var(--ink-soft); color: #fff; }
.fw-result.fw-stop { background: #fdeef1; border: 1.5px dashed #e2a4b2; }
.fw-result.fw-stop .fw-badge { background: var(--red); }
.fw-result.fw-in { background: #e3f3da; border: 1.5px dashed #a6d391; }
.fw-result.fw-in .fw-badge { background: #4b9a5c; }
.fw-result.fw-mid { background: #fef5ea; border: 1.5px dashed #e8c188; }
.fw-result.fw-mid .fw-badge { background: #d98a2b; }
.fw-result.fw-end { text-align: center; background: linear-gradient(165deg, #4c3a82, var(--blue-deep) 45%, #6a55ab); border: 1px solid #47367a; border-radius: 999px; padding: 26px 34px; }
.fw-result.fw-end h3 { color: #fff; }
.fw-result.fw-end p { color: rgba(255,255,255,.82); }
.fw-result.fw-end p strong, .fw-result.fw-end p em { color: #fff; }
.fw-result.fw-end .fw-badge { background: rgba(255,255,255,.2); color: #fff; }
.fw-restart { font: inherit; font-weight: 700; cursor: pointer; margin-top: 8px; background: none; border: 1.5px solid var(--line); color: var(--ink); border-radius: 999px; padding: .55em 1.3em; }
.fw-restart:hover { border-color: var(--blue); }
.fw-result.fw-end .fw-restart { color: #fff; border-color: rgba(255,255,255,.35); }
.fw-result.fw-end .fw-restart:hover { border-color: #fff; }

.fw-trail { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fw-back-to { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; font: inherit; font-size: .84rem; cursor: pointer; text-align: left; background: var(--silver-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: var(--ink-soft); }
.fw-back-to:hover { border-color: var(--blue); color: var(--ink); }
.fw-t-a { flex: none; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; padding: 2px 9px; border-radius: 999px; color: #fff; }
.fw-t-yes { background: var(--blue-deep); }
.fw-t-no { background: var(--red); }

@media (max-width: 560px) {
  .flow-two { grid-template-columns: 1fr; }
  .flow-toolbar { flex-direction: column; align-items: stretch; text-align: center; }
  .fw-ans { flex: 1; min-width: 0; }
}

@media print {
  .no-print, .site-header, .post-back, .flow-mode, .flow-walk, .flow-why, .fx-overlay, .fx-pop { display: none !important; }
  .flowchart { display: block !important; }   /* always print the full chart, not the walker */
  .flow-block { break-inside: avoid; page-break-inside: avoid; margin-bottom: 34px; }
  .flow-step, .flow-conn, .flow-exit { break-inside: avoid; page-break-inside: avoid; }
  .flow-step { box-shadow: none; }
  /* printers drop backgrounds — keep the terminator nodes legible */
  .flow-step.is-start, .flow-step.is-end { background: #fff !important; border: 2.5px solid var(--blue-deep) !important; }
  .flow-step.is-start h3, .flow-step.is-end h3 { color: var(--blue-deep) !important; }
  .flow-step.is-start p, .flow-step.is-end p,
  .flow-step.is-start p strong, .flow-step.is-end p strong,
  .flow-step.is-start p em, .flow-step.is-end p em { color: var(--ink) !important; }
  .flow-lbl { color: var(--ink) !important; background: #fff !important; border: 1.5px solid var(--ink) !important; }
  .post { padding: 0; }
  body { background: #fff; }
}

.cards { display: grid; gap: 22px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }

/* materials grouped into subject sections */
.mat-group { margin: 0 0 40px; }
.mat-group-h {
  font-size: 1.35rem; color: var(--red); margin: 0 0 18px; padding-bottom: 10px;
  border-bottom: 2px solid var(--line); display: flex; align-items: center; gap: 8px;
}
.mat-group-ic { display: inline-flex; width: 36px; height: 36px; flex: none; align-items: center; justify-content: center; color: var(--red); background: #fff; border: 1.5px solid var(--line); border-radius: 50%; box-shadow: var(--shadow-sm); }
.mat-group-ic svg { width: 21px; height: 21px; }
.mat-card {
  position: relative; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .18s ease, border-color .18s ease;
}
.mat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue); }
.mat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mat-subject { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--red); }
/* Type label: a hand-painted brush stroke (SVG mask), colored per material type */
.mat-type { position: relative; z-index: 0; font-size: .74rem; font-weight: 700; padding: .35em .95em .5em; color: #2f7d5c; background: transparent; }
.mat-type::before { content: ""; position: absolute; inset: 0; z-index: -1; background-color: #a8e2dc;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 60' preserveAspectRatio='none'%3E%3Cpath d='M7,31 C4,18 17,11 47,10 C112,7 171,9 227,13 C239,16 240,35 233,45 C225,56 150,52 96,51 C57,50 22,53 12,45 C6,40 9,37 7,31 Z' fill='%23000'/%3E%3C/svg%3E") center/100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 60' preserveAspectRatio='none'%3E%3Cpath d='M7,31 C4,18 17,11 47,10 C112,7 171,9 227,13 C239,16 240,35 233,45 C225,56 150,52 96,51 C57,50 22,53 12,45 C6,40 9,37 7,31 Z' fill='%23000'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
.mat-type--playbook       { color: #4d3a86; } .mat-type--playbook::before       { background-color: #d0b6eb; }
.mat-type--checklist      { color: #226b62; } .mat-type--checklist::before      { background-color: #a8e2dc; }
.mat-type--recall-drills  { color: #2f6b34; } .mat-type--recall-drills::before  { background-color: #c6e8be; }
.mat-type--rapid-review   { color: #3a5f96; } .mat-type--rapid-review::before   { background-color: #c7effb; }
.mat-type--quick-chat     { color: #8a5a2f; } .mat-type--quick-chat::before     { background-color: #f2d8a4; }
.mat-type--spot-apply     { color: #3a2568; } .mat-type--spot-apply::before     { background-color: #b385dc; }
.mat-type--mee-guide      { color: #1f6360; } .mat-type--mee-guide::before      { background-color: #9cd1d0; }
.mat-type--mixed-set      { color: #3a5f96; } .mat-type--mixed-set::before      { background-color: #c7effb; }
.mat-type--deep-dive      { color: #22635f; } .mat-type--deep-dive::before      { background-color: #9cd1d0; }
.mat-type--game,
.mat-type--quick-guide    { color: #3a2f5e; } .mat-type--game::before,
.mat-type--quick-guide::before { background-color: #a497c4; }
.mat-card h3 { margin-bottom: .35em; }
.mat-card p { color: var(--ink-soft); font-size: .96rem; flex: 1; }
.mat-meta { display: flex; gap: 14px; font-size: .82rem; color: var(--ink-soft); margin: 4px 0 16px; }
.mat-meta span { display: inline-flex; align-items: center; gap: .35em; }
.mat-meta .free-tag { color: #53b288; font-weight: 700; }
.mat-card .btn { margin-top: auto; }
.mat-card .view-link { align-self: flex-start; font-size: .76rem; padding: .32em .8em; }
.mat-card .view-bubble { align-self: flex-start; margin-top: auto; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.mat-card .view-bubble::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); } /* stretched link — whole card is clickable */
.view-bubble .vb-ic { font-size: 1.7rem; line-height: 1; filter: saturate(1.1); transition: transform .16s; }
.view-bubble .vb-open { font-size: .74rem; font-weight: 700; letter-spacing: .03em; color: var(--ink-soft); transition: color .16s; }
.mat-card:hover .view-bubble .vb-ic { transform: scale(1.18) translateY(-2px); }
.mat-card:hover .view-bubble .vb-open { color: var(--red); }

/* Bubble burst on card click (spawned in JS, appended to <body>) */
.dce-bubble {
  position: fixed;
  z-index: 9999;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.97), rgba(199,239,251,.62) 40%, rgba(112,190,201,.5) 67%, rgba(112,190,201,.12) 74%, transparent 77%);
  border: 1px solid rgba(112,190,201,.42);
  box-shadow: inset 0 0 7px rgba(255,255,255,.75), 0 1px 6px rgba(58,124,160,.22);
  transform: translate(-50%, -50%) scale(.3);
  opacity: 0;
  animation: dce-bubble-rise var(--dur, 780ms) cubic-bezier(.22,.68,.36,1) var(--delay, 0ms) forwards;
  will-change: transform, opacity;
}
@keyframes dce-bubble-rise {
  0%   { transform: translate(-50%, -50%) scale(.3); opacity: 0; }
  18%  { opacity: 1; }
  70%  { opacity: .95; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(var(--s, 1)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dce-bubble { display: none; }
}

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-cover { height: 8px; background: linear-gradient(90deg, var(--crimson), var(--blue), #53b288); }
.post-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-tag { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.post-card h3 { font-size: 1.24rem; }
.post-card p { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.post-date { font-size: .82rem; color: var(--ink-soft); margin-top: 12px; }
.post-more { color: var(--red); font-weight: 600; font-size: .92rem; margin-top: 10px; }

/* ---------- Request a topic ---------- */
.topic-request {
  margin-top: 44px; padding: 32px; border-radius: var(--radius-lg); text-align: center;
  background: linear-gradient(160deg, var(--silver-2), #fff); border: 1px solid var(--line);
}
.topic-request h3 { margin-bottom: .3em; }
.topic-request > p { color: var(--ink-soft); max-width: 52ch; margin: 0 auto 18px; }
.topic-form { display: flex; gap: 10px; max-width: 660px; margin: 0 auto; flex-wrap: wrap; }
.topic-form input {
  flex: 1 1 200px; padding: .85em 1.05em; border-radius: 12px;
  border: 1.5px solid var(--line); font: inherit; background: #fff;
}
.topic-form input:focus { outline: none; border-color: var(--red); }
.topic-form .btn { flex: 0 0 auto; }
.topic-request .form-status { margin-top: 14px; }
.topic-request .form-status.ok { color: #53b288; }
.topic-request .form-status.err { color: var(--red); }
@media (max-width: 560px) { .topic-form .btn { width: 100%; } }

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.about-photo {
  aspect-ratio: 4/5; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, var(--silver-2), var(--blue));
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.about-photo .can-emoji { font-size: 6rem; filter: drop-shadow(0 10px 20px rgba(42,33,72,.18)); }
.about-photo .ph-note { position: absolute; bottom: 14px; font-size: .8rem; color: var(--ink-soft); }
.about-copy .check-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.about-copy .check-list li { padding-left: 30px; position: relative; color: var(--ink-soft); }
.about-copy .check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: #fff; background: var(--red);
  width: 20px; height: 20px; border-radius: 50%; font-size: .72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Countdown / study pacer ---------- */
.countdown-card {
  max-width: 620px; margin: 0 auto; background: linear-gradient(160deg, #fff, var(--silver-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); text-align: center;
}
.cd-input label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.cd-input input[type="date"] { font: inherit; padding: .7em 1em; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.cd-input input[type="date"]:focus { outline: none; border-color: var(--red); }
.cd-result { margin-top: 22px; }
.cd-days { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cd-num { font-family: var(--font-disp); font-size: 3.4rem; font-weight: 600; color: var(--red); line-height: 1; }
.cd-lbl { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.cd-msg { margin: 16px auto 18px; max-width: 48ch; color: var(--ink-soft); }
.cd-msg a { color: var(--red); font-weight: 600; }
.cd-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Community (homepage) ---------- */
.community-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 900px; margin: 0 auto; }
.community-card {
  border-radius: var(--radius-lg); padding: 32px 28px; text-align: center;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.community-card .cc-emoji { font-size: 2.4rem; }
.community-card h3 { margin: .45em 0 .25em; }
.community-card p { color: var(--ink-soft); flex: 1; }
.community-card .btn { margin-top: 18px; }
.community-card--ask { background: linear-gradient(160deg, #fff, var(--silver-2)); }
.community-card--discord { background: linear-gradient(160deg, #edf7fc, #e9e0f7); }
@media (max-width: 720px) { .community-cards { grid-template-columns: 1fr; } }

/* ---------- Mailbag Q&A accordion ---------- */
.qa-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.qa {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.qa summary {
  list-style: none; cursor: pointer; padding: 18px 22px;
  font-family: var(--font-disp); font-size: 1.12rem; color: var(--ink);
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--red); font-size: 1.5rem; line-height: 1; flex: 0 0 auto; }
.qa[open] summary::after { content: "\2013"; }
.qa .qa-a { padding: 0 22px 20px; color: var(--ink-soft); }
.qa .qa-a p { margin: 0 0 .7em; }
.qa .qa-a p:last-child { margin-bottom: 0; }

/* status colors on light backgrounds */
.post .form-status.ok, .topic-request .form-status.ok { color: #53b288; }
.post .form-status.err { color: var(--red); }

/* ---------- Outline glossary (clickable terms) ---------- */
.glossary-term {
  cursor: pointer; color: inherit; border-bottom: 2px dotted var(--red);
  transition: background .12s ease, color .12s ease; border-radius: 2px;
}
.glossary-term:hover, .glossary-term:focus {
  color: var(--red-dark); background: rgba(216,31,63,.08); outline: none;
}
.glossary-hint {
  font-size: .9rem; color: var(--ink-soft); background: var(--silver-2);
  border-radius: 999px; padding: .5em 1em; display: inline-block; margin: 0 0 4px;
}
.glossary-hint span { border-bottom: 2px dotted var(--red); }
.glossary-overlay { position: fixed; inset: 0; z-index: 199; background: transparent; }
.glossary-overlay[hidden] { display: none; }
.glossary-pop {
  position: absolute; z-index: 200; max-width: 340px; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 16px 34px 16px 18px;
  font-family: var(--font-body); animation: pop .14s ease;
}
.glossary-pop[hidden] { display: none; }
.glossary-pop .gp-term { font-family: var(--font-disp); font-weight: 600; font-size: 1.06rem; margin: 0 0 .35em; color: var(--ink); }
.glossary-pop .gp-def { margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.5; }
.glossary-pop .gp-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 1.35rem; line-height: 1; color: var(--ink-soft); cursor: pointer; }
@media (max-width: 560px) {
  .glossary-pop { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto; max-width: none; }
  .glossary-overlay { background: rgba(42,33,72,.35); }
}

/* ---------- Outline study tools (interactive) ---------- */
.study-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 6px 0 24px; padding: 12px 14px; background: var(--silver-2);
  border: 1px solid var(--line); border-radius: 14px;
}
.study-btn {
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  padding: .45em .9em; border-radius: 999px; transition: .15s;
}
.study-btn:hover { border-color: var(--blue); }
.study-btn.on { background: var(--red); color: #fff; border-color: var(--red); }
.study-progress { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sp-bar { width: 120px; height: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.sp-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--blue), #53b288); transition: width .25s; }
.sp-text { font-size: .82rem; color: var(--ink-soft); white-space: nowrap; }

.outl-sec { border-bottom: 1px solid var(--line); }
.outl-sec:last-of-type { border-bottom: 0; }
.sec-head { display: flex; align-items: baseline; gap: 10px; cursor: pointer; }
.sec-head h2 { flex: 1; }
.sec-chev { color: var(--red); font-size: .9rem; flex: 0 0 auto; transition: transform .18s; align-self: center; }
.sec-chev::before { content: "▾"; }
.outl-sec.collapsed .sec-chev { transform: rotate(-90deg); }
.outl-sec.collapsed .sec-body { display: none; }
.sec-review {
  flex: 0 0 auto; align-self: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; color: transparent; font-size: .78rem;
  font-weight: 800; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.sec-review::before { content: "✓"; }
.sec-review:hover { border-color: var(--blue); color: var(--silver); }
.outl-sec.reviewed .sec-review { background: #53b288; border-color: #53b288; color: #fff; }
.outl-sec.reviewed .sec-head h2 { color: var(--ink-soft); }

.quiz-mode .recall-ans { filter: blur(5px); cursor: pointer; border-radius: 4px; background: rgba(216,31,63,.06); transition: filter .15s, background .15s; }
.quiz-mode .recall-ans:hover { background: rgba(216,31,63,.12); }
.quiz-mode .recall-ans.revealed { filter: none; cursor: auto; background: none; }

/* reset link + flashcards */
.sp-reset { font: inherit; font-size: .78rem; background: none; border: 0; color: var(--red); cursor: pointer; text-decoration: underline; padding: 0; }
.fc-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(42,33,72,.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.fc-overlay[hidden] { display: none; }
.fc-modal { background: #fff; border-radius: var(--radius-lg); max-width: 560px; width: 100%; padding: 26px 26px 22px; box-shadow: var(--shadow-lg); position: relative; text-align: center; animation: pop .16s ease; }
.fc-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.fc-meta { font-size: .78rem; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.fc-card { min-height: 210px; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 14px; background: linear-gradient(160deg, #fff, var(--silver-2)); }
.fc-front { font-family: var(--font-disp); font-weight: 600; font-size: 1.5rem; color: var(--ink); }
.fc-back { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.5; text-align: left; border-top: 1px solid var(--line); padding-top: 14px; }
.fc-back[hidden] { display: none; }
.fc-tap { font-size: .76rem; color: var(--ink-soft); margin: 0; }
.fc-actions { display: flex; gap: 10px; margin-top: 18px; }
.fc-btn { flex: 1; font: inherit; font-weight: 600; padding: .7em 1em; border-radius: 999px; cursor: pointer; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.fc-again:hover { border-color: var(--blue); }
.fc-got { background: #53b288; color: #fff; border-color: #53b288; }
.fc-got:hover { background: #378d68; }
.fc-controls { display: flex; align-items: center; gap: 14px; justify-content: flex-start; margin-top: 14px; }
.fc-mini { font: inherit; font-size: .85rem; background: none; border: 0; color: var(--red); cursor: pointer; font-weight: 600; }
.fc-known { font-size: .82rem; color: var(--ink-soft); margin-left: auto; }
.fc-modal.is-known .fc-front::after { content: " ✓"; color: #53b288; }
@media (max-width: 560px) { .fc-front { font-size: 1.25rem; } .fc-actions { flex-direction: column; } }

/* ---------- Outline pages ---------- */
.outline-steps {
  background: linear-gradient(160deg, #eef9fd, #fff); border: 1px solid var(--line);
  border-left: 4px solid var(--blue-deep); border-radius: var(--radius); padding: 20px 26px; margin: 24px 0;
}
.outline-steps h3 { margin: 0 0 .5em; font-size: 1.08rem; }
.outline-steps ol { margin: 0; padding-left: 1.3em; }
.outline-steps li { margin-bottom: .5em; color: var(--ink); }
.outline-group { font-family: var(--font-disp); font-weight: 600; font-size: 1.2rem; margin: 34px 0 2px; color: var(--ink); }
.outline-group:first-of-type { margin-top: 10px; }
.outline-group span { font-family: var(--font-body); font-weight: 500; font-size: .8rem; color: var(--ink-soft); letter-spacing: 0; }
.outline-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.outline-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .18s ease, border-color .18s ease;
}
.outline-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--blue); }
.outline-card .oc-subject { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--red); }
.outline-card h3 { margin: .3em 0 .2em; font-size: 1.2rem; }
.outline-card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.outline-card.soon { opacity: .62; pointer-events: none; }
.outline-card .oc-tag { display: inline-block; margin-top: 10px; font-size: .8rem; font-weight: 600; color: var(--red); }
.outline-card.soon .oc-tag { color: var(--ink-soft); }
@media (max-width: 680px) { .outline-grid { grid-template-columns: 1fr; } }

/* ---------- Exam-by-state table ---------- */
.exam-note-box {
  background: #fff4f5; border: 1px solid #f6ccd3; border-left: 4px solid var(--red);
  border-radius: var(--radius); padding: 18px 22px; margin: 24px 0;
}
.exam-note-box p { margin: 0; color: var(--ink); font-size: .96rem; }
.exam-note-box strong { color: var(--red-dark); }
.state-search {
  width: 100%; max-width: 340px; padding: .7em 1em; border-radius: 999px;
  border: 1.5px solid var(--line); font: inherit; margin: 4px 0 18px;
}
.state-search:focus { outline: none; border-color: var(--red); }
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.exam-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .95rem; }
.exam-table th, .exam-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.exam-table thead th {
  background: var(--blue-deep); color: #fff; font-family: var(--font-body);
  font-weight: 600; font-size: .82rem; letter-spacing: .03em; text-transform: uppercase;
}
.exam-table tbody tr:nth-child(even) { background: var(--paper); }
.exam-table td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.exam-table td .note { color: var(--ink-soft); font-size: .88rem; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: .22em .65em; border-radius: 999px; white-space: nowrap; }
.badge-2026 { background: #fde2e7; color: var(--red-dark); }
.badge-2027 { background: #ece4f8; color: var(--blue-deep); }
.badge-2028 { background: #e1f6fc; color: #6b4aa6; }
.badge-tbd  { background: #eef8fb; color: var(--ink-soft); }
.state-empty { padding: 18px; text-align: center; color: var(--ink-soft); }

/* ---------- Social proof / testimonial ---------- */
.social { background: linear-gradient(180deg, #fff, var(--paper)); text-align: center; }
.quote-block { max-width: 720px; margin: 0 auto; }
.quote-block blockquote {
  font-family: var(--font-disp); font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.32; color: var(--ink); margin: 0; position: relative; padding-top: 42px;
}
.quote-block blockquote::before {
  content: "\201C"; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-disp); font-size: 5rem; color: var(--crimson); line-height: 1;
}
.quote-block figcaption { margin-top: 22px; font-size: .95rem; color: var(--ink-soft); font-weight: 600; }
.social-note { margin-top: 34px; color: var(--ink-soft); font-size: 1.05rem; max-width: 48ch; margin-left: auto; margin-right: auto; }

/* ---------- Signup / newsletter ---------- */
.section-dark { background:
    radial-gradient(760px 320px at 15% 0%, rgba(216,31,63,.30), transparent 60%),
    linear-gradient(160deg, var(--blue-deep), #2a2148); color: #fff; }
.section-dark h2 { color: #fff; }
.signup-inner { max-width: 620px; margin: 0 auto; text-align: center; }
.signup-inner p { color: #d3cbee; }
.signup-form { display: flex; gap: 10px; margin: 24px auto 10px; max-width: 460px; }
.signup-form input {
  flex: 1; padding: .9em 1.1em; border-radius: 999px; border: 1.5px solid #503a82;
  background: #34275e; color: #fff; font: inherit;
}
.signup-form input::placeholder { color: #aaa0c9; }
.signup-form input:focus { outline: none; border-color: var(--red); }
.signup-note { font-size: .82rem; color: #aaa0c9; }
.form-status { font-size: .92rem; margin-top: 10px; }
.form-status.ok { color: #c6e8be; }
.form-status.err { color: #ffb0bc; }

/* ---------- Footer ---------- */
.site-footer { position: relative; color: #6f5d38; padding: 64px 0 32px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='16' viewBox='0 0 130 16' preserveAspectRatio='none'%3E%3Cpath d='M0,0 H130 V6 Q97.5,15 65,6 T0,6 Z' fill='%239cd1d0'/%3E%3C/svg%3E") top left repeat-x,
    linear-gradient(180deg, #f7ecd3 0%, #ecdcb0 100%);
  background-size: 130px 16px, 100% 100%; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid #dcc793; }
.footer-brand .brand { margin-bottom: 8px; }
.footer-brand .brand .brand-diet { color: #4f4127; }
.footer-brand p { max-width: 32ch; font-size: .92rem; color: #6f5d38; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.footer-nav a { color: #6f5d38; font-size: .95rem; }
.footer-nav a:hover { color: #3f331d; }
.footer-bottom { padding-top: 22px; font-size: .85rem; }
.footer-bottom .disclaimer { max-width: 70ch; margin-top: 6px; color: #937f52; font-size: .8rem; }

/* ---------- In-page PDF viewer ---------- */
.pdf-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(42,33,72,.62); backdrop-filter: blur(3px); }
.pdf-overlay[hidden], .pdf-modal[hidden] { display: none; }
.pdf-modal {
  position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(960px, 94vw); height: 92vh; display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.pdf-head { display: flex; align-items: center; gap: 16px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--line); background: var(--silver-2); }
.pdf-titles { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.pdf-subject { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.pdf-title { font-family: var(--font-disp); font-size: 1.05rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.pdf-actions .btn { padding: .5em 1em; font-size: .85rem; }
.pdf-close { border: none; background: none; font-size: 1.8rem; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 0 6px; }
.pdf-close:hover { color: var(--ink); }
.pdf-body { flex: 1; display: flex; min-height: 0; }
.pdf-frame { flex: 1; width: 100%; border: 0; background: #eef9fd; }
.pdf-frame[hidden] { display: none; }
/* native web-text rendering of a material */
.pdf-doc { flex: 1; overflow-y: auto; padding: 30px 40px 44px; }
.pdf-doc[hidden] { display: none; }
.pdf-doc-head { border-bottom: 2px solid var(--line); margin-bottom: 22px; padding-bottom: 14px; }
.pdf-doc-head h1 { font-size: 1.7rem; margin: 0 0 .3em; }
.pdf-doc-note { margin: 0; font-size: .85rem; color: var(--ink-soft); }
.doc-content h2 { font-size: 1.15rem; color: var(--blue-deep); margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.doc-content h2:first-child { margin-top: 0; }
.doc-content .rs-overview { color: var(--ink-soft); font-style: italic; background: var(--silver-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 15px; margin-bottom: 6px; }
.doc-content p { margin: 0 0 12px; line-height: 1.6; color: var(--ink); }
.doc-content p strong { color: var(--ink); }
.doc-content ul { margin: 0 0 14px; padding-left: 22px; }
.doc-content li { margin-bottom: 7px; line-height: 1.55; }
.pdf-doc::-webkit-scrollbar { width: 10px; }
.pdf-doc::-webkit-scrollbar-thumb { background: var(--silver); border-radius: 6px; }
/* interactive active-recall Q&A */
.doc-content .rc-intro { background: var(--silver-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: .92rem; color: var(--ink-soft); }
.doc-content .rc { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 10px; overflow: hidden; background: #fff; }
.doc-content .rc > summary { cursor: pointer; list-style: none; padding: 13px 44px 13px 16px; font-weight: 600; color: var(--ink); position: relative; }
.doc-content .rc > summary::-webkit-details-marker { display: none; }
.doc-content .rc > summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--blue-deep); font-weight: 700; }
.doc-content .rc[open] > summary::after { content: "−"; }
.doc-content .rc > summary:hover { color: var(--red); }
.doc-content .rc[open] > summary { border-bottom: 1px solid var(--line); background: var(--silver-2); }
.doc-content .rc-a { padding: 13px 16px; color: var(--ink); line-height: 1.6; border-left: 3px solid #53b288; }
.doc-content .rc-a strong { color: var(--ink); }
/* interactive issue-spotting checklist */
.doc-content .ck { list-style: none; padding-left: 0; margin: 0 0 20px; }
.doc-content .ck li { margin-bottom: 9px; }
.doc-content .ck label { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; }
.doc-content .ck input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: #53b288; cursor: pointer; }
.doc-content .ck span { line-height: 1.5; }
.doc-content .ck input:checked + span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: #53b288; }
/* checklist progress (live count + saved ticks + reset) */
.ck-progress { position: sticky; top: 60px; z-index: 5; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 6px 0 24px; box-shadow: var(--shadow-sm); }
.ck-prog-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.ck-count { font-weight: 600; color: var(--ink); font-size: .92rem; }
.ck-progress.is-done .ck-count { color: #378d68; }
.ck-reset { font: inherit; font-size: .82rem; font-weight: 600; color: var(--red); background: none; border: none; cursor: pointer; padding: 0; }
.ck-reset:hover { text-decoration: underline; }
.ck-bar { height: 9px; background: #fff; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.ck-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #53b288); transition: width .25s; }

/* ---------- Material page (its own URL, not a modal) ---------- */
.mat-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 24px; }
.mat-doc { margin-top: 4px; }
.mat-doc .pdf-doc-note { margin: 0 0 20px; }
.mat-frame { width: 100%; height: 82vh; border: 1px solid var(--line); border-radius: var(--radius); background: #eef9fd; }
@media (max-width: 560px) {
  .pdf-modal { width: 100vw; height: 100vh; border-radius: 0; top: 0; left: 0; transform: none; }
  .pdf-head { flex-wrap: wrap; }
  .pdf-titles { flex-basis: 100%; margin-bottom: 6px; }
  .pdf-newtab { display: none; }
}

/* ---------- Email-gate modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(42,33,72,.60); backdrop-filter: blur(4px); padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff; border-radius: var(--radius-lg); max-width: 460px; width: 100%;
  padding: 34px 30px 30px; box-shadow: var(--shadow-lg); position: relative; text-align: center;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.modal-icon { font-size: 2.4rem; }
.modal h3 { margin: 8px 0 .3em; }
.modal .modal-sub { color: var(--ink-soft); font-size: .96rem; }
.modal .modal-file { font-weight: 600; color: var(--ink); }
.gate-form { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.gate-form input {
  padding: .9em 1.1em; border-radius: 12px; border: 1.5px solid var(--line); font: inherit;
}
.gate-form input:focus { outline: none; border-color: var(--red); }
.gate-consent { font-size: .78rem; color: var(--ink-soft); margin: 4px 0 0; }
.gate-success { display: none; }
.gate-success .dl-btn { margin-top: 14px; }

/* ---------- Mobile sticky CTA ---------- */
.mobile-cta { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding: 56px 0; }
  .hero .lead { max-width: none; }
  .hero-visual { order: -1; }
  .can-card { max-width: 320px; transform: none; }
  .cards-3, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-inner { grid-template-columns: repeat(2, 1fr); gap: 22px 8px; }
  .about-inner { grid-template-columns: 1fr; gap: 30px; }
  .about-photo { max-width: 320px; margin: 0 auto; }
}
@media (max-width: 880px) {
  .header-inner { flex-wrap: wrap; height: auto; min-height: 60px; padding: 8px 0; row-gap: 6px; }
  .nav { order: 3; width: 100%; justify-content: center; flex-wrap: wrap; gap: 10px 16px; }
  .nav .nav-cta { margin-top: 2px; }
}

@media (max-width: 620px) {
  .section { padding: 60px 0; }
  .cards-3, .post-grid { grid-template-columns: 1fr; }
  .signup-form { flex-direction: column; }
  .signup-form .btn { width: 100%; }
  .footer-inner { flex-direction: column; }
  .mobile-cta {
    display: block; position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 40;
    text-align: center; box-shadow: var(--shadow-lg);
  }
}

/* ===== MEE guide web pages (mee/<slug>.html) ===== */
.mg-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--ink-soft); font-size: .92rem; margin: -6px 0 22px; }
.mg-orig { background: var(--silver-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; margin: 0 0 26px; max-width: 750px; }
.mg-orig summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--blue-deep); list-style: none; }
.mg-orig summary::-webkit-details-marker { display: none; }
.mg-orig summary::after { content: " ▾"; }
.mg-orig[open] summary::after { content: " ▴"; }
.mg-orig-body { padding-top: 10px; }
.mg-orig-body .mg-p { font-size: .9rem; }
.post .mg-h { font-size: 1.28rem; margin: 1.6em 0 .55em; }
.post .mg-p { font-size: .97rem; line-height: 1.65; color: var(--ink); margin: 0 0 12px; }
.mg-irac { margin: 2px 0 4px; }
.mg-irac .mg-p { margin: 0; padding-top: 1px; }
/* two-column rows: main text left, script margin notes right (like the PDFs) */
.mg-row { display: grid; grid-template-columns: minmax(0, 1fr) clamp(150px, 24%, 230px); column-gap: clamp(14px, 2.5vw, 30px); }
.mg-main { min-width: 0; }
.mg-side { padding-top: 3px; }
.mg-note { margin: 0 0 10px; line-height: 1.3; }
@media (max-width: 640px) {
  .mg-row { grid-template-columns: 1fr; }
  .mg-side { padding: 0 0 6px 32px; margin-top: -4px; }
}
/* Step-by-Step framework — flowchart grammar */
.mg-step { background: linear-gradient(180deg, #f4fbfd, #dff4fb); border: 1.5px solid #93c9e6; color: var(--ink); font-weight: 600; font-size: .93rem; line-height: 1.5; border-radius: 12px; padding: 10px 16px; margin: 0 0 8px; }
.mg-step::before { content: "🐚"; display: inline-block; font-size: .85em; margin-right: 7px; vertical-align: 0; }
.post .mg-out { font-size: .88rem; font-weight: 600; line-height: 1.5; color: #22635f; background: #d9f0ef; border: 1px solid #9cd1d0; border-radius: 10px; padding: 8px 14px; margin: 0 0 8px 22px; }
.mg-out + .ms-tree-arrow { margin-top: 6px; }
/* hub cards: Read online pill next to the PDF pill */
.mee-g-btns { flex: none; display: flex; align-items: center; gap: 6px; }
.mee-g-read { flex: none; font-size: .8rem; font-weight: 700; letter-spacing: .03em; color: var(--blue-deep); padding: .35em .3em; text-decoration: none; transition: .15s; }
.mee-g-read:hover { color: #47367a; text-decoration: underline; text-underline-offset: 3px; }

/* ===== Homepage study-path cards ===== */
#path { padding-bottom: 0; }
.path-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.path-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--silver); border-radius: var(--radius); padding: 18px 20px 16px; box-shadow: var(--shadow-sm); }
.path-card.is-learn { border-top-color: #93c9e6; }
.path-card.is-drill { border-top-color: #a6d391; }
.path-card.is-write { border-top-color: var(--blue-deep); }
.path-k { display: inline-block; font-family: var(--font-disp); font-size: 1.18rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.path-card > p { margin: 0 0 12px; font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }
.path-links { display: flex; flex-direction: column; gap: 6px; }
.path-links a { font-size: .9rem; font-weight: 600; color: var(--blue-deep); width: fit-content; }
.path-links a:hover { color: var(--red); }
@media (max-width: 700px) { .path-grid { grid-template-columns: 1fr; } }

/* ===== Deep Dives ===== */
.dd-ex { background: linear-gradient(180deg, #f4fbfd, #e9f7fc); border: 1px solid #bfe0f0; border-radius: 12px; padding: 12px 16px; margin: 14px 0 18px; }
.dd-ex::before { content: "🐚 Example"; display: block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #22635f; margin-bottom: 5px; }
.post .dd-ex p { font-size: .93rem; line-height: 1.6; margin: 0 0 8px; }
.post .dd-ex p:last-child { margin-bottom: 0; }
.dd-go { display: flex; flex-wrap: wrap; gap: 8px 22px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 30px; font-size: .9rem; font-weight: 600; }
/* rule card with a citation chip */
.dd-rule { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue-deep); border-radius: 12px; padding: 13px 16px; margin: 14px 0; box-shadow: var(--shadow-sm); }
.dd-cite { float: right; margin: -1px 0 8px 14px; font-size: .68rem; font-weight: 800; letter-spacing: .05em; color: #fff; background: linear-gradient(165deg, #6a55ab, var(--blue-deep) 60%, #4c3a82); border-radius: 999px; padding: .35em .95em; white-space: nowrap; }
.post .dd-rule p { margin: 0 0 8px; font-size: .95rem; line-height: 1.6; }
.post .dd-rule p:last-child { margin-bottom: 0; }
/* application (green) and exception/exemption (amber) boxes */
.dd-app { background: linear-gradient(180deg, #f0f9ec, #e5f4dd); border: 1px solid #b8dca4; border-radius: 12px; padding: 12px 16px; margin: 14px 0 18px; }
.dd-app::before { content: "⚖ Application"; display: block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #2f6b34; margin-bottom: 5px; }
.dd-exc { background: linear-gradient(180deg, #fff8ec, #fdf0d7); border: 1px solid #e8ce97; border-radius: 12px; padding: 12px 16px; margin: 14px 0 18px; }
.dd-exc::before { content: "Exceptions & carve-outs"; display: block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8a6a2f; margin-bottom: 5px; }
.post .dd-app p, .post .dd-exc p { font-size: .93rem; line-height: 1.6; margin: 0 0 8px; }
.post .dd-app p:last-child, .post .dd-exc p:last-child { margin-bottom: 0; }
/* side-by-side comparison chart */
.dd-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 20px; }
.dd-col { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.dd-col-h { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; border-radius: 999px; padding: .32em .95em; margin-bottom: 9px; }
.dd-col.is-green { border-color: #a6d391; } .dd-col.is-green .dd-col-h { background: #e3f3da; color: #2f6b34; border: 1px solid #a6d391; }
.dd-col.is-red { border-color: #e2a4b2; } .dd-col.is-red .dd-col-h { background: #fdeef1; color: var(--red-dark); border: 1px solid #e2a4b2; }
.dd-col.is-amber { border-color: #e8c188; } .dd-col.is-amber .dd-col-h { background: #fef5ea; color: #8a6a2f; border: 1px solid #e8c188; }
.dd-col.is-blue { border-color: #93c9e6; } .dd-col.is-blue .dd-col-h { background: #dff4fb; color: #2b5e80; border: 1px solid #93c9e6; }
.dd-col ul { margin: 0; padding-left: 18px; }
.dd-col li { font-size: .88rem; line-height: 1.5; color: var(--ink); margin-bottom: 6px; }
@media (max-width: 620px) { .dd-grid2 { grid-template-columns: 1fr; } }
/* data table */
.dd-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 14px 0 20px; }
.dd-table th { text-align: left; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-deep); border-bottom: 2px solid var(--silver); padding: 6px 10px; }
.dd-table td { border-bottom: 1px solid var(--line); padding: 9px 10px; vertical-align: top; line-height: 1.5; }
.dd-table td:first-child { font-weight: 600; }
/* mini-flowchart wrapper (reuses the .flowchart grammar) */
.dd-chart { margin: 18px 0 22px; padding: 18px 16px 16px; background: #fbfcfe; border: 1px solid var(--line); border-radius: var(--radius); }
.dd-chart-h { text-align: center; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--red); margin: 0 0 14px; }
.dd-chart .flow-ask { font-size: .98rem; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
