
/* ==========================================================================
   Polish4Beginners (Mój polski) — Shared Content Stylesheet
   All base/element rules are scoped under .site so loading site.css on the
   homepage affects only the .cast-* Meet the Cast section.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Self-hosted fonts
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Baloo 2";
  src: url("/app/fonts/baloo2-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Baloo 2";
  src: url("/app/fonts/baloo2-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Baloo 2";
  src: url("/app/fonts/baloo2-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/app/fonts/nunito-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/app/fonts/nunito-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/app/fonts/nunito-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/app/fonts/nunito-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Design tokens (shared with the homepage). Red and white since 3 Dec 2026:
   brand red #d30934 (from the logo; 5.4:1 on white), darker #b5102f for small red text.
   Token names are historical: --violet is the brand red, --lime the Warsaw yellow (#ffcc00, ink text, hover #ffd83d).
   -------------------------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #17141f;
  --body: #3a3547;
  --muted: #b5102f;
  --faint: #7a747f;
  --line: #eedce0;
  --violet: #d30934;
  --coral: #b5102f;
  --soft-violet: #fde8ec;
  --lime: #ffcc00;   /* Warsaw-flag yellow: secondary buttons, badges, small tags; always with ink text */
  --cyan: #d30934;
  --border: 2.5px solid #17141f;
  --radius: 12px;
  --shadow: 4px 4px 0 #17141f;
  --shadow-hover: 5px 5px 0 #17141f;
  --max: 1160px;
  --font-head: "Baloo 2", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Literata", Georgia, "Times New Roman", serif;
}

/* --------------------------------------------------------------------------
   3. Scoped base, typography, accessibility & utilities (.site only)
   -------------------------------------------------------------------------- */
.site,
.site *,
.site *::before,
.site *::after {
  box-sizing: border-box;
}

.site {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(23, 20, 31, 0.055) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  color: var(--body);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.site [hidden] {
  display: none !important;
}

.site img {
  max-width: 100%;
  height: auto;
}

.site h1,
.site h2,
.site h3,
.site h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.18;
  margin: 0;
}

.site h1 {
  font-weight: 800;
}

.site h2 {
  font-weight: 700;
}

.site h3 {
  font-weight: 700;
}

.site a {
  color: var(--violet);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.site a:hover {
  color: var(--ink);
}

.site :focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.site .skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 1000;
  padding: 0.6rem 1.1rem;
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.site .skip-link:focus {
  left: 0.75rem;
}

.site .pl {
  color: var(--violet);
  font-weight: 700;
}

.site .kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  line-height: 1.3;
}

.site .kicker:empty {
  display: none;
}

.site .site-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 3.5rem;
}

/* --------------------------------------------------------------------------
   4. Buttons & play button
   -------------------------------------------------------------------------- */
.site .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.site .btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hover);
}

.site .btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.site .btn-primary {
  background: var(--violet);
  color: #ffffff;
}

.site .btn-primary:hover {
  color: #ffffff;
  background: #a8072a;
}

.site .btn-secondary {
  background: var(--lime);
  color: var(--ink);
}

.site .btn-secondary:hover {
  color: var(--ink);
  background: #ffd83d;
}

.site .btn-tertiary {
  background: var(--panel);
  color: var(--ink);
}

.site .btn-tertiary:hover {
  color: var(--ink);
  background: #fff7f8;
}

.site .btn-yt {
  background: #ff0033;
  color: #ffffff;
}

.site .btn-yt:hover {
  color: #ffffff;
  background: #e3002d;
}

.site .btn-sm {
  padding: 0.44rem 0.95rem;
  font-size: 0.88rem;
  box-shadow: 3px 3px 0 #17141f;
}

.site .btn-sm:hover {
  box-shadow: 4px 4px 0 #17141f;
}

.site .btn-sm:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.site .say-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--soft-violet);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.site .say-btn:hover {
  background: var(--lime);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.site .say-btn:active,
.site .say-btn.is-speaking {
  background: var(--violet);
  color: #ffffff;
  transform: translate(2px, 2px);
  box-shadow: none;
}

.site .say-btn svg {
  display: block;
}

/* --------------------------------------------------------------------------
   5. Site header & navigation
   -------------------------------------------------------------------------- */
.site .site-header {
  background: var(--panel);
  border-bottom: var(--border);
}

.site .site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.site .site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.site .site-brand-icon {
  display: block;
  width: auto;
  height: 36px;
  border-radius: 6px;
}

.site .site-brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.site .site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
}

.site .site-nav a {
  display: inline-block;
  padding: 0.4rem 0.72rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--body);
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.site .site-nav a:hover {
  color: var(--ink);
  background: var(--soft-violet);
  border-color: var(--ink);
}

