/* Shared stylesheet for tutoring-online.mn645680.workers.dev
   Design tokens and base components mirror the homepage (index.html) inline
   styles, so /homework, /materials and /materials/vocabulary match it exactly.
   The homepage itself keeps its own inline <style> untouched. */

:root {
  color-scheme: light dark;
  --paper: #F3F6FB;
  --surface: #FFFFFF;
  --surface-2: #EAEFF8;
  --ink: #1C2438;
  --muted: #5B6478;
  --accent: #2E4C8C;
  --accent-ink: #ffffff;
  --accent-2: #C98A3E;
  --border: rgba(28, 36, 56, 0.12);
  --shadow: 0 18px 40px -22px rgba(28, 36, 56, 0.35);
  --danger: #B3423C;
  --danger-bg: rgba(179, 66, 60, 0.1);

  /* modular type scale — 1rem base (17px), ratio 1.125 */
  --text-xs: 0.79rem;
  --text-sm: 0.889rem;
  --text-md: 1.125rem;
  --text-lg: 1.266rem;
  --text-xl: 1.424rem;
  --text-2xl: 1.602rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #11162A;
    --surface: #1A2038;
    --surface-2: #212945;
    --ink: #E9ECF5;
    --muted: #9BA3BC;
    --accent: #7FA0E0;
    --accent-ink: #0E1424;
    --accent-2: #E3B268;
    --border: rgba(233, 236, 245, 0.14);
    --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.6);
    --danger: #E28A85;
    --danger-bg: rgba(226, 138, 133, 0.14);
  }
}

:root[data-theme="dark"] {
  --paper: #11162A;
  --surface: #1A2038;
  --surface-2: #212945;
  --ink: #E9ECF5;
  --muted: #9BA3BC;
  --accent: #7FA0E0;
  --accent-ink: #0E1424;
  --accent-2: #E3B268;
  --border: rgba(233, 236, 245, 0.14);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.6);
  --danger: #E28A85;
  --danger-bg: rgba(226, 138, 133, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Golos Text", "Segoe UI", -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Unbounded", "Golos Text", sans-serif; text-wrap: balance; margin: 0; line-height: 1.15; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 0.9rem; }
.brand { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 1rem; letter-spacing: 0.01em; text-decoration: none; }
.topbar-right { display: flex; align-items: center; gap: clamp(1rem, 3vw, 1.75rem); }

/* ---------- shared navigation (mobile <details> disclosure + desktop row) ---------- */
.site-nav { display: flex; }
.nav-disclosure { position: relative; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; list-style: none;
  font-family: "Golos Text", "Segoe UI", sans-serif; font-size: 0.85rem; font-weight: 600;
  color: var(--muted); padding: 0.4rem 0.75rem; border: 1px solid var(--border);
  border-radius: 999px; user-select: none; white-space: nowrap;
}
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle::marker { content: ""; }
.nav-toggle:hover { color: var(--ink); }
.nav-disclosure[open] .nav-toggle { color: var(--ink); border-color: var(--accent); }

