/* ===== Tokens — matched to the ESL360.org WordPress brand ===== */
:root {
  /* Brand colors, as specified: cream background, teal menu/link, coral active/hover */
  --cream: #FCFAF5;
  --teal: #95D8D6;
  --teal-deep: #1E7A76;   /* darkened for accessible body-text links/labels on light backgrounds; true --teal reserved for backgrounds/decorative use */
  --teal-light: #E4F5F4;  /* tint of brand teal, used for soft card/callout backgrounds */
  --coral: #F2491A;
  --coral-deep: #F2491A;  /* darkened coral for text needing extra contrast on light backgrounds */
  --coral-light: #FCE0D6; /* tint of brand coral, used for soft badge/callout backgrounds */
  --gold: #E6A91A;        /* sampled directly from the circle logo's ring */
  --ink: #1A1A1A;
  --ink-soft: #55524C;
  --paper: #FFFFFF;
  --rule: #E9E3D2;
  --rule-strong: #D8D0B8;

  /* New Kansas (headings/buttons) is part of Adobe's Typekit collection —
     not embeddable without kit access. Fraunces (variable, WONK axis engaged)
     is used as a free stand-in: closer in warmth/character to New Kansas
     than a plain slab serif. See chat for the real-font path once kit access
     is sorted out. */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Laila', Georgia, serif;
  --font-ui: 'Laila', -apple-system, sans-serif;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--teal-deep); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; font-variation-settings: 'SOFT' 60, 'WONK' 1; color: var(--ink); margin: 0 0 0.5em; letter-spacing: 0.005em; }
h1 { color: var(--coral); }
h1 { font-size: 2.3rem; line-height: 1.15; }
h2 { font-size: 1.55rem; margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.6em; }
p { margin: 0 0 1em; }

/* ===== Header ===== */
.site-header {
  background: var(--teal);
  border-bottom: 4px solid var(--coral);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
}

.nav-hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--ink);
  border-radius: var(--radius);
}
.nav-hamburger:hover { background: rgba(255,255,255,0.35); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
}
.main-nav > a {
  color: var(--ink);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 2px solid transparent;
}
.main-nav > a:hover, .main-nav > a.active { color: var(--coral-deep); background: var(--cream); border-color: var(--gold); }

/* Units dropdown — a <details> now, so tap/click works identically on touch and desktop (hover alone never worked on mobile) */
.nav-group { position: relative; }
.nav-group-label {
  color: var(--ink);
  padding: 7px 12px;
  cursor: pointer;
  display: inline-block;
  list-style: none;
  border-radius: var(--radius);
}
.nav-group-label::-webkit-details-marker { display: none; }
.nav-group-label::after { content: ' \25BE'; font-size: 0.75em; }
.nav-group-label:hover { background: rgba(255,255,255,0.35); }
.nav-group-items {
  position: absolute;
  top: 100%; left: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(26,26,26,0.18);
  padding: 6px;
  min-width: 110px;
  z-index: 20;
}
.nav-group-items a {
  display: block;
  color: var(--ink);
  padding: 7px 10px;
  border-radius: 4px;
  text-decoration: none;
}
.nav-group-items a:hover, .nav-group-items a.active { background: var(--teal-light); color: var(--coral-deep); }

.nav-search {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-search input[type="search"] {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 5px 12px;
  width: 140px;
  background: rgba(255,255,255,0.6);
  color: var(--ink);
}
.nav-search input[type="search"]::placeholder { color: var(--ink-soft); }
.nav-search input[type="search"]:focus { outline: 2px solid var(--coral); outline-offset: 1px; background: var(--paper); }
.nav-search button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px 6px;
  border-radius: var(--radius);
  line-height: 1;
}
.nav-search button:hover { background: rgba(255,255,255,0.35); }

