/* ===== /assets/curriculum-enhancements.css ===== */
/* ── Accent ──────────────────────────────────────────────────────────────────
 * One accent value, defined once, chosen for CONTRAST rather than by eye.
 *
 * `.ewl-preset-btn` ("Launch Preset ↗") was white on #0284c7 at 13px/800 —
 * 4.10:1, which is not large text, so AA wants 4.5:1. Twelve of them on the
 * page, and it was the hub's only serious axe violation. #0369a1 is the same
 * hue one step darker and reaches 5.93:1.
 *
 * It is a token rather than five literals because the value appeared five
 * times — two backgrounds behind white text and three borders — and the two
 * that mattered could be fixed while the three drifted a shade away.
 * ────────────────────────────────────────────────────────────────────────── */
:root {
  --ewl-accent: #0369a1;
}

.lesson-standard-badge {
  display: inline-block;
  margin: 0 0 8px;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.lesson-standard-badge:hover,
.lesson-standard-badge:focus-visible {
  filter: brightness(1.1);
  outline: none;
}

.hub-toolbar-sticky {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #0f111a;
  padding: 8px 0 10px;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--line);
}

body.light-theme .hub-toolbar-sticky {
  background: var(--cream, #f7f4ec);
}

.hub-clear-filters {
  display: inline-block;
  margin-top: 12px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: #161825;
  color: var(--teal);
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.hub-clear-filters:hover,
.hub-clear-filters:focus-visible {
  border-color: var(--teal);
  outline: none;
}

body.light-theme .hub-clear-filters {
  background: #fff;
}

/* Top-of-hub view banner. Deliberately louder than .hub-student-hint below:
   this one exists to stop a teacher concluding the site is broken when every
   teacher-only panel silently renders nothing. Hidden in teacher view by
   `body.teacher-mode .hub-student-only` (curriculum-top1.css). */
.hub-mode-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
  padding: 10px 14px;
  border: 1.5px solid #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
  color: #78350f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.hub-student-hint {
  font-size: 13px;
  color: var(--muted);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 12px;
  line-height: 1.5;
}

.hub-hint-link {
  display: inline-block;
  min-height: 44px;
  border: 0;
  background: none;
  padding: 10px 2px;
  margin: 0;
  color: var(--teal);
  font-weight: 700;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.hub-hint-link:hover,
.hub-hint-link:focus-visible {
  color: var(--amber);
}

/* Colour alone is not a focus indicator (WCAG 2.4.7). */
.hub-hint-link:focus-visible {
  outline: 3px solid var(--teal, #0f766e);
  outline-offset: 2px;
  border-radius: 4px;
}

.hub-enhance-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
}

.hub-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: #161825;
  color: var(--ink);
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.hub-mode-toggle:hover,
.hub-mode-toggle:focus-visible {
  background: #1e2133;
  border-color: var(--teal);
  color: var(--teal);
  outline: none;
}

.hub-mode-toggle[aria-pressed="true"] {
  background: rgba(45, 212, 191, 0.12);
  border-color: var(--teal);
  color: var(--teal);
}

.hub-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.hub-filter-chip {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #161825;
  color: var(--muted);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.hub-filter-chip:hover,
.hub-filter-chip:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  outline: none;
}

.hub-filter-chip[aria-pressed="true"] {
  background: rgba(45, 212, 191, 0.12);
  border-color: var(--teal);
  color: var(--teal);
}

.hub-progress-summary {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}

.hub-progress-summary strong {
  color: var(--teal);
  font-weight: 700;
}

.unit-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  width: 100%;
}

.unit-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.unit-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.unit-progress-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.lesson-real-world {
  font-size: 13px;
  color: var(--ink);
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 10px;
  line-height: 1.5;
}

.lesson-real-world-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 4px;
}

.lesson-outline-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.progress-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.progress-check:hover,
.progress-check:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  outline: none;
}

.progress-check[aria-pressed="true"] {
  background: rgba(45, 212, 191, 0.15);
  border-color: var(--teal);
  color: var(--teal);
}

.search-highlight {
  background: rgba(251, 191, 36, 0.25);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
}