.nav-links { list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color 0.15s ease; display: block; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* --- mobile (< 640px): links hidden until the disclosure is opened --- */
.nav-disclosure .nav-links { display: none; }
.nav-disclosure[open] .nav-links {
  display: grid; gap: 0.15rem;
  position: absolute; right: 0; top: calc(100% + 0.6rem); min-width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 0.6rem; box-shadow: var(--shadow); z-index: 30;
}
.nav-disclosure[open] .nav-links a { padding: 0.55rem 0.65rem; border-radius: 8px; font-size: 0.95rem; }
.nav-disclosure[open] .nav-links a:hover { background: var(--surface-2); }

/* --- bare <ul class="nav-links"> (static /materials/vocabulary/* pages) --- */
.nav-links { display: none; }
@media (min-width: 640px) {
  .nav-links { display: flex; gap: clamp(1rem, 3vw, 1.75rem); font-size: 0.9rem; }
}

/* --- desktop (>= 640px): always show the row, drop the toggle --- */
@media (min-width: 640px) {
  .nav-toggle { display: none; }
  .nav-disclosure::details-content { content-visibility: visible; display: contents; } /* modern browsers */
  .nav-disclosure .nav-links,
  .nav-disclosure[open] .nav-links {
    display: flex; position: static; min-width: 0;
    background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none;
    gap: clamp(1rem, 3vw, 1.75rem); font-size: 0.9rem;
  }
  .nav-disclosure .nav-links a { padding: 0; border-radius: 4px; font-size: inherit; }
}

.eyebrow {
  display: inline-block; font-family: "Golos Text", sans-serif; font-weight: 600;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.9rem;
}

section { padding-block: clamp(3rem, 7vw, 5rem); }
section + section { border-top: 1px solid var(--border); }
.lede { color: var(--muted); font-size: var(--text-md); max-width: 60ch; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; font-family: "Golos Text", sans-serif;
  font-weight: 600; font-size: 0.95rem; padding: 0.85rem 1.5rem; border-radius: 999px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: 0 22px 44px -20px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: var(--text-sm); }
.btn-danger { background: transparent; border-color: var(--border); color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }

/* ---------- page header ---------- */
.page-hero { padding-top: clamp(2.5rem, 7vw, 4rem); padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.page-hero h1 { font-size: clamp(1.9rem, 3.4vw + 1rem, 2.75rem); font-weight: 800; max-width: 22ch; }
.page-hero .lede { margin-top: 0.9rem; }

/* ---------- topic / file lists ---------- */
.block-group + .block-group { margin-top: 2.25rem; }
.block-heading {
  font-size: var(--text-md); font-weight: 600; margin-bottom: 1rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.file-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.file-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.file-card:focus-within { border-color: var(--accent); outline: 2px solid var(--accent-2); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .file-card:hover { transform: none; } }
.file-card-main { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.file-num {
  font-family: "Unbounded", sans-serif; font-weight: 600; font-size: var(--text-xs);
  color: var(--accent); background: var(--surface-2); border-radius: 8px;
  padding: 0.35rem 0.55rem; flex-shrink: 0;
}
.file-title { font-weight: 600; }
.file-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- login ---------- */
.login-wrap { display: flex; justify-content: center; padding-block: clamp(3rem, 10vw, 6rem); }
.login-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: clamp(2rem, 5vw, 2.75rem); width: 100%; max-width: 380px; box-shadow: var(--shadow);
}
.login-card h1 { font-size: var(--text-2xl); font-weight: 700; margin-bottom: 0.4rem; }
.login-card .lede { font-size: var(--text-sm); margin-bottom: 1.75rem; }
.field { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }
.field label { font-size: var(--text-sm); font-weight: 600; color: var(--muted); }
.field input {
  font: inherit; padding: 0.75rem 0.9rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--paper); color: var(--ink); width: 100%;
}
.field input:focus { border-color: var(--accent); outline: none; }
.login-error {
  background: var(--danger-bg); color: var(--danger); border-radius: 10px;
  padding: 0.75rem 1rem; font-size: 0.9rem; margin-bottom: 1.1rem;
}
.login-submit { width: 100%; justify-content: center; margin-top: 0.4rem; }

/* ---------- materials dashboard ---------- */
.dash-topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* ---------- vocabulary pages ---------- */
.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 2rem; }
.vocab-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem 1.4rem; }
.vocab-pos {
  display: inline-block; font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 0.68rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent);
  border-radius: 999px; padding: 0.2rem 0.55rem; margin-bottom: 0.6rem;
}
.vocab-word { font-size: var(--text-lg); font-weight: 700; margin-bottom: 0.35rem; }
.vocab-meaning { color: var(--muted); font-size: var(--text-sm); margin-bottom: 0.45rem; }
.vocab-example { font-size: var(--text-sm); font-style: italic; color: var(--ink); opacity: 0.85; }
.vocab-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; }

