/* ==========================================================================
   OXFORD STUDY HUB — "Oxford Archival" University-Press Design System
   Light (Warm Ivory), Sepia (Archival Parchment), Dark (Obsidian)
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #F6F4EF;
  --panel: #FCFBF8;
  --panel-alt: #F1EEE7;
  --ink: #191D23;
  --ink-soft: #5C636E;
  --rule: #DCD8CE;
  --accent: #1F3552;
  --accent-soft: rgba(31, 53, 82, 0.07);
  --accent-mid: rgba(31, 53, 82, 0.14);
  --colophon: #26374D;
  --vh: #8C2D25;
  --h: #8F5B14;
  --m: #2C4A6E;
  --l: #5B646D;
  --ref: #1F3552;
  --ok: #1F6A44;
  --ok-bg: #E5F2EB;
  --err: #8C2D25;
  --err-bg: #F6E4E2;
  --warn-bg: #F7EFE0;
}

:root[data-theme="sepia"] {
  color-scheme: light;
  --bg: #F2E9D8;
  --panel: #FAF4E6;
  --panel-alt: #EDE2CC;
  --ink: #2A2118;
  --ink-soft: #6A5B48;
  --rule: #D8CBB4;
  --accent: #5E3F24;
  --accent-soft: rgba(94, 63, 36, 0.08);
  --accent-mid: rgba(94, 63, 36, 0.16);
  --colophon: #5E3F24;
  --ref: #5E3F24;
  --warn-bg: #EFE0C4;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12151A;
  --panel: #191D24;
  --panel-alt: #1F242D;
  --ink: #E7E5DF;
  --ink-soft: #9BA2AE;
  --rule: #2B313C;
  --accent: #95B1D6;
  --accent-soft: rgba(149, 177, 214, 0.11);
  --accent-mid: rgba(149, 177, 214, 0.2);
  --colophon: #2E435E;
  --vh: #C75B52;
  --h: #C99142;
  --m: #6D99C9;
  --l: #8A949E;
  --ref: #7FA1CC;
  --ok: #5BB685;
  --ok-bg: #172F22;
  --err: #D46C63;
  --err-bg: #331A18;
  --warn-bg: #2D2415;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, Cambria, 'Times New Roman', serif;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.ui-font { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
.serif-font { font-family: 'Cormorant Garamond', Georgia, serif; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.num-tab { font-variant-numeric: tabular-nums; }

/* Inline Preview / Mode Strip */
.preview-strip {
  background: var(--panel-alt);
  border-bottom: 1px solid var(--rule);
  padding: 0.36rem 1.25rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.preview-strip strong { color: var(--h); font-weight: 600; }
.preview-controls { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.preview-select {
  font-family: inherit;
  font-size: 0.71rem;
  padding: 0.18rem 0.45rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--panel);
  color: var(--ink);
}

/* Academic Masthead */
header.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 1.35rem 0.8rem;
  flex-shrink: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; flex-direction: column; gap: 0.08rem; min-width: 0; }
