/* ============================================================
   ExAC Study Textbook — style.css
   Extracted from exac_textbook_v14.html
   Changes: 125% scale, centered content, Theme 6+ margin fix,
            mobile overflow fix, stacked-card tables on mobile
   ============================================================ */

/* ── Prevent any element from causing horizontal scroll ── */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

:root {
  --green-dark: #2d5016;
  --green-mid: #4a7c2a;
  --green-light: #7ab648;
  --green-pale: #c8e6a0;
  --green-wash: #eef6e4;
  --slate: #2c3e2d;
  --text: #1a2a1b;
  --text-muted: #5a6b5c;
  --bg: #f8faf5;
  --white: #ffffff;
  --border: #d4e8b8;
  --accent-gold: #c4a035;
  --accent-blue: #2a5f8f;
  --shadow: 0 2px 16px rgba(45, 80, 22, 0.1);
  --shadow-lg: 0 8px 40px rgba(45, 80, 22, 0.15);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Base font scaled 125% (16px × 1.25 = 20px) ── */
body {
  font-family: "Source Sans 3", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 20px;
  line-height: 1.7;
}

/* ── Sidebar (width scaled 125%: 270 → 338px) ── */
#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 338px;
  background: var(--slate);
  overflow-y: auto;
  z-index: 100;
  padding-bottom: 50px;
}
#sidebar::-webkit-scrollbar {
  width: 5px;
}
#sidebar::-webkit-scrollbar-thumb {
  background: var(--green-mid);
  border-radius: 2px;
}
.sidebar-logo {
  padding: 35px 30px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-logo .exam-label {
  font-family: "Source Code Pro", monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--green-pale);
  text-transform: uppercase;
  display: block;
  margin-bottom: 5px;
}
.sidebar-logo h1 {
  font-family: "Playfair Display", serif;
  font-size: 27.5px;
  color: var(--white);
  font-weight: 700;
  line-height: 1.2;
}
.sidebar-logo .subtitle {
  font-size: 13.75px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 5px;
  font-weight: 300;
}
.nav-section-label {
  padding: 22.5px 30px 7.5px;
  font-size: 11.25px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--green-pale);
  opacity: 0.7;
}
.nav-item {
  display: block;
  padding: 11.25px 30px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 16.25px;
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  line-height: 1.4;
}
.nav-item:hover,
.nav-item.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  border-left-color: var(--green-light);
}
.nav-item .section-num {
  font-family: "Source Code Pro", monospace;
  font-size: 12.5px;
  color: var(--green-light);
  display: block;
  margin-bottom: 1px;
}
.nav-group {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 5px;
}

/* ── Main layout — sidebar offset 338px, content centred ── */
#main {
  margin-left: 338px;
  min-height: 100vh;
}

/* ── Banner ── */
.top-banner {
  background: linear-gradient(
    135deg,
    var(--green-dark) 0%,
    var(--green-mid) 60%,
    var(--green-light) 100%
  );
  padding: 75px 100px 62.5px;
  position: relative;
  overflow: hidden;
}
.top-banner::before {
  content: "ExAC";
  position: absolute;
  right: -25px;
  top: -37.5px;
  font-family: "Playfair Display", serif;
  font-size: 275px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  line-height: 1;
}
.banner-eyebrow {
  font-family: "Source Code Pro", monospace;
  font-size: 13.75px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--green-pale);
  margin-bottom: 17.5px;
}
.banner-title {
  font-family: "Playfair Display", serif;
  font-size: 52.5px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  max-width: 750px;
  margin-bottom: 20px;
}
.banner-sub {
  font-size: 18.75px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 700px;
  font-weight: 300;
  line-height: 1.6;
}
.banner-chips {
  display: flex;
  gap: 12.5px;
  margin-top: 35px;
  flex-wrap: wrap;
}
.chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  border-radius: 25px;
  padding: 6.25px 17.5px;
  font-size: 15px;
  font-weight: 600;
}

/* ── Content area — centred with auto horizontal margins ── */
.content {
  max-width: 1125px;
  padding: 0 100px 100px;
  margin: 0 auto;
}