body:not(.teacher-mode) .teacher-only,
body:not(.teacher-mode) details.teacher-tools {
  display: none !important;
}

body.teacher-mode details.teacher-tools {
  display: block;
}

.search-empty-enhanced {
  text-align: center;
  padding: 28px 18px;
  color: var(--muted);
  font-size: 15px;
}

.search-empty-enhanced strong {
  color: var(--ink);
}

/* Smooth accordion (print fallback) */
@media screen {
  details.unit .unit-body,
  details.lesson .lesson-body {
    overflow: hidden;
    transition: opacity 0.25s ease;
  }
}

body.light-theme .hub-mode-toggle,
body.light-theme .hub-filter-chip {
  background: #ffffff;
  color: #5f6f80;
  border-color: #dbe5ef;
}

body.light-theme .hub-mode-toggle:hover,
body.light-theme .hub-mode-toggle:focus-visible,
body.light-theme .hub-filter-chip:hover,
body.light-theme .hub-filter-chip:focus-visible {
  background: #e8f7f4;
  border-color: #0f766e;
  color: #0f766e;
}

body.light-theme .hub-mode-toggle[aria-pressed="true"],
body.light-theme .hub-filter-chip[aria-pressed="true"] {
  background: #e8f7f4;
  border-color: #0f766e;
  color: #0f766e;
}

body.light-theme .lesson-real-world {
  background: #fffbeb;
  border-color: #fde68a;
  color: #17283a;
}

@media (prefers-reduced-motion: reduce) {
  .unit-progress-fill,
  details.unit .unit-body,
  details.lesson .lesson-body {
    transition: none;
  }
}

/* --- Accessibility: skip link --- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  background: #15487f;
  color: #fff;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(21, 72, 127, 0.3);
  transition: top 0.18s ease;
}
.skip-link:focus {
  top: 12px;
  outline: 3px solid #2c7d6b;
  outline-offset: 2px;
}

/* --- Search result count (live region) --- */
.result-count {
  margin: -2px 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #56627a;
}
.result-count:empty {
  display: none;
}

/* --- Search clear (x) button --- */
/* Browserless hub (/curriculum/): the box hands the query to the units
   browser, so it gets a real Search control and a one-line explanation. */
/* Let the box give way to the Search control at 320px instead of
   overflowing the viewport (inputs carry an intrinsic min-width). */
.search input {
  min-width: 0;
}
.curr-search-go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--teal, #0f766e);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.curr-search-go:hover,
.curr-search-go:focus-visible {
  background: #0b5f59;
  color: #fff;
  outline: 3px solid #0f766e;
  outline-offset: 2px;
}
@media (max-width: 480px) {
  /* Phones: the Search control drops to its own row so the box keeps
     enough width to show what was typed. */
  .search:has(.curr-search-go) {
    flex-wrap: wrap;
    padding-bottom: 10px;
  }
  .search:has(.curr-search-go) .curr-search-go {
    flex: 1 1 100%;
    justify-content: center;
  }
}
.hub-search-hint {
  margin: 6px 0 0;
  font-size: 14px;
  color: #56627a;
}
.hub-search-hint a {
  color: #0f766e;
  font-weight: 700;
}

.curr-search-clear {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef2f7;
  color: #56627a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.curr-search-clear:hover {
  background: #e2e8f0;
  color: #15487f;
}
.curr-search-clear:focus-visible {
  outline: 3px solid #2c7d6b;
  outline-offset: 2px;
}
.curr-search-clear[hidden] {
  display: none;
}