.site .site-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* --------------------------------------------------------------------------
   6. Breadcrumbs
   -------------------------------------------------------------------------- */
.site .breadcrumbs {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
}

.site .breadcrumbs:has(.breadcrumbs-list:empty) {
  display: none;
}

.site .breadcrumbs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #5a5560;
}

.site .breadcrumbs-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.site .breadcrumbs-list li + li::before {
  content: "/";
  color: var(--faint);
  font-weight: 800;
}

.site .breadcrumbs-list a {
  color: var(--muted);
  text-decoration: none;
}

.site .breadcrumbs-list a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   7. Hero with character host & comic speech bubble
   -------------------------------------------------------------------------- */
.site .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem 2.25rem;
  padding: 1.75rem 0 2.25rem;
}

.site .hero-copy {
  min-width: 0;
}

.site .hero-title {
  margin-top: 0.65rem;
  font-size: clamp(1.95rem, 4vw, 2.95rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}

.site .hero-title:first-child {
  margin-top: 0;
}

.site .hero-intro {
  margin: 0.9rem 0 0;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--body);
  max-width: 58ch;
}

.site .hero-intro:empty {
  display: none;
}

.site .hero-actions {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site .hero-actions:empty {
  display: none;
}

.site .hero-stage {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  min-width: 0;
}

.site .hero-bubble {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 280px;
  padding: 1rem 1.15rem;
  background: var(--panel);
  border: var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.site .hero-bubble::before {
  content: "";
  position: absolute;
  top: 42%;
  right: -14px;
  transform: translateY(-50%);
  border-width: 10px 0 10px 14px;
  border-style: solid;
  border-color: transparent transparent transparent #17141f;
}

.site .hero-bubble::after {
  content: "";
  position: absolute;
  top: 42%;
  right: -10px;
  transform: translateY(-50%);
  border-width: 8px 0 8px 11px;
  border-style: solid;
  border-color: transparent transparent transparent #ffffff;
}

.site .hero-bubble:has(.hero-bubble-pl:empty) {
  display: none;
}

.site .hero-bubble-pl {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.site .hero-bubble-pl:empty {
  display: none;
}

.site .hero-bubble-en {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #5a5560;
}

.site .hero-bubble-en:empty {
  display: none;
}

.site .hero-char {
  display: block;
  flex-shrink: 0;
  width: 142px;
  max-width: 150px;
  height: auto;
  filter: drop-shadow(3px 4px 0 rgba(23, 20, 31, 0.14));
}

.site .hero-stage:has(.hero-char[src=""]) .hero-char {
  display: none;
}

/* --------------------------------------------------------------------------
   8. Table of contents (pill row)
   -------------------------------------------------------------------------- */
.site .toc {
  margin: 0 0 2rem;
}

.site .toc:has(.toc-list:empty) {
  display: none;
}

.site .toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.site .toc-list a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.95rem;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2.5px 2.5px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.site .toc-list a:hover {
  background: var(--soft-violet);
  color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 3.5px 3.5px 0 var(--ink);
}

.site .toc-list a:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   9. Hub sections & hub cards
   -------------------------------------------------------------------------- */
.site .hub-section {
  margin: 0 0 2.5rem;
}

.site .hub-section-head {
  margin-bottom: 1.1rem;
}

.site .hub-heading {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 800;
}

.site .hub-heading:empty {
  display: none;
}

.site .hub-note {
  margin: 0.3rem 0 0;
  font-size: 0.98rem;
  color: #5a5560;
}

.site .hub-note:empty {
  display: none;
}

.site .hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
}

.site .hub-card {
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.25rem;
  background: var(--panel);
  color: var(--body);
  text-decoration: none;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.site .hub-card:hover {
  color: var(--body);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hover);
}

.site .hub-card:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.site .hub-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.site .hub-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  overflow-wrap: break-word;
}

.site .hub-card-badge {
  flex-shrink: 0;
  padding: 0.16rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 999px;
  line-height: 1.3;
}

.site .hub-card-badge:empty {
  display: none;
}

.site .hub-card-meta {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
}

.site .hub-card-meta:empty {
  display: none;
}

.site .hub-card-desc {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--body);
}

.site .hub-card-desc:empty {
  display: none;
}

/* --------------------------------------------------------------------------
   10. Phrase level sections & responsive phrase table
   -------------------------------------------------------------------------- */
.site .level-section {
  margin: 0 0 2.5rem;
  scroll-margin-top: 1.25rem;
}

.site .level-head {
  margin-bottom: 0.9rem;
}

