/* English School UA — Elevate EdTech Design System */
:root {
  --bg-backdrop: #CBE2F4;
  --bg-shell: #FFFFFF;
  --bg-canvas: #F5F6F8;
  --ink: #202024;
  --ink-hover: #32343A;
  --text: #202024;
  --text-muted: #4A4E57;
  --border: #ECEEF2;
  --peach: #FFE0B5;
  --peach-soft: #FFF2DF;
  --lavender: #ECD4FF;
  --lavender-soft: #F7EEFF;
  --lime: #D8F4A0;
  --lime-soft: #EEFBD2;
  --sky: #D6EEF8;
  --sky-soft: #ECF7FC;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-shell: 26px;
  --shadow-shell: 0 20px 50px rgba(32, 32, 36, 0.08);
  --shadow-card: 0 4px 16px rgba(32, 32, 36, 0.05);
  --font-head: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-body: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: linear-gradient(180deg, var(--bg-backdrop) 0%, #DFEFFB 100%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.22;
  margin-top: 0;
}
h1 { font-size: clamp(1.65rem, 2.8vw, 2.3rem); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.7rem; }
h2 { font-size: clamp(1.3rem, 2vw, 1.65rem); font-weight: 800; letter-spacing: -0.015em; margin: 2rem 0 0.85rem; }
h3 { font-size: 1.12rem; font-weight: 700; margin: 1.35rem 0 0.55rem; }
p { margin: 0 0 0.95rem; color: var(--text); }
a { color: var(--ink); font-weight: 600; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { opacity: 0.78; }
ul, ol { margin: 0 0 1.1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.4rem; }
img, svg { max-width: 100%; height: auto; }
.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;
}

.skip-link {
  position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff;
  padding: 8px 14px; border-radius: 99px; z-index: 1000;
}
.skip-link:focus { left: 12px; }

/* Outer App-Shell Framing */
.app-frame { max-width: 1380px; margin: 0 auto; padding: 20px 18px 28px; }
.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--bg-shell);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-shell);
  border: 1px solid rgba(255, 255, 255, 0.85);
  overflow: visible;
  min-height: calc(100vh - 48px);
}

/* Left Persistent Sidebar */
.app-sidebar {
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg-shell);
  border-radius: var(--radius-shell) 0 0 var(--radius-shell);
}
.brand-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; padding: 4px 8px; color: var(--ink);
  min-height: 44px; min-width: 44px;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--lavender); display: grid; place-items: center; flex-shrink: 0;
}
.brand-word { font-weight: 800; font-size: 1.06rem; letter-spacing: -0.02em; color: var(--ink); }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.snav-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 12px; text-decoration: none;
  color: var(--text-muted); font-weight: 600; font-size: 0.92rem; transition: background 0.15s ease, color 0.15s ease;
}
.snav-item:hover { background: var(--bg-canvas); color: var(--ink); opacity: 1; }
.snav-item.is-active { background: var(--lime); color: var(--ink); font-weight: 700; }
.snav-left { display: inline-flex; align-items: center; gap: 10px; }
.snav-left svg { width: 18px; height: 18px; flex-shrink: 0; }
.snav-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px;
  background: var(--ink); color: #FFFFFF; font-size: 0.74rem; font-weight: 700;
}
.sidebar-sub {
  border-top: 1px solid var(--border); padding-top: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.sidebar-sub-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 0 10px; }
.sidebar-sub a {
  font-size: 0.85rem; color: var(--text-muted); text-decoration: none;
  padding: 5px 10px; border-radius: 8px; font-weight: 600;
}
.sidebar-sub a:hover, .sidebar-sub a.is-current { background: var(--sky-soft); color: var(--ink); opacity: 1; }
.sidebar-foot {
  margin-top: auto; background: var(--bg-canvas); border-radius: 14px; padding: 12px;
  font-size: 0.82rem; color: var(--text-muted);
}
.sidebar-foot strong { color: var(--ink); display: block; margin-bottom: 2px; }

