﻿/* Washington State History - Mrs. Mandeville 4th grade
   Orchard palette: purple #581c64, green #027538, blue #174b7d */
:root {
  --purple: #581c64;
  --purple-soft: #7a3a82;
  --green: #027538;
  --green-soft: #1a8a4a;
  --blue: #174b7d;
  --blue-soft: #2a6aa0;
  --cream: #faf7f2;
  --sand: #f3eee6;
  --foam: #eef5f1;
  --sky: #e8f0f7;
  --ink: #1e2a32;
  --muted: #4a5a64;
  --soft: #6b7a84;
  --line: #d4dde4;
  --white: #ffffff;
  --gold: #c9a227;
  --shadow: 0 14px 32px rgba(23, 75, 125, 0.12);
  --radius: 16px;
  --max: 1040px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 8% -8%, #ebe0ef 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #dfeaf4 0%, transparent 50%),
    var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--purple); }
p, li { max-width: 70ch; }
ul, ol { padding-left: 1.25rem; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--purple);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(250, 247, 242, 0.94);
  border-bottom: 1px solid rgba(88, 28, 100, 0.12);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  color: inherit;
}
.brand-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.15rem;
  color: var(--ink);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  align-items: center;
}
.nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.95rem;
}
.nav a:hover { color: var(--purple); }
.nav .btn-home {
  background: var(--purple);
  color: #fff !important;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
}
.nav .btn-home:hover { background: var(--purple-soft); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1.5rem;
  align-items: center;
  margin: 0.5rem 0 1.75rem;
  padding: 1.25rem;
  background: linear-gradient(145deg, var(--white), var(--sky));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--green);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--purple);
}
.lede { margin: 0 0 1rem; color: var(--muted); font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 0.75rem; }
.hero-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--sand);
}
.hero-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hero-badge {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  background: rgba(23, 75, 125, 0.92);
  color: #fff;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  max-width: 85%;
}
.hero-badge strong { display: block; font-size: 0.95rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  transition: transform 0.12s ease, background 0.12s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover { background: var(--green-soft); color: #fff; }
.button-blue { background: var(--blue); color: #fff; }
.button-blue:hover { background: var(--blue-soft); color: #fff; }
.button-ghost {
  background: transparent;
  color: var(--purple);
  border: 2px solid rgba(88, 28, 100, 0.28);
}
.button-ghost:hover { background: rgba(88, 28, 100, 0.06); color: var(--purple); }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.toc a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  background: rgba(23, 75, 125, 0.08);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
}
.toc a:hover { background: rgba(88, 28, 100, 0.1); color: var(--purple); }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin: 1.25rem 0 2rem;
}
.hub-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(88, 28, 100, 0.14);
}
.hub-card-media img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.hub-card-body { padding: 1.1rem 1.2rem 1.35rem; }
.hub-card-body h2 {
  font-family: var(--font-display);
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  color: var(--purple);
}
.hub-card-body p { margin: 0 0 0.85rem; color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(23, 75, 125, 0.1);
  color: var(--blue);
}
.chip-green { background: rgba(2, 117, 56, 0.12); color: var(--green); }
.chip-purple { background: rgba(88, 28, 100, 0.12); color: var(--purple); }

.section { margin: 2rem 0; }
.section-head { margin-bottom: 1rem; }
.section-head h2 {
  font-family: var(--font-display);
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  color: var(--blue);
}
.section-head p { margin: 0; color: var(--muted); }

.story-block {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.15rem;
  align-items: start;
  margin: 1.35rem 0;
  padding: 1.15rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.story-block.reverse { grid-template-columns: 0.9fr 1.1fr; }
.story-block.reverse .story-text { order: 2; }
.story-block.reverse .story-fig { order: 1; }
.story-text h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  color: var(--purple);
  font-size: 1.25rem;
}
.story-text p { margin: 0 0 0.75rem; }
.story-fig {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--sand);
}
.story-fig img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.caption {
  font-size: 0.85rem;
  color: var(--soft);
  padding: 0.55rem 0.7rem 0.7rem;
  margin: 0;
}

.era-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--green);
  margin-bottom: 0.35rem;
}