/* ── Sections ── */
.section {
  padding-top: 75px;
}
.section-header {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  margin-bottom: 40px;
  padding-bottom: 25px;
  border-bottom: 2px solid var(--border);
}
.section-badge {
  background: var(--green-mid);
  color: var(--white);
  border-radius: 12.5px;
  padding: 10px 17.5px;
  font-family: "Source Code Pro", monospace;
  font-size: 16.25px;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 5px;
  flex-shrink: 0;
}
.section-header-text h2 {
  font-family: "Playfair Display", serif;
  font-size: 35px;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.25;
  margin-bottom: 7.5px;
}
.section-header-text .chop-ref {
  font-family: "Source Code Pro", monospace;
  font-size: 13.75px;
  color: var(--accent-gold);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ── Objectives ── */
.objective {
  margin-bottom: 35px;
}
.objective-title {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12.5px;
  display: flex;
  align-items: center;
  gap: 12.5px;
}
.objective-title .obj-num {
  font-family: "Source Code Pro", monospace;
  font-size: 13.75px;
  background: var(--green-wash);
  border: 1px solid var(--border);
  color: var(--green-mid);
  padding: 2.5px 10px;
  border-radius: 5px;
  font-weight: 600;
  white-space: nowrap;
}
.objective-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--green-mid);
  border-radius: 0 10px 10px 0;
  padding: 25px 30px;
  font-size: 18.125px;
  line-height: 1.75;
}
.objective-content p {
  margin-bottom: 15px;
}
.objective-content p:last-child {
  margin-bottom: 0;
}
.objective-content ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.objective-content ul li {
  padding: 3.75px 0 3.75px 22.5px;
  position: relative;
  font-size: 17.5px;
}
.objective-content ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--green-mid);
  font-size: 13.75px;
  top: 6.25px;
}
.objective-content ul li ul {
  margin: 5px 0 5px 20px;
}
.objective-content ul li ul li::before {
  content: "–";
  color: var(--text-muted);
}
.objective-content strong {
  color: var(--green-dark);
  font-weight: 700;
}

/* ── Definition / Key / Ref boxes ── */
.def-box {
  background: linear-gradient(135deg, #f0f8e8, #e8f4d8);
  border: 1px solid var(--green-pale);
  border-radius: 12.5px;
  padding: 22.5px 27.5px;
  margin: 20px 0;
}
.def-box::before {
  content: "Definition";
  font-family: "Source Code Pro", monospace;
  font-size: 11.25px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-mid);
  display: block;
  margin-bottom: 10px;
}
.def-box p {
  font-size: 17.5px;
  color: var(--text);
  font-style: italic;
}

.key-box {
  background: #fffbee;
  border: 1px solid #f0d878;
  border-left: 5px solid var(--accent-gold);
  border-radius: 0 10px 10px 0;
  padding: 20px 25px;
  margin: 20px 0;
}
.key-box::before {
  content: "Key Exam Point";
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 10px;
}
.key-box p {
  font-size: 17.5px;
  color: var(--text);
}

.ref-box {
  background: #f0f5ff;
  border: 1px solid #c4d4f0;
  border-left: 5px solid var(--accent-blue);
  border-radius: 0 10px 10px 0;
  padding: 17.5px 22.5px;
  margin: 15px 0;
  font-size: 16.25px;
  color: var(--accent-blue);
  font-family: "Source Code Pro", monospace;
}

