/* ============================================================
   LESSPLAN.COM — Design System & Stylesheet
   Identity: Sovereign ELA Pedagogy & Resource Hub of Mr. H
   Theme: Clean Paper / Ink / Subtle Brass (light, high-contrast)
   ============================================================ */

:root {
  --void: #fbfaf7;            /* page paper */
  --void-deep: #f3efe7;       /* footer / subtle band */
  --surface: #ffffff;         /* card */
  --surface-raised: #f6f3ec;  /* raised / hover */
  --surface-hover: #efeae0;   /* deeper hover */
  --edge: #e4ded0;            /* hairline border */
  --edge-strong: #d6cebb;     /* emphasis border */
  --edge-subtle: rgba(138, 106, 53, 0.16);

  --parchment: #211d16;       /* primary ink */
  --parchment-dim: #474034;   /* secondary ink */
  --parchment-muted: #7a715f; /* tertiary / labels */
  --ink: #211d16;

  --brass: #8a6a35;           /* accent */
  --brass-bright: #6f5426;    /* accent hover */
  --gold: #a9853f;
  --crimson: #b0413e;
  --sage: #3f6f57;
  --lake: #3a6178;

  --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Cascadia Mono', Consolas, 'SF Mono', Menlo, Monaco, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 3px rgba(33, 29, 22, 0.08);
  --shadow-md: 0 4px 16px rgba(33, 29, 22, 0.10);
  --shadow-lg: 0 14px 40px rgba(33, 29, 22, 0.14);

  --max-width: 1160px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--void);
  color: var(--parchment);
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  background: var(--void);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brass);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

a:hover {
  color: var(--brass-bright);
}

/* Typography Helpers */
h1, h2, h3, h4, .serif {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--parchment);
  line-height: 1.2;
}

.mono {
  font-family: var(--font-mono);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Global Masthead / Navigation */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f6f3ec 0%, #ffffff 100%);
  border: 1px solid var(--edge-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
  font-family: var(--font-serif);
  font-weight: bold;
  font-size: 19px;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--parchment);
  line-height: 1.1;
}

.brand-title span {
  color: var(--brass);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--parchment-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--parchment-dim);
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-links a:hover, .nav-links a.active {
  background: var(--surface-raised);
  color: var(--brass);
}

.nav-action {
  background: rgba(138, 106, 53, 0.10) !important;
  border: 1px solid rgba(138, 106, 53, 0.35) !important;
  color: var(--brass) !important;
  font-weight: 600 !important;
}

.nav-action:hover {
  background: rgba(138, 106, 53, 0.18) !important;
  border-color: var(--brass) !important;
}

/* Hero Section */
.hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--edge);
  position: relative;
}

.hero-header {
  max-width: 820px;
  margin-bottom: 32px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  background: rgba(138, 106, 53, 0.08);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(138, 106, 53, 0.22);
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.12;
  margin-bottom: 14px;
  color: var(--parchment);
}

.hero-title em {
  font-style: italic;
  color: var(--brass);
}

.hero-lead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--parchment-dim);
  font-weight: 400;
  max-width: 720px;
  line-height: 1.6;
}

/* Quick Starter Feature Card (The Bellringer Engine) */
.starter-widget {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-top: 3px solid var(--brass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: clamp(20px, 3vw, 32px);
  position: relative;
}

.starter-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--edge);
}

.starter-badge-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.starter-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
  font-weight: 700;
}

.starter-strand-pill {
  background: rgba(138, 106, 53, 0.10);
  color: var(--parchment-dim);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(138, 106, 53, 0.28);
  font-weight: 500;
}

.starter-type-pill {
  background: rgba(63, 111, 87, 0.10);
  color: #2f6a4d;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(63, 111, 87, 0.3);
}

.starter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
  background: var(--surface-raised);
  color: var(--parchment);
}

.btn:hover {
  background: var(--surface-hover);
  color: var(--parchment);
}

.btn-brass {
  background: var(--brass);
  color: #fff !important;
  font-weight: 600;
  border: 1px solid var(--brass);
}

.btn-brass:hover {
  background: var(--brass-bright);
  border-color: var(--brass-bright);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--edge-strong);
  background: var(--surface);
}

.btn-outline:hover {
  border-color: var(--brass);
  color: var(--brass);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12.5px;
}

