/* Little Words — /activities/ styles.
   Loads AFTER games/shared/lw-games.css (brand tokens) and alongside the shared
   game stylesheets. Mobile-first at 375px; the two-column clinician layout
   arrives at 900px because that is where a laptop actually is.

   SPECIFICITY NOTE (the games CSS cascade rail): turn-loop.css is injected into
   <head> by game-kit.js at RUNTIME, so it lands after this file's <link> and
   wins any tie on source order. Every rule here that has to beat a turn-loop
   rule is therefore written with a body-level ancestor (`body.lw-act …`) so it
   wins on specificity instead, which does not depend on load order. */

body.lw-act { background: var(--cream); }

/* ---------- page chrome ---------- */
.act-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 251, 245, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.act-bar .act-home {
  display: inline-flex; align-items: center; gap: 7px;
  flex: 0 0 auto;
  min-height: 44px; padding: 0 10px;
  font-weight: 600; font-size: .95rem; color: var(--soft-navy); text-decoration: none;
}
.act-bar .act-home img { width: 26px; height: 26px; border-radius: 8px; }
.act-bar h1 {
  flex: 1 1 auto; min-width: 0;
  font-size: 1rem; font-weight: 700; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.act-bar .act-spacer { display: none; }
.act-pill {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px;
  border-radius: 999px; background: var(--light-sage); color: #2F5F47;
  font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums;
}
.act-iconbtn {
  flex: 0 0 auto;
  min-width: 44px; min-height: 44px; border-radius: 12px; font-size: 1.15rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.act-iconbtn:hover { background: var(--blush); }
@media (max-width: 420px) {
  .act-bar { gap: 8px; padding-inline: 10px; }
  .act-bar .act-home { width: 44px; padding: 0; justify-content: center; font-size: 0; }
  .act-bar h1 { font-size: .9rem; }
}

/* ---------- the drill area ---------- */
.act-shell { max-width: 1080px; margin: 0 auto; padding: 0 12px; }
.act-stage {
  position: relative;
  min-height: 62vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18px 0 22px;
}
@media (min-width: 900px) {
  .act-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; padding: 0 20px; }
  .act-stage { min-height: 70vh; }
  .act-side { padding-top: 26px; }
}

.act-loading { color: var(--muted); }

/* ---------- setup screen ---------- */
.act-setup { width: 100%; max-width: 520px; text-align: center; }
.act-kicker {
  text-transform: uppercase; letter-spacing: .1em; font-size: .72rem;
  font-weight: 700; color: var(--deep-coral);
}
.act-h { font-size: clamp(1.4rem, 5vw, 1.9rem); margin-top: 6px; line-height: 1.2; }
.act-lede { color: var(--body); margin-top: 10px; line-height: 1.55; }
.act-opts { margin-top: 22px; display: grid; gap: 16px; text-align: left; }
.act-fs { border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px 14px; background: #fff; }
.act-fs legend { padding: 0 6px; font-size: .82rem; font-weight: 700; color: var(--soft-navy); }
.act-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.act-chip {
  min-width: 52px; min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 2px solid var(--border); background: #fff; font-weight: 700; color: var(--soft-navy);
  font-variant-numeric: tabular-nums;
}
.act-chip.on { border-color: var(--sage); background: var(--light-sage); color: #2F5F47; }
.act-deckline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .92rem; color: var(--body); }
.act-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 14px;
  font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent;
}
.act-btn-go { background: var(--sage); color: #fff; width: 100%; margin-top: 20px; font-size: 1.08rem; min-height: 54px; }
.act-btn-go:hover { background: #5C9E7D; }
.act-btn-ghost { border-color: var(--border); background: #fff; color: var(--soft-navy); }
.act-btn-ghost:hover { border-color: var(--coral); color: var(--deep-coral); }
.act-micro { margin-top: 12px; font-size: .82rem; color: var(--muted); }

/* ---------- shared trial furniture ---------- */
.act-cue {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700;
  color: var(--navy); font-size: clamp(1.05rem, 4vw, 1.35rem);
  text-align: center; line-height: 1.3; margin-bottom: 16px; max-width: 30ch;
  margin-left: auto; margin-right: auto;
}
.act-tilerow { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 460px; }
.act-tilerow.four { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 460px; }
@media (min-width: 720px) { .act-tilerow.four { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; } }
.act-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-height: 128px; padding: 12px 10px 14px;
  background: #fff; border: 3px solid var(--border); border-radius: 20px;
  box-shadow: 0 4px 14px rgba(30, 42, 74, .07);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.act-tile:hover { transform: translateY(-3px); border-color: var(--sky-deep); }
.act-tile:disabled { opacity: .55; }
.act-tile-pic { width: 100%; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.act-tile-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.act-tile-word {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700;
  font-size: 1.15rem; color: var(--navy);
}
.act-word-tile { min-height: 88px; justify-content: center; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--navy); }
/* The affirming states. There is no "wrong" state anywhere in this file: a
   pick that is not the target is answered by Buddy saying the word again and a
   soft glow on the one he means, never a red border and never a shake. */
.act-tile.chosen { border-color: var(--sage); background: var(--light-sage); }
.act-tile.nudge, .act-bin.nudge { border-color: var(--gold); background: var(--pale-gold); animation: act-breathe 1.4s ease-in-out infinite; }
@keyframes act-breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 195, 106, .55); } 50% { box-shadow: 0 0 0 10px rgba(232, 195, 106, 0); } }
@media (prefers-reduced-motion: reduce) {
  .act-tile, .act-bin { transition: none; }
  .act-tile.nudge, .act-bin.nudge { animation: none; }
}

/* ---------- sorting ---------- */
.act-sort { display: flex; flex-direction: column; align-items: center; width: 100%; }
.act-sortcard { width: 168px; margin-bottom: 18px; }
.act-sortcard .act-tile { pointer-events: none; }
.act-bins { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 460px; }
.act-bin {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 88px; padding: 12px;
  background: #fff; border: 3px dashed var(--border); border-radius: 20px;
  font-weight: 700; color: var(--soft-navy); text-align: center; line-height: 1.25;
}
.act-bin:hover { border-color: var(--sage); background: var(--light-sage); }
.act-bin .ab-emoji { font-size: 1.5rem; }
.act-bin .ab-lab { font-size: .95rem; }

/* ---------- same / different ---------- */
.act-judge { display: flex; flex-direction: column; align-items: center; width: 100%; }
.act-heard {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--navy);
}
.act-heard .ah-sep { font-family: 'DM Sans', sans-serif; font-weight: 400; font-size: .95rem; color: var(--muted); }
.act-heard span:not(.ah-sep) { min-width: 84px; text-align: center; padding: 8px 12px; background: #fff; border: 2px solid var(--border); border-radius: 14px; }

/* ---------- picking / ordering ---------- */
.act-pick, .act-order { display: flex; flex-direction: column; align-items: center; width: 100%; }
.act-seqstrip { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; min-height: 34px; }
.act-seqchip { padding: 6px 12px; border-radius: 999px; background: var(--light-sage); color: #2F5F47; font-weight: 700; font-size: .9rem; }

/* ---------- the adult's trial log ---------- */
.act-tallybar {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 12px 14px 14px; box-shadow: 0 4px 14px rgba(30, 42, 74, .06);
}
.at-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.at-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.at-counts { font-size: .88rem; color: var(--soft-navy); font-weight: 600; font-variant-numeric: tabular-nums; }
.at-last { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.at-lastword { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.at-marks { display: flex; gap: 6px; margin-top: 8px; }
.at-mark {
  flex: 1; min-height: 44px; border-radius: 12px; border: 2px solid var(--border);
  background: #fff; font-weight: 700; font-size: .82rem; color: var(--soft-navy); padding: 0 4px;
}
.at-mark[data-mark="y"].on { border-color: var(--sage); background: var(--light-sage); color: #2F5F47; }
.at-mark[data-mark="a"].on { border-color: var(--gold); background: var(--pale-gold); color: #7A5B12; }
.at-mark[data-mark="n"].on { border-color: var(--sky-deep); background: #E8F4FB; color: #1F5170; }

/* ---------- summary ---------- */
.act-summary { width: 100%; max-width: 520px; text-align: center; }
.as-buddy img { width: 92px; height: 92px; object-fit: contain; }
.as-line { color: var(--body); margin-top: 6px; }
.as-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
@media (min-width: 560px) { .as-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.as-cell { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 12px 6px; }
.as-cell b { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.6rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.as-cell span { font-size: .78rem; color: var(--muted); }
.as-cell.as-y { background: var(--light-sage); border-color: #C6E3D4; }
.as-cell.as-a { background: var(--pale-gold); border-color: #F0DFAE; }
.as-revisit { margin-top: 14px; font-size: .92rem; color: var(--body); background: var(--blush); border-radius: 14px; padding: 10px 14px; }
.as-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.as-actions .act-btn { flex: 1 1 44%; font-size: .9rem; }
.as-privacy { margin-top: 14px; font-size: .8rem; color: var(--muted); }
.as-again { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.as-again .act-btn-go { margin-top: 0; }

/* ---------- the SEO / guidance article under the drill ---------- */
.act-about { max-width: 760px; margin: 8px auto 0; padding: 26px 16px 44px; }
.act-about h2 { font-size: 1.3rem; margin-top: 26px; }
.act-about h2:first-child { margin-top: 0; }
.act-about p { color: var(--body); line-height: 1.65; margin-top: 10px; }
.act-about ul { margin: 10px 0 0 20px; color: var(--body); line-height: 1.65; }
.act-about li { margin-top: 6px; }
.act-about .act-wordlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; list-style: none; padding: 0; }
.act-about .act-wordlist li { margin: 0; padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: .9rem; }
.act-about .act-related { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; list-style: none; padding: 0; }
.act-about .act-related li { margin: 0; }
.act-about .act-related a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--border); text-decoration: none; font-size: .9rem; font-weight: 600; }

/* ---------- turn-loop overrides (specificity, not source order) ---------- */
/* A drill runs 10 to 20 trials, so the shared star rail can be four times the
   length a game ever asks it to be. It wraps and shrinks here rather than
   pushing the card off a 375px screen. */
body.lw-act .lwt-stars { flex-wrap: wrap; justify-content: center; max-width: 260px; gap: 2px; }
body.lw-act .lwt-star { font-size: .78rem; }

/* ---------- print: the report only ---------- */
#lw-print-report { display: none; }
@media print {
  body.lw-printing-report > *:not(#lw-print-report) { display: none !important; }
  body.lw-printing-report #lw-print-report {
    display: block; white-space: pre-wrap; font: 12pt/1.5 ui-monospace, monospace; padding: 0;
  }
}

/* ---------- hub ---------- */
.acthub-hero { max-width: 900px; margin: 0 auto; padding: 40px 16px 6px; text-align: center; }
.acthub-hero h1 { font-size: clamp(1.9rem, 5.5vw, 2.9rem); letter-spacing: -.5px; }
.acthub-hero p { color: var(--body); max-width: 620px; margin: 12px auto 0; font-size: 1.05rem; line-height: 1.55; }
.acthub-jump { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
.acthub-jump a { display: inline-block; padding: 10px 16px; min-height: 44px; line-height: 24px; border-radius: 999px; background: #fff; border: 1px solid var(--border); text-decoration: none; font-weight: 600; color: var(--soft-navy); }
.acthub-jump a:hover { border-color: var(--coral); color: var(--deep-coral); }
.acthub-filter { position:sticky; top:61px; z-index:20; max-width:900px; margin:22px auto 0; padding:10px 16px;
  background:rgba(255,251,245,.94); backdrop-filter:blur(8px); }
.acthub-filter .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.acthub-filter-in { display:grid; grid-template-columns:1fr minmax(170px,.35fr) auto; gap:8px; padding:10px;
  border:1px solid var(--border); border-radius:18px; background:#fff; box-shadow:0 8px 22px rgba(30,42,74,.08); }
.acthub-filter input, .acthub-filter select { min-height:46px; width:100%; padding:8px 13px; border:1px solid var(--border);
  border-radius:12px; background:#fff; color:var(--navy); font:inherit; }
.acthub-filter button { min-height:46px; padding:0 14px; border-radius:999px; background:var(--blush); color:var(--deep-coral); font-weight:800; }
.acthub-filter-status { grid-column:1/-1; color:var(--muted); font-size:.86rem; min-height:1.2em; }
@media (max-width:620px) {
  .acthub-filter { top:59px; padding-inline:10px; }
  .acthub-filter-in { grid-template-columns:1fr auto; }
  .acthub-filter input { grid-column:1/-1; }
}
.acthub-sec { max-width: 1080px; margin: 0 auto; padding: 34px 16px 0; }
.acthub-sec > header { max-width: 640px; }
.acthub-sec h2 { font-size: 1.55rem; }
.acthub-sec h2 .acthub-n { font-size: .82rem; font-weight: 600; color: var(--muted); margin-left: 8px; }
.acthub-sec > header p { color: var(--body); margin-top: 6px; line-height: 1.55; }
.acthub-group { margin-top: 22px; }
.acthub-group h3 { font-size: 1.05rem; color: var(--soft-navy); }
.acthub-group > p { color: var(--muted); font-size: .92rem; margin-top: 4px; line-height: 1.5; }
.acthub-list { display: grid; gap: 10px; margin-top: 12px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .acthub-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .acthub-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.acthub-card {
  display: flex; align-items: center; gap: 10px; min-height: 60px;
  padding: 12px 14px; background: #fff; border: 1px solid var(--border); border-radius: 16px;
  text-decoration: none; color: inherit;
}
.acthub-card:hover { border-color: var(--coral); box-shadow: 0 6px 18px rgba(30, 42, 74, .09); }
.acthub-card .ah-badge {
  flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--blush);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; color: var(--deep-coral); font-size: .95rem;
}
.acthub-card b { display: block; font-size: .98rem; color: var(--navy); font-weight: 700; line-height: 1.3; }
.acthub-card small { color: var(--muted); font-size: .82rem; }
.acthub-card[hidden], .acthub-group[hidden], .acthub-sec[hidden] { display:none; }
.acthub-how { max-width: 760px; margin: 44px auto 0; padding: 0 16px; }
.acthub-how h2 { font-size: 1.4rem; }
.acthub-how p { color: var(--body); line-height: 1.65; margin-top: 10px; }
.acthub-how details { margin-top: 10px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; }
.acthub-how summary { font-weight: 700; color: var(--navy); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.acthub-how details p { margin-top: 8px; }