/* ── Tables ── */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16.875px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.styled-table thead tr {
  background: var(--green-dark);
  color: var(--white);
}
.styled-table thead th {
  padding: 15px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.styled-table tbody tr:nth-child(even) {
  background: var(--green-wash);
}
.styled-table tbody tr:nth-child(odd) {
  background: var(--white);
}
.styled-table tbody td {
  padding: 12.5px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

/* ── Q&A sections — all get consistent margin (Theme 6 fix) ── */
.qa-section {
  margin-top: 60px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 17.5px;
  overflow: visible;
  box-shadow: var(--shadow);
}
.qa-header {
  background: var(--green-dark);
  padding: 22.5px 35px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.qa-header h3 {
  font-family: "Playfair Display", serif;
  font-size: 22.5px;
  color: var(--white);
  font-weight: 700;
}
.qa-item {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--border);
}
.qa-item:last-child {
  border-bottom: none;
}
.qa-question {
  position: relative;
  pointer-events: auto !important;
  z-index: 9999;
  padding: 22.5px 35px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  transition: background 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
}
.qa-question:hover {
  background: var(--green-wash);
}
.qa-question .q-text {
  font-size: 18.125px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
}
.qa-question .q-num {
  font-family: "Source Code Pro", monospace;
  font-size: 13.75px;
  background: var(--green-mid);
  color: var(--white);
  padding: 2.5px 10px;
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 2.5px;
}
.qa-toggle {
  color: var(--green-mid);
  font-size: 22.5px;
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-top: 2.5px;
}
.qa-item.open .qa-toggle {
  transform: rotate(180deg);
}
.qa-answer {
  font-size: 17.5px;
  color: var(--text);
  line-height: 1.7;
  border-top: 1px dashed var(--border);
  background: #f9fcf5;
}
.qa-item.open .qa-answer p {
  margin-bottom: 10px;
}
.qa-answer p:last-child {
  margin-bottom: 0;
}
.qa-answer ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.qa-answer ul li {
  padding: 2.5px 0 2.5px 20px;
  position: relative;
  font-size: 16.875px;
}
.qa-answer ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green-mid);
  font-size: 13.75px;
  top: 5px;
}

/* ── Visual Diagrams ── */
.diagram {
  margin: 24px 0;
  padding: 18px 20px;
  background: var(--green-wash);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.diagram-title {
  font-family: "Source Code Pro", monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.diagram-flow {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}
.diagram-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.diagram-flow-box {
  background: var(--white);
  border: 2px solid var(--green-mid);
  border-radius: 8px;
  padding: 7px 13px;
  font-weight: 700;
  font-size: 13px;
  color: var(--green-dark);
  white-space: nowrap;
  line-height: 1.3;
}
.diagram-flow-box.df-highlight {
  background: var(--green-mid);
  color: var(--white);
  border-color: var(--green-dark);
}
.diagram-flow-box.df-bridge {
  background: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
}
.diagram-flow-label {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 5px;
  max-width: 80px;
  line-height: 1.3;
}
.diagram-flow-arrow {
  color: var(--green-mid);
  font-size: 20px;
  padding: 0 2px;
  margin-top: 7px;
  line-height: 1;
}
.diagram-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  line-height: 1.5;
}
.diagram-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.diagram-grid-cell {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.diagram-grid-cell-label {
  font-family: "Source Code Pro", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green-mid);
  margin-bottom: 3px;
}
.diagram-grid-cell-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 4px;
}
.diagram-grid-cell-body {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Misc ── */
.subsection-heading {
  font-family: "Playfair Display", serif;
  font-size: 22.5px;
  color: var(--green-dark);
  font-weight: 700;
  margin: 40px 0 20px;
  padding-left: 17.5px;
  border-left: 4px solid var(--green-light);
}
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 50px 0;
}
.version-bar {
  background: var(--slate);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 20px;
  font-size: 13.75px;
  font-family: "Source Code Pro", monospace;
  letter-spacing: 1px;
}

