/* ==========================================================================
   Creative Writing Section & Printable Worksheet Styles (Years 4–6)
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --navy: #1e3a5f;
  --navy-dark: #152a45;
  --teal: #2a9d8f;
  --teal-dark: #21807a;
  --amber: #f4a742;
  --coral: #e76f51;
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #1e293b;
  --ink-soft: #64748b;
  --line: #e2e8f0;
  --good: #16a34a;
  --bad: #dc2626;
  --radius: 16px;
  --font-body: 'Lexend', 'Inter', system-ui, -apple-system, sans-serif;
  --font-dyslexic: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.dyslexic { font-family: var(--font-dyslexic); letter-spacing: 0.02em; }
body.text-large { font-size: 18.5px; }
body.text-xlarge { font-size: 21px; }

/* Subheader / Topbar */
header.topbar {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff;
  padding: 22px 24px;
  box-shadow: 0 4px 20px rgba(21, 42, 69, 0.15);
}
.topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar .brand .logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--navy-dark);
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.topbar h1 { font-size: 22px; margin: 0 0 2px 0; font-weight: 700; }
.topbar p { margin: 0; font-size: 13.5px; color: #c9d6e3; }

.settings-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.settings-bar select, .settings-bar button.small {
  font-family: inherit;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 7px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.settings-bar select option { background: var(--navy-dark); color: #fff; }
.settings-bar button.small:hover { background: rgba(255,255,255,0.2); }
.settings-bar button.small.active {
  background: var(--amber);
  color: var(--navy-dark);
  border-color: var(--amber);
  font-weight: 700;
}

/* Main Container */
main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}

/* Cross-tool switcher banner */
.cross-tool-banner {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.cross-tool-link {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
  background: #ffffff;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
}
.cross-tool-link:hover {
  border-color: var(--teal);
  color: var(--navy);
  background: #f1f8f9;
}
.cross-tool-link.active {
  background: var(--teal);
  color: #ffffff;
  border-color: var(--teal);
}

/* Hero Intro Box */
.creative-hero-box {
  background: linear-gradient(135deg, #1e3a5f, #0f172a);
  color: #fff;
  padding: 30px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.creative-hero-content {
  max-width: 720px;
}
.creative-hero-content h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.creative-hero-content p {
  font-size: 14.5px;
  color: #cbd5e1;
  line-height: 1.6;
}
.hero-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.hero-pill {
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 20px;
  color: #f1f5f9;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Tab Bar */
nav.tabbar {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--line);
  overflow-x: auto;
}
nav.tabbar button {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 18px;
  cursor: pointer;
  color: var(--ink-soft);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s;
}
nav.tabbar button:hover { color: var(--navy); }
nav.tabbar button.active {
  color: var(--navy);
  border-bottom-color: var(--teal);
  font-weight: 700;
}

.screen { display: none; }
.screen.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Filter & Search Bar */
.filter-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.filter-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.year-pills-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill-btn {
  background: #f1f5f9;
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.2s;
}
.pill-btn:hover { background: #e2e8f0; color: var(--navy); }
.pill-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.search-box-wrap {
  position: relative;
  min-width: 260px;
  flex: 1;
  max-width: 380px;
}
.search-box-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}
.search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  background: #f8fafc;
  color: var(--ink);
  transition: border 0.2s, background 0.2s;
}
.search-input:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}

.filter-row-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.genre-label { font-size: 12.5px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.5px; }
.genre-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s;
}
.genre-btn:hover { background: #f1f5f9; color: var(--ink); }
.genre-btn.active {
  background: #eefaf8;
  color: var(--teal-dark);
  font-weight: 700;
  border-color: #bbf7d0;
}

/* Prompts Grid */
.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
  margin-bottom: 30px;
}
.prompt-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}
.prompt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(30,58,95,0.08);
  border-color: var(--teal);
}
.prompt-card-top { margin-bottom: 14px; }
.card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.badge-yr {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4338ca;
  text-transform: uppercase;
}
.badge-yr.y4 { background: #dbeafe; color: #1e40af; }
.badge-yr.y5 { background: #ede9fe; color: #5b21b6; }
.badge-yr.y6 { background: #e0e7ff; color: #1e3a5f; }
.badge-gn {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.prompt-card h3 {
  font-size: 17.5px;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.35;
  font-weight: 700;
}
.prompt-teaser {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  border-left: 3px solid var(--teal);
}
.prompt-focus-chip {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 16px;
}
.prompt-focus-chip strong { color: var(--navy); }

/* Dual Print Buttons & Action Bar */
.card-actions-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.print-dual-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-print-action {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s;
  border: 1.5px solid var(--line);
  background: #ffffff;
  color: var(--navy);
  text-align: center;
}
.btn-print-action.structured {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.btn-print-action.structured:hover {
  background: #dcfce7;
  border-color: #86efac;
}
.btn-print-action.freewrite {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
.btn-print-action.freewrite:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
.btn-write-online {
  width: 100%;
  padding: 9px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
}
.btn-write-online:hover { background: var(--teal-dark); }

/* ==========================================================================
   SCREEN 2: INTERACTIVE WRITING STUDIO
   ========================================================================== */
.studio-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
}
@media (max-width: 900px) {
  .studio-layout { grid-template-columns: 1fr; }
}

.studio-sidebar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: fit-content;
}
.studio-prompt-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
  outline: none;
  background: #f8fafc;
}
.studio-prompt-hook-box {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 14px;
  border-left: 4px solid var(--amber);
}
.studio-prompt-hook-box h4 {
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 6px;
}
.studio-prompt-hook-box p {
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
}

.guidelines-toggle-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.toggle-switch-btn {
  background: #f1f5f9;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.toggle-switch-btn.active {
  background: #eefaf8;
  color: var(--teal-dark);
  border-color: #99f6e4;
}

.studio-guidelines-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
}
.studio-box {
  background: #fafafa;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  padding: 12px;
}
.studio-box h5 {
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.studio-box ul {
  padding-left: 18px;
  line-height: 1.5;
  color: #475569;
}
.studio-box ul li { margin-bottom: 4px; }
.studio-vocab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.studio-vocab-tag {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #0f766e;
}

/* Studio Editor Area */
.studio-editor-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}

.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.timer-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 10px;
}
.timer-display {
  font-family: 'JetBrains Mono', monospace, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}
.timer-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 2px 4px;
}
.timer-btn:hover { color: var(--navy); }