/* Workspace & Topbar */
.app-workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  min-height: 68px; padding: 12px 26px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 460px; position: relative; }
.nav-toggle {
  display: none; align-items: center; justify-content: center; min-height: 44px;
  background: var(--bg-canvas); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 14px; cursor: pointer; font-family: var(--font-head);
  font-weight: 700; color: var(--ink); flex-shrink: 0;
}
.search-box { position: relative; width: 100%; }
.search-input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: 99px;
  border: 1px solid transparent; background: var(--bg-canvas);
  font-family: var(--font-body); font-size: 0.9rem; color: var(--ink);
}
.search-input:focus { outline: none; background: #fff; border-color: var(--ink); }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-dropdown {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--bg-shell); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-shell); padding: 8px; z-index: 120; max-height: 320px; overflow-y: auto;
}
.search-dropdown.is-open { display: block; }
.search-dropdown a {
  display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px;
  border-radius: 10px; text-decoration: none; font-size: 0.88rem; color: var(--ink);
}
.search-dropdown a:hover { background: var(--lime-soft); opacity: 1; }
.search-role { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: 99px; background: var(--bg-canvas); border: 1px solid var(--border);
  width: fit-content; flex-shrink: 0;
}
.lang-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; min-height: 36px; padding: 6px 10px; border-radius: 99px;
  font-size: 0.78rem; font-weight: 800;
  text-decoration: none; color: var(--text-muted); line-height: 1.2;
}
.lang-link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.7); opacity: 1; }
.lang-link.is-active { background: var(--ink); color: #FFFFFF; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  border-radius: 99px; background: var(--bg-canvas); font-size: 0.82rem; font-weight: 700; color: var(--ink);
}
.workspace-body { padding: 24px 26px 36px; flex: 1; min-width: 0; }

/* Buttons & Pills */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 99px; border: 1.5px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem;
  text-align: center; line-height: 1.25;
  text-decoration: none; cursor: pointer; transition: transform 0.14s ease, background 0.14s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 1; }
.btn-primary { background: var(--ink); color: #FFFFFF; }
.btn-primary:hover { background: var(--ink-hover); color: #FFFFFF; }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: #CBEB8A; color: var(--ink); }
.btn-outline { background: var(--bg-shell); color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--ink); background: var(--bg-canvas); color: var(--ink); }
.btn-secondary { background: var(--lavender); color: var(--ink); }
.btn-secondary:hover { background: #DFC0FA; color: var(--ink); }
.btn-sm { padding: 7px 14px; font-size: 0.84rem; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 11px;
  border-radius: 99px; font-size: 0.78rem; font-weight: 700; width: fit-content;
  text-align: center; white-space: nowrap; line-height: 1.2;
  background: var(--bg-canvas); color: var(--ink);
}
.pill-dark { background: var(--ink); color: #FFFFFF; }
.pill-lime { background: var(--lime); color: var(--ink); }
.pill-peach { background: var(--peach); color: var(--ink); }
.pill-lavender { background: var(--lavender); color: var(--ink); }
.pill-sky { background: var(--sky); color: var(--ink); }

/* Filter Pill Tabs */
.pill-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.pill-tab {
  min-height: 44px; padding: 10px 16px; border-radius: 99px; border: none; cursor: pointer;
  background: var(--bg-canvas); color: var(--text-muted); font-family: var(--font-head);
  font-weight: 700; font-size: 0.86rem; transition: all 0.15s ease;
}
.pill-tab:hover { color: var(--ink); background: #EAECEF; }
.pill-tab.is-active { background: var(--ink); color: #FFFFFF; }

/* Elevate 4-Column Pastel Cards Grid */
.elevate-cards-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px;
}
.e-card {
  border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 12px; min-height: 205px; min-width: 0; max-width: 100%; transition: transform 0.16s ease;
}
.e-card:hover { transform: translateY(-2px); }
.tone-peach { background: var(--peach); }
.tone-lavender { background: var(--lavender); }
.tone-lime { background: var(--lime); }
.tone-sky { background: var(--sky); }
.e-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: nowrap; }
.e-card-badge {
  background: rgba(255, 255, 255, 0.88); color: var(--ink); padding: 4px 9px;
  border-radius: 99px; font-size: 0.76rem; font-weight: 700; white-space: nowrap;
}
.e-card-title { font-size: 1.08rem; font-weight: 800; margin: 4px 0; color: var(--ink); text-decoration: none; display: block; }
.e-card-desc { font-size: 0.84rem; color: var(--ink); opacity: 0.9; margin: 0; }
.e-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.e-card-price { font-size: 0.9rem; font-weight: 800; color: var(--ink); }
.e-circle-btn {
  width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #FFFFFF;
  display: inline-grid; place-items: center; text-decoration: none; font-size: 1rem; flex-shrink: 0;
}
.e-circle-btn:hover { background: var(--ink-hover); color: #fff; opacity: 1; }

/* 2-Column Analytics Bar Chart + Quiz Split */
.dashboard-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 18px; margin-bottom: 26px; align-items: stretch; }
.dash-panel {
  background: var(--bg-shell); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0; max-width: 100%;
}
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 10px; margin-bottom: 14px; }
.dash-head > div { min-width: 0; flex: 1 1 190px; }
.dash-head h2, .dash-head h3 { margin: 0; font-size: 1.08rem; }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 148px; padding: 12px 4px 4px; }
.bar-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-track { width: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.bar-val { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.bar-fill { width: 100%; max-width: 34px; border-radius: 10px; background: var(--bg-canvas); transition: background 0.15s ease; }
.bar-col.is-highlight .bar-fill { background: var(--peach); }
.bar-col.is-lime .bar-fill { background: var(--lime); }
.bar-lbl { font-size: 0.72rem; font-weight: 700; color: var(--ink); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 68px; }
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 10px; }
.kpi-box { min-width: 0; }
.kpi-box strong { display: block; font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.kpi-box span { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; }

/* Quiz Step Circles */
.quiz-circles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.q-circle {
  width: 34px; height: 34px; border-radius: 50%; background: var(--bg-canvas); color: var(--text-muted);
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 800;
}
.q-circle.is-active { background: var(--lime); color: var(--ink); }
.q-circle.is-done { background: var(--ink); color: #FFFFFF; }
.quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.quiz-opt {
  text-align: left; padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--bg-canvas); cursor: pointer; font-family: var(--font-body);
  font-weight: 700; font-size: 0.88rem; color: var(--ink); min-width: 0; max-width: 100%;
}
.quiz-opt:hover, .quiz-opt.is-selected { background: var(--lime-soft); border-color: var(--ink); }

/* Screen 3 Inner Layout & Colored TOC Cards */
.page-top-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.back-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: 99px; background: var(--bg-canvas); text-decoration: none;
  font-size: 0.84rem; font-weight: 700; color: var(--ink);
}
.back-pill:hover { background: var(--lime); opacity: 1; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.82rem; color: var(--text-muted); }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; font-weight: 600; }
.answer-first {
  background: var(--bg-canvas); border-radius: var(--radius-md); padding: 16px 20px;
  margin: 12px 0 16px; border: 1px solid var(--border);
}
.eeat-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  font-size: 0.84rem; color: var(--text-muted); margin-bottom: 10px;
}
.affiliate-disclosure {
  font-size: 0.79rem; color: var(--text-muted); background: var(--bg-canvas);
  border-left: 3px solid var(--ink); padding: 7px 12px; border-radius: 0 10px 10px 0;
  margin-bottom: 16px;
}

