/* ==========================================================================
   QWIK EDITORIAL — MASTER RESPONSIVE STYLESHEET
   Optimized for: Mobile (320px+), Tablet (768px+), Desktop (1200px+) & Print
   ========================================================================== */

/* 1. Global Variables & Color Palette (Light & Night Ink Modes) */
:root {
  --news-bg: #fdfcf7;           /* Warm vintage newsprint tint */
  --news-surface: #f4f0e6;      /* Contrasting warm cream for sidebar panels */
  --news-card: #ffffff;         /* Pure card surface */
  --news-border: #1a1a1a;       /* Strong traditional ink black */
  --news-border-light: #ded6c5; /* Subtle column and card dividers */
  --news-text: #1a1a1a;         /* High-contrast ink typography */
  --news-accent: #8b1e1e;       /* Deep editorial crimson for kickers & highlights */
  --news-highlight: #fff3bf;    /* Soft highlighter yellow for active lookups */
  --news-gray: #555555;         /* Muted meta text and subtitles */
  --article-font-size: 10.5pt;  /* Controlled dynamically by A- / A+ */
}

[data-editorial-theme="dark"] {
  --news-bg: #121316;
  --news-surface: #1b1d22;
  --news-card: #1f2229;
  --news-border: #d8d3c8;
  --news-border-light: #2e323b;
  --news-text: #e8e4d9;
  --news-accent: #ef6b6b;
  --news-highlight: #3d3512;
  --news-gray: #a0a6b2;
}

/* 2. Global Resets & Anti-Copy Security Layer */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--news-bg);
  color: var(--news-text);
  font-family: 'Merriweather', Georgia, serif;
  font-size: 15px;
  line-height: 1.65;
  padding-bottom: 90px;
  width: 100%;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;

  /* Client-Side Anti-Copy / Selection Lockdown */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Re-enable selection specifically for text inputs */
input, select, textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 3. Top Archival & Utility Bar */
.utility-bar {
  background: #111111;
  color: #eeeeee;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #2c2c2c;
}

.utility-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.back-home-link {
  color: #f5d77f;
  text-decoration: none;
  font-weight: 700;
  padding: 4px 10px;
  border: 1px solid rgba(245, 215, 127, 0.45);
  border-radius: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.back-home-link:hover {
  background: #f5d77f;
  color: #111111;
}

.utility-divider {
  color: #444444;
}

.user-sync-badge {
  color: #a7f3d0;
  font-weight: 700;
  font-size: 11.5px;
  white-space: nowrap;
}

.utility-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.utility-bar label {
  font-weight: 700;
  color: #bbbbbb;
  white-space: nowrap;
}

.utility-bar select {
  background: #242424;
  color: #ffffff;
  border: 1px solid #484848;
  font-size: 12px;
  padding: 5px 10px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  outline: none;
}

.utility-bar button {
  background: #2f2f2f;
  color: #ffffff;
  border: 1px solid #4a4a4a;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 11.5px;
  font-family: inherit;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 4px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.utility-bar button:hover {
  background: var(--news-accent);
  border-color: var(--news-accent);
}

/* 4. Broadsheet Masthead */
.masthead {
  text-align: center;
  border-bottom: 3px double var(--news-border);
  padding: 20px 0 12px 0;
  margin-bottom: 14px;
}

.masthead-motto {
  font-family: 'Source Sans 3', sans-serif;
  font-size: clamp(10px, 1.8vw, 12px);
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--news-gray);
  margin-bottom: 4px;
}

.newspaper-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(28px, 6vw, 52px);
  font-weight: 900;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  line-height: 1.08;
  margin: 4px 0 6px 0;
}

.masthead-subline {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(12.5px, 2.2vw, 15px);
  color: var(--news-gray);
  margin-bottom: 12px;
  padding: 0 8px;
}