.editor-actions-group {
  display: flex;
  gap: 8px;
}
.editor-btn {
  background: #f1f5f9;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.editor-btn:hover { background: #e2e8f0; }

.writing-textarea {
  width: 100%;
  min-height: 420px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  font-family: inherit;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink);
  outline: none;
  resize: vertical;
  background: #fdfdfd;
  transition: border-color 0.2s;
}
.writing-textarea:focus {
  border-color: var(--teal);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.12);
}

.editor-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.stats-badges {
  display: flex;
  gap: 14px;
}
.stat-pill strong { color: var(--navy); }

.progress-track {
  width: 180px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--teal);
  width: 0%;
  transition: width 0.3s;
}

/* ==========================================================================
   SCREEN 3: CURRICULUM & 11+ GUIDE
   ========================================================================== */
.guide-content-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 24px;
}
.guide-content-card h3 {
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-content-card p {
  color: #475569;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.curriculum-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 14px;
}
.curriculum-table th, .curriculum-table td {
  padding: 12px 16px;
  border: 1px solid var(--line);
  text-align: left;
}
.curriculum-table th {
  background: #f1f5f9;
  color: var(--navy);
  font-weight: 700;
}
.curriculum-table tr:nth-child(even) td {
  background: #fafafa;
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  background: var(--card);
  overflow: hidden;
}
.faq-question {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}
.faq-answer {
  padding: 16px 20px;
  font-size: 14.5px;
  color: #475569;
  line-height: 1.6;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   MODAL PREVIEW STYLES
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-container {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 850px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}
.modal-header h3 { font-size: 17px; color: var(--navy); }
.modal-header-actions { display: flex; align-items: center; gap: 10px; }
.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}
.modal-close-btn:hover { color: var(--ink); }
.modal-body {
  padding: 24px;
  overflow-y: auto;
  background: #f1f5f9;
}
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #ffffff;
}

/* ==========================================================================
   PRINTABLE WORKSHEET COMPONENT (SCREEN & PRINT SHARED)
   ========================================================================== */
#print-container {
  display: none; /* hidden on screen */
}

.printable-worksheet {
  background: #ffffff;
  color: #111827;
  max-width: 800px;
  margin: 0 auto;
}