.brand-kicker {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
header.masthead h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.42rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.12;
  color: var(--ink);
}
.brand-sub {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.73rem;
  color: var(--ink-soft);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.copy-badge {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: #FFFFFF;
  background: var(--colophon);
  padding: 0.3rem 0.58rem;
  border-radius: 3px;
  font-weight: 600;
  white-space: nowrap;
}

/* Status Pills & Buttons */
.btn-ghost, .btn-primary, .btn-danger, .btn-gold {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.36rem 0.76rem;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn-ghost { border: 1px solid var(--rule); background: transparent; color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-primary { border: 1px solid var(--accent); background: var(--accent); color: #FFFFFF; font-weight: 600; }
.btn-primary:hover:not(:disabled) { opacity: 0.9; }
.btn-danger { border: 1px solid var(--err); background: transparent; color: var(--err); font-weight: 600; }
.btn-danger:hover:not(:disabled) { background: var(--err-bg); }
.btn-gold { border: 1px solid var(--h); background: var(--warn-bg); color: var(--h); font-weight: 600; }
.btn-gold:hover:not(:disabled) { opacity: 0.9; }
button:disabled { opacity: 0.48; cursor: not-allowed; }
.btn-sm { padding: 0.24rem 0.56rem; font-size: 0.69rem; }

:root[data-theme="dark"] .btn-primary { color: #12151A; }

.status-pill {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 2px;
  border: 1px solid var(--rule);
  background: var(--panel-alt);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}
.status-pill.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.status-pill.warn { background: var(--warn-bg); border-color: var(--h); color: var(--h); }
.status-pill.err { background: var(--err-bg); border-color: var(--err); color: var(--err); }

/* Primary Section Navigation Bar */
nav.primary-nav {
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 3px 0 -2px var(--bg), 0 4px 0 -2px var(--rule);
  flex-shrink: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.pnav-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.pnav-inner::-webkit-scrollbar { display: none; }
.pnav-inner.admin-wide { max-width: 1180px; }
.pnav-tab {
  position: relative;
  background: none;
  border: none;
  padding: 0.72rem 0.1rem 0.68rem;
  font-family: inherit;
  font-size: 0.77rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  transition: color 0.15s;
}
.pnav-tab:hover { color: var(--ink); }
.pnav-tab.active { color: var(--accent); }
.pnav-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}
.pnav-badge {
  font-size: 0.63rem;
  font-weight: 600;
  padding: 0.08rem 0.42rem;
  border-radius: 2px;
  background: var(--panel-alt);
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}
.pnav-tab.active .pnav-badge {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-mid);
}

main { flex: 1; min-height: 0; overflow: auto; }
.wrap { max-width: 820px; margin: 0 auto; padding: 1.35rem 1.25rem 4rem; position: relative; }
.wrap.admin-wide { max-width: 1180px; }

/* Auth Gate & Maintenance Screens */
.gate-shell {
  max-width: 520px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}
.gate-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1.8rem 1.75rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.gate-card h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0.25rem 0 0.5rem;
  color: var(--ink);
  line-height: 1.15;
}
.gate-card p { font-size: 0.84rem; line-height: 1.55; color: var(--ink-soft); margin: 0 0 1.1rem; }
.gate-divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.15rem 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}
.gate-divider::before, .gate-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.field-row { display: flex; flex-direction: column; gap: 0.32rem; margin-bottom: 0.85rem; }
.field-lbl {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}
.inp, .textarea, .sel {
  width: 100%;
  padding: 0.52rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  outline: none;
}
.inp:focus, .textarea:focus, .sel:focus { border-color: var(--accent); background: var(--panel); }
.textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.inline-form { display: flex; gap: 0.5rem; align-items: stretch; }
.inline-form .inp { flex: 1; }

/* Master Hub Banners & Strips */
.announcement-bar {
  padding: 0.68rem 0.95rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  border-radius: 3px;
  margin-bottom: 0.9rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8rem;
  line-height: 1.48;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.announcement-bar.warn { border-left-color: var(--h); background: var(--warn-bg); }
.announcement-bar.urgent { border-left-color: var(--vh); background: var(--err-bg); color: var(--err); }

.countdown-bar {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  font-family: 'Inter', system-ui, sans-serif;
}
.countdown-clock {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.resume-bar {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--h);
  border-radius: 4px;
  padding: 0.8rem 1rem;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-family: 'Inter', system-ui, sans-serif;
}
.resume-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}
.resume-meta { font-size: 0.73rem; color: var(--ink-soft); margin-top: 0.1rem; }

/* Hub Toolbar (Global Search + Cram Mode + Offline Vault) */
.hub-controls {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.95rem 1.05rem;
  margin-bottom: 1.25rem;
  font-family: 'Inter', system-ui, sans-serif;
}
.hub-ctrl-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}
.hub-ctrl-row .search-box { margin-bottom: 0; flex: 1; min-width: 210px; }

.cram-toggle.active {
  background: var(--err-bg);
  border-color: var(--vh);
  color: var(--vh);
  font-weight: 600;
}
.vault-toggle.active {
  background: var(--ok-bg);
  border-color: var(--ok);
  color: var(--ok);
  font-weight: 600;
}

/* Subject Cards Grid */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.35rem 0 0.7rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rule);
  font-family: 'Inter', system-ui, sans-serif;
}
.section-head h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.32rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}
.section-head span {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.subject-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--sub-accent, var(--accent));
  border-radius: 4px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.15s, transform 0.15s;
}
.subject-card:hover { border-color: var(--sub-accent, var(--accent)); transform: translateY(-1px); }
.sub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: 'Inter', system-ui, sans-serif;
}
.sub-code {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sub-accent, var(--accent));
}
.sub-badges { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.mini-tag {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.61rem;
  font-weight: 600;
  padding: 0.08rem 0.38rem;
  border-radius: 2px;
  border: 1px solid var(--rule);
  background: var(--panel-alt);
  color: var(--ink-soft);
}
.sub-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.18;
}
.sub-desc {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.76rem;
  color: var(--ink-soft);
  line-height: 1.42;
  margin: 0;
}
.sub-prog {
  height: 3px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.15rem;
}
.sub-prog-fill {
  height: 100%;
  background: var(--sub-accent, var(--accent));
  transition: width 0.3s ease;
}
.sub-foot {
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  color: var(--ink-soft);
}