/* ── Copy protection — disable text selection across all content ── */
.content,
.qa-answer,
.section,
.key-summary,
.styled-table {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ── Key Summary Boxes ── */
.key-summary {
  background: linear-gradient(135deg, #2d5016 0%, #4a7c2a 100%);
  border-radius: 15px;
  padding: 35px 40px;
  margin: 60px 0 0;
  color: var(--white);
}
.key-summary-header {
  display: flex;
  align-items: center;
  gap: 17.5px;
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 20px;
}
.key-summary-icon {
  font-size: 27.5px;
}
.key-summary-header h3 {
  font-family: "Playfair Display", serif;
  font-size: 22.5px;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}
.key-summary-header .ks-sub {
  font-size: 13.75px;
  color: rgba(255, 255, 255, 0.6);
  font-family: "Source Code Pro", monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 3.75px;
}
.ks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17.5px;
  margin-bottom: 22.5px;
}
@media (max-width: 875px) {
  .ks-grid {
    grid-template-columns: 1fr;
  }
}
.ks-point {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 17.5px 20px;
}
.ks-point .kp-num {
  font-family: "Source Code Pro", monospace;
  font-size: 11.25px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-pale);
  margin-bottom: 7.5px;
  display: block;
}
.ks-point .kp-fact {
  font-size: 16.875px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 5px;
}
.ks-point .kp-tip {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
}
.ks-mnemonic {
  background: rgba(196, 160, 53, 0.15);
  border: 1px solid rgba(196, 160, 53, 0.4);
  border-radius: 10px;
  padding: 17.5px 22.5px;
  margin-top: 5px;
}
.ks-mnemonic .km-label {
  font-family: "Source Code Pro", monospace;
  font-size: 11.25px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #f0d070;
  margin-bottom: 7.5px;
  display: block;
}
.ks-mnemonic .km-text {
  font-size: 16.25px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}
.ks-mnemonic .km-text strong {
  color: #f0d070;
}

/* ── ARE Question Blocks ── */
.are-q-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12.5px;
  padding: 27.5px 32.5px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}
.are-q-num {
  font-family: "Source Code Pro", monospace;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--green-dark);
  color: var(--white);
  padding: 2.5px 10px;
  border-radius: 5px;
  margin-right: 12.5px;
}
.are-q-text {
  font-size: 18.75px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin: 12.5px 0 5px;
}
.are-q-sub {
  font-size: 16.25px;
  color: var(--text-muted);
  margin-bottom: 15px;
  line-height: 1.5;
}
.are-diagram {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12.5px;
  padding: 25px;
  margin: 20px 0 10px;
  display: flex;
  justify-content: center;
}
.are-diagram svg {
  max-width: 100%;
}
.are-options {
  list-style: none;
  padding: 0;
  margin: 15px 0 0;
}
.are-options li {
  padding: 10px 17.5px;
  border: 1px solid var(--border);
  border-radius: 7.5px;
  margin-bottom: 7.5px;
  font-size: 17.5px;
  cursor: pointer;
  transition: background 0.15s;
}
.are-options li:hover {
  background: var(--green-wash);
}
.are-options li.correct-opt {
  background: #e8f4d8;
  border-color: var(--green-mid);
  font-weight: 600;
}
.are-options li.wrong-opt {
  background: #fff0f0;
  border-color: #e08080;
}
.are-multi-note {
  font-size: 15px;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.are-check-btn {
  margin-top: 12.5px;
  background: var(--green-mid);
  color: var(--white);
  border: none;
  border-radius: 7.5px;
  padding: 10px 25px;
  font-size: 16.25px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.are-check-btn:hover {
  background: var(--green-dark);
}
.are-result {
  display: none;
  margin-top: 12.5px;
  padding: 15px 20px;
  border-radius: 7.5px;
  font-size: 16.875px;
  line-height: 1.6;
}
.are-result.show {
  display: block;
}
.are-result.pass {
  background: #e8f4d8;
  border: 1px solid var(--green-pale);
}
.are-result.fail {
  background: #fff3e0;
  border: 1px solid #f0c878;
}
.are-tag {
  display: inline-block;
  font-family: "Source Code Pro", monospace;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2.5px 10px;
  border-radius: 5px;
  margin-bottom: 10px;
}
.are-tag.theme1 {
  background: #e8f4d8;
  color: var(--green-dark);
}
.are-tag.theme2 {
  background: #e4eef8;
  color: #2a5f8f;
}
.are-tag.theme3 {
  background: #f8f4e8;
  color: #8f6a2a;
}
.are-tag.theme4 {
  background: #f4e8f8;
  color: #6a2a8f;
}
.are-tag.theme8 {
  background: #f8e8e8;
  color: #8f2a2a;
}
.are-tag.theme9 {
  background: #e8eef8;
  color: #2a4a8f;
}
.are-tag.theme10 {
  background: #f0f8e8;
  color: #3a6a1a;
}
.are-tag.theme13 {
  background: #e4f8ef;
  color: #0d6e4e;
}
.are-tag.ccdc {
  background: #e8edf8;
  color: #2a3f8f;
}
.are-calc {
  background: #f8faf5;
  border: 1px dashed var(--border);
  border-radius: 7.5px;
  padding: 15px 20px;
  margin-top: 12.5px;
  font-size: 16.25px;
  line-height: 1.7;
}
.are-calc strong {
  color: var(--green-dark);
}

/* ─────────────────────────────────────────────
   MOBILE HAMBURGER BUTTON
───────────────────────────────────────────── */
#mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: var(--slate);
  z-index: 200;
  align-items: center;
  padding: 0 20px;
  gap: 17.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
#hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6.25px;
  width: 45px;
  height: 45px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7.5px;
  border-radius: 7.5px;
  flex-shrink: 0;
  transition: background 0.2s;
}
#hamburger:hover {
  background: rgba(255, 255, 255, 0.08);
}
#hamburger span {
  display: block;
  height: 2.5px;
  background: var(--white);
  border-radius: 2.5px;
  transition: all 0.3s;
  transform-origin: center;
}
#hamburger.open span:nth-child(1) {
  transform: translateY(8.75px) rotate(45deg);
}
#hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#hamburger.open span:nth-child(3) {
  transform: translateY(-8.75px) rotate(-45deg);
}
#mobile-header-title {
  font-family: "Playfair Display", serif;
  font-size: 22.5px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.3px;
}
#mobile-header-title span {
  font-family: "Source Code Pro", monospace;
  font-size: 11.25px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--green-pale);
  text-transform: uppercase;
  display: block;
  margin-bottom: 1.25px;
}