.note, .callout, .vocab-box, .think-box {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0.85rem 0;
}
.note {
  background: var(--foam);
  border-left: 4px solid var(--green);
  color: var(--ink);
}
.callout {
  background: var(--sky);
  border-left: 4px solid var(--blue);
}
.vocab-box {
  background: #f6eef8;
  border: 1px solid rgba(88, 28, 100, 0.18);
}
.vocab-box h4 {
  margin: 0 0 0.45rem;
  color: var(--purple);
  font-size: 0.95rem;
}
.vocab-box dl { margin: 0; }
.vocab-box dt {
  font-weight: 700;
  color: var(--ink);
  margin-top: 0.45rem;
}
.vocab-box dd { margin: 0.15rem 0 0; color: var(--muted); }
.think-box {
  background: #fff8e8;
  border: 1px dashed rgba(201, 162, 39, 0.55);
}
.think-box strong { color: var(--purple); }

.timeline {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border-left: 3px solid rgba(23, 75, 125, 0.28);
}
.timeline li {
  position: relative;
  padding: 0 0 1.1rem 1.2rem;
  max-width: none;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -0.55rem;
  top: 0.35rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--purple);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px rgba(88, 28, 100, 0.25);
}
.timeline .when {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.timeline .what { font-weight: 700; color: var(--ink); }
.timeline .why { color: var(--muted); margin: 0.2rem 0 0; }

.timeline-visual {
  margin: 1rem 0 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}
.timeline-visual img { width: 100%; }

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.panel h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  color: var(--purple);
  font-size: 1.15rem;
}
.panel.full { grid-column: 1 / -1; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.55rem;
  max-width: none;
}
.check-list li::before {
  content: "[";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 800;
}
.check-list li::after {
  content: "]";
  position: absolute;
  left: 0.85rem;
  color: var(--green);
  font-weight: 800;
}

.standards code {
  font-size: 0.88rem;
  background: rgba(23, 75, 125, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.quiz-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.quiz-progress {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--soft);
  margin-bottom: 0.55rem;
}
.quiz-question {
  font-family: var(--font-display);
  margin: 0 0 0.85rem;
  color: var(--ink);
  font-size: 1.2rem;
}
.quiz-options { display: grid; gap: 0.55rem; }
.quiz-option {
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--cream);
  cursor: pointer;
  color: var(--ink);
}
.quiz-option:hover:not(:disabled) { border-color: var(--blue-soft); background: var(--sky); }
.quiz-option.correct { border-color: var(--green); background: #e5f6ec; }
.quiz-option.incorrect { border-color: #b34a4a; background: #fceaea; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.9rem; }
.feedback {
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  display: none;
}
.feedback.show { display: block; }
.feedback.ok { background: #e5f6ec; color: #0f5132; }
.feedback.bad { background: #fceaea; color: #842029; }
.feedback.info { background: var(--sky); color: var(--blue); }
.quiz-score {
  display: none;
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  background: #f6eef8;
  border-radius: 12px;
}
.quiz-score.show { display: block; }
.quiz-score p { margin: 0.35rem 0 0; }

.study-sheet {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--white);
  border: 2px solid var(--purple);
  border-radius: var(--radius);
}
.study-sheet h2 { color: var(--purple); font-family: var(--font-display); margin-top: 0; }
.sheet-name {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin: 0.75rem 0 1.1rem;
  font-weight: 600;
}
.sheet-name .line {
  flex: 1;
  border-bottom: 1px solid var(--ink);
  min-height: 1.4rem;
}
.blank-line {
  display: inline-block;
  min-width: 8rem;
  border-bottom: 1px solid var(--ink);
  height: 1.1em;
  vertical-align: baseline;
  margin: 0 0.15rem;
}
.sheet-section { margin: 1.15rem 0; }
.sheet-section h3 {
  margin: 0 0 0.5rem;
  color: var(--blue);
  font-size: 1.05rem;
}
.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.25rem;
}
.match-grid ol, .match-grid ul { margin: 0; }

.print-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.75rem 0 1.25rem;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: #f3eef5;
  padding: 1.35rem 1.25rem 1.6rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.footer-note { margin: 0; color: var(--muted); font-size: 0.92rem; max-width: 42rem; }
.disclaimer {
  max-width: var(--max);
  margin: 0.75rem auto 0;
  font-size: 0.85rem;
  color: var(--soft);
}

.sources {
  background: var(--sand);
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  margin-top: 2rem;
}
.sources h2 {
  font-family: var(--font-display);
  color: var(--blue);
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}
.sources ul { margin: 0.5rem 0 0; }
.sources li { margin: 0.25rem 0; max-width: none; }

@media (max-width: 820px) {
  .hero, .story-block, .story-block.reverse, .hub-grid, .teacher-grid, .match-grid {
    grid-template-columns: 1fr;
  }
  .story-block.reverse .story-text,
  .story-block.reverse .story-fig { order: initial; }
}

@media print {
  .site-header, .nav, .print-bar, .hero-actions, .quiz-panel,
  .skip, .no-print, .toc, .button { display: none !important; }
  body {
    background: #fff;
    font-size: 11pt;
    color: #000;
  }
  .wrap { max-width: none; padding: 0; }
  .hero, .story-block, .panel, .study-sheet, .hub-card {
    box-shadow: none;
    border-color: #ccc;
    break-inside: avoid;
  }
  a { color: #000; text-decoration: none; }
  .study-sheet {
    border: 2px solid #000;
    page-break-before: always;
  }
  .print-only { display: block !important; }
  .sheet-print-footer {
    display: block !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10pt;
    border-top: 1px solid #000;
    padding-top: 0.35rem;
  }
}
.print-only, .sheet-print-footer { display: none; }



/* --- Month-long unit additions: week nav, denser study, print packets --- */
.week-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.85rem 0 1.25rem;
  padding: 0.75rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.week-nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--purple);
  background: rgba(88, 28, 100, 0.08);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(88, 28, 100, 0.15);
}
.week-nav a:hover {
  background: rgba(2, 117, 56, 0.12);
  color: var(--green);
  border-color: rgba(2, 117, 56, 0.25);
}

.week-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 1rem;
  margin: 2.25rem 0 1rem;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(120deg, rgba(88, 28, 100, 0.1), rgba(23, 75, 125, 0.1));
  border-left: 5px solid var(--purple);
  border-radius: 0 12px 12px 0;
}
.week-banner .week-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
}
.week-banner h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.45rem;
  color: var(--purple);
}
.week-banner p {
  margin: 0;
  flex: 1 1 100%;
  color: var(--muted);
}