.article-shell { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 24px; align-items: start; }
.article-main { min-width: 0; max-width: 100%; }

/* 2-Column Zigzag Content + Contextual Illustration Layout (Rule #5 + AGENTS Mobile Hierarchy) */
.zigzag-row {
  display: grid;
  grid-template-columns: 54% 40%;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin: 12px 0 20px;
}
.zigzag-row.is-zigzag-reverse {
  grid-template-columns: 40% 54%;
}
.zigzag-row.is-zigzag-reverse > .zigzag-media {
  order: -1;
}
.zigzag-text {
  min-width: 0;
}
.zigzag-media {
  margin: 0;
  border-radius: var(--radius-lg);
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.zigzag-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.zigzag-caption {
  padding: 9px 13px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-shell);
  border-top: 1px solid var(--border);
}

/* Centered Commercial CTA (Strictly before H2/H3 after image or table) */
.cta-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  margin: 18px 0 26px;
}
.cta-centered-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Lesson Demo Timeline & City Pills */
.lesson-timeline[hidden] { display: none; }
.lesson-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 14px 0 22px;
}
.lesson-step {
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.lesson-step h4 {
  margin: 6px 0 4px;
  font-size: 0.96rem;
}
.lesson-step p {
  font-size: 0.84rem;
  margin: 0;
  color: var(--text-muted);
}
.city-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}
.city-pill {
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}
.city-pill:hover,
.city-pill.is-current {
  background: var(--lime);
  border-color: var(--ink);
  opacity: 1;
}