/* Filter pills row */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.filter-pill {
  padding: 6px 14px;
  font-size: 12.5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--edge-strong);
  color: var(--parchment-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.filter-pill:hover {
  border-color: var(--brass);
  color: var(--parchment);
}

.filter-pill.active {
  background: rgba(138, 106, 53, 0.12);
  border-color: var(--brass);
  color: var(--brass);
  font-weight: 600;
}

/* Starter Content Display */
.starter-content {
  margin-bottom: 20px;
}

.starter-title {
  font-size: clamp(21px, 2.6vw, 28px);
  color: var(--parchment);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stimulus-box {
  background: #faf7f0;
  border: 1px solid rgba(138, 106, 53, 0.22);
  border-left: 4px solid var(--brass);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.6;
  color: var(--parchment);
  white-space: pre-line;
}

.prompt-box {
  background: var(--surface-raised);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.prompt-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prompt-text {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--parchment);
}

.scaffold-box {
  background: rgba(63, 111, 87, 0.08);
  border: 1px dashed rgba(63, 111, 87, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 14px;
  color: #2f5c44;
  margin-bottom: 16px;
  font-style: italic;
}

.scaffold-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3f6f57;
  font-style: normal;
  margin-bottom: 4px;
}

/* Expandable Teacher Note */
.teacher-accordion {
  margin-bottom: 16px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.teacher-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: none;
  border: none;
  color: var(--parchment-dim);
  font-family: var(--font-sans);
  font-size: 13.5px;
  cursor: pointer;
  text-align: left;
}

.teacher-toggle:hover {
  background: var(--surface-raised);
  color: var(--brass);
}

.teacher-drawer {
  display: none;
  padding: 14px 18px;
  border-top: 1px solid var(--edge);
  font-size: 14px;
  line-height: 1.6;
  color: var(--parchment-dim);
  background: var(--surface-raised);
}

.teacher-drawer.open {
  display: block;
}

/* Quick Timer & Scratchpad Bar */
.starter-bottombar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--edge);
}

@media (max-width: 800px) {
  .starter-bottombar {
    grid-template-columns: 1fr;
  }
}

.timer-card {
  background: var(--surface-raised);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timer-display {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--brass);
  letter-spacing: 0.05em;
  min-width: 64px;
}

.timer-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timer-input {
  width: 58px;
  background: var(--surface);
  border: 1px solid var(--edge-strong);
  border-radius: var(--radius-sm);
  color: var(--parchment);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  padding: 5px 8px;
  text-align: center;
}

.timer-input:focus {
  outline: none;
  border-color: var(--brass);
}

.timer-unit {
  font-size: 12.5px;
  color: var(--parchment-muted);
}

.scratchpad-container {
  background: var(--surface-raised);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.scratchpad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--parchment-muted);
}

.scratchpad-textarea {
  width: 100%;
  height: 64px;
  background: var(--surface);
  border: 1px solid var(--edge-strong);
  border-radius: var(--radius-sm);
  color: var(--parchment);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 8px 12px;
  resize: vertical;
}

.scratchpad-textarea:focus {
  outline: none;
  border-color: var(--brass);
}

/* Fullscreen Classroom Presentation Mode (high-contrast light) */
body.projector-mode .masthead,
body.projector-mode .hero-header,
body.projector-mode .filter-bar,
body.projector-mode footer,
body.projector-mode .section {
  display: none !important;
}

body.projector-mode .hero {
  border-bottom: none;
  padding: 0;
}

body.projector-mode .starter-widget {
  min-height: 94vh;
  margin: 3vh auto;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 1.2em;
  border-width: 2px;
}

body.projector-mode .stimulus-box {
  font-size: 26px;
  line-height: 1.6;
  padding: 28px 34px;
}

body.projector-mode .prompt-text {
  font-size: 22px;
  line-height: 1.6;
}

body.projector-mode .timer-display {
  font-size: 48px;
}

/* Section Common */
.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--edge);
}

.section-head {
  margin-bottom: 32px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: clamp(25px, 3.2vw, 34px);
  color: var(--parchment);
  margin-bottom: 10px;
}

.section-desc {
  font-size: 16px;
  color: var(--parchment-dim);
  max-width: 720px;
  line-height: 1.6;
}

/* Interactive Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tool-card:hover {
  color: inherit;
  transform: translateY(-3px);
  border-color: var(--brass);
  box-shadow: var(--shadow-md);
}

.tool-card:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tool-card-flag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--parchment-muted);
}

.tool-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  border: 1px solid var(--edge);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
}

.tool-title {
  font-size: 18px;
  color: var(--parchment);
  margin-bottom: 8px;
  line-height: 1.25;
}

.tool-desc {
  font-size: 14px;
  color: var(--parchment-dim);
  line-height: 1.55;
  margin-bottom: 16px;
}

.tool-open {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tool-open span {
  transition: transform 0.15s ease;
}

.tool-card:hover .tool-open span {
  transform: translateX(3px);
}

/* Slim resource strip */
.cloud-strip {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--parchment-dim);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cloud-strip:hover {
  color: var(--parchment-dim);
  border-color: var(--brass);
  background: var(--surface-raised);
}

.cloud-strip-icon {
  color: var(--brass);
  display: flex;
}

.cloud-strip-text {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 14px;
  flex: 1;
}

.cloud-strip-text strong {
  color: var(--parchment);
  font-weight: 600;
}

.cloud-strip-go {
  font-size: 13px;
  font-weight: 600;
  color: var(--brass);
  white-space: nowrap;
}