/* ===== Mobile nav: collapse into a hamburger drawer ===== */
@media (max-width: 780px) {
  .header-inner { flex-wrap: nowrap; }
  .nav-hamburger { display: flex; order: 1; }
  .main-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    margin-top: 10px;
    padding: 10px 28px 16px;
    background: var(--teal);
    border-bottom: 2px solid var(--coral);
    z-index: 30;
  }
  .main-nav.nav-open { display: flex; }
  .main-nav > a { width: 100%; }
  .nav-group { width: 100%; }
  .nav-group-items { position: static; box-shadow: none; margin-top: 4px; }
  .nav-search { order: 2; margin-left: auto; }
  .nav-search input[type="search"] { width: 100px; }
}

/* ===== Layout shells ===== */
main { max-width: 1180px; margin: 0 auto; padding: 0 28px 64px; }

.page-nav-utility {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  padding: 14px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-nav-utility a { color: var(--teal-deep); text-decoration: none; font-weight: 600; }
.page-nav-utility a:hover { color: var(--coral-deep); text-decoration: underline; }
.page-nav-sep { color: var(--rule-strong); }

/* ===== Page banner — full-bleed white band, logo + eyebrow/title side by side, used on every page ===== */
.page-banner-band {
  background: var(--cream);
  border-bottom: 2px solid var(--coral);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 32px;
}
.page-banner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.page-banner-logo { flex: 0 0 auto; height: 110px; width: auto; display: block; }
.page-banner-text { flex: 1; min-width: 0; }
.page-banner .eyebrow {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  color: var(--teal-deep);
  font-weight: 700;
}
.eyebrow-rule {
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--coral);
  margin-right: 8px;
  vertical-align: middle;
}
.page-banner h1 { margin: 4px 0 0; }
.page-banner .unit-subtitle { font-size: 1.05rem; color: var(--ink-soft); margin: 4px 0 0; font-weight: 600; font-family: var(--font-ui); }
.page-banner .unit-skills { font-size: 0.98rem; color: var(--ink-soft); margin: 8px 0 0; max-width: 70ch; }
.page-banner .status { margin-top: 10px; }

/* ===== Status badges ===== */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.status-final { background: var(--teal-light); color: var(--teal-deep); }
.status-final::before { background: var(--teal-deep); }
.status-draft { background: var(--coral-light); color: var(--coral-deep); }
.status-draft::before { background: var(--coral); }

p.lede { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 32px; }

/* ===== Cards / grid ===== */
.grid { display: grid; gap: 20px; margin: 28px 0; }
.grid-units { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-ref { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 24px 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--teal-deep); box-shadow: 0 6px 18px rgba(30,122,118,0.12); }
.card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-icon { width: 56px; height: auto; display: block; flex: 0 0 auto; }
/* Each source file has a different amount of transparent padding above its
   actual artwork, so matching the <img> box position isn't enough to align
   the visible ink itself. Margins below correct for that, measured per file. */
.card-icon-2 { margin-top: -6px; }
.card-icon-3 { margin-top: -3px; }
.card-icon-4 { margin-top: -3px; }
.card-icon-5 { margin-top: -4px; }
.card .unit-no {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: var(--ink-soft);
  font-weight: 700;
  letter-spacing: 0.04em;
  display: block;
}
.card h3 { margin: 0 0 10px; font-size: 1.2rem; line-height: 1.25; }
.card-desc { font-size: 0.95rem; font-style: normal; color: var(--ink-soft); margin: 0; }
.card .mode {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: auto 0 0;
  padding-top: 12px;
}

/* ===== Compact hub-link cards (Methodology reference cards) — smaller than unit cards ===== */
.card-compact { min-height: 0; padding: 18px 22px; }
.card-compact h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card-compact .mode { margin: 0; padding-top: 0; }

/* ===== Authentic Sources excerpt (unit pages) ===== */
.source-excerpt { padding: 4px 0 20px; }
.source-excerpt .eyebrow {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  color: var(--teal-deep);
  font-weight: 700;
  margin: 0 0 6px;
}
.source-excerpt p:last-child { margin: 0; color: var(--ink); }