.day-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.05rem;
  margin: 0.65rem 0;
}
.day-card h4 {
  margin: 0 0 0.4rem;
  color: var(--blue);
  font-size: 1.02rem;
}
.day-card p { margin: 0.35rem 0; }
.day-card ul { margin: 0.35rem 0 0; }

.review-box {
  background: var(--foam);
  border: 2px solid rgba(2, 117, 56, 0.28);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
}
.review-box h4 {
  margin: 0 0 0.5rem;
  color: var(--green);
  font-family: var(--font-display);
}
.review-box ol, .review-box ul { margin: 0.4rem 0 0; }

.story-block.dense {
  grid-template-columns: 1fr;
}
.story-block.dense .story-text p {
  max-width: 75ch;
}
.story-prose {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.35rem;
  margin: 1.15rem 0;
}
.story-prose h3 {
  font-family: var(--font-display);
  margin: 0 0 0.65rem;
  color: var(--purple);
  font-size: 1.3rem;
}
.story-prose p {
  margin: 0 0 0.85rem;
  max-width: 75ch;
}
.story-prose .era-tag { margin-bottom: 0.45rem; }

.unit-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}
.unit-meta .panel { padding: 0.85rem 1rem; }
.unit-meta h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.unit-meta p, .unit-meta li { font-size: 0.95rem; margin: 0.25rem 0; }

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1.25rem;
}
.glossary-grid dt {
  font-weight: 700;
  color: var(--purple);
  margin-top: 0.55rem;
}
.glossary-grid dd {
  margin: 0.1rem 0 0;
  color: var(--muted);
}

.outline-print {
  border: 2px dashed rgba(23, 75, 125, 0.35);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  background: #fbfcfe;
}

.packet-part {
  page-break-inside: avoid;
  margin: 1.35rem 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.study-dense body,
body.study-dense {
  font-size: 1.05rem;
}
.study-dense .story-prose p,
.study-dense .story-text p {
  line-height: 1.7;
}

@media (max-width: 820px) {
  .unit-meta, .glossary-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .week-nav, .site-footer, .hero-media, .hero-badge { display: none !important; }
  .week-banner {
    break-after: avoid;
    background: #eee;
    border-left-color: #000;
  }
  .story-prose, .day-card, .review-box, .panel {
    break-inside: avoid;
    box-shadow: none;
  }
  .study-sheet {
    page-break-before: always;
  }
  .packet-part {
    page-break-inside: avoid;
  }
  .sheet-print-footer {
    display: block !important;
  }
  .print-name-line {
    display: flex !important;
    gap: 0.5rem;
    align-items: baseline;
    margin-bottom: 0.75rem;
    font-weight: 700;
  }
  .print-name-line .line {
    flex: 1;
    border-bottom: 1px solid #000;
    min-height: 1.2rem;
  }
}
.print-name-line { display: none; }