.site .level-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 800;
}

.site .level-badge {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  background: var(--lime);
  color: var(--ink);
  border: var(--border);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 0.95em;
  line-height: 1.2;
}

.site .level-sep {
  color: var(--faint);
}

.site .level-count {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 800;
  color: #5a5560;
}

.site .phrase-table-wrap {
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.site .phrase-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.96rem;
}

.site .phrase-table thead th {
  background: var(--soft-violet);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.78rem 1rem;
  border-bottom: var(--border);
  white-space: nowrap;
}

.site .phrase-table tbody td {
  padding: 0.82rem 1rem;
  border-bottom: 1.5px solid var(--line);
  vertical-align: top;
}

.site .phrase-table tbody tr:last-child td {
  border-bottom: none;
}

.site .phrase-table tbody tr:hover td {
  background: #fff7f8;
}

.site .phrase-pl-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.site .phrase-pl {
  font-size: 1.04rem;
  line-height: 1.35;
}

.site .phrase-phonetic-cell {
  color: #5a5560;
  font-size: 0.92rem;
  font-style: italic;
}

.site .phrase-en-cell {
  color: var(--ink);
  font-weight: 700;
}

.site .phrase-ex-pl {
  display: block;
  font-size: 0.93rem;
  line-height: 1.4;
}

.site .phrase-ex-pl:empty {
  display: none;
}

.site .phrase-ex-en {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #5a5560;
}

.site .phrase-ex-en:empty {
  display: none;
}

/* --------------------------------------------------------------------------
   11. Conversation info strip & chat bubbles
   -------------------------------------------------------------------------- */
.site .dialog-info {
  margin: 0 0 1.85rem;
  padding: 1rem 1.25rem;
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem 1.25rem;
}

.site .dialog-info-item {
  min-width: 0;
}

.site .dialog-info-item:has(dd:empty) {
  display: none;
}

.site .dialog-info dt {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.2rem;
}

.site .dialog-info dd {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: break-word;
}

.site .dialog-info-level {
  display: inline-block;
  padding: 0.1rem 0.65rem;
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.86rem;
}

.site .dialog-line {
  display: flex;
  margin-bottom: 1rem;
}

.site .dialog-line-a {
  justify-content: flex-start;
}

.site .dialog-line-b {
  justify-content: flex-end;
}

.site .dialog-bubble {
  width: 100%;
  max-width: min(680px, 88%);
  min-width: 0;
  padding: 1rem 1.2rem;
  background: var(--panel);
  border: var(--border);
  border-radius: 16px 16px 16px 4px;
  box-shadow: var(--shadow);
}

.site .dialog-line-b .dialog-bubble {
  background: #fff7f8;
  border-radius: 16px 16px 4px 16px;
}

.site .dialog-bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.site .dialog-who {
  display: inline-block;
  padding: 0.16rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--ink);
  background: var(--lime);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}

.site .dialog-line-b .dialog-who {
  background: #f4f2f3;
}

.site .dialog-who:empty {
  display: none;
}

.site .dialog-pl {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.site .dialog-en {
  margin: 0.35rem 0 0;
  font-size: 0.96rem;
  color: var(--body);
}

.site .dialog-en:empty {
  display: none;
}

.site .dialog-note {
  margin: 0.6rem 0 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  font-style: italic;
  color: #5a5560;
  background: var(--panel);
  border-left: 3px solid var(--cyan);
  border-radius: 0 8px 8px 0;
}

.site .dialog-note:empty {
  display: none;
}

/* --------------------------------------------------------------------------
   12. Grammar chapter prose, tables, chips, mini-dialogues & exercises
   -------------------------------------------------------------------------- */
.site .prose {
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2.25rem;
  margin: 0 0 2.25rem;
  overflow-wrap: break-word;
}

.site .prose > :first-child {
  margin-top: 0;
}

.site .prose > :last-child {
  margin-bottom: 0;
}

.site .prose h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
  margin: 2.2rem 0 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--line);
  scroll-margin-top: 1.25rem;
}

.site .prose h3 {
  font-size: 1.22rem;
  font-weight: 700;
  margin: 1.65rem 0 0.6rem;
  scroll-margin-top: 1.25rem;
}

.site .prose p {
  margin: 0 0 1rem;
  max-width: 72ch;
}

.site .prose ul,
.site .prose ol {
  margin: 0 0 1.15rem;
  padding-left: 1.45rem;
  max-width: 72ch;
}

.site .prose li + li {
  margin-top: 0.4rem;
}

.site .prose li::marker {
  color: var(--violet);
  font-weight: 800;
}