/* ---------- language switcher (shared with homepage) ---------- */
.lang-switch {
  display: flex; gap: 0.3rem; border: 1px solid var(--border); border-radius: 999px;
  padding: 0.2rem; background: var(--surface);
}
.lang-switch button {
  font-family: "Golos Text", sans-serif; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.3rem 0.65rem; border-radius: 999px; border: none; background: transparent;
  color: var(--muted); cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- vocabulary flip cards ---------- */
.flashcard-hint { color: var(--muted); font-size: var(--text-sm); margin: 0.75rem 0 0; }
.flashcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; margin-top: 1.5rem; }
.flashcard { perspective: 1400px; height: 220px; }
.flashcard-inner {
  position: relative; width: 100%; height: 100%; text-align: center; cursor: pointer;
  transition: transform 0.5s cubic-bezier(.4,.2,.2,1); transform-style: preserve-3d;
}
.flashcard.is-flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 16px; border: 1px solid var(--border); padding: 1.25rem 1.4rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
}
.flashcard-front { background: var(--surface); box-shadow: var(--shadow); }
.flashcard-back { background: var(--surface-2); transform: rotateY(180deg); text-align: left; align-items: stretch; justify-content: center; gap: 0.45rem; padding-bottom: 2rem; }
.flashcard-word { font-family: "Unbounded", sans-serif; font-size: var(--text-lg); font-weight: 700; }
.flashcard-tap { font-size: var(--text-xs); color: var(--muted); }
.flashcard-back .vocab-pos { align-self: flex-start; }
.flashcard-back .vocab-meaning { margin: 0; }
.flashcard-back .vocab-example { margin: 0; }
.flashcard-translation { font-weight: 700; color: var(--accent); font-size: var(--text-md); }
/* persistent "flip" affordance on the back face */
.flashcard-flip-icon {
  position: absolute; right: 0.9rem; bottom: 0.7rem;
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: var(--text-xs); color: var(--muted); line-height: 1;
}
.flashcard-flip-icon::before { content: "\21BB"; font-size: 1em; }