/* Recently Updated & Search Results Strips */
.strip-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.strip-item {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.62rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.strip-item:hover { background: var(--accent-soft); border-color: var(--accent); }

/* Assessment Lab Feature Band */
.lab-feature {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1.1rem 1.2rem 1.15rem;
  margin-bottom: 1.25rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.lab-f-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.lab-f-kicker {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.15rem;
}
.lab-f-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.32rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
  color: var(--ink);
}
.lab-f-sub { font-size: 0.77rem; color: var(--ink-soft); margin: 0.22rem 0 0; line-height: 1.45; }
.lab-modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
.lab-mod {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.72rem 0.8rem;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.lab-mod:hover { border-color: var(--accent); background: var(--panel); transform: translateY(-1px); }
.lab-mod-top { display: flex; align-items: center; justify-content: space-between; color: var(--accent); }
.lab-mod-num { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.lab-mod-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.05rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.lab-mod-meta { font-size: 0.7rem; color: var(--ink-soft); line-height: 1.35; }
.lab-mod-stat {
  margin-top: auto;
  padding-top: 0.38rem;
  border-top: 1px solid var(--rule);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Scholarly Dashboard & Filters */
.dash {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.35rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.metric { display: flex; flex-direction: column; gap: 0.12rem; }
.metric-lbl { font-size: 0.61rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 600; }
.metric-val { font-size: 0.86rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.dash-bar { height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; margin-bottom: 0.85rem; }
.dash-fill { height: 100%; width: 0%; background: var(--accent); transition: width 0.35s ease; }

.search-box {
  width: 100%;
  padding: 0.52rem 0.78rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.83rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  outline: none;
  margin-bottom: 0.68rem;
}
.search-box:focus { border-color: var(--accent); background: var(--panel); }

.filters { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 0.35rem; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.f-pill {
  flex: 0 0 auto;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.71rem;
  font-weight: 500;
  padding: 0.28rem 0.66rem;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.f-pill:hover { border-color: var(--accent); color: var(--ink); }
.f-pill.active { background: var(--accent); color: #FFFFFF; border-color: var(--accent); font-weight: 600; }
:root[data-theme="dark"] .f-pill.active { color: #12151A; }

/* Syllabus Index */
.list-area { position: relative; }
.spine-rule { position: absolute; left: 4px; top: 1.1rem; bottom: 1rem; width: 1px; background: var(--rule); }
.spine-tick { position: absolute; left: 0px; width: 9px; height: 2px; background: var(--accent); transition: top 0.3s ease; }
.group-label {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--accent);
  margin: 1.8rem 0 0.5rem 1.35rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
}
.group-label:first-of-type { margin-top: 0.25rem; }
.row-wrap { display: flex; align-items: center; gap: 0.2rem; border-bottom: 1px solid transparent; }
.row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  padding: 0.72rem 0.45rem 0.72rem 1.35rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  border-radius: 3px;
  transition: background 0.15s;
}
.row:hover { background: var(--accent-soft); }
.row-num {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  width: 1.65rem;
  font-variant-numeric: tabular-nums;
}
.row-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.row-top { display: flex; align-items: baseline; gap: 0.45rem; flex-wrap: wrap; }
.row-title { font-size: 1.13rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
.prob-pill {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  color: #FFFFFF;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.p-vh { background: var(--vh); }
.p-h { background: var(--h); }
.p-m { background: var(--m); }
.p-l { background: var(--l); }
.p-ref { background: var(--ref); }
.offline-dot {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.59rem;
  font-weight: 600;
  padding: 0.08rem 0.34rem;
  border-radius: 2px;
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok);
}
.row-meta {
  font-size: 0.73rem;
  color: var(--ink-soft);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin-top: 0.14rem;
}
.rule { display: flex; width: 52px; height: 2px; flex-shrink: 0; border-radius: 1px; overflow: hidden; }
.rule-fill { height: 2px; background: var(--accent); width: 0%; transition: width 0.4s ease; }
.rule-rest { height: 2px; background: var(--rule); flex: 1; }

.bm-btn, .icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 0.42rem 0.38rem;
  border-radius: 3px;
  flex-shrink: 0;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, color 0.15s;
}
.bm-btn .bm-ico path { fill: none; }
.bm-btn:hover, .icon-btn:hover { opacity: 1; color: var(--accent); }
.bm-btn.starred { color: var(--h); opacity: 1; }
.bm-btn.starred .bm-ico path { fill: currentColor; }
.icon-btn.saved { color: var(--ok); opacity: 1; }

.gym-inline-strip {
  margin: 0.35rem 0 0.25rem 1.35rem;
  padding: 0.62rem 0.85rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.76rem;
  color: var(--ink-soft);
}
.gym-inline-strip strong { color: var(--ink); font-weight: 600; }

.empty-msg {
  text-align: center;
  padding: 2.2rem 1rem;
  color: var(--ink-soft);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.86rem;
}

footer.hub-footer {
  text-align: center;
  padding: 1rem 1rem 2rem;
  flex-shrink: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  background: var(--panel);
}

/* Reader Overlay */
#overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: none;
  flex-direction: column;
  z-index: 60;
}
#overlay.open { display: flex; }
#top-progress { height: 2px; background: var(--rule); flex-shrink: 0; }
#top-progress-fill { height: 100%; width: 0%; background: var(--accent); transition: width 0.15s linear; }
.overlay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.56rem 1.05rem;
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.overlay-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}
#overlay iframe { flex: 1; border: none; width: 100%; background: var(--bg); }

/* Assessment Lab Workspace */
.lab-shell { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
.lab-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.95rem;
  margin-bottom: 1.05rem;
  border-bottom: 1px solid var(--rule);
}
.lab-header h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0.12rem 0 0;
  line-height: 1.15;
  color: var(--ink);
}
.lab-header p { font-size: 0.78rem; color: var(--ink-soft); margin: 0.25rem 0 0; }
.drill-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.15rem; overflow-x: auto; scrollbar-width: none; }
.drill-tabs::-webkit-scrollbar { display: none; }
.d-tab {
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.42rem 0.85rem;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.d-tab:hover { border-color: var(--accent); color: var(--ink); }
.d-tab.active { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
:root[data-theme="dark"] .d-tab.active { color: #12151A; }

.d-panel { display: none; }
.d-panel.active { display: block; }
.q-progbar { height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; margin-bottom: 0.9rem; }
.q-progbar-fill { height: 100%; width: 4%; background: var(--accent); transition: width 0.25s ease; }
.q-card { background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; padding: 1.2rem 1.35rem; margin-bottom: 1rem; }
.q-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
  padding-bottom: 0.6rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}
.q-txt { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.26rem; line-height: 1.48; margin: 0 0 1rem; color: var(--ink); }
.q-opts { display: grid; gap: 0.48rem; }
.q-opt {
  text-align: left;
  padding: 0.62rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.15s;
}
.q-opt:hover:not(:disabled) { border-color: var(--accent); background: var(--panel); }
.q-opt.correct { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); font-weight: 600; }
.q-opt.wrong { background: var(--err-bg); border-color: var(--err); color: var(--err); }
.q-exp {
  margin-top: 0.9rem;
  padding: 0.72rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 0.83rem;
  line-height: 1.52;
  display: none;
}
.q-nav { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.05rem; }
.q-nav-group { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; }

/* Report & Flashcards */
.report-box { background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; padding: 1.35rem 1.4rem; }
.report-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.45rem; margin: 0.1rem 0 0; color: var(--ink); }
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0.9rem 0;
  margin: 0.85rem 0 1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.report-item { border: 1px solid var(--rule); background: var(--bg); border-radius: 3px; padding: 0.78rem 0.92rem; margin-bottom: 0.6rem; font-size: 0.82rem; line-height: 1.48; }
.report-item .ri-q { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.06rem; margin-bottom: 0.35rem; color: var(--ink); }
.report-item .ri-ans { font-size: 0.76rem; color: var(--ok); font-weight: 600; margin-bottom: 0.25rem; }
.report-item .ri-exp { font-size: 0.78rem; color: var(--ink-soft); }

.fc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.fc-box {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  padding: 2rem 1.6rem;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0.9rem;
  transition: border-color 0.15s;
}
.fc-box:hover { border-color: var(--accent); }
.fc-side { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 0.7rem; font-weight: 600; }
.fc-text { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.3rem; line-height: 1.5; color: var(--ink); max-width: 560px; }
.fc-hint { font-size: 0.7rem; color: var(--ink-soft); margin-top: 1rem; }
.btn-mastered { border: 1px solid var(--ok); background: var(--ok-bg); color: var(--ok); font-weight: 600; }

/* Timer & Pacing Table */
.timer-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.timer-clock { font-family: 'Inter', system-ui, sans-serif; font-size: 1.75rem; font-weight: 600; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.1; }
.timer-stage { font-size: 0.76rem; color: var(--accent); font-weight: 600; margin-top: 0.22rem; }
.time-tbl { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--rule); font-size: 0.84rem; }
.time-tbl th, .time-tbl td { padding: 0.62rem 0.72rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; line-height: 1.45; }
.time-tbl th { background: var(--bg); font-size: 0.69rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); }
.time-tbl tr.active-row td { background: var(--accent-soft); }
.time-tbl tr.active-row td:first-child { border-left: 3px solid var(--accent); }

/* Writing Gym & Arabic RTL */
.gym-subtabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.gym-pane { display: none; }
.gym-pane.active { display: block; }
.cloze-card { background: var(--panel); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 4px; padding: 1.25rem 1.35rem; margin-bottom: 0.9rem; }
.cloze-sent { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.3rem; line-height: 1.65; color: var(--ink); margin: 0.3rem 0 1rem; }
.cloze-cue { display: inline-block; font-family: 'Inter', system-ui, sans-serif; font-size: 0.72rem; font-weight: 600; padding: 0.08rem 0.42rem; border-radius: 2px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; margin: 0 0.18rem; }
.cloze-input {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  width: 175px;
  max-width: 100%;
  border: none;
  border-bottom: 2px solid var(--accent);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  border-radius: 2px 2px 0 0;
}
.cloze-input.ok { border-bottom-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.cloze-input.bad { border-bottom-color: var(--err); background: var(--err-bg); color: var(--err); }
.cloze-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; margin: 0.75rem 0; }
.cloze-fb { margin-top: 0.8rem; padding: 0.7rem 0.9rem; border-left: 3px solid var(--accent); background: var(--accent-soft); font-size: 0.82rem; line-height: 1.5; display: none; }

.ar-panel, [dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: 'Amiri', 'Traditional Arabic', 'Times New Roman', serif;
  font-size: 1.25rem;
  line-height: 1.95;
}
.ar-panel {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-right: 3px solid var(--h);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  margin: 0.65rem 0 0.9rem;
  color: var(--ink);
}
.polish-box {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.15rem 1.3rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.72;
  color: var(--ink);
  margin-bottom: 0.85rem;
}
.p-weak { background: var(--err-bg); color: var(--err); border-bottom: 2px dashed var(--err); padding: 0.05rem 0.3rem; border-radius: 2px; cursor: pointer; font-weight: 600; }
.p-done { background: var(--ok-bg); color: var(--ok); border-bottom: 2px solid var(--ok); padding: 0.05rem 0.3rem; border-radius: 2px; font-weight: 600; }
.polish-why { background: var(--panel); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 4px; padding: 0.8rem 1rem; font-size: 0.82rem; line-height: 1.5; color: var(--ink); margin-bottom: 0.9rem; min-height: 52px; }

.sb-select { width: 100%; padding: 0.52rem 0.72rem; border: 1px solid var(--rule); border-radius: 3px; background: var(--panel); color: var(--ink); font-family: 'Inter', system-ui, sans-serif; font-size: 0.82rem; margin-bottom: 0.75rem; }
.sb-bar { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.65rem; }
.sb-assist { background: var(--panel); border: 1px solid var(--rule); border-left: 3px solid var(--h); border-radius: 4px; padding: 0.78rem 0.95rem; margin-bottom: 0.8rem; font-size: 0.82rem; line-height: 1.5; }
.sb-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.sb-chip { font-size: 0.73rem; font-weight: 600; padding: 0.18rem 0.52rem; border-radius: 3px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-mid); cursor: pointer; }
.sb-chip:hover { background: var(--accent); color: #FFFFFF; }
.upgrader-bar { background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; padding: 0.7rem 0.9rem; margin-bottom: 0.75rem; font-size: 0.78rem; }
.upgrader-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.upgrader-out { margin-top: 0.55rem; padding-top: 0.5rem; border-top: 1px solid var(--rule); font-size: 0.8rem; color: var(--ink); display: none; }
.sb-textarea { width: 100%; min-height: 145px; padding: 0.8rem 0.95rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--panel); color: var(--ink); font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.12rem; line-height: 1.58; resize: vertical; outline: none; }
.sb-textarea:focus { border-color: var(--accent); }
.sb-model { background: var(--panel); border: 1px solid var(--accent); border-left: 3px solid var(--accent); border-radius: 4px; padding: 1rem 1.15rem; margin-top: 0.9rem; display: none; }
.sb-model-txt { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.14rem; line-height: 1.58; color: var(--ink); margin: 0.35rem 0 0.85rem; }
.scorecard { border-top: 1px solid var(--rule); padding-top: 0.75rem; margin-top: 0.6rem; }
.sc-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-size: 0.79rem; margin-bottom: 0.42rem; }
.sc-row input[type="range"] { width: 120px; accent-color: var(--accent); }
.sc-total { font-size: 0.88rem; font-weight: 700; color: var(--accent); margin-top: 0.55rem; padding-top: 0.45rem; border-top: 1px solid var(--rule); }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 21, 26, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 90;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1.35rem 1.45rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.modal-card.wide { max-width: 820px; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid var(--rule);
}
.modal-head h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 120;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  padding: 0.65rem 0.95rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  display: none;
  max-width: 360px;
}
.toast.show { display: block; }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }

/* ==========================================================================
   ADMIN COMMAND CENTER
   ========================================================================== */
.admin-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.admin-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; }
.admin-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.05rem 1.2rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin-bottom: 1rem;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding-bottom: 0.6rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.card-head h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.26rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  font-family: 'Inter', system-ui, sans-serif;
}
.kpi-val {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-top: 0.18rem;
}

.tbl-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 3px; background: var(--panel); }
.arch-tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
}
.arch-tbl th, .arch-tbl td {
  padding: 0.56rem 0.68rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: middle;
}
.arch-tbl th {
  background: var(--panel-alt);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.arch-tbl tr:last-child td { border-bottom: none; }

.split-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 0.75rem;
}
.split-preview-frame {
  width: 100%;
  height: 420px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg);
}
.code-textarea {
  width: 100%;
  height: 420px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.48;
  padding: 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}

.size-meter {
  height: 6px;
  border-radius: 3px;
  background: var(--rule);
  overflow: hidden;
  margin: 0.35rem 0;
}
.size-meter-fill { height: 100%; background: var(--ok); transition: width 0.25s ease; }
.size-meter-fill.warn { background: var(--h); }
.size-meter-fill.danger { background: var(--err); }

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.4rem;
}
.check-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg);
  cursor: pointer;
}