.site .prose strong {
  color: var(--ink);
  font-weight: 800;
}

.site .prose code {
  font-size: 0.92em;
  padding: 0.1rem 0.4rem;
  background: #fff7f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
}

.site .prose .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.4rem 0;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 3px 3px 0 var(--ink);
}

.site .prose .table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

.site .prose .table-wrap th {
  background: var(--soft-violet);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  padding: 0.72rem 0.95rem;
  border-bottom: var(--border);
  white-space: nowrap;
}

.site .prose .table-wrap td {
  padding: 0.68rem 0.95rem;
  border-bottom: 1.5px solid var(--line);
  vertical-align: top;
}

.site .prose .table-wrap tbody tr:last-child td {
  border-bottom: none;
}

.site .prose .table-wrap tbody tr:nth-child(even) td {
  background: #fff7f8;
}

.site .prose .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.25rem 0;
}

.site .prose .chips .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.82rem;
  background: var(--panel);
  color: var(--violet);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
}

.site .prose .dialogue {
  margin: 1.5rem 0;
  padding: 1.15rem 1.35rem;
  background: #fff7f8;
  border: var(--border);
  border-left: 6px solid var(--cyan);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--ink);
}

.site .prose .dialogue > :first-child {
  margin-top: 0;
}

.site .prose .dialogue > :last-child {
  margin-bottom: 0;
}

.site .prose .dialogue p {
  margin: 0 0 0.55rem;
  max-width: none;
}

.site .prose .dialogue .gist,
.site .prose .dialogue .muted,
.site .prose .dialogue small {
  display: block;
  margin-top: 0.65rem;
  color: #5a5560;
  font-size: 0.92rem;
}

.site .prose .exercise {
  margin: 1.65rem 0;
  padding: 1.3rem 1.45rem;
  background: var(--panel);
  border: var(--border);
  border-top: 6px solid var(--lime);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.site .prose .exercise > :first-child {
  margin-top: 0;
}

.site .prose .exercise > :last-child {
  margin-bottom: 0;
}

.site .prose .exercise ol {
  margin-bottom: 0;
  max-width: none;
}

.site .prose .exercise li + li {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1.5px dashed var(--line);
}

.site .prose .exercise details {
  margin-top: 0.55rem;
}

.site .prose .exercise summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink);
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.site .prose .exercise summary::-webkit-details-marker {
  display: none;
}

.site .prose .exercise summary::after {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.15s ease;
}

.site .prose .exercise details[open] summary::after {
  transform: rotate(-135deg) translateY(-1px);
}

.site .prose .exercise summary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.site .prose .exercise details[open] > :not(summary) {
  margin-top: 0.6rem;
  padding: 0.65rem 0.9rem;
  background: #fff7f8;
  border: 1.5px solid var(--line);
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   13. Call-to-action card (with character cameo)
   -------------------------------------------------------------------------- */
.site .cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.25rem;
  margin: 2.5rem 0 1.75rem;
  padding: 1.75rem 2rem;
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.site .cta-body {
  flex: 1 1 auto;
  min-width: 0;
}

.site .cta-heading {
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  font-weight: 800;
}

.site .cta-heading:empty {
  display: none;
}

.site .cta-text {
  margin: 0.55rem 0 0;
  font-size: 1rem;
  color: var(--body);
  max-width: 58ch;
}

.site .cta-text:empty {
  display: none;
}

.site .cta-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site .cta-actions:empty {
  display: none;
}

.site .cta-media {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.site .cta-media:has(.cta-char[src=""]) {
  display: none;
}

.site .cta-char {
  display: block;
  width: 120px;
  max-width: 140px;
  height: auto;
  filter: drop-shadow(3px 4px 0 rgba(23, 20, 31, 0.14));
}

/* --------------------------------------------------------------------------
   14. Previous / next page links
   -------------------------------------------------------------------------- */
.site .prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0 0;
}

.site .prev-next:has(.prev-next-prev:empty):has(.prev-next-next:empty) {
  display: none;
}

.site .prev-next-slot {
  display: flex;
  min-width: 0;
}

.site .prev-next-prev {
  justify-content: flex-start;
}

.site .prev-next-next {
  justify-content: flex-end;
}

.site .prev-next-slot a {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.15rem;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 100%;
  overflow-wrap: break-word;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.site .prev-next-slot a:hover {
  background: var(--soft-violet);
  color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hover);
}

.site .prev-next-slot a:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   15. Site footer
   -------------------------------------------------------------------------- */
.site .site-footer {
  margin-top: auto;
  background: var(--panel);
  border-top: var(--border);
}

.site .site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 1.75rem;
}

.site .site-footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}