/* ===== IDP preview block (top of unit page) ===== */
.idp-preview { padding: 20px 0; border-bottom: 1px solid var(--rule); margin-bottom: 24px; }
.idp-preview .eyebrow {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  color: var(--teal-deep);
  font-weight: 700;
  margin: 0 0 4px;
}
.idp-preview h3 { margin: 0 0 6px; }
.idp-preview .idp-tagline { color: var(--teal-deep); font-weight: 600; margin: 0 0 8px; }
.idp-preview p:last-child { margin: 0; color: var(--ink); }

/* ===== "Why" line inside lesson accordions (used by IDP end-of-unit entry) ===== */
.lesson-why { font-size: 0.95rem; color: var(--ink); margin: 0; }

/* ===== "I Can" statements — column layout ===== */
.ican-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 32px;
  list-style: none;
  padding: 0;
  margin: 12px 0 28px;
}
.ican-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
}
.ican-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--coral);
  font-weight: 700;
}
@media (max-width: 640px) {
  .ican-list { grid-template-columns: 1fr; }
}

/* ===== Part blocks ===== */
.part {
  margin: 40px 0 0;
  border-left: 4px solid var(--coral);
  padding-left: 20px;
}
.part-title {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
  margin-bottom: 2px;
}
.part-sub { font-family: var(--font-ui); color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 18px; }

