/* =============================================
   AUSSIE MONEY SURVIVAL — SHARED STYLES
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg:          #f5f8fc;
  --surface:     #ffffff;
  --surface2:    #334155;
  --surface3:    #dce6f1;
  --border:      #d3dcea;
  --border2:     #bccadd;
  --accent:      #3b82f6;
  --accent2:     #60a5fa;
  --accent3:     #93c5fd;
  --green:       #10b981;
  --green2:      #34d399;
  --red:         #ef4444;
  --red2:        #f87171;
  --amber:       #f59e0b;
  --amber2:      #fbbf24;
  --purple:      #8b5cf6;
  --text:        #16253d;
  --text2:       #435466;
  --text3:       #6b7c8f;
  --mono:        'Space Mono', monospace;
  --sans:        'DM Sans', sans-serif;
  --radius:      14px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --shadow:      0 8px 24px rgba(16,24,40,.08);
  --shadow-lg:   0 16px 40px rgba(16,24,40,.12);
  --glow:        0 0 24px rgba(59,130,246,.25);
  --transition:  0.2s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p  { color: var(--text2); font-size: .95rem; }

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--surface3);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── LAYOUT ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── NAV ── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}

.nav-logo .flag { font-size: 1.3rem; }

.nav-badge {
  font-family: var(--mono);
  font-size: .7rem;
  padding: 3px 9px;
  border-radius: 99px;
  font-weight: 700;
  letter-spacing: .05em;
}
.badge-student { background: rgba(59,130,246,.2); color: var(--accent2); border: 1px solid rgba(59,130,246,.3); }
.badge-teacher { background: rgba(139,92,246,.2); color: #c4b5fd; border: 1px solid rgba(139,92,246,.3); }

.nav-links {
  display: flex;
  gap: .5rem;
  list-style: none;
}

.nav-links a {
  font-size: .85rem;
  padding: .4rem .8rem;
  border-radius: var(--radius-sm);
  color: var(--text2);
  transition: var(--transition);
}
.nav-links a:hover { background: var(--surface2); color: var(--text); text-decoration: none; }

/* ── CARDS ── */
.card {
  background: white;
  border: 1px solid #dbe6f2;
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
}
.card:hover { border-color: var(--border2); }
.card-accent { border-color: rgba(59,130,246,.4); box-shadow: var(--glow); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

.card-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.card-icon.blue  { background: rgba(59,130,246,.15); }
.card-icon.green { background: rgba(16,185,129,.15); }
.card-icon.red   { background: rgba(239,68,68,.15); }
.card-icon.amber { background: rgba(245,158,11,.15); }
.card-icon.purple{ background: rgba(139,92,246,.15); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 600;
  padding: .55rem 1.2rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: var(--glow); }
.btn-secondary { background: #334155; color: #ffffff; border: none; }
.btn-secondary:hover { background: #1e293b; color: #ffffff; transform:translateY(-2px);border-color: var(--border2); }
.btn-danger { background: rgba(239,68,68,.15); color: var(--red2); border: 1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-success { background: rgba(16,185,129,.15); color: var(--green2); border: 1px solid rgba(16,185,129,.3); }
.btn-success:hover { background: rgba(16,185,129,.25); }
.btn-warning { background: rgba(245,158,11,.15); color: var(--amber2); border: 1px solid rgba(245,158,11,.3); }
.btn-warning:hover { background: rgba(245,158,11,.25); }
.btn-sm { font-size: .8rem; padding: .35rem .8rem; }
.btn-lg { font-size: 1rem; padding: .75rem 1.6rem; border-radius: var(--radius); }
.btn-full { width: 100%; justify-content: center; }

/* ── FORM ELEMENTS ── */
input[type="number"],
input[type="text"],
input[type="range"],
select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--sans);
  font-size: .9rem;
  padding: .5rem .8rem;
  transition: var(--transition);
  outline: none;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }

/* ── PROGRESS BARS ── */
.progress-wrap {
  background: var(--surface2);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 99px;
  transition: width .5s ease;
}
.progress-bar.blue  { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.progress-bar.green { background: linear-gradient(90deg, var(--green), var(--green2)); }
.progress-bar.red   { background: linear-gradient(90deg, #dc2626, var(--red2)); }
.progress-bar.amber { background: linear-gradient(90deg, #d97706, var(--amber2)); }

/* ── STAT NUMBERS ── */
.stat-big {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.stat-label { font-size: .78rem; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
.stat-change {
  font-size: .78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.stat-change.up { color: var(--green2); }
.stat-change.down { color: var(--red2); }

/* ── TAGS / PILLS ── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.tag-blue   { background: rgba(59,130,246,.15);  color: var(--accent3); }
.tag-green  { background: rgba(16,185,129,.15);  color: var(--green2); }
.tag-red    { background: rgba(239,68,68,.15);   color: var(--red2); }
.tag-amber  { background: rgba(245,158,11,.15);  color: var(--amber2); }
.tag-purple { background: rgba(139,92,246,.15);  color: #c4b5fd; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap::-webkit-scrollbar { height: 4px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  min-width: 600px;
}
thead th {
  padding: .7rem .9rem;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text3);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: .85rem .9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text2);
}
tbody tr:hover td { background: rgba(255,255,255,.02); }
tbody tr:last-child td { border-bottom: none; }
td strong { color: var(--text); font-weight: 600; }

/* ── DETAILS / HINTS ── */
details {
  background:  #f7fbff;
  border: 1px solid #d7e7ff;
  border-radius: 18px;
  overflow: hidden;
  margin-top: 18px;
  transition: .25s;
}

summary {
  padding: 18px 22px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: #2563eb;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
summary:hover{
  background: #f2f8ff;
}

summary::before { content: '▶️'; font-size: 1rem; transition: transform .2s; }
details[open] summary::before { background: #eef6ff; box-shadow: 0 8px 24px rgba(31,99,235,.08);transform: rotate(90deg); }
.details-body { padding: .7rem .9rem; border-top: 1px solid var(--border); }
.details-body p { font-size: .85rem; margin-bottom: .4rem; }
.details-body ul { padding-left: 1.2rem; }
.details-body li { font-size: .85rem; color: var(--text2); margin-bottom: .3rem; }

/* ── NOTIFICATIONS / ALERTS ── */
.alert {
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: .75rem;
}
.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.alert-blue   { background: rgba(59,130,246,.1);  border: 1px solid rgba(59,130,246,.25);  color: var(--accent3); }
.alert-green  { background: rgba(16,185,129,.1);  border: 1px solid rgba(16,185,129,.25);  color: var(--green2); }
.alert-red    { background: rgba(239,68,68,.1);   border: 1px solid rgba(239,68,68,.25);   color: var(--red2); }
.alert-amber  { background: rgba(245,158,11,.1);  border: 1px solid rgba(245,158,11,.25);  color: var(--amber2); }

/* ── SECTION HEADERS ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-head h2 { display: flex; align-items: center; gap: .5rem; }
.section-num {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--text3);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
}

section { margin-bottom: 2.5rem; }

/* ── POPUP / TOAST ── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: .6rem;
  max-width: 360px;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  animation: toastIn .3s ease forwards;
  font-size: .875rem;
}
.toast.removing { animation: toastOut .3s ease forwards; }
.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-msg { color: var(--text); flex: 1; }
.toast-msg small { display: block; color: var(--text3); font-size: .78rem; margin-top: 2px; }
.toast-close { color: var(--text3); cursor: pointer; font-size: .9rem; padding: 2px; }
.toast-close:hover { color: var(--text); }
.toast.toast-red    { border-color: rgba(239,68,68,.4);  }
.toast.toast-green  { border-color: rgba(16,185,129,.4); }
.toast.toast-amber  { border-color: rgba(245,158,11,.4); }
.toast.toast-blue   { border-color: rgba(59,130,246,.4); }

@keyframes toastIn  { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform: translateY(0); } }
@keyframes toastOut { from { opacity:1; transform: translateY(0); } to { opacity:0; transform: translateY(12px); } }

/* ── STRESS METER ── */
.stress-meter { display: flex; align-items: center; gap: .75rem; }
.stress-orbs { display: flex; gap: 4px; }
.orb {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--surface3);
  transition: background .3s;
}
.orb.active.low    { background: var(--green2); box-shadow: 0 0 6px var(--green); }
.orb.active.mid    { background: var(--amber2); box-shadow: 0 0 6px var(--amber); }
.orb.active.high   { background: var(--red2);   box-shadow: 0 0 6px var(--red);   }

/* ── SLANG CHIP ── */
.slang-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.slang-chip {
  font-family: var(--mono);
  font-size: .72rem;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--text2);
  cursor: default;
  transition: var(--transition);
}
.slang-chip:hover { border-color: var(--accent); color: var(--accent2); }

/* ── MONEY ANIMATION ── */
.money-pop {
  position: fixed;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  pointer-events: none;
  animation: moneyFloat 1.4s ease forwards;
  z-index: 9998;
}
.money-pop.gain { color: var(--green2); }
.money-pop.loss { color: var(--red2); }
@keyframes moneyFloat {
  0%   { opacity:1; transform: translateY(0) scale(1); }
  100% { opacity:0; transform: translateY(-60px) scale(.85); }
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform .3s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.modal-close { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; color: var(--text2); cursor: pointer; padding: 4px 8px; font-size: 1rem; }
.modal-close:hover { color: var(--text); }

/* ── SCORE BADGE ── */
.score-display {
  font-family: var(--mono);
  font-size: .9rem;
  font-weight: 700;
  padding: .4rem .9rem;
  border-radius: 99px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--accent2);
}

/* ── WEEK INDICATOR ── */
.week-pills { display: flex; gap: .5rem; flex-wrap: wrap; }
.week-pill {
  font-size: .75rem;
  font-weight: 700;
  padding: .35rem .8rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--mono);
}
.week-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.week-pill.done   { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); color: var(--green2); }
.week-pill:hover:not(.active) { border-color: var(--border2); background: var(--surface2); }

/* ── HERO BANNER ── */
.hero {
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,246,.08), transparent);
  pointer-events: none;
}
.hero-subtitle { color: var(--text2); max-width: 580px; margin: .75rem auto 1.5rem; font-size: 1rem; }

/* ── EMERGENCY BANNER ── */
.emergency-banner {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: pulse-border 2s infinite;
}
@keyframes pulse-border {
  0%,100% { border-color: rgba(239,68,68,.3); }
  50%      { border-color: rgba(239,68,68,.7); }
}
.emergency-icon { font-size: 1.8rem; flex-shrink: 0; }
.emergency-title { font-weight: 700; color: var(--red2); font-size: 1rem; }
.emergency-desc  { color: var(--text2); font-size: .875rem; margin-top: 2px; }

/* ── TEACHER SPECIFIC ── */
.secret-badge {
  background: rgba(139,92,246,.15);
  border: 1px dashed rgba(139,92,246,.5);
  border-radius: var(--radius-sm);
  padding: .5rem .8rem;
  font-size: .8rem;
  color: #c4b5fd;
  font-style: italic;
}

.trap-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--red2);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.script-box {
  background: var(--surface2);
  border-left: 3px solid var(--purple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .75rem 1rem;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--text2);
  line-height: 1.7;
  margin: .5rem 0;
}
.script-box .speaker { color: var(--accent2); font-weight: 700; }
.script-box .emphasis { color: var(--amber2); font-style: italic; }
.script-box .trap { color: var(--red2); }

.difficulty-dots { display: inline-flex; gap: 3px; align-items: center; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--surface3); }
.dot.filled.easy   { background: var(--green2); }
.dot.filled.medium { background: var(--amber2); }
.dot.filled.hard   { background: var(--red2); }

/* ── MINIGAME ── */
.minigame-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}
.minigame-card h3 { margin-bottom: .5rem; }
.minigame-card p  { margin-bottom: 1rem; }

/* ── TIMER ── */
.timer-display {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: .05em;
}
.timer-display.urgent { color: var(--red2); animation: blink .7s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .hero { padding: 2rem 1rem 1.5rem; }
  .topnav { padding: .7rem 1rem; }
  .card { padding: 1rem; }
  .btn-lg { width: 100%; justify-content: center; }
  table { font-size: .8rem; }
  thead th, tbody td { padding: .6rem .7rem; }
}

  .dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    align-items: start;
  }
  @media (max-width:900px) { .dashboard-grid { grid-template-columns: 1fr; } }

  .sidebar { display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: 80px; }

  .bank-card {
    background: linear-gradient(135deg, #1a3a6b 0%, #0d1a3a 60%, #0a1628 100%);
    border: 1px solid rgba(59,130,246,.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
  }
  .bank-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(59,130,246,.2), transparent);
    border-radius: 50%;
  }
  .bank-card-logo { font-size: .7rem; font-weight: 700; letter-spacing: .15em; color: var(--accent3); text-transform: uppercase; margin-bottom: 1.2rem; }
  .bank-card-num { font-family: var(--mono); font-size: .9rem; color: rgba(255,255,255,.6); letter-spacing: .25em; margin-bottom: .3rem; }
  .bank-card-name { font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.85); margin-bottom: 1rem; }
  .bank-card-chips { display: flex; gap: .4rem; }

  .hint-keywords { display: flex; flex-wrap: wrap; gap: .35rem; }
  .hint-kw {
    font-family: var(--mono);
    font-size: .72rem;
    padding: 3px 8px;
    background: var(--surface3);
    border: 1px solid var(--border2);
    border-radius: 4px;
    color: var(--text3);
    cursor: default;
  }
  .hint-kw:hover { color: var(--accent2); border-color: rgba(59,130,246,.4); }

  .scenario-emoji { font-size: 2.5rem; display: block; margin-bottom: .5rem; }

  .task-row {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--border);
  }
  .task-row:last-child { border-bottom: none; }
  .task-check { flex-shrink: 0; }
  .task-check input[type=checkbox] {
    width: 16px; height: 16px; cursor: pointer;
    accent-color: var(--accent);
  }
  .task-label { font-size: .875rem; color: var(--text2); }

  .vocab-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .35rem .75rem;
    margin: .2rem;
    font-size: .8rem;
    color: var(--text2);
    cursor: default;
  }
  .vocab-pill strong { color: var(--accent2); }

  .scenario-table th { min-width: 120px; }

  .input-row { display: flex; align-items: center; gap: .5rem; }
  .input-row input { max-width: 90px; }
  .input-row span { font-size: .8rem; color: var(--text3); }

  .phrase-card {
    background: var(--surface2);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: .6rem .9rem;
    font-size: .875rem;
    color: var(--text);
    margin-bottom: .4rem;
  }
  .phrase-card span { display: block; color: var(--text3); font-size: .78rem; margin-top: 2px; }

  .table-wrap{

overflow-x:auto;

margin-top:20px;

}