.site .site-footer-heading {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.65rem;
}

.site .site-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site .site-footer-list li + li {
  margin-top: 0.42rem;
}

.site .site-footer-list a {
  color: var(--body);
  font-size: 0.93rem;
  font-weight: 700;
  text-decoration: none;
}

.site .site-footer-list a:hover {
  color: var(--violet);
  text-decoration: underline;
}

.site .site-footer-bottom {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1.5px solid var(--line);
  font-size: 0.88rem;
  font-weight: 700;
  color: #5a5560;
}

.site .site-footer-bottom p {
  margin: 0;
}

.site .site-footer-bottom a {
  color: var(--muted);
  text-decoration: none;
}

.site .site-footer-bottom a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   16. Meet the Cast section (self-contained .cast-* classes for homepage)
   -------------------------------------------------------------------------- */
.cast-section,
.cast-section *,
.cast-section *::before,
.cast-section *::after {
  box-sizing: border-box;
}

.cast-section {
  width: 100%;
  padding: 3rem 1.25rem;
  font-family: var(--font-body);
  color: var(--body);
}

.cast-section :focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.cast-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.cast-head {
  max-width: 640px;
  margin: 0 0 1.75rem;
}

.cast-kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  line-height: 1.3;
}

.cast-heading {
  margin: 0.65rem 0 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  line-height: 1.14;
  color: var(--ink);
}

.cast-intro {
  margin: 0.65rem 0 0;
  font-size: 1.03rem;
  line-height: 1.6;
  color: var(--body);
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.cast-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}

.cast-section .cast-figure {
  margin: 0;
  height: 340px;
  padding: 1.25rem 1rem 0.75rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(23, 20, 31, 0.055) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  border-bottom: var(--border);
}

.cast-section .cast-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 300px;      /* same height for every character, so names and text line up */
  object-fit: contain;
  filter: drop-shadow(3px 4px 0 rgba(23, 20, 31, 0.14));
}

.cast-body {
  padding: 1.1rem 1.25rem 1.25rem;
}

.cast-section .cast-name {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--ink);
}

.cast-section .cast-bio {
  margin: 0.4rem 0 0;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--body);
}

.cast-cta {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
}

.cast-section .cast-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.66rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  color: #ffffff;
  background: #ff0033;
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.cast-section .cast-btn:hover {
  color: #ffffff;
  background: #e3002d;
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hover);
}

.cast-section .cast-btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.cast-section .cast-note {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: #5a5560;
}

/* --------------------------------------------------------------------------
   16b. Language menu, "EN" link tags, beta note (unscoped: also on the homepage)
   -------------------------------------------------------------------------- */
.lang-menu {
  position: relative;
  font-family: var(--font-body);
}

.lang-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.7rem;
  min-height: 36px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.lang-menu > summary::-webkit-details-marker {
  display: none;
}

.lang-menu > summary:hover,
.lang-menu[open] > summary {
  background: var(--soft-violet);
}

.lang-menu > summary:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}

.lang-menu-list {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 11rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lang-menu-list a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
}

.lang-menu-list a:hover {
  background: var(--soft-violet);
}

.lang-menu-list a[aria-current="true"] {
  background: var(--ink);
  color: var(--panel);
}

.lang-tag {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0 0.3rem;
  font-size: 0.68em;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.04em;
  vertical-align: 0.12em;
  color: var(--muted);
  border: 1.5px solid currentColor;
  border-radius: 5px;
}

.site .beta-note {
  max-width: var(--max);
  margin: 0.9rem auto 0;
  padding: 0.55rem 1.25rem;
  font-size: 0.92rem;
  color: var(--body);
}

/* --------------------------------------------------------------------------
   16c. The menu: four groups with sub-menus, same on every page (unscoped: homepage too)
   -------------------------------------------------------------------------- */
.site-header .site-nav {
  margin-left: auto;
}

.site-nav .nav-group {
  position: relative;
}

.site-nav .nav-group > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--body);
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.site-nav .nav-group > summary::-webkit-details-marker {
  display: none;
}

.site-nav .nav-group > summary::after {
  content: "";
  width: 0.42em;
  height: 0.42em;
  margin-top: -0.2em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.12s ease;
}

.site-nav .nav-group[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: 0.15em;
}

.site-nav .nav-group > summary:hover,
.site-nav .nav-group[open] > summary {
  color: var(--ink);
  background: var(--soft-violet);
  border-color: var(--ink);
}

.site-nav .nav-group > summary:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}

.site-nav .nav-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 50;
  min-width: 14rem;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.site-nav .nav-group:last-child .nav-menu {
  left: auto;
  right: 0;
}