/* Silo v3 Related Links & Parent Trial Checklist */
.related-links-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 22px 0;
}
.related-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.related-link-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--bg-shell);
  border: 1px solid var(--border);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.related-link-tile:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
  opacity: 1;
}
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin: 14px 0 4px;
}
.checklist-item {
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.86rem;
}
.checklist-item strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}
.article-sidebar { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; }
.sidebar-card {
  background: var(--bg-shell); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-card);
}
.sidebar-card h3 { margin: 0 0 10px; font-size: 0.98rem; }
.toc-pastel-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.toc-pastel-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--ink);
  font-size: 0.84rem; font-weight: 700; transition: transform 0.14s ease;
}
.toc-pastel-list a:hover { transform: translateX(2px); opacity: 0.92; }
.toc-num { font-size: 0.74rem; opacity: 0.7; margin-right: 6px; }
.toc-sky { background: var(--sky); }
.toc-lime { background: var(--lime); }
.toc-lavender { background: var(--lavender); }
.toc-peach { background: var(--peach); }

/* Generic Cards, Scorecards, Tables, Pros/Cons, UGC */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 16px 0; }
.card {
  background: var(--bg-canvas); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%;
}
.card-highlight { background: var(--lime-soft); border: 1.5px solid var(--ink); }
.school-scorecard {
  background: var(--bg-shell); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-card); margin: 18px 0; min-width: 0; max-width: 100%;
}
.score-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 14px; }
.score-header > div { min-width: 0; max-width: 100%; }
.score-header .pill { max-width: 100%; white-space: normal; text-align: left; }
.score-badge {
  display: inline-flex; align-items: baseline; gap: 3px; background: var(--ink); color: var(--lime);
  padding: 8px 14px; border-radius: 14px; font-weight: 800; font-size: 1.3rem;
}
.score-badge small { color: #fff; font-size: 0.8rem; }
.score-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; margin-bottom: 14px; }
.score-row-top { display: flex; justify-content: space-between; font-size: 0.84rem; font-weight: 700; margin-bottom: 4px; }
.progress-track { height: 7px; background: var(--bg-canvas); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--ink); border-radius: 99px; }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-shell); margin: 14px 0 20px; }
.table-wrap:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
table { width: 100%; border-collapse: collapse; min-width: 600px; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
th, td { padding: 12px 13px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); line-height: 1.42; }
th:last-child, td:last-child { border-right: none; }
th { background: var(--bg-canvas); color: var(--ink); font-weight: 800; line-height: 1.3; }
tbody tr:nth-child(even) { background: rgba(245, 246, 248, 0.5); }
tbody tr:hover { background: var(--sky-soft); }
tr:last-child td { border-bottom: none; }
.cell-school, .cell-price { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.cell-school-head { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.cell-sub { font-size: 0.79rem; color: var(--text-muted); line-height: 1.32; }
.table-actions { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 128px; }
.table-actions .btn { width: 100%; white-space: nowrap; justify-content: center; text-align: center; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; background: var(--bg-canvas); padding: 12px 14px; border-radius: var(--radius-md); margin: 14px 0 10px; }
.filter-bar label { font-size: 0.82rem; font-weight: 700; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.filter-bar select, .calc-grid select {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-shell); font-family: var(--font-body); font-size: 0.88rem; color: var(--ink);
}
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.calc-result { background: var(--sky-soft); border-radius: var(--radius-md); padding: 14px; }
.widget-panel { background: var(--bg-shell); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-card); min-width: 0; max-width: 100%; }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.pros-box { background: var(--lime-soft); border-radius: var(--radius-md); padding: 18px; }
.cons-box { background: var(--peach-soft); border-radius: var(--radius-md); padding: 18px; }
.ugc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0; }
.ugc-card { background: var(--bg-canvas); border-radius: var(--radius-md); padding: 16px; }
.ugc-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; }