.print-page {
  padding: 30px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 24px;
  position: relative;
}

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #1e3a5f;
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.print-header.compact {
  border-bottom: 1.5px solid #cbd5e1;
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.print-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.print-logo-icon { font-size: 26px; }
.print-brand-title {
  font-size: 16px;
  font-weight: 800;
  color: #1e3a5f;
  letter-spacing: -0.2px;
}
.print-brand-sub {
  font-size: 11.5px;
  color: #475569;
}
.print-badge-cluster {
  display: flex;
  gap: 6px;
}
.pbadge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.pbadge-year { background: #e0f2fe; color: #0369a1; }
.pbadge-genre { background: #f1f5f9; color: #334155; }
.pbadge-exam { background: #fee2e2; color: #991b1b; }

.print-student-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 14px;
}
.print-student-meta-compact {
  display: flex;
  gap: 20px;
  font-size: 11px;
  color: #475569;
}

.print-prompt-card {
  border: 1.5px solid #0284c7;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f0f9ff;
  margin-bottom: 16px;
}
.print-prompt-card.clean-prompt {
  border-color: #1e3a5f;
  background: #ffffff;
  border-width: 2px;
}
.prompt-flag {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #0284c7;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.clean-prompt .prompt-flag { color: #1e3a5f; }
.prompt-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}
.prompt-hook {
  font-size: 12.5px;
  line-height: 1.6;
  color: #1e293b;
}
.highlight-hook {
  font-size: 13px;
  font-style: italic;
  background: #f8fafc;
  padding: 10px;
  border-left: 3px solid #1e3a5f;
  margin-top: 6px;
}
.prompt-focus-bar {
  margin-top: 8px;
  font-size: 11px;
  color: #0369a1;
  border-top: 1px dashed #bae6fd;
  padding-top: 6px;
}

.exam-instructions-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 11px;
  color: #92400e;
  margin-bottom: 12px;
}
.exam-instructions-box ol {
  padding-left: 18px;
  margin-top: 4px;
  line-height: 1.5;
}

.rough-notes-box {
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  padding: 10px 14px;
  min-height: 110px;
  margin-bottom: 14px;
  background: #fafafa;
}
.rough-notes-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  display: block;
  margin-bottom: 4px;
}

/* 4-Quadrant Guidelines Grid */
.print-guidelines-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.guide-box {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  background: #ffffff;
  font-size: 11px;
}
.guide-title {
  font-weight: 800;
  color: #1e3a5f;
  margin-bottom: 6px;
  font-size: 11.5px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.guide-list {
  padding-left: 14px;
  margin: 0;
  line-height: 1.45;
}
.guide-list li { margin-bottom: 3px; }

.vocab-pill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.vocab-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.25;
}
.vocab-pill strong { color: #0284c7; }

.starter-list {
  padding-left: 14px;
  margin: 0;
  line-height: 1.45;
}
.starter-list li { margin-bottom: 4px; color: #334155; }

.checklist-items {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.45;
}
.checklist-items li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 3px;
}
.chk-box {
  font-size: 13px;
  line-height: 1;
  color: #64748b;
}

/* Lined Paper Engine */
.lined-paper-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #1e3a5f;
  padding-bottom: 4px;
  margin-bottom: 8px;
}
.lined-paper-title-bar h3 {
  font-size: 12.5px;
  color: #1e3a5f;
  font-weight: 800;
  text-transform: uppercase;
}
.lined-notes {
  font-size: 10.5px;
  color: #64748b;
  font-style: italic;
}

.print-lined-sheet {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #cbd5e1;
}
.print-line {
  height: 28px;
  border-bottom: 1px solid #cbd5e1;
  position: relative;
}
.print-line.with-margin::before {
  content: '';
  position: absolute;
  left: 36px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #fca5a5; /* soft pink margin rule */
}
.line-num {
  position: absolute;
  left: 6px;
  top: 6px;
  font-size: 9px;
  color: #cbd5e1;
  font-family: monospace;
}

/* Evaluation Box */
.print-eval-box {
  margin-top: 12px;
  border: 1.5px solid #1e3a5f;
  border-radius: 6px;
  padding: 10px 14px;
  background: #f8fafc;
}
.eval-title {
  font-size: 11px;
  font-weight: 800;
  color: #1e3a5f;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.eval-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.2fr;
  gap: 8px;
  font-size: 10.5px;
}
.eval-item {
  background: #fff;
  border: 1px solid #cbd5e1;
  padding: 4px 6px;
  border-radius: 4px;
}
.eval-item.total {
  font-weight: 800;
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.print-page-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 9.5px;
  color: #94a3b8;
  border-top: 1px solid #e2e8f0;
  padding-top: 6px;
}

/* ==========================================================================
   PRINT MEDIA QUERY: PURE A4 PRINTING
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm 10mm 12mm;
  }

  /* Hide normal site chrome */
  body * {
    visibility: hidden;
  }
  .contact-bar,
  .navbar,
  header.topbar,
  main,
  .modal-overlay,
  #whatsapp-widget,
  footer {
    display: none !important;
  }

  /* Show solely print container */
  #print-container,
  #print-container * {
    visibility: visible;
  }

  #print-container {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .print-page {
    border: none;
    padding: 0;
    margin: 0;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .page-break {
    page-break-before: always !important;
    break-before: page !important;
    padding-top: 12mm;
  }

  .print-lined-sheet {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