.issue-info-strip {
  border-top: 1px solid var(--news-border);
  border-bottom: 1px solid var(--news-border);
  padding: 6px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 5. Navigation Bar */
.nav-strip {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 22px 0;
  border-bottom: 1px solid var(--news-border-light);
  padding-bottom: 10px;
}

.nav-btn {
  background: none;
  border: none;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  padding: 8px 16px;
  color: var(--news-gray);
  border-bottom: 2.5px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-btn.active, 
.nav-btn:hover {
  color: var(--news-accent);
  border-bottom-color: var(--news-accent);
}

.tab-short {
  display: none;
}

/* 6. Editorial Layout (Columns & Typography) */
.main-grid {
  display: grid;
  grid-template-columns: 2.15fr 1fr;
  gap: 32px;
  align-items: start;
}

.article-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.kicker {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--news-accent);
  letter-spacing: 1.2px;
}

.cite-btn, .mini-tool-btn {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--news-card);
  color: var(--news-text);
  border: 1px solid var(--news-border-light);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cite-btn:hover, .mini-tool-btn:hover, .mini-tool-btn.active {
  background: var(--news-accent);
  color: #ffffff;
  border-color: var(--news-accent);
}

.article-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 3.8vw, 34px);
  line-height: 1.18;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.article-subdeck {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(14px, 2.2vw, 16.5px);
  color: var(--news-gray);
  line-height: 1.45;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--news-border-light);
}

.editorial-columns {
  column-count: 2;
  column-gap: 28px;
  text-align: justify;
  hyphens: auto;
  font-size: var(--article-font-size);
  line-height: 1.72;
}

.editorial-columns p {
  margin-bottom: 14px;
  text-indent: 18px;
}

.editorial-columns p:first-of-type {
  text-indent: 0;
}

.drop-cap {
  float: left;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 54px;
  line-height: 0.78;
  padding-top: 4px;
  padding-right: 10px;
  padding-bottom: 2px;
  font-weight: 800;
  color: var(--news-text);
}

/* Interactive Vocabulary Highlight Tag */
.vocab-tag {
  color: var(--news-accent);
  font-weight: 700;
  cursor: pointer;
  border-bottom: 1.5px dashed var(--news-accent);
  padding: 0 2px;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.vocab-tag:hover, .vocab-tag:active {
  background-color: var(--news-highlight);
}

/* 7. Integrated Vocabulary Rail (Sidebar) */
.sidebar-panel {
  background: var(--news-surface);
  border: 1px solid var(--news-border-light);
  border-top: 3px solid var(--news-border);
  padding: 16px;
  border-radius: 2px;
  height: fit-content;
  position: sticky;
  top: 52px;
}

.panel-header {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--news-border-light);
  padding-bottom: 8px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 8px;
}

.vocab-search-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 13.5px;
  background: var(--news-card);
  color: var(--news-text);
  border: 1px solid var(--news-border-light);
  border-radius: 4px;
  font-family: 'Source Sans 3', sans-serif;
  outline: none;
}

.vocab-search-input:focus {
  border-color: var(--news-accent);
}

.pos-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: 'Source Sans 3', sans-serif;
}

.pos-chip {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--news-border-light);
  background: var(--news-card);
  color: var(--news-text);
  padding: 5px 11px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.pos-chip:hover {
  border-color: var(--news-accent);
}

.pos-chip.active {
  background: var(--news-accent);
  color: #ffffff;
  border-color: var(--news-accent);
}

.vocab-list {
  margin-top: 8px;
  padding-top: 2px;
  max-height: 740px;
  overflow-y: auto;
  padding-right: 4px;
}

.vocab-list::-webkit-scrollbar {
  width: 5px;
}
.vocab-list::-webkit-scrollbar-thumb {
  background-color: #b8ae99;
  border-radius: 2px;
}

.vocab-card {
  margin-bottom: 10px;
  padding: 10px;
  background: var(--news-card);
  border: 1px solid var(--news-border-light);
  font-size: 13px;
  line-height: 1.45;
  border-radius: 4px;
  transition: background 0.3s ease, border-color 0.2s ease;
}

.vocab-card.active-flash {
  background: var(--news-highlight);
  border-color: var(--news-accent);
}

.vocab-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.vocab-title {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--news-accent);
}

.speak-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 5px;
  opacity: 0.8;
}
.speak-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.vocab-hindi {
  font-family: 'Merriweather', serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--news-text);
}

.vocab-meta {
  font-size: 11.5px;
  color: var(--news-gray);
  margin-bottom: 4px;
}

/* Blind / Flashcard Quiz Mode */
.vocab-list.blind-mode .vocab-details {
  filter: blur(5px);
  cursor: pointer;
  transition: filter 0.2s ease;
}
.vocab-list.blind-mode .vocab-card:hover .vocab-details,
.vocab-list.blind-mode .vocab-card.revealed .vocab-details {
  filter: none;
}

/* 8. Practice Zone & Scoreboard */
.practice-container {
  display: none;
}