/* Flashcards */
.fc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.fc-tab { padding: 8px 14px; border-radius: 99px; border: none; background: var(--bg-canvas); cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; }
.fc-tab.is-active { background: var(--ink); color: #fff; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 12px; }
.fc-card {
  background: var(--sky-soft); border: 1.5px solid var(--border); border-radius: var(--radius-md);
  padding: 15px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; min-height: 155px;
}
.fc-card.is-flipped { background: var(--lime-soft); border-color: var(--ink); }
.fc-word { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.fc-phonetic { font-size: 0.82rem; color: var(--text-muted); }
.fc-ua { font-size: 1rem; font-weight: 800; color: var(--ink); margin-top: 6px; }
.fc-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.fc-speak { background: #fff; border: 1px solid var(--border); border-radius: 99px; padding: 4px 10px; font-size: 0.78rem; font-weight: 700; cursor: pointer; }

/* CTA Banner */
.cta-banner {
  background: var(--ink); color: #FFFFFF; border-radius: var(--radius-lg);
  padding: 22px 24px; margin: 24px 0; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 16px;
}
.cta-banner h3, .cta-banner p { color: #FFFFFF; margin: 0 0 4px; }
.cta-banner p { opacity: 0.86; font-size: 0.9rem; }

/* Mandatory FAQ Accordion */
.faq { margin: 24px 0; }
.faq--list { display: flex; flex-direction: column; gap: 10px; }
.faq--item { background: var(--bg-canvas); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.faq--item[open] { background: var(--bg-shell); border-color: var(--ink); }
.faq--title {
  list-style: none; cursor: pointer; padding: 15px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-weight: 700; font-size: 0.98rem; color: var(--ink);
}
.faq--title::-webkit-details-marker { display: none; }
.faq--chevron { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.2s ease; }
.faq--item[open] .faq--chevron { transform: rotate(180deg); }
.faq--text { padding: 0 18px 15px; border-top: 1px solid var(--border); }
.faq--text p { margin: 11px 0 0; }

/* Footer inside Workspace */
.site-footer { border-top: 1px solid var(--border); padding: 26px 26px 24px; background: var(--bg-canvas); border-radius: 0 0 var(--radius-shell) 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 22px; }
.site-footer h4 { font-size: 0.94rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; font-size: 0.84rem; }
.site-footer a { color: var(--text-muted); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 14px; font-size: 0.8rem; color: var(--text-muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* Responsive */
@media (max-width: 1120px) {
  .elevate-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-split, .article-shell { grid-template-columns: minmax(0, 1fr); }
  .article-sidebar { position: static; }
}
@media (max-width: 960px) {
  .app-frame { padding: 8px; }
  .app-shell { grid-template-columns: minmax(0, 1fr); border-radius: 18px; }
  .nav-toggle { display: inline-flex; }
  .app-sidebar {
    display: none; position: fixed; left: 12px; top: 12px; bottom: 12px; width: 270px;
    z-index: 200; border-radius: 20px; box-shadow: var(--shadow-shell); overflow-y: auto;
  }
  .app-sidebar.is-open { display: flex; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar-left { min-width: 0; }
  .workspace-body { padding: 18px 14px 28px; }
  .topbar-right .meta-chip,
  .topbar-right .lang-switch { display: none; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
  .zigzag-row,
  .zigzag-row.is-zigzag-reverse {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .zigzag-row > .zigzag-media,
  .zigzag-row.is-zigzag-reverse > .zigzag-media {
    order: -1;
    width: 100%;
    max-width: 520px;
  }
}
@media (max-width: 620px) {
  .workspace-body { padding: 14px 12px 24px; }
  .topbar-right .btn { font-size: 0.82rem; padding: 8px 12px; min-height: 40px; white-space: nowrap; }
  .nav-toggle { padding: 8px 12px; font-size: 0.86rem; min-height: 44px; }
  .lang-link { min-width: 40px; min-height: 40px; }
  .dash-panel, .widget-panel, .school-scorecard { padding: 16px 14px; }
  .elevate-cards-grid, .pros-cons, .quiz-options, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-chart { display: flex; flex-direction: column; align-items: stretch; gap: 8px; height: auto; padding: 6px 0 4px; }
  .bar-col { display: grid; grid-template-columns: 82px minmax(0, 1fr) 48px; align-items: center; gap: 8px; height: auto; }
  .bar-lbl { order: 1; text-align: left; max-width: none; font-size: 0.8rem; }
  .bar-track { order: 2; height: 14px; background: var(--bg-canvas); border-radius: 99px; overflow: hidden; align-items: stretch; justify-content: flex-start; }
  .bar-fill { width: var(--pct, 50%); height: 100% !important; max-width: none; border-radius: 99px; background: var(--sky); }
  .bar-col.is-highlight .bar-fill { background: var(--peach); }
  .bar-col.is-lime .bar-fill { background: var(--lime); }
  .bar-val { order: 3; text-align: right; font-size: 0.8rem; color: var(--ink); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: #fff; }
  .app-frame { padding: 0; }
  .app-shell { display: block; box-shadow: none; border: none; }
  .app-sidebar, .topbar, .site-footer, .article-sidebar, .cta-banner, .cta-centered, .faq, .page-top-nav, .eeat-bar, .fc-tabs, .related-links-card, .no-print { display: none !important; }
  .fc-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .fc-card { border: 1.5px dashed #333; break-inside: avoid; page-break-inside: avoid; }
  .fc-ua, .fc-example { display: block !important; }
  .checklist-item { break-inside: avoid; page-break-inside: avoid; border: 1px solid #999; }
}