.site-nav .nav-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav .nav-menu a:hover,
.site-nav .nav-menu a:focus-visible {
  background: var(--soft-violet);
  color: var(--ink);
}

/* the header stays in place on every page, as on the homepage */
.site .site-header {
  position: sticky;
  top: 0;
  z-index: 40;
}

@media (max-width: 720px) {
  /* one row of four; a sub-menu opens as a full-width panel under the row, never off-screen */
  .site-header .site-nav {
    position: relative;
    margin-left: 0;
    gap: 2px 2px;
  }

  .site-nav .nav-group {
    position: static;
  }

  .site-nav .nav-group > summary {
    padding: 0.32rem 0.42rem;
    font-size: 0.86rem;
  }

  .site-nav .nav-menu,
  .site-nav .nav-group:last-child .nav-menu {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .site-nav .nav-menu a {
    white-space: normal;
    padding: 0.6rem 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   16d. Story videos: click-to-play embed, episode pages, homepage section (unscoped)
   -------------------------------------------------------------------------- */
.yt-lite {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: #17141f;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.yt-lite img,
.yt-lite iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.yt-lite .yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transition: transform 0.12s ease;
}

.yt-lite:hover .yt-play,
.yt-lite .yt-play:focus-visible {
  transform: translate(-50%, -50%) scale(1.08);
}

.yt-lite .yt-play:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
  border-radius: 12px;
}

.site .video-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 1.25rem;
  align-items: center;
  margin: 0.5rem 0 2rem;
  padding: 1.1rem;
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
}

.site .video-aside h2 {
  margin: 0.4rem 0;
  font-size: 1.2rem;
}

.site .ep-video {
  max-width: 880px;
  margin: 0 auto 2rem;
}

.site .ep-words {
  margin-bottom: 2.25rem;
}

.site .ep-word-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.site .ep-word {
  margin: 0;
  padding: 0.6rem;
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.site .ep-word img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.site .ep-word figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  padding-top: 0.5rem;
  font-size: 1.15rem;
}

.site .ep-word details,
.site .ep-phrases details {
  width: 100%;
  font-size: 0.95rem;
}

.site .ep-word summary,
.site .ep-phrases summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.site .ep-phrases {
  list-style: none;
  padding: 0;
}

.site .ep-phrases li {
  padding: 0.6rem 0;
  border-bottom: 1.5px solid var(--line);
}

.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.ep-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ep-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.ep-card-num {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
}

.ep-card-title {
  font-weight: 800;
  line-height: 1.3;
}

.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
}

.watch-side h3 {
  margin: 0.25rem 0 0.5rem;
}

.watch-ep {
  margin: 0;
  font-weight: 800;
  color: var(--muted);
}

.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.75rem 0;
}