/* Overlay behind open sidebar on mobile */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ─────────────────────────────────────────────
   TABLE HORIZONTAL SCROLL WRAPPER (desktop)
───────────────────────────────────────────── */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(
      to right,
      transparent 85%,
      rgba(212, 232, 184, 0.4)
    )
    no-repeat right;
  background-size: 50px 100%;
  margin: 20px 0;
  border-radius: 10px;
}
.table-scroll .styled-table {
  margin: 0;
  border-radius: 10px;
}

/* ─────────────────────────────────────────────
   PRINT
───────────────────────────────────────────── */
@media print {
  body * {
    display: none !important;
  }
  body::after {
    display: block !important;
    content: "Printing this document is not permitted.";
    font-family: sans-serif;
    font-size: 18px;
    text-align: center;
    margin-top: 40vh;
    color: #333;
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVE — TABLET (max 1125px)
───────────────────────────────────────────── */
@media (max-width: 1125px) {
  #sidebar {
    width: 300px;
  }
  #main {
    margin-left: 300px;
  }
  .top-banner {
    padding: 60px 50px 50px;
  }
  .banner-title {
    font-size: 42.5px;
  }
  .content {
    padding: 0 50px 75px;
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVE — MOBILE (max 875px)
   Sidebar becomes an off-canvas drawer
───────────────────────────────────────────── */
@media (max-width: 875px) {
  #mobile-header {
    display: flex;
  }

  /* Sidebar slides in from left — does NOT affect page width */
  #sidebar {
    width: 85vw;
    max-width: 340px;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 300;
    padding-top: 0;
  }
  #sidebar.open {
    transform: translateX(0);
  }
  #sidebar-overlay {
    display: block;
  }

  /* Main takes full viewport width — no left margin */
  #main {
    margin-left: 0 !important;
    padding-top: 65px;
    width: 100%;
    max-width: 100vw;
  }

  /* Banner fits screen width */
  .top-banner {
    padding: 40px 20px 35px;
    width: 100%;
    box-sizing: border-box;
  }
  .top-banner::before {
    font-size: 120px;
  }
  .banner-title {
    font-size: 28px;
    max-width: 100%;
  }
  .banner-sub {
    font-size: 16px;
    max-width: 100%;
  }
  .banner-chips {
    gap: 8px;
  }
  .chip {
    font-size: 13px;
    padding: 5px 12px;
  }

  /* Content fits screen — no large side padding */
  .content {
    padding: 0 16px 60px;
    width: 100%;
    box-sizing: border-box;
  }
  .section {
    padding-top: 50px;
  }

  .section-header {
    gap: 14px;
    margin-bottom: 28px;
    flex-wrap: wrap;
  }
  .section-header-text h2 {
    font-size: 24px;
  }
  .section-badge {
    font-size: 13px;
    padding: 7px 12px;
  }

  .objective-content {
    padding: 16px;
    font-size: 15px;
  }
  .objective-title {
    font-size: 13px;
  }

  .key-box {
    padding: 14px 16px;
  }
  .key-box p {
    font-size: 14px;
  }
  .def-box {
    padding: 14px 16px;
  }
  .def-box p {
    font-size: 14px;
  }
  .ref-box {
    font-size: 13px;
    padding: 12px 14px;
  }

  /* ── Stacked-card tables on mobile ──
     Each row becomes a card; th labels appear inline via data-label.
     The JS below injects data-label onto every td automatically.     */
  .table-scroll {
    overflow-x: visible;
    background: none;
    border-radius: 0;
  }

  .styled-table,
  .styled-table thead,
  .styled-table tbody,
  .styled-table th,
  .styled-table td,
  .styled-table tr {
    display: block;
    width: 100%;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  /* Hide the header row visually — labels come from data-label */
  .styled-table thead tr {
    display: none;
  }

  /* Each data row becomes a card */
  .styled-table tbody tr {
    background: var(--white) !important;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }

  /* Each cell: show column label in green above the value */
  .styled-table tbody td {
    border-bottom: 1px solid var(--green-wash);
    padding: 10px 14px;
    font-size: 14px;
    position: relative;
  }
  .styled-table tbody td:last-child {
    border-bottom: none;
  }

  .styled-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--green-mid);
    font-family: "Source Code Pro", monospace;
    margin-bottom: 4px;
  }

  /* Q&A sections */
  .qa-section {
    margin-top: 36px;
  }
  .qa-header {
    padding: 16px 20px;
  }
  .qa-header h3 {
    font-size: 17px;
  }
  .qa-question {
    padding: 16px 18px;
    gap: 6px;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .qa-question .q-num {
    order: -1;
    margin-top: 0;
    margin-bottom: 4px;
  }
  .qa-question .q-text {
    font-size: 15px;
    flex: 1 1 100%;
    order: 0;
  }
  .qa-toggle {
    order: -1;
    margin-left: auto;
    align-self: flex-start;
  }
  .qa-answer {
    padding: 14px 18px 18px;
    font-size: 14.5px;
  }
  .qa-answer ul li {
    font-size: 14px;
  }

  .ks-grid {
    grid-template-columns: 1fr;
  }
  .key-summary {
    padding: 24px 20px;
  }
  .key-summary-header h3 {
    font-size: 18px;
  }

  .subsection-heading {
    font-size: 18px;
    margin: 28px 0 14px;
  }

  .step-card-row {
    flex-direction: column !important;
  }
  .banner-chips {
    margin-top: 22px;
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVE — SMALL MOBILE (max 475px)
───────────────────────────────────────────── */
@media (max-width: 475px) {
  .top-banner {
    padding: 28px 14px 24px;
  }
  .banner-title {
    font-size: 23px;
  }
  .content {
    padding: 0 12px 48px;
  }
  .qa-question {
    padding: 13px 14px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .qa-question .q-num {
    order: -1;
    margin-top: 0;
    margin-bottom: 2px;
  }
  .qa-question .q-text {
    flex: 1 1 100%;
    order: 0;
  }
  .qa-toggle {
    order: -1;
    margin-left: auto;
  }
  .qa-answer {
    padding: 12px 14px 16px;
  }
  .key-summary {
    padding: 20px 16px;
  }
}