/* --- Back-to-top floating button --- */
.hub-back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #15487f;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(21, 72, 127, 0.35);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    background 0.15s;
}
.hub-back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.hub-back-to-top:hover {
  background: #205fa6;
}
.hub-back-to-top:focus-visible {
  outline: 3px solid #2c7d6b;
  outline-offset: 2px;
}
@media print {
  /* --- "Unit at a glance": clean printable curriculum overview --- */
  .hub-back-to-top,
  .curr-search-clear,
  .skip-link,
  #hub-toolbar-sticky,
  .hub-enhance-controls,
  .hub-filter-chips,
  #hub-progress-summary,
  .hub-student-hint,
  .controls,
  .result-count,
  .no-results,
  .mailbox-feature,
  .eoy-callout,
  details.teacher-tools,
  .hub-recent,
  #launch-modal {
    display: none !important;
  }

  body,
  body.light-theme {
    background: #fff !important;
    color: #14223a !important;
  }
  .wrap {
    max-width: none !important;
    padding: 0 !important;
  }

  /* Print-only header injected by JS */
  #hub-print-header {
    display: block !important;
    margin: 0 0 14px;
    padding: 0 0 10px;
    border-bottom: 2px solid #15487f;
  }
  #hub-print-header h2 {
    margin: 0 0 2px;
    font-size: 20pt;
    color: #15487f;
  }
  #hub-print-header p {
    margin: 0;
    font-size: 10pt;
    color: #56627a;
  }

  /* Force every unit + lesson open and visible (JS also sets [open]) */
  details.unit,
  details.lesson {
    display: block !important;
    border: 1px solid #c9d4e3 !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  details.unit {
    margin: 0 0 10px !important;
  }
  details.unit > summary,
  details.lesson > summary {
    list-style: none;
  }
  details.unit .unit-body,
  details.lesson .lesson-body {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  details.lesson {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Links: keep readable text, drop hover chrome, no URL spew */
  a {
    color: #15487f !important;
    text-decoration: none !important;
  }
  a[href]::after {
    content: "" !important;
  }

  @page {
    margin: 1.4cm;
  }
}

/* Print header is hidden on screen, revealed only in @media print above */
#hub-print-header {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .hub-back-to-top {
    transition: opacity 0.2s ease;
    transform: none;
  }
  .hub-back-to-top.show {
    transform: none;
  }
}