.email-preview-box {
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #F6F4EF;
  padding: 1rem;
  max-height: 420px;
  overflow: auto;
}

@media (max-width: 860px) {
  .admin-grid-2, .admin-grid-3, .admin-grid-4, .split-editor { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  header.masthead { flex-direction: column; align-items: flex-start; gap: 0.55rem; }
  .header-right { width: 100%; justify-content: flex-start; }
  .subject-grid, .lab-modules, .cloze-choices, .report-grid { grid-template-columns: 1fr; }
  .dash-metrics { grid-template-columns: repeat(2, 1fr); }
  .rule { width: 32px; }
  .row-title { font-size: 1.05rem; }
}

/* ==========================================================================
   UNIVERSITY-PRESS PDF / PRINT STYLESHEET
   ========================================================================== */
.print-only { display: none; }

@media print {
  @page { size: A4; margin: 16mm 15mm 18mm 15mm; }
  html, body {
    height: auto !important;
    overflow: visible !important;
    background: #FFFFFF !important;
    color: #16191F !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .preview-strip, nav.primary-nav, .header-right button, .lab-feature, .search-box, .filters,
  .dash-bar, .bm-btn, .icon-btn, .rule, .spine-rule, .spine-tick, .drill-tabs,
  .q-nav, .fc-toolbar, .fc-box, .timer-card, .lab-header button, #overlay, .hub-controls,
  .resume-bar, .modal-backdrop, .toast {
    display: none !important;
  }
  main { overflow: visible !important; height: auto !important; }
  .wrap { max-width: 100% !important; padding: 10pt 0 0 !important; }
  header.masthead { padding: 0 0 10pt !important; border-bottom: 1.5pt solid #1F3552 !important; background: #FFFFFF !important; }
  .screen-only-lab { display: none !important; }
  .print-only { display: block !important; }
  .print-sheet-tbl { width: 100%; border-collapse: collapse; font-size: 8.8pt; margin-top: 8pt; }
  .print-sheet-tbl th, .print-sheet-tbl td { border: 0.6pt solid #CFCBC2; padding: 5.5pt 7pt; text-align: left; vertical-align: top; line-height: 1.42; }
  .print-sheet-tbl th { background: #F2EFE8 !important; font-size: 7.5pt; text-transform: uppercase; letter-spacing: 0.05em; color: #16191F; }
}