.practice-scoreboard {
  position: sticky;
  top: 44px;
  z-index: 900;
  background: var(--news-surface);
  border: 1.5px solid var(--news-border);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'Source Sans 3', sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.score-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.score-pill {
  padding: 5px 10px;
  background: var(--news-card);
  border: 1px solid var(--news-border-light);
  border-radius: 4px;
}

.correct-pill strong { color: #15803d; }
.wrong-pill strong { color: #b91c1c; }
.acc-pill strong { color: var(--news-accent); }

.score-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.sync-drill-btn {
  background: #15803d;
  color: #ffffff;
  border: none;
  padding: 7px 14px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.sync-drill-btn:hover {
  background: #166534;
}

.sync-drill-btn.synced {
  background: #1e293b;
  color: #6ee7b7;
  border: 1px solid #10b981;
}

.reset-drill-btn {
  background: var(--news-accent);
  color: #ffffff;
  border: none;
  padding: 7px 14px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
}

.practice-jump-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.practice-jump-bar::-webkit-scrollbar {
  display: none;
}

.jump-chip {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  color: var(--news-text);
  background: var(--news-surface);
  border: 1px solid var(--news-border-light);
  padding: 6px 12px;
  border-radius: 4px;
  white-space: nowrap;
}
.jump-chip:hover {
  border-color: var(--news-accent);
  color: var(--news-accent);
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  border-bottom: 2px solid var(--news-border);
  padding-bottom: 6px;
  margin: 24px 0 14px 0;
  letter-spacing: -0.2px;
}

.question-block {
  background: var(--news-card);
  border: 1px solid var(--news-border-light);
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 6px;
  font-size: 14px;
}

.q-text {
  font-weight: 700;
  margin-bottom: 12px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-line;
}

.q-options {
  list-style: none;
  display: grid;
  gap: 8px;
}

.q-options-error {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.q-option-item {
  padding: 10px 14px;
  background: var(--news-bg);
  border: 1px solid var(--news-border-light);
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.45;
  border-radius: 4px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.q-option-item:hover {
  border-color: var(--news-accent);
}

.q-option-item.correct {
  background: #d4edda !important;
  border-color: #28a745 !important;
  font-weight: 700;
  color: #155724 !important;
}

.q-option-item.wrong {
  background: #f8d7da !important;
  border-color: #dc3545 !important;
  color: #721c24 !important;
}

.explanation-box {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--news-surface);
  border-left: 3.5px solid var(--news-accent);
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  display: none;
  line-height: 1.55;
}

.correction-pill {
  display: inline-block;
  background: var(--news-highlight);
  color: #111111;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  margin-bottom: 6px;
}

/* 9. Grammar Rules Table */
.grammar-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 2px solid var(--news-border);
  padding-bottom: 10px;
  margin: 20px 0 14px 0;
}

.grammar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 480px;
}

.grammar-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13.5px;
  background: var(--news-card);
}

.grammar-table th, 
.grammar-table td {
  border: 1px solid var(--news-border-light);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.grammar-table th {
  background: var(--news-surface);
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.rule-cat-badge {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 4px;
}
.rule-cat-core { background: var(--news-accent); color: #ffffff; }
.rule-cat-general { background: var(--news-border-light); color: #222222; }

/* 10. Floating Quick-Lookup Bar & Toast */
.vocab-quick-bar {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(94vw, 680px);
  background: #18181b;
  color: #fdfcf7;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid #d4af37;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
  z-index: 1500;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-family: 'Source Sans 3', sans-serif;
}

.qb-word { font-size: 15px; color: #f5d77f; margin-right: 6px; }
.qb-pos { font-size: 12px; color: #bbbbbb; font-style: italic; margin-right: 6px; }
.qb-hindi { font-size: 14px; color: #ffffff; font-weight: 700; }
.qb-def { font-size: 13px; color: #e4e4e7; margin-top: 4px; line-height: 1.4; }
.qb-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

.editorial-toast {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  top: 64px;
  right: 16px;
  left: 16px;
  max-width: 420px;
  margin-left: auto;
  background: #111111;
  color: #ffffff;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 16px;
  border-left: 4px solid var(--news-accent);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 2000;
  transition: all 0.25s ease;
}
.editorial-toast.show {
  visibility: visible;
  opacity: 1;
}

/* 11. Footer */
footer {
  border-top: 2px solid var(--news-border);
  margin-top: 40px;
  padding-top: 16px;
  text-align: center;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  color: var(--news-gray);
}

/* ==========================================================================
   12. TABLET & MOBILE OPTIMIZATION BREAKPOINTS
   ========================================================================== */

/* Tablet & Below (<= 960px) */
@media (max-width: 960px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .editorial-columns {
    column-count: 1;
    font-size: calc(var(--article-font-size) * 1.08);
  }

  .sidebar-panel {
    position: static;
  }

  /* Release nested scroll trap on touch devices */
  .vocab-list {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
  }

  .vocab-card {
    margin-bottom: 0;
  }
}

/* Mobile Screens (<= 640px) */
@media (max-width: 640px) {
  .container {
    padding: 0 14px;
  }

  /* Compact 2-Row Mobile Utility Header */
  .utility-bar {
    padding: 8px 12px;
    gap: 8px;
  }

  .utility-left {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .back-home-link {
    font-size: 11px;
    padding: 3px 8px;
  }

  .user-sync-badge {
    font-size: 11px;
  }

  .utility-divider {
    display: none;
  }

  .utility-controls {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
  }

  .utility-bar label {
    display: none;
  }

  .utility-bar select {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    padding: 6px 8px;
  }

  /* Hide Print button on small mobile screens to prevent 3rd row wrap */
  .utility-bar button[onclick*="print"] {
    display: none;
  }

  /* Masthead & Info Strip */
  .masthead {
    padding: 14px 0 10px 0;
  }

  .issue-info-strip {
    justify-content: center;
    text-align: center;
    gap: 4px 14px;
    font-size: 11px;
  }

  /* Fit All 3 Tabs on Screen Simultaneously (Zero Cut-Off!) */
  .tab-full {
    display: none;
  }
  .tab-short {
    display: inline;
  }

  .nav-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    overflow: visible;
    background: var(--news-surface);
    padding: 5px;
    border-radius: 8px;
    border: 1px solid var(--news-border-light);
    margin: 10px 0 18px 0;
  }

  .nav-btn {
    width: 100%;
    text-align: center;
    padding: 8px 4px;
    font-size: 11.5px;
    border-radius: 6px;
    border: none;
    background: transparent;
    letter-spacing: 0.2px;
  }

  .nav-btn.active {
    background: var(--news-accent);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }

  /* Clean Left-Aligned Mobile Reading Experience */
  .editorial-columns {
    text-align: left;
    hyphens: none;
    line-height: 1.78;
  }

  .editorial-columns p {
    text-indent: 0;
    margin-bottom: 16px;
  }

  .drop-cap {
    font-size: 46px;
    padding-right: 8px;
  }

  /* Vocab Header & Single Column on Phones */
  .panel-header {
    font-size: 12px;
    letter-spacing: 0.4px;
  }

  .vocab-list {
    grid-template-columns: 1fr;
  }

  /* Scoreboard Mobile Stack */
  .practice-scoreboard {
    position: static;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .score-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .score-actions {
    width: 100%;
  }

  .sync-drill-btn, .reset-drill-btn {
    flex: 1;
    text-align: center;
    padding: 9px 10px;
  }

  .q-options-error {
    grid-template-columns: 1fr;
  }

  /* Convert 3-Column Grammar Table into Mobile Revision Cards */
  .grammar-table, 
  .grammar-table tbody, 
  .grammar-table tr, 
  .grammar-table td {
    display: block;
    width: 100%;
  }

  .grammar-table thead {
    display: none;
  }

  .grammar-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--news-border-light);
    border-radius: 6px;
    padding: 12px;
    background: var(--news-card);
  }

  .grammar-table td {
    border: none;
    padding: 4px 0;
  }

  .grammar-table td:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed var(--news-border-light);
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

  .grammar-table td:first-child br {
    display: none;
  }

  .rule-cat-badge {
    margin-top: 0;
  }
}

/* 13. Broadsheet Print Engine */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 14mm 14mm 14mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 9pt;
    padding-bottom: 0;
  }

  .utility-bar,
  .nav-strip,
  .practice-container,
  #vocabSearch,
  .pos-chip-group,
  .cite-btn,
  .mini-tool-btn,
  .speak-btn,
  .vocab-quick-bar,
  .editorial-toast {
    display: none !important;
  }

  #tabArticle {
    display: block !important;
  }

  .main-grid {
    display: block !important;
  }

  .editorial-columns {
    column-count: 2 !important;
    text-align: justify !important;
  }

  .sidebar-panel {
    background: #ffffff !important;
    border: 1px solid #333333 !important;
    margin-top: 24px;
    page-break-inside: avoid;
  }

  .vocab-list {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
  }
}