@media (max-width: 760px) {
  .site .video-aside,
  .watch-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   17. Responsive breakpoints (360px to 1600px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .site .hero {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 1.35rem 0 1.85rem;
  }

  .site .hero-stage {
    justify-content: flex-start;
  }

  .site .hero-char {
    width: 118px;
  }

  .site .site-footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site .site-header-inner {
    padding: 0.75rem 1rem;
    gap: 0.65rem 0.75rem;
  }

  .site .site-nav {
    order: 3;
    width: 100%;
    padding-top: 0.5rem;
    border-top: 1.5px solid var(--line);
    gap: 0.25rem 0.35rem;
  }

  .site .site-nav a {
    padding: 0.35rem 0.62rem;
    font-size: 0.92rem;
  }

  .site .breadcrumbs {
    padding: 0.85rem 1rem 0;
  }

  .site .site-main {
    padding: 0 1rem 2.75rem;
  }

  .site .hero-bubble {
    max-width: none;
    padding: 0.85rem 1rem;
  }

  .site .hero-char {
    width: 110px;
  }

  /* How-to-say and comparison tables: one card per row on phones */
  .site .prose .table-wrap.stack { overflow: visible; background: transparent; border: none; box-shadow: none; }
  .site .prose .table-wrap.stack table,
  .site .prose .table-wrap.stack tbody,
  .site .prose .table-wrap.stack tr,
  .site .prose .table-wrap.stack td { display: block; width: 100%; }
  .site .prose .table-wrap.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site .prose .table-wrap.stack tbody tr { background: var(--panel); border: var(--border); border-radius: var(--radius); box-shadow: 3px 3px 0 var(--ink); padding: 0.8rem 0.95rem; margin-bottom: 0.75rem; }
  .site .prose .table-wrap.stack tbody tr:nth-child(even) td { background: transparent; }
  .site .prose .table-wrap.stack td { padding: 0.12rem 0; border: none; }
  .site .prose .table-wrap.stack td.st-main { font-size: 1.05rem; padding-bottom: 0.2rem; }
  .site .prose .table-wrap.stack td.st-say { color: var(--muted); font-size: 0.92rem; }
  .site .prose .table-wrap.stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 800; color: var(--ink); }

  /* Stack phrase table rows into cards on phones (CSS only) */
  .site .phrase-table-wrap {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .site .phrase-table,
  .site .phrase-table tbody,
  .site .phrase-table tr,
  .site .phrase-table td {
    display: block;
    width: 100%;
  }

  .site .phrase-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .site .phrase-table tbody tr.phrase-row {
    background: var(--panel);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.95rem 1rem;
    margin-bottom: 0.85rem;
  }

  .site .phrase-table tbody tr.phrase-row:last-child {
    margin-bottom: 0;
  }

  .site .phrase-table tbody tr:hover td {
    background: transparent;
  }

  .site .phrase-table tbody td {
    padding: 0;
    border-bottom: none;
  }

  .site .phrase-phonetic-cell {
    margin-top: 0.25rem;
    font-size: 0.88rem;
  }

  .site .phrase-phonetic-cell:empty {
    display: none;
  }

  .site .phrase-en-cell {
    margin-top: 0.35rem;
    font-size: 1rem;
  }

  .site .phrase-ex-cell {
    margin-top: 0.65rem;
    padding-top: 0.6rem;
    border-top: 1.5px dashed var(--line);
  }

  .site .phrase-ex-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .site .phrase-ex-cell:has(.phrase-ex-pl:empty):has(.phrase-ex-en:empty) {
    display: none;
  }

  .site .dialog-bubble {
    max-width: 95%;
    padding: 0.9rem 1rem;
  }

  .site .prose {
    padding: 1.25rem 1.05rem;
  }

  .site .prose .dialogue,
  .site .prose .exercise {
    padding: 1rem 1.05rem;
  }

  .site .cta-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.35rem 1.25rem;
    gap: 1.25rem;
  }

  .site .cta-media {
    align-self: center;
  }

  .site .cta-char {
    width: 112px;
  }

  .site .prev-next {
    grid-template-columns: 1fr;
  }

  .site .prev-next-slot:empty {
    display: none;
  }

  .site .prev-next-prev,
  .site .prev-next-next {
    justify-content: stretch;
  }

  .site .prev-next-slot a {
    width: 100%;
    justify-content: center;
  }

  .cast-section {
    padding: 2.25rem 1rem;
  }

  .cast-grid {
    grid-template-columns: 1fr;
  }

  .cast-section .cast-figure {
    height: 280px;
  }

  .cast-section .cast-img {
    height: 245px;
  }
}

@media (max-width: 440px) {
  .site .site-brand-name {
    font-size: 1.14rem;
  }

  .site .site-header-actions {
    width: 100%;
  }

  .site .site-footer-cols {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .site .hero-stage {
    gap: 0.7rem;
  }

  .site .hero-char {
    width: 104px;
  }
}

/* --------------------------------------------------------------------------
   18. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .site .btn,
  .site .say-btn,
  .site .site-nav a,
  .site .toc-list a,
  .site .hub-card,
  .site .prev-next-slot a,
  .site .prose .exercise summary,
  .site .prose .exercise summary::after,
  .cast-section .cast-btn {
    transition: none;
  }

  .site .btn:hover,
  .site .btn:active,
  .site .say-btn:hover,
  .site .say-btn:active,
  .site .toc-list a:hover,
  .site .toc-list a:active,
  .site .hub-card:hover,
  .site .hub-card:active,
  .site .prev-next-slot a:hover,
  .site .prev-next-slot a:active,
  .site .prose .exercise summary:hover,
  .cast-section .cast-btn:hover,
  .cast-section .cast-btn:active {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   19. Print stylesheet
   -------------------------------------------------------------------------- */
@media print {
  .site {
    background: #ffffff !important;
    color: #000000;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .site .skip-link,
  .site .site-header,
  .site .site-nav,
  .site .site-header-actions,
  .site .breadcrumbs,
  .site .toc,
  .site .btn,
  .site .say-btn,
  .site .hero-actions,
  .site .hero-stage,
  .site .hero-char,
  .site .cta-card,
  .site .cta-char,
  .site .prev-next,
  .site .site-footer,
  .cast-section .cast-figure,
  .cast-cta,
  .cast-section .cast-btn {
    display: none !important;
  }

  .site .site-main {
    max-width: none;
    padding: 0;
  }

  .site .hero {
    display: block;
    padding: 0 0 1rem;
  }

  .site .pl {
    color: #17141f;
  }

  .site .phrase-table-wrap,
  .site .prose,
  .site .dialog-info,
  .site .dialog-bubble,
  .site .hub-card,
  .site .prose .table-wrap,
  .site .prose .dialogue,
  .site .prose .exercise {
    background: #ffffff !important;
    box-shadow: none !important;
    border: 1px solid #888888;
  }

  .site .phrase-table-wrap {
    overflow: visible;
  }

  .site .phrase-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
  }

  .site .phrase-table thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    display: table-header-group;
  }

  .site .phrase-table tbody {
    display: table-row-group;
  }

  .site .phrase-table tr,
  .site .phrase-table tbody tr.phrase-row {
    display: table-row;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    break-inside: avoid;
  }

  .site .phrase-table th,
  .site .phrase-table td {
    display: table-cell;
    width: auto;
    padding: 0.45rem 0.6rem;
    border: 1px solid #bbbbbb;
    background: #ffffff !important;
  }

  .site .phrase-ex-cell::before {
    display: none;
  }

  .site .dialog-line {
    display: block;
    break-inside: avoid;
  }

  .site .dialog-bubble {
    max-width: none;
    border-radius: 6px;
  }

  .site .level-badge {
    background: #ffffff;
    box-shadow: none;
    border: 1px solid #000000;
  }

  .site a {
    color: #000000;
    text-decoration: none;
  }
}