.vocab-table{

width:100%;

border-collapse:collapse;

background:white;

border-radius:18px;

overflow:hidden;

box-shadow:
0 12px 35px rgba(0,0,0,.05);

}

.vocab-table thead{

background:
linear-gradient(
90deg,
#2563eb,
#60a5fa
);

color:white;

}

.vocab-table th{

padding:18px;

text-align:left;

font-size:1rem;

}

.vocab-table td{

padding:18px;

border-bottom:
1px solid #e6edf7;

color:#334155;

line-height:1.7;

}

.vocab-table tbody tr{

transition:.2s;

}

.vocab-table tbody tr:hover{

background:#f8fbff;

}

.vocab-table tbody tr:last-child td{

border-bottom:none;

}

.vocab-table td:first-child{

font-weight:700;

color:#12355c;

width:180px;

}

@media(max-width:700px){

.vocab-table{

font-size:.92rem;

}

th,
td{

padding:14px;

}

}

/* PRE-LESSON VOCAB */

.study-box{
margin-bottom:32px;
background:white;
padding:24px;
border-radius:18px;
}

.study-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
gap:18px;
margin-top:18px;
}

.word-card{
background:#f8fbff;
border-radius:14px;
overflow:hidden;
border:1px solid #dfe7ec;
}

.word-card img{
width:100%;
height:140px;
object-fit:cover;
display:block;
}

.word-content{
padding:14px;
}

.word{
font-weight:bold;
color:var(--primary);
margin-bottom:6px;
}

.phonetic{
color:#777;
font-size:.9rem;
margin-bottom:8px;
}

.meaning{
font-size:.92rem;
line-height:1.5;
color:#555;
}