/* --- "Jump back in": recently opened lessons --- */
.hub-recent {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: #f4f8fd;
  border: 1px solid #d8e3f1;
  border-radius: 14px;
}
.hub-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}
.hub-recent-title {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.98rem;
  color: #15487f;
}
.hub-recent-clear {
  border: 0;
  background: transparent;
  color: #56627a;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}
.hub-recent-clear:hover {
  background: #e6eef8;
  color: #15487f;
}
.hub-recent-clear:focus-visible {
  outline: 3px solid #2c7d6b;
  outline-offset: 2px;
}
.hub-recent-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hub-recent-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-height: 48px;
  justify-content: center;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #d8e3f1;
  border-radius: 12px;
  text-decoration: none;
  max-width: 260px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.1s;
}
.hub-recent-chip:hover {
  border-color: #205fa6;
  box-shadow: 0 4px 14px rgba(21, 72, 127, 0.14);
  transform: translateY(-1px);
}
.hub-recent-chip:focus-visible {
  outline: 3px solid #2c7d6b;
  outline-offset: 2px;
}
.hub-recent-unit {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2c7d6b;
}
.hub-recent-name {
  font-weight: 700;
  color: #14223a;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Browse by standard (CCSS domain) --- */
.hub-standards {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
}
.hub-standards-lead {
  font-size: 13px;
  font-weight: 800;
  color: #56627a;
  margin-right: 2px;
  padding-top: 9px;
}
.hub-standard-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #dbe5ef;
  background: #fff;
  border-radius: 9px;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.hub-standard-chip .hsc-code {
  font-weight: 800;
  color: #15487f;
}
.hub-standard-chip .hsc-label {
  color: #56627a;
  font-weight: 600;
}
.hub-standard-chip:hover,
.hub-standard-chip:focus-visible {
  border-color: #2c7d6b;
  outline: none;
}
.hub-standard-chip[aria-pressed="true"] {
  background: #e8f7f4;
  border-color: #2c7d6b;
}
.hub-standard-chip[aria-pressed="true"] .hsc-code,
.hub-standard-chip[aria-pressed="true"] .hsc-label {
  color: #176153;
}
.hub-standard-chip:focus-visible {
  outline: 3px solid #2c7d6b;
  outline-offset: 2px;
}
/* Domain chip + its specific-standard dropdown, stacked vertically. */
.hub-standard-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.hub-substd-select {
  min-height: 32px;
  max-width: 220px;
  padding: 0 8px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #fff;
  color: #15487f;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.hub-substd-select:hover,
.hub-substd-select:focus-visible {
  border-color: #2c7d6b;
  outline: none;
}
.hub-substd-select:focus-visible {
  outline: 3px solid #2c7d6b;
  outline-offset: 2px;
}
@media (max-width: 520px) {
  .hub-standard-chip .hsc-label {
    display: none;
  }
  .hub-substd-select {
    max-width: none;
  }
}

/* --- Per-lesson "Copy link" (shareable deep link) --- */
.lesson-copy-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin-left: 10px;
  padding: 0 14px;
  border: 1px solid #d8e3f1;
  background: #fff;
  color: #15487f;
  border-radius: 10px;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.lesson-copy-link:hover,
.lesson-copy-link:focus-visible {
  border-color: #205fa6;
  background: #f4f8fd;
  outline: none;
}
.lesson-copy-link:focus-visible {
  outline: 3px solid #2c7d6b;
  outline-offset: 2px;
}
.lesson-copy-link.copied {
  background: #e8f7f4;
  border-color: #2c7d6b;
  color: #176153;
}
.lesson-student-launch-copy {
  color: #176153;
  border-color: #b7e0d6;
  background: #f3fbf8;
}
.lesson-student-launch-copy:hover,
.lesson-student-launch-copy:focus-visible {
  border-color: #2c7d6b;
  background: #e8f7f4;
}
@media print {
  .lesson-copy-link {
    display: none !important;
  }
}

/* --- Per-lesson "Print lesson" button (mirrors .lesson-copy-link) --- */
.lesson-print-lesson {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin-left: 10px;
  padding: 0 14px;
  border: 1px solid #d8e3f1;
  background: #fff;
  color: #15487f;
  border-radius: 10px;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.lesson-print-lesson:hover,
.lesson-print-lesson:focus-visible {
  border-color: #205fa6;
  background: #f4f8fd;
  outline: none;
}
.lesson-print-lesson:focus-visible {
  outline: 3px solid #2c7d6b;
  outline-offset: 2px;
}

/* --- Per-activity "Print" pill inside the lesson outline (mirrors .scorm-dl) --- */
.lesson-outline-item .lesson-print-activity {
  flex: 0 0 auto;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1;
  color: #5a6b82;
  background: transparent;
  border: 1px dashed #cdd8e6;
  border-radius: 8px;
  cursor: pointer;
}
.lesson-outline-item .lesson-print-activity:hover,
.lesson-outline-item .lesson-print-activity:focus-visible {
  color: #176153;
  border-style: solid;
  border-color: #2c7d6b;
  outline: none;
}

/* Compact "More" disclosure for SCORM + print chrome on outline rows */
.lesson-outline-item .outline-more {
  flex: 0 0 auto;
  position: relative;
}
.lesson-outline-item .outline-more > summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #5a6b82;
  background: transparent;
  border: 1px dashed #cdd8e6;
  border-radius: 8px;
  user-select: none;
}
.lesson-outline-item .outline-more > summary::-webkit-details-marker {
  display: none;
}
.lesson-outline-item .outline-more[open] > summary {
  color: #176153;
  border-style: solid;
  border-color: #2c7d6b;
}
.lesson-outline-item .outline-more-body {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  display: flex;
  gap: 6px;
  padding: 6px;
  background: #fff;
  border: 1px solid #d8e3f1;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(21, 72, 127, 0.12);
}

@media print {
  .lesson-print-lesson,
  .lesson-print-activity,
  .lesson-outline-item .outline-more {
    display: none !important;
  }
}

/* --- Per-unit "Print unit" button --- */
.unit-print-btn {
  font-family: "Nunito", system-ui, sans-serif;
  cursor: pointer;
  line-height: 1.2;
}
.unit-print-btn:focus-visible {
  outline: 3px solid #2c7d6b;
  outline-offset: 2px;
}
/* Print only the chosen unit when triggered from its card */
@media print {
  body.print-single-unit details.unit:not(.print-this-unit) {
    display: none !important;
  }
}

/* ── Teacher unlock (inline PIN form) ─────────────────────────────────────
   Replaces the old window.prompt(), which no password manager could fill.
   The username field is present for the manager, not for the teacher, so it
   is visually hidden without being display:none (managers skip hidden ones). */
.nt-credential-user {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hub-teacher-unlock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.hub-teacher-pin {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f111c;
  color: var(--ink);
  font-size: 14px;
  min-width: 210px;
}

.hub-teacher-pin:focus-visible {
  outline: none;
  border-color: var(--teal);
}

.hub-teacher-go {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--teal);
  border-radius: 12px;
  background: var(--teal);
  color: #08131a;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.hub-teacher-err {
  flex: 1 0 100%;
  margin: 0;
  font-size: 13px;
  color: #ff9a8a;
}

/* ── Interactive Math Workbench Presets Bar ───────────────────────────────── */
.ewl-preset-bar {
  background: #ffffff;
  border: 1.5px solid var(--ewl-accent);
  border-radius: 18px;
  padding: 24px 28px;
  margin: 24px 0;
  box-shadow: 0 10px 30px -10px rgba(2, 132, 199, 0.15);
}
.ewl-preset-header {
  margin-bottom: 18px;
}
.ewl-preset-badge {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 6px;
}
.ewl-preset-title {
  font-family: Nunito, sans-serif;
  font-size: 1.5rem;
  color: #0f172a;
  margin: 0 0 4px;
  font-weight: 900;
}
.ewl-preset-sub {
  font-size: 0.95rem;
  color: #475569;
  display: block;
}
.ewl-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.ewl-preset-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.ewl-preset-card:hover {
  transform: translateY(-2px);
  border-color: var(--ewl-accent);
  box-shadow: 0 8px 20px -8px rgba(2, 132, 199, 0.25);
}
.ewl-preset-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.ewl-preset-tag {
  font-size: 11px;
  font-weight: 800;
  color: #0369a1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.ewl-preset-name {
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 6px;
  display: block;
}
.ewl-preset-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 14px;
  line-height: 1.4;
}
.ewl-preset-btn {
  background: var(--ewl-accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  text-align: center;
  margin-top: auto;
}

/* ── Project Readiness Overlay Modal ─────────────────────────────────────── */
.ewl-readiness-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ewl-readiness-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 620px;
  width: 100%;
  padding: 28px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  font-family: Atkinson Hyperlegible, system-ui, sans-serif;
}
.ewl-rd-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-weight: 800;
  font-size: 16px;
  color: #475569;
  cursor: pointer;
}
.ewl-rd-badge {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 8px;
}
.ewl-rd-header h2 {
  font-family: Nunito, sans-serif;
  font-size: 1.5rem;
  margin: 0 0 6px;
  color: #0f172a;
}
.ewl-rd-sub {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 20px;
}
.ewl-rd-qbox {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.ewl-rd-qstem {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: #1e293b;
}
.ewl-rd-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ewl-rd-opt {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ewl-rd-opt:hover:not(:disabled) {
  border-color: var(--ewl-accent);
  background: #f0f9ff;
}
.ewl-rd-opt.selected.correct {
  background: #dcfce7;
  border-color: #16a34a;
  color: #14532d;
}
.ewl-rd-opt.selected.wrong {
  background: #fee2e2;
  border-color: #dc2626;
  color: #7f1d1d;
}
.ewl-rd-hint {
  font-size: 0.88rem;
  margin: 10px 0 0;
  line-height: 1.4;
}
.ewl-rd-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}
.ewl-rd-action-btn {
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13.5px;
  text-decoration: none;
  text-align: center;
  flex: 1 1 180px;
}
.ewl-rd-action-btn.primary {
  background: var(--ewl-accent);
  color: #ffffff;
}
.ewl-rd-action-btn.secondary {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

/* ── Dual-Language ESOL & A11y Supports Drawer ─────────────────────────── */
.ewl-esol-a11y-bar {
  background: #f0fdf4;
  border: 1.5px solid #16a34a;
  border-radius: 16px;
  padding: 18px 24px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.ewl-esol-title {
  font-family: Nunito, sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: #14532d;
  margin: 0;
}
.ewl-esol-btn {
  background: #16a34a;
  color: #ffffff;
  border: none;
  border-radius: 9px;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}


/* ===== /assets/curriculum-sidebar.css ===== */
/* ==========================================================================
   Curriculum Hub — sidebar (master-detail) layout.
   Pairs with curriculum-sidebar.js. Uses the hub's existing CSS variables so
   it adapts to dark/light theme. Falls back gracefully if JS doesn't run.
   ========================================================================== */
.curr-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* Left rail of units */
.curr-rail {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding-right: 2px;
}
.curr-rail-item {
  appearance: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  background: var(--card, rgba(255, 255, 255, 0.02));
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.1s;
}
.curr-rail-item:hover,
.curr-rail-item:focus-visible {
  border-color: var(--teal);
  outline: none;
  transform: translateX(2px);
}
.curr-rail-item[aria-current="true"] {
  border-color: var(--teal);
  background: var(--teal-light, rgba(45, 212, 191, 0.12));
}
.curr-rail-item[aria-current="true"] .cri-num {
  color: var(--teal);
}
.cri-num {
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.01em;
}
.cri-name {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

/* Detail mode: one unit at a time, full width */
.curr-shell .units-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px;
}
.curr-detail-mode .unit-card:not(.curr-active) {
  display: none;
}

/* Browse mode (search/filter active): restore the multi-column grid so every
   matching unit shows. */
.curr-browse-mode .units-grid {
  grid-template-columns: repeat(
    auto-fill,
    minmax(min(100%, 420px), 1fr)
  ) !important;
}
.curr-browse-mode .unit-card {
  display: block;
}

/* Responsive: rail becomes a horizontal wrap above the content */
@media (max-width: 820px) {
  .curr-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .curr-rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    overflow: visible;
  }
  .curr-rail-item {
    flex: 1 1 130px;
  }
  .curr-rail-item .cri-name {
    display: none;
  }
}

@media print {
  .curr-rail {
    display: none !important;
  }
  .curr-detail-mode .unit-card {
    display: block !important;
  }
}

/* ===== /assets/reveal-document-links.css ===== */
.reveal-document-downloads { margin-block: 1rem; }
.reveal-document-downloads summary { cursor: pointer; font-size: 1rem; font-weight: 700; padding-block: 0.65rem; }
.reveal-document-downloads summary:focus-visible { outline: 3px solid #075985; outline-offset: 3px; }
.reveal-document-downloads .res-row { padding-block: 0.5rem; }
.reveal-document-downloads a { overflow-wrap: anywhere; }
body:not(.teacher-mode) .reveal-document-downloads.hub-teacher-only,
body:not(.teacher-mode) .reveal-document-downloads .hub-teacher-only,
body:not(.teacher-mode) .reveal-document-unit-downloads .hub-teacher-only { display: none; }

/* ===== /assets/curriculum-product-upgrades.css ===== */
/* Progressive product-layer styles; the core curriculum remains usable without JavaScript. */
.cpu-audiences {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.cpu-audience {
  display: grid;
  grid-template-columns: 34px 1fr;
  min-height: 72px;
  gap: 2px 10px;
  align-content: center;
  padding: 12px 14px;
  border: 1px solid rgba(21, 72, 127, 0.18);
  border-radius: 14px;
  background: #fff;
  color: #14223a;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.cpu-audience > span {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 24px;
}

.cpu-audience strong,
.cpu-audience small {
  grid-column: 2;
}

.cpu-audience small {
  color: #56627a;
  font-size: 13px;
  line-height: 1.35;
}

.cpu-audience:hover {
  border-color: #205fa6;
  box-shadow: 0 7px 18px rgba(21, 72, 127, 0.12);
}

.cpu-audience:focus-visible,
.cpu-palette button:focus-visible,
.cpu-palette a:focus-visible,
.cpu-evidence button:focus-visible,
.cpu-evidence a:focus-visible {
  outline: 3px solid #f0b429;
  outline-offset: 3px;
}

.cpu-contract {
  margin: 10px 0 18px;
  border: 1px solid rgba(21, 72, 127, 0.16);
  border-radius: 12px;
  background: #f7faff;
}

.cpu-contract summary {
  min-height: 48px;
  padding: 12px 16px;
  font-weight: 800;
  color: #15487f;
  cursor: pointer;
}

.cpu-contract-copy {
  padding: 0 16px 14px;
  color: #34445f;
}

.cpu-palette {
  width: min(720px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #14223a;
  box-shadow: 0 24px 80px rgba(20, 34, 58, 0.35);
}

.cpu-palette::backdrop {
  background: rgba(20, 34, 58, 0.55);
  backdrop-filter: blur(3px);
}

.cpu-palette-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px 10px;
}

.cpu-palette-head h2 {
  margin: 0;
  font-size: clamp(22px, 4vw, 30px);
}

.cpu-palette-close,
.cpu-quick-actions button,
.cpu-quick-actions a,
.cpu-feedback button,
.cpu-support-actions a {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid #b9c7d8;
  border-radius: 10px;
  background: #fff;
  color: #15487f;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.cpu-palette-label {
  display: grid;
  gap: 7px;
  padding: 8px 22px;
  font-weight: 800;
}

.cpu-palette-input {
  min-height: 52px;
  padding: 10px 14px;
  border: 2px solid #6f8198;
  border-radius: 12px;
  color: #14223a;
  font: inherit;
  font-size: 18px;
}

.cpu-palette-input:focus {
  border-color: #205fa6;
  outline: 3px solid rgba(32, 95, 166, 0.2);
}

.cpu-palette-status {
  margin: 4px 22px 8px;
  color: #56627a;
}

.cpu-palette-results {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 0 22px;
  list-style: none;
}

.cpu-result a {
  display: grid;
  min-height: 48px;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  color: #15487f;
  text-decoration: none;
}

.cpu-result a:hover {
  border-color: #205fa6;
  background: #f3f7fc;
}

.cpu-result span,
.cpu-result small {
  color: #56627a;
}

.cpu-quick-actions,
.cpu-feedback,
.cpu-support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cpu-quick-actions {
  padding: 16px 22px 22px;
}

.cpu-evidence {
  margin: 16px 0;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid rgba(37, 107, 91, 0.25);
  border-radius: 16px;
  background: #f4fbf8;
}

.cpu-evidence h3 {
  margin: 0 0 6px;
  color: #15487f;
}

.cpu-provenance {
  color: #4f5f73;
}

.cpu-support-actions,
.cpu-feedback {
  margin-top: 12px;
}

.cpu-provenance {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #c9ddd5;
  font-size: 14px;
}

@media (max-width: 820px) {
  .cpu-audiences {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .cpu-audiences {
    grid-template-columns: 1fr;
  }

  .cpu-audience {
    min-height: 68px;
  }

  .cpu-palette {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .cpu-palette-head,
  .cpu-palette-label,
  .cpu-quick-actions {
    padding-left: 14px;
    padding-right: 14px;
  }

  .cpu-palette-results {
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cpu-audience {
    transition: none;
  }
}

@media print {
  .cpu-audiences,
  .cpu-palette,
  .cpu-feedback,
  .cpu-quick-actions {
    display: none !important;
  }
}

.cpu-manual-copy { display: grid; gap: 8px; margin: 12px 16px; font-size: 16px; font-weight: 700; }
.cpu-manual-copy textarea { box-sizing: border-box; width: 100%; min-height: 90px; padding: 10px; font: 16px/1.4 monospace; border: 1px solid #64748b; border-radius: 8px; resize: vertical; color: #14365b; background: #fff; }
.cpu-manual-copy textarea:focus-visible { outline: 3px solid #175da0; outline-offset: 2px; }

.cpu-palette-close { flex-shrink: 0; white-space: nowrap; }
.cpu-palette-head h2 { min-width: 0; }