/* Phrase tables: hide a column that is empty for every row of the table */
.site .phrase-table.no-pron th:nth-child(2), .site .phrase-table.no-pron td.phrase-phonetic-cell,
.site .phrase-table.no-ex th:nth-child(4), .site .phrase-table.no-ex td.phrase-ex-cell { display: none; }
/* Phone level headings: keep the separator dot with the count */
.site .level-title .level-sep, .site .level-title .level-count { white-space: nowrap; }
/* Video hub: room between the episode cards and the About panel */
.site .ep-list { margin-bottom: 2.25rem; }
/* /learn/: the five steps in one row on wide screens, never 4 + 1 */
@media (min-width: 1100px) { .site .hub-grid.steps-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 721px) and (max-width: 1099px) { .site .hub-grid.steps-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Headings: no lone last word or character (zh 语 on its own line) */
.site .hero-title, .site h2 { text-wrap: balance; }
.site .nw { display: inline-block; white-space: nowrap; }
/* Homepage hero (language homepages), same as the English homepage: size chip on the Android button, note under the buttons */
.site .btn-meta { font-size: 0.78rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(23, 20, 31, 0.1); color: var(--ink); margin-left: 0.4rem; }
.site .hero-note { margin: 1rem 0 0; font-size: 0.94rem; font-weight: 700; color: var(--body); }
.site .watch-section { margin-top: 2.5rem; }
.site .video-fallback, .video-fallback { margin: 0 0 0.6rem; font-weight: 700; color: var(--muted); }
/* Beta note on the vi/tr homepages (the homepage has no .site wrapper) */
.home-beta { margin: 14px 0 0; padding: 8px 12px; font-size: 0.9rem; color: var(--body, #39343d); background: var(--soft-violet, #fde8ec); border: 2px solid var(--ink, #17141f); border-radius: 12px; }
.nw { display: inline-block; white-space: nowrap; }
/* Full video title under each embed (the VideoObject name, shown on the page) */
.video-title { margin: 0.45rem 0 0; font-size: 0.86rem; font-weight: 700; color: var(--muted, #b5102f); }
.yt-soon img { display: block; width: 100%; height: auto; border-radius: 12px; }
/* "Sign up free": the fifth header item (only once sign-in is switched on) */
.site-nav .nav-signup { display: inline-flex; align-items: center; padding: 0.4rem 0.75rem; font-weight: 800; font-size: 0.95rem; color: var(--ink, #17141f); background: var(--lime, #ffcc00); border: 2px solid var(--ink, #17141f); border-radius: 999px; text-decoration: none; white-space: nowrap; }
.site-nav .nav-signup:hover { background: #ffd83d; color: var(--ink, #17141f); }
/* Signed in (flag from the web app): "My account" with avatar or initial, same size as "Sign up free" */
.site-nav a.nav-signup.nav-me, .site .site-nav a.nav-signup.nav-me { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--panel, #ffffff); border-color: var(--ink, #17141f); }
.site-nav .nav-avatar { display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; overflow: hidden; background: var(--violet, #d30934); color: #ffffff; font-size: 0.75rem; font-weight: 800; object-fit: cover; flex: none; margin: -0.2rem 0; }