.link-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.text-link {
  font-size: 14px;
  font-weight: 600;
}

/* Curriculum Pillars (Years 7–12) */
.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.curriculum-card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: border-color 0.15s ease;
}

.curriculum-card:hover {
  border-color: var(--brass);
}

.curriculum-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 10px;
  display: inline-block;
}

.curriculum-title {
  font-size: 19px;
  color: var(--parchment);
  margin-bottom: 8px;
}

.curriculum-desc {
  font-size: 14px;
  color: var(--parchment-dim);
  line-height: 1.55;
  margin-bottom: 14px;
}

.curriculum-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Sovereign Manifesto Section */
.manifesto-box {
  background: var(--surface);
  border: 1px solid rgba(138, 106, 53, 0.35);
  border-radius: var(--radius-xl);
  padding: clamp(26px, 4vw, 44px);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.manifesto-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(19px, 2.3vw, 26px);
  color: var(--parchment);
  line-height: 1.45;
  margin-bottom: 20px;
  border-left: 3px solid var(--brass);
  padding-left: 22px;
}

.manifesto-body {
  font-size: 15px;
  color: var(--parchment-dim);
  line-height: 1.7;
  max-width: 900px;
  display: grid;
  gap: 14px;
}

/* ============================================================
   RESOURCES DIRECTORY (course → unit → files)
   ============================================================ */
.page-hero {
  padding: 44px 0 24px;
}

.page-hero .section-title {
  font-size: clamp(30px, 4.5vw, 44px);
}

.section-flush {
  padding-top: 8px;
  border-bottom: none;
}

.res-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.res-search-input {
  flex: 1;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--edge-strong);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-size: 15px;
  color: var(--parchment);
  font-family: var(--font-sans);
  transition: border-color 0.15s ease;
}

.res-search-input:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(138, 106, 53, 0.12);
}

.res-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--parchment-muted);
  white-space: nowrap;
}

.res-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--parchment-muted);
  font-size: 14.5px;
}

/* Course section */
.course-section {
  margin-bottom: 40px;
  scroll-margin-top: 90px;
}

.course-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--edge);
  margin-bottom: 4px;
}

.course-title {
  font-size: 22px;
  color: var(--parchment);
}

.course-year {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.course-desc {
  font-size: 14px;
  color: var(--parchment-dim);
  margin: 8px 0 14px;
  max-width: 820px;
}

.course-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--parchment-muted);
}

/* Unit accordion */
.unit {
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  margin: 10px 0;
  background: var(--surface);
  overflow: hidden;
}

.unit-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
}

.unit-head:hover {
  background: var(--surface-raised);
}

.unit-head:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: -2px;
}

.unit-title {
  flex: 1;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--parchment);
  line-height: 1.3;
}

.unit-text {
  font-family: var(--font-serif);
  font-size: 13.5px;
  color: var(--brass);
  font-style: italic;
}

.unit-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--parchment-muted);
  white-space: nowrap;
}

.unit-arrow {
  color: var(--brass);
  font-size: 12px;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.unit.open .unit-arrow {
  transform: rotate(90deg);
}

.unit-body {
  display: none;
  border-top: 1px solid var(--edge);
  background: var(--surface-raised);
  padding: 8px 18px 14px;
}

.unit.open .unit-body {
  display: block;
}

/* File rows */
.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--edge);
}

.file-row:last-child {
  border-bottom: none;
}

.file-badge {
  width: 42px;
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brass);
  background: rgba(138, 106, 53, 0.08);
  border: 1px solid rgba(138, 106, 53, 0.25);
  border-radius: var(--radius-sm);
  padding: 5px 0;
  text-transform: uppercase;
}

.file-main {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 14px;
  color: var(--parchment);
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.file-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--parchment-muted);
  margin-top: 2px;
}

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 13px;
  border: 1px solid var(--edge-strong);
  border-radius: 999px;
  color: var(--brass);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.file-link:hover {
  border-color: var(--brass);
  background: rgba(138, 106, 53, 0.08);
  color: var(--brass-bright);
}

/* Type sub-grouping within a unit/group */
.type-group {
  margin: 4px 0 12px;
}

.type-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass);
  margin-bottom: 4px;
}

.type-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--edge);
}

.type-count {
  color: var(--parchment-muted);
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 44px 0;
  background: var(--void-deep);
  border-top: 1px solid var(--edge);
  font-size: 14px;
  color: var(--parchment-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-note {
  max-width: 500px;
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--parchment-dim);
}

.footer-nav a:hover {
  color: var(--brass);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .masthead-inner {
    flex-direction: column;
    height: auto;
    padding: 12px 0;
    gap: 10px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero {
    padding: 32px 0 24px;
  }
  .tools-grid,
  .curriculum-grid {
    grid-template-columns: 1fr;
  }
  .file-row {
    flex-wrap: wrap;
  }
  .cloud-strip {
    flex-wrap: wrap;
  }
}