/* ---------- materials slide viewer ---------- */
.mviewer-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.mviewer-progress { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.mviewer-editnote { font-size: 0.85rem; color: var(--muted); margin: 0.5rem 0 1.5rem; }
.mviewer-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.mviewer-jump { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.mviewer-jump select { font: inherit; padding: 0.4rem 0.6rem; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); }

/* ---------- slide canvas: mirrors the actual .pptx template (fixed palette,
   deliberately NOT theme-reactive - a slide looks the same in light or dark
   site mode, same as an embedded PDF/PPT preview would) ---------- */
.mslide-stage { background: var(--surface-2); border-radius: 20px; padding: clamp(1rem, 3vw, 2.25rem); }
.mslide-canvas { container-type: inline-size; max-width: 960px; margin: 0 auto; }
.pslide {
  position: relative; aspect-ratio: 13.333 / 7.5; width: 100%; overflow: hidden;
  background: #C7CCDC; border-radius: 14px; box-shadow: 0 25px 55px -20px rgba(10, 12, 30, 0.55), 0 0 0 1px rgba(10, 12, 30, 0.08);
  display: flex; flex-direction: column; padding: 4.6cqw 4.7cqw 3.6cqw;
  font-family: Calibri, "Segoe UI", Roboto, Arial, sans-serif; color: #1a1a1a;
}
.pslide * { box-sizing: border-box; }
.pslide-page-n {
  position: absolute; right: 3.2cqw; bottom: 2.6cqw; font-family: Calibri, sans-serif;
  font-size: 1.5cqw; color: #000;
}
.pslide-kicker {
  font-family: Calibri, sans-serif; font-weight: 700; font-size: 1.75cqw; letter-spacing: 0.12em;
  color: #44546A; text-transform: uppercase; margin: 0 0 1.2cqw;
}
.pslide-title {
  font-family: Arial, Helvetica, sans-serif; font-weight: 800; text-transform: uppercase;
  color: #000; font-size: 4.6cqw; line-height: 1.18; margin: 0; outline: none; border-radius: 0.4cqw;
}
.pslide-subtitle {
  font-family: "Times New Roman", Georgia, serif; font-style: italic; color: #000;
  font-size: 2.35cqw; margin: 0.9cqw 0 0; outline: none; border-radius: 0.4cqw;
}
.pslide--divider .pslide-title, .pslide--divider .pslide-subtitle { text-align: center; }
.pslide--title .pslide-title, .pslide--title .pslide-subtitle { text-align: left; }
[contenteditable="true"] { cursor: text; transition: background 0.15s ease, box-shadow 0.15s ease; }
[contenteditable="true"]:hover { background: rgba(0, 0, 0, 0.05); }
[contenteditable="true"]:focus { background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 2px #4C6FE0 inset; }

/* accent-colored circular badge (number / icon) used across several types */
.pslide-badge-circle {
  flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: Arial, sans-serif; font-weight: 800;
}

/* dark callout box (tip / footer / thanks) */
.pslide-tip {
  background: #16171C; color: #fff; border-radius: 1cqw; font-family: Calibri, sans-serif;
  font-weight: 700; font-size: 1.85cqw; padding: 1.4cqw 1.8cqw; margin-top: auto; outline: none;
}

/* ---- title slide ---- */
.pslide--title .pslide-body { display: flex; flex-direction: column; height: 100%; }
.pslide-badges { display: flex; gap: 1.6cqw; margin-top: auto; }
.pslide-badge-card {
  flex: 1; background: #E4E7EF; border-radius: 1cqw; padding: 1.6cqw 1.3cqw; display: flex; flex-direction: column; gap: 1cqw;
}
.pslide-badge-card .pslide-badge-circle { width: 5.2cqw; height: 5.2cqw; font-size: 1.7cqw; }
.pslide-badge-card .pslide-badge-label { font-family: Calibri, sans-serif; font-weight: 700; font-size: 1.85cqw; color: #000; outline: none; border-radius: 0.4cqw; }
.pslide-author { font-family: Calibri, sans-serif; font-weight: 700; font-size: 1.7cqw; color: #44546A; margin-top: 1.6cqw; outline: none; border-radius: 0.4cqw; }

/* ---- divider slide ---- */
.pslide--divider { justify-content: center; align-items: center; text-align: center; }
.pslide-divider-badge {
  display: inline-block; padding: 0.9cqw 1.8cqw; border-radius: 999px; color: #fff;
  font-family: Arial, sans-serif; font-weight: 800; font-size: 1.7cqw; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 1.6cqw; outline: none;
}
.pslide--divider .pslide-title { font-size: 4.1cqw; }
.pslide--divider .pslide-subtitle { font-size: 2.15cqw; max-width: 76%; margin-inline: auto; }
.pslide-divider-dots { display: flex; gap: 0.8cqw; justify-content: center; margin-top: 2cqw; }
.pslide-divider-dots span { width: 1cqw; height: 1cqw; border-radius: 50%; background: #4C6FE0; }
.pslide-divider-dots span:last-child { background: #9BA1B8; }

/* ---- agenda / summary / your-turn: full-width rows ---- */
.pslide-rows { display: flex; flex-direction: column; gap: 1.1cqw; margin-top: 1.6cqw; flex: 1; overflow: auto; }
.pslide-row {
  background: #E4E7EF; border-radius: 1cqw; display: flex; align-items: center; gap: 1.5cqw; padding: 1.2cqw 1.6cqw;
}
.pslide--agenda .pslide-row .pslide-badge-circle,
.pslide--summary .pslide-row .pslide-badge-circle { width: 4.8cqw; height: 4.8cqw; font-size: 1.5cqw; }
.pslide--yourturn .pslide-row .pslide-badge-circle { width: 3.6cqw; height: 3.6cqw; font-size: 1.4cqw; }
.pslide-row-body { flex: 1; min-width: 0; }
.pslide-row-title { font-family: Calibri, sans-serif; font-weight: 700; font-size: 1.95cqw; color: #000; outline: none; border-radius: 0.4cqw; }
.pslide-row-desc { font-family: Calibri, sans-serif; font-style: italic; font-size: 1.5cqw; color: #44546A; margin-top: 0.3cqw; outline: none; border-radius: 0.4cqw; }
.pslide-row-desc.gray { font-style: normal; color: #333333; }
.pslide-row-text { font-family: Calibri, sans-serif; font-weight: 700; font-size: 1.85cqw; color: #000; outline: none; border-radius: 0.4cqw; }
.pslide-thanks {
  align-self: center; margin-top: 1.6cqw; background: #16171C; color: #fff; border-radius: 999px;
  padding: 0.9cqw 2.2cqw; font-family: Calibri, sans-serif; font-weight: 700; font-size: 1.85cqw; outline: none;
}

/* ---- content / practice: numbered rows with circle outside the card ---- */
.pslide-numlist { display: flex; flex-direction: column; gap: 0.9cqw; margin-top: 1.6cqw; flex: 1; overflow: auto; }
.pslide-numrow { display: flex; align-items: flex-start; gap: 1.1cqw; }
.pslide-numrow .pslide-badge-circle { width: 2.2cqw; height: 2.2cqw; font-size: 1.15cqw; margin-top: 0.35cqw; }
.pslide-numrow .pslide-row { flex: 1; }
.pslide--practice .pslide-numrow .pslide-row { align-items: center; }
.pslide--practice .pslide-row-text { font-size: 1.85cqw; }

/* ---- comparison: two columns ---- */
.pslide-columns { display: flex; gap: 1.6cqw; margin-top: 1.6cqw; flex: 1; min-height: 0; }
.pslide-column { flex: 1; background: #E4E7EF; border-radius: 0.9cqw; padding: 1.5cqw; display: flex; flex-direction: column; gap: 0.85cqw; overflow: auto; }
.pslide-column-label {
  align-self: flex-start; color: #fff; font-family: Arial, sans-serif; font-weight: 800; font-size: 1.35cqw;
  text-transform: uppercase; border-radius: 999px; padding: 0.55cqw 1.2cqw; margin-bottom: 0.4cqw;
}
.pslide-column-row { font-family: Calibri, sans-serif; font-size: 1.65cqw; color: #000; font-weight: 700; outline: none; border-radius: 0.4cqw; }
.pslide-column-row.arrow { font-weight: 400; font-style: italic; color: #333; }

/* ---- vocabulary: 2-column card grid ---- */
.pslide-vocab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85cqw 1.6cqw; margin-top: 1.6cqw; flex: 1; }
.pslide-vocab-card { background: #E4E7EF; border-radius: 0.9cqw; padding: 1cqw 1.2cqw; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5cqw 1cqw; }
.pslide-vocab-pos {
  color: #fff; font-family: Arial, sans-serif; font-weight: 800; font-size: 1.15cqw; border-radius: 0.4cqw;
  padding: 0.35cqw 0.7cqw; line-height: 1;
}
.pslide-vocab-word { font-family: Calibri, sans-serif; font-weight: 700; font-size: 1.85cqw; color: #000; outline: none; border-radius: 0.4cqw; }
.pslide-vocab-meaning { flex-basis: 100%; font-family: Calibri, sans-serif; font-style: italic; font-size: 1.35cqw; color: #44546A; outline: none; border-radius: 0.4cqw; }

@media (max-width: 640px) {
  .pslide { padding: 5.4cqw 5.6cqw 4.6cqw; }
  .pslide-title { font-size: 6.4cqw; }
  .pslide-subtitle { font-size: 3.3cqw; }
  .pslide-vocab-grid { grid-template-columns: 1fr; }
  .pslide-columns { flex-direction: column; }
  .pslide-row-title, .pslide-row-text { font-size: 2.7cqw; }
  .pslide-row-desc, .pslide-vocab-meaning { font-size: 2.2cqw; }
  .pslide-vocab-word { font-size: 2.6cqw; }
  .pslide-tip { font-size: 2.6cqw; }
}

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

footer { padding-block: 2.25rem; border-top: 1px solid var(--border); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; color: var(--muted); font-size: var(--text-sm); }

/* ---------- dark mode: subtle 1px top highlight on cards ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .file-card,
  :root:not([data-theme="light"]) .vocab-card,
  :root:not([data-theme="light"]) .flashcard-front,
  :root:not([data-theme="light"]) .login-card {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }
  :root:not([data-theme="light"]) .flashcard-front { box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
  :root:not([data-theme="light"]) .login-card { box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
}
:root[data-theme="dark"] .file-card,
:root[data-theme="dark"] .vocab-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
:root[data-theme="dark"] .flashcard-front { box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
:root[data-theme="dark"] .login-card { box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
footer a { text-decoration: none; color: var(--muted); }
footer a:hover { color: var(--ink); }