/* ===== Lesson card ===== */
.lesson {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
/* Special calendar events (not numbered lessons) — same date-first structure, blue box instead of cream */
.lesson-event { background: var(--teal-light); border-color: var(--teal-deep); }
.lesson-event-body { padding: 16px 24px; }
.lesson summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 24px;
}
.lesson summary::-webkit-details-marker { display: none; }
.lesson-summary-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.lesson-date {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
  font-size: 1.15rem;
  color: var(--teal-deep);
}
.lesson-id { font-family: var(--font-ui); font-weight: 700; color: var(--coral-deep); font-size: 0.85rem; }
.lesson-summary-row h4 {
  flex: 1;
  min-width: 180px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
  font-size: 1.15rem;
  color: var(--ink);
}
.lesson-instructor { font-family: var(--font-ui); font-size: 0.82rem; color: var(--ink-soft); }
.lesson-toggle { font-size: 1.3rem; color: var(--coral); line-height: 1; }
.lesson-toggle::after { content: '+'; }
.lesson[open] .lesson-toggle::after { content: '\2212'; }
.lesson-what { font-size: 0.95rem; color: var(--ink); margin: 0; }
.lesson-what strong {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-deep);
  margin-right: 6px;
}
.lesson-detail { padding: 0 24px 20px; }
.lesson-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 0.95rem; margin: 0; }
.lesson-detail dt { font-family: var(--font-ui); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--teal-deep); font-weight: 700; align-self: start; padding-top: 2px; }
.lesson-detail dt::after { content: ':'; }
.lesson-detail dd { margin: 0; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--rule); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; background: var(--paper); }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { background: var(--ink); color: #fff; font-family: var(--font-ui); font-weight: 700; font-size: 0.82rem; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: #FCFAF2; }
td.center, th.center { text-align: center; }
.tick { color: var(--teal-deep); font-weight: 700; }
.dash { color: #C7BEA8; }
.star { color: var(--coral-deep); font-weight: 700; }

/* ===== Details / collapsible ===== */
details.ref-block {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 4px 4px;
}
details.ref-block summary {
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 700;
  padding: 14px 18px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
details.ref-block summary::-webkit-details-marker { display: none; }
details.ref-block summary::after { content: '+'; color: var(--coral); font-size: 1.3rem; }
details.ref-block[open] summary::after { content: '\2212'; }
details.ref-block .ref-body { padding: 0 18px 18px; }

/* ===== Callouts ===== */
.callout {
  background: var(--teal-light);
  border-left: 4px solid var(--teal-deep);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.95rem;
}
.callout h2 { margin-top: 0; }
.callout strong { color: var(--teal-deep); }
.callout.gold { background: var(--coral-light); border-left-color: var(--coral); }
.callout.gold strong { color: var(--coral-deep); }

/* ===== Footer ===== */
.site-footer {
  background: var(--paper);
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  margin-top: 60px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 28px 26px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.footer-inner p { margin: 0 0 6px; }
.footer-inner strong { color: var(--ink); }
.footer-meta { color: #9C9890; font-size: 0.78rem; }

/* ===== Search page ===== */
.page-search-form {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin-top: 8px;
}
.page-search-form input[type="search"] {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
}
.page-search-form input[type="search"]:focus { outline: 2px solid var(--coral); outline-offset: 1px; }
.page-search-form button {
  font-family: var(--font-ui);
  font-weight: 700;
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  cursor: pointer;
}
.page-search-form button:hover { background: var(--coral-deep); }
.search-results { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.search-result h3 { margin: 0 0 6px; font-size: 1.1rem; }
.search-result mark { background: var(--coral-light); color: var(--coral-deep); padding: 0 2px; border-radius: 2px; }

@media (max-width: 640px) {
  h1 { font-size: 1.8rem; }
  .page-banner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .page-banner-logo { height: 80px; }
  .lesson dl { grid-template-columns: 1fr; }
  .lesson dt { padding-top: 8px; }
}

/* 2026-09 curriculum maintenance additions */
.card-disabled {
  cursor: default;
  opacity: 0.62;
  filter: saturate(0.72);
  box-shadow: none;
}
.card-disabled:hover {
  border-color: var(--line);
  box-shadow: none;
}
.materials-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.material-link {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid var(--teal-deep);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.79rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--teal-deep);
  background: #fff;
}
.material-link:hover {
  background: var(--teal-light);
}
.lesson-muted {
  background: #f7f7f5;
  border-color: var(--line);
  color: var(--ink-soft);
}
.lesson-idp-event {
  margin-top: 24px;
}
.lesson-detail-empty dd:empty::after {
  content: '';
}


/* ===== Curriculum / Book Club visual synchronization — 2026-09-10 ===== */
/* Keep shared colors and panel treatments identical across the two sites. */
:root {
  --coral: #F2491A;
  --coral-deep: #F2491A;
  --coral-light: #FCE0D6;
  --teal: #95D8D6;
  --teal-deep: #1E7A76;
  --teal-light: #E4F5F4;
}

/* Same softer student-facing callout fills used on the Book Club site. */
.callout,
.lesson-event {
  background: #EAF5F4;
}
.callout.gold {
  background: #FBEAE4;
  border-left-color: var(--coral);
}
.callout.gold strong,
.status-draft,
.star,
.search-result mark {
  color: var(--coral);
}

/* Core lesson heading line mirrors the Book Club session-heading hierarchy:
   date = teal, lesson number = orange/red, title = black, all same size/type. */
.lesson > summary .lesson-summary-row {
  align-items: baseline;
  column-gap: 9px;
  row-gap: 4px;
}
.lesson > summary .lesson-date,
.lesson > summary .lesson-id,
.lesson > summary .lesson-summary-row h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
  font-size: 1.12rem;
  line-height: 1.3;
}
.lesson > summary .lesson-date {
  color: var(--teal-deep);
}
.lesson > summary .lesson-id {
  color: var(--coral);
}
.lesson > summary .lesson-summary-row h4 {
  color: var(--ink);
}
.lesson-sep {
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1;
  color: var(--ink-soft);
}

/* Keep link/action pills aligned with the Book Club site's restrained treatment. */
.material-link {
  border-width: 1px;
  box-shadow: none;
  background: #FFFFFF;
}
