/* ============================================================
   LESSPLAN.COM — Design System & Stylesheet
   Identity: Sovereign Pedagogical Vault & Research Hub of Mr. H
   Palette: Parchment on Void / Deep Ink / Brass & Gold / Academic Sage
   ============================================================ */

:root {
  --void: #0d1117;
  --void-deep: #07090d;
  --surface: #141922;
  --surface-raised: #1c2331;
  --surface-hover: #242c3d;
  --edge: #2e384d;
  --edge-subtle: rgba(201, 168, 106, 0.2);

  --parchment: #f6f2e9;
  --parchment-dim: #e4ded0;
  --parchment-muted: #9e9786;
  --ink: #18191a;

  --brass: #c9a86a;
  --brass-bright: #dfbe7d;
  --gold: #d4af37;
  --crimson: #a83a3a;
  --sage: #5b8a72;
  --lake: #447a9c;

  --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 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.55);

  --max-width: 1220px;
}

/* 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:
    radial-gradient(1200px 700px at 15% -10%, #1a2233 0%, transparent 60%),
    radial-gradient(1000px 600px at 85% 10%, #201a14 0%, transparent 50%),
    linear-gradient(180deg, var(--void) 0%, var(--void-deep) 100%);
  background-attachment: fixed;
  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;
}

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

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

.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(13, 17, 23, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--edge);
}

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

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

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #242c3d 0%, #161a24 100%);
  border: 1px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
  font-family: var(--font-serif);
  font-weight: bold;
  font-size: 19px;
  box-shadow: 0 0 14px rgba(201, 168, 106, 0.25);
}

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

.brand-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: bold;
  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: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--parchment-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  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(201, 168, 106, 0.12) !important;
  border: 1px solid rgba(201, 168, 106, 0.4) !important;
  color: var(--brass) !important;
  font-weight: 600 !important;
}

.nav-action:hover {
  background: rgba(201, 168, 106, 0.22) !important;
  border-color: var(--brass) !important;
}

/* Hero Section */
.hero {
  padding: 56px 0 36px;
  border-bottom: 1px solid rgba(46, 56, 77, 0.6);
  position: relative;
}

.hero-header {
  max-width: 860px;
  margin-bottom: 36px;
}

.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(201, 168, 106, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 106, 0.25);
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--parchment);
}

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

.hero-lead {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--parchment-dim);
  font-weight: 300;
  max-width: 760px;
  line-height: 1.55;
}

/* Quick Starter Feature Card (The Bellringer Engine) */
.starter-widget {
  background: linear-gradient(175deg, #18202d 0%, #111620 100%);
  border: 1px solid var(--edge);
  border-top: 2px solid var(--brass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(20px, 3.5vw, 36px);
  position: relative;
  overflow: hidden;
}

.starter-widget::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 100% 0%, rgba(201, 168, 106, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.starter-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(46, 56, 77, 0.8);
}

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

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

.starter-strand-pill {
  background: rgba(201, 168, 106, 0.15);
  color: var(--parchment);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 106, 0.3);
  font-weight: 500;
}

.starter-type-pill {
  background: rgba(91, 138, 114, 0.2);
  color: #a3d9be;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(91, 138, 114, 0.4);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  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: linear-gradient(135deg, #c9a86a 0%, #b38f4d 100%);
  color: #0d1117 !important;
  font-weight: 600;
  border: 1px solid var(--brass-bright);
  box-shadow: 0 2px 10px rgba(201, 168, 106, 0.3);
}

.btn-brass:hover {
  background: linear-gradient(135deg, #dfbe7d 0%, #c9a86a 100%);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--edge);
  background: rgba(28, 35, 49, 0.6);
}

.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: 24px;
  scrollbar-width: thin;
}

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

.filter-pill:hover {
  border-color: rgba(201, 168, 106, 0.4);
  color: var(--parchment);
}

.filter-pill.active {
  background: rgba(201, 168, 106, 0.18);
  border-color: var(--brass);
  color: var(--brass);
  font-weight: 600;
}

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

.starter-title {
  font-size: clamp(22px, 3vw, 30px);
  color: var(--parchment);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stimulus-box {
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid rgba(201, 168, 106, 0.25);
  border-left: 4px solid var(--brass);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 20px;
  font-family: var(--font-serif);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: var(--parchment);
  white-space: pre-line;
}

.prompt-box {
  background: rgba(28, 35, 49, 0.6);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 20px;
}

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

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

.scaffold-box {
  background: rgba(91, 138, 114, 0.1);
  border: 1px dashed rgba(91, 138, 114, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 14.5px;
  color: #caecd9;
  margin-bottom: 20px;
  font-style: italic;
}

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

/* Expandable Teacher Note */
.teacher-accordion {
  margin-bottom: 20px;
  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: rgba(13, 17, 23, 0.5);
}

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

/* Quick Timer & Scratchpad Bar */
.starter-bottombar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(46, 56, 77, 0.8);
}

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

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

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

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

.scratchpad-container {
  background: var(--surface);
  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: 11.5px;
  text-transform: uppercase;
  color: var(--parchment-muted);
}

.scratchpad-textarea {
  width: 100%;
  height: 64px;
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid var(--edge);
  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 */
body.projector-mode .masthead,
body.projector-mode .hero-header,
body.projector-mode footer,
body.projector-mode .curriculum-section,
body.projector-mode .tools-section,
body.projector-mode .manifesto-section {
  display: none !important;
}

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: 72px 0;
  border-bottom: 1px solid rgba(46, 56, 77, 0.6);
}

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

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

.section-title {
  font-size: clamp(26px, 3.5vw, 38px);
  color: var(--parchment);
  margin-bottom: 12px;
}

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

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

.tool-card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 106, 0.5);
  box-shadow: var(--shadow-md);
}

.tool-card-flag {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(201, 168, 106, 0.15);
  color: var(--brass);
  border: 1px solid rgba(201, 168, 106, 0.3);
}

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

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

.tool-desc {
  font-size: 14.5px;
  color: var(--parchment-dim);
  line-height: 1.6;
  margin-bottom: 20px;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.tool-tag {
  font-size: 11.5px;
  font-family: var(--font-mono);
  background: rgba(46, 56, 77, 0.4);
  color: var(--parchment-muted);
  padding: 3px 8px;
  border-radius: 4px;
}

.tool-cta {
  margin-top: auto;
}

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

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

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

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

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

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

.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: linear-gradient(160deg, #161c27 0%, #11151e 100%);
  border: 1px solid rgba(201, 168, 106, 0.3);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4.5vw, 48px);
  position: relative;
  box-shadow: var(--shadow-md);
}

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

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

/* Resources Vault Page Specifics */
.vault-search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}

.vault-search-input {
  flex: 1;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 15px;
  color: var(--parchment);
  font-family: var(--font-sans);
  transition: border-color 0.15s ease;
}

.vault-search-input:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 10px rgba(201, 168, 106, 0.2);
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
}

.vault-card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.vault-card:hover {
  border-color: rgba(201, 168, 106, 0.45);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.vault-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.vault-strand-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(201, 168, 106, 0.15);
  color: var(--brass);
  border: 1px solid rgba(201, 168, 106, 0.3);
}

.vault-type-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--parchment-muted);
}

.vault-title {
  font-size: 20px;
  color: var(--parchment);
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.vault-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.vault-topic-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  background: rgba(46, 56, 77, 0.45);
  color: var(--parchment-muted);
  padding: 2px 7px;
  border-radius: 4px;
}

.vault-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(46, 56, 77, 0.6);
}

.onedrive-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.15s ease;
}

.onedrive-btn:hover {
  background: linear-gradient(135deg, #1084d8 0%, #006bbd 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 120, 212, 0.35);
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 48px 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: 24px;
}

.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: 14px 0;
    gap: 12px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero {
    padding: 36px 0 24px;
  }
  .tools-grid, .vault-grid {
    grid-template-columns: 1fr;
  }
}
