/* ============================================
   MAK LABS — Design Tokens
   ============================================ */
:root {
  /* Color */
  --ink:        #1C1F26;
  --ink-soft:   #565C68;
  --paper:      #FBF9F4;
  --paper-dim:  #F3EFE6;
  --card:       #FFFFFF;
  --line:       #E7E1D3;

  --blue:       #1E50A0;
  --blue-deep:  #163C7A;
  --blue-tint:  #EAF0FA;

  --red:        #D8392E;
  --amber:      #F2A30F;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* Shadow */
  --shadow-card: 0 2px 10px rgba(28,31,38,0.06);
  --shadow-hover: 0 10px 28px rgba(28,31,38,0.12);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

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

/* ============================================
   Utility bar (skip links only — kept minimal)
   ============================================ */
.skip-links a {
  position: absolute;
  left: -999px;
}
.skip-links a:focus {
  position: static;
  display: inline-block;
  background: var(--blue-deep);
  color: #fff;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 0 0 6px 0;
}

/* ============================================
   Header / Top utility row
   ============================================ */
.top-row {
  background: var(--blue-deep);
  color: #D9E4F5;
  font-size: 13px;
}
.top-row .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
}
.top-row .top-links { display: flex; gap: 18px; }
.top-row .top-links a { color: #C7D7EF; }
.top-row .top-links a:hover { color: #fff; }
.top-row .top-date { color: #93A9CC; font-size: 12px; letter-spacing: 0.2px; }

header.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
header.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img.brand-mark { height: 48px; width: auto; }
.brand img.brand-word { height: 28px; width: auto; }
.brand .tagline {
  display: block;
  width: 100%;              /* = width of .brand-text, which the wordmark sets */
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
  letter-spacing: 0.7px;
  text-align: justify;      /* stretches the single line to fill that width, */
  text-align-last: justify; /* so the tagline always matches the logo exactly */
  -moz-text-align-last: justify;
}
.brand-text { display: flex; flex-direction: column; align-items: flex-start; }

.header-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 420px;
}
.header-search input {
  flex: 1;
  border: 1.5px solid var(--line);
  border-right: none;
  background: var(--card);
  padding: 11px 16px;
  font-size: 14px;
  font-family: var(--font-body);
  border-radius: 999px 0 0 999px;
  outline: none;
  color: var(--ink);
}
.header-search input:focus { border-color: var(--blue); }
.header-search input::placeholder { color: #9AA1AD; }
.header-search button {
  border: 1.5px solid var(--blue);
  background: var(--blue);
  color: #fff;
  padding: 0 20px;
  height: 44px;
  border-radius: 0 999px 999px 0;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-body);
}
.header-search button:hover { background: var(--blue-deep); border-color: var(--blue-deep); }

@media (max-width: 760px) {
  .header-search { display: none; }
}

/* ============================================
   Navigation
   ============================================ */
nav.main-nav {
  background: var(--blue);
}
nav.main-nav .container { position: relative; }
nav.main-nav > .container > ul {
  display: flex;
  flex-wrap: wrap;
}
nav.main-nav > .container > ul > li { position: relative; }
nav.main-nav > .container > ul > li > a {
  display: block;
  color: #EAF0FA;
  padding: 14px 20px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
}
nav.main-nav > .container > ul > li > a .caret {
  font-size: 10px;
  margin-left: 5px;
  opacity: 0.75;
}
nav.main-nav > .container > ul > li:hover > a,
nav.main-nav > .container > ul > li > a:focus-visible {
  background: var(--blue-deep);
  color: #fff;
}

/* Dropdown */
nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card);
  border-top: 3px solid var(--amber);
  min-width: 260px;
  box-shadow: var(--shadow-hover);
  border-radius: 0 0 10px 10px;
  padding: 6px;
  z-index: 200;
}
nav li:hover > .dropdown,
nav li.hover-open > .dropdown { display: block; }
nav .dropdown li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink);
  border-radius: 7px;
  font-weight: 500;
}
nav .dropdown li a:hover { background: var(--blue-tint); color: var(--blue-deep); }
nav .dropdown li { position: relative; }

nav .sub-dropdown {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background: var(--card);
  border-top: 3px solid var(--amber);
  min-width: 240px;
  box-shadow: var(--shadow-hover);
  border-radius: 0 10px 10px 10px;
  padding: 6px;
  margin-left: 6px;
}
nav .dropdown li:hover > .sub-dropdown,
nav .dropdown li.hover-open > .sub-dropdown { display: block; }

/* Invisible bridge across the 6px gap, so travelling from the parent
   row into the sub-menu never passes over dead space. */
nav .sub-dropdown::before {
  content: "";
  position: absolute;
  top: 0;
  left: -14px;
  width: 14px;
  height: 100%;
}

@media (max-width: 900px) {
  nav.main-nav > .container > ul { overflow-x: auto; }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero .container {
  position: relative;
  padding-top: 64px;
  padding-bottom: 56px;
}
@media (max-width: 760px) {
  .hero .container { padding-top: 44px; padding-bottom: 40px; }
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-deep);
  background: var(--blue-tint);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
  color: var(--ink);
  max-width: 700px;
  letter-spacing: -0.5px;
}
.hero h1 em {
  font-style: normal;
  color: var(--blue);
  border-bottom: 4px solid var(--amber);
}
.hero p.lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 560px;
  margin-top: 20px;
  line-height: 1.6;
}
.hero .hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-body);
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue-deep); }

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.hero-stats .stat strong {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--blue-deep);
  display: block;
}
.hero-stats .stat span {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ============================================
   Section heading pattern
   ============================================ */
.section { padding: 64px 0; }
.section-tight { padding: 44px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
}
.section-head p {
  color: var(--ink-soft);
  font-size: 15px;
}
.section-head .view-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}
.section-head .view-all:hover { color: var(--blue-deep); text-decoration: underline; }

.section-alt { background: var(--paper-dim); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ============================================
   Standard picker — tappable tiles
   ============================================ */
.standard-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .standard-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .standard-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }

.standard-tile {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 12px;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.standard-tile:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.standard-tile .num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--blue-deep);
  display: block;
}
.standard-tile .label {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 4px;
  display: block;
}

.board-toggle {
  display: inline-flex;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 28px;
}
.board-toggle button {
  border: none;
  background: transparent;
  padding: 9px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
}
.board-toggle button.active { background: var(--blue); color: #fff; }

/* ============================================
   Resource cards (papers, lesson plans, etc.)
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.resource-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: box-shadow 0.15s, transform 0.15s;
}
.resource-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }

.resource-card .tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.tag-blue { background: var(--blue-tint); color: var(--blue-deep); }
.tag-red  { background: #FBE7E4; color: var(--red); }
.tag-amber{ background: #FCF0DA; color: #8A5A05; }

.resource-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.35;
}
.resource-card p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.resource-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.resource-card .download {
  font-weight: 600;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.resource-card .download:hover { color: var(--blue-deep); }

/* ============================================
   Two-column feature band (About / mission)
   ============================================ */
.about-band {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 820px) { .about-band { grid-template-columns: 1fr; gap: 32px; } }

.about-band .art {
  background: var(--blue-tint);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-band .art img { height: 160px; }

.about-band h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
}
.about-band p { color: var(--ink-soft); margin-bottom: 14px; font-size: 15.5px; }
.about-band .check-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.about-band .check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink);
}
.about-band .check-list li svg { flex-shrink: 0; margin-top: 2px; }

/* ============================================
   Notice strip
   ============================================ */
.notice-strip {
  background: var(--blue-deep);
  color: #fff;
}
.notice-strip .container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  font-size: 14.5px;
}
.notice-strip strong { color: var(--amber); font-weight: 700; }

/* ============================================
   External links band
   ============================================ */
.links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 760px) { .links-grid { grid-template-columns: repeat(2, 1fr); } }

.ext-link {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.15s, color 0.15s;
}
.ext-link:hover { border-color: var(--blue); color: var(--blue-deep); }
.ext-link span.arrow { color: var(--ink-soft); }

/* ============================================
   Footer
   ============================================ */
footer.site-footer {
  background: var(--ink);
  color: #C9CDD6;
  margin-top: 0;
}
.footer-top {
  padding-top: 56px;
  padding-bottom: 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 820px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-top { grid-template-columns: 1fr; } }

/* Footer logo — image hidden (white bg, not transparent), replaced with styled text */
.footer-top .brand-col .brand-word { display: none; }
.footer-top .brand-col .footer-brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-bottom: 14px;
}
.footer-top .brand-col .footer-brand-name span { color: var(--amber); }
.footer-top .brand-col p { font-size: 13.5px; color: #9098A6; line-height: 1.6; max-width: 280px; }

.footer-top h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}
.footer-top ul { display: flex; flex-direction: column; gap: 10px; }
.footer-top ul a { font-size: 13.5px; color: #9098A6; }
.footer-top ul a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #353A45;
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: #757C8A;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a { color: #9098A6; }
.footer-bottom a:hover { color: #fff; }

/* ============================================
   WhatsApp Share Button
   ============================================ */
.wa-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: none;
}
.wa-share:hover { background: #1ebe5d; color: #fff; }
.wa-share svg { flex-shrink: 0; }

.resource-card .card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================
   Ad Zones
   No box, no fixed height: an ad slot takes up space only
   when Google actually fills it. Leftover placeholder text
   (e.g. "728 × 90 — Leaderboard Ad") is never shown.
   ============================================ */
.ad-zone {
  width: 100%;
  text-align: center;
  position: relative;
}
.ad-zone > span { display: none; }
/* 728×90 leaderboard — top of page, below nav */
.ad-leaderboard { margin: 14px 0; }
/* 336×280 rectangle — sidebar / between content */
.ad-rect { max-width: 336px; margin: 0 auto 24px; }
/* In-content — full width */
.ad-infeed { margin: 24px 0; }
/* Google marks every slot it could not fill (for example before approval)
   with data-ad-status="unfilled". Such a slot, and its label, take no space. */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad-zone:has(ins.adsbygoogle[data-ad-status="unfilled"]) { margin: 0; }
/* The "Advertisement" label shows only above a slot that really has an ad */
.ad-label { display: none; }
.ad-label:has(+ .ad-zone ins.adsbygoogle[data-ad-status="filled"]) { display: block; }
/* Ad label (visible to users, required by AdSense policy) */
.ad-label {
  font-size: 11px;
  color: #aaa;
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============================================
   Inner page layout (About, Privacy, etc.)
   ============================================ */
.page-hero {
  background: var(--blue-deep);
  color: #fff;
  padding: 48px 0 40px;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 10px;
}
.page-hero p { color: #C0D0E8; font-size: 16px; }

.page-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.page-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 36px 0 12px;
  color: var(--blue-deep);
}
.page-body h2:first-child { margin-top: 0; }
.page-body p { font-size: 15.5px; color: #444; line-height: 1.75; margin-bottom: 14px; }
.page-body ul { margin: 10px 0 16px 20px; list-style: disc; }
.page-body ul li { font-size: 15px; color: #444; margin-bottom: 8px; line-height: 1.6; }
.page-body a { color: var(--blue); }
.page-body a:hover { text-decoration: underline; }
.page-body .last-updated {
  display: inline-block;
  background: var(--blue-tint);
  color: var(--blue-deep);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 32px;
  font-weight: 600;
}

/* Team/About card */
.about-card {
  background: var(--blue-tint);
  border-radius: var(--radius-md);
  padding: 32px;
  margin: 32px 0;
  display: flex;
  gap: 24px;
  align-items: center;
}
.about-card .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 30px;
  color: #fff;
  flex-shrink: 0;
}
.about-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.about-card p { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* ============================================
   MOBILE RESPONSIVE — Full Support
   ============================================ */

/* ── Hamburger Button ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  flex-shrink: 0;
}
.hamburger:hover { background: rgba(255,255,255,0.1); }
.hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}
/* Animate to X when open */
.hamburger.is-active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.sub-toggle { display: none; }

/* ── Mobile Nav ── */
@media (max-width: 768px) {
  /* Show hamburger, restructure nav */
  .hamburger { display: flex; }

  nav.main-nav .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 16px;
  }

  /* Hide the ul by default on mobile */
  nav.main-nav #main-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue-deep);
    z-index: 500;
    padding: 8px 0 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    max-height: 80vh;
    overflow-y: auto;
  }

  /* Show when toggled */
  nav.main-nav #main-menu.menu-open { display: block; }

  nav.main-nav > .container > ul { flex-direction: column; }

  nav.main-nav > .container > ul > li > a {
    padding: 13px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Mobile dropdowns — hidden by default, shown with .mobile-open */
  nav .dropdown,
  nav .sub-dropdown {
    display: none;
    position: static;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    background: rgba(0,0,0,0.2);
    margin: 0;
    padding: 4px 0;
    min-width: unset;
    width: 100%;
  }
  nav .dropdown.mobile-open,
  nav .sub-dropdown.mobile-open { display: block; }

  nav .dropdown li a {
    color: #C7D7EF;
    padding: 11px 32px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 14px;
  }
  nav .dropdown li a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
  }
  nav .sub-dropdown li a { padding-left: 48px; }

  /* Override hover-based dropdown on mobile. Phones emulate :hover after
     a tap, so these must not fight a list the user has just opened. */
  nav li:hover > .dropdown:not(.mobile-open) { display: none; }
  nav .dropdown li:hover > .sub-dropdown:not(.mobile-open) { display: none; }
  nav li.hover-open > .dropdown:not(.mobile-open) { display: none; }

  /* ── Expandable rows: label navigates, chevron expands ──────────
     The row is a flex line: label | chevron, with the submenu wrapping
     onto the next line. No overlay, so the chevron can never cover the
     list it opened. */
  nav.main-nav #main-menu li.has-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
  }
  nav.main-nav #main-menu li.has-sub > a {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 16px;
  }
  nav.main-nav #main-menu li.has-sub > ul { flex: 1 0 100%; }

  /* The decorative arrow inside the label is desktop-only. */
  nav.main-nav #main-menu li.has-sub > a .caret { display: none; }

  .sub-toggle {
    flex: 0 0 58px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0;
    margin: 0;
    background: rgba(255,255,255,0.07);
    border: 0;
    border-left: 1px solid rgba(255,255,255,0.16);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .sub-toggle:active { background: rgba(255,255,255,0.2); }
  .sub-toggle:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }

  .sub-toggle-icon {
    display: block;
    font-size: 20px;
    line-height: 1;
    transition: transform 0.22s ease;
  }
  li.is-open > .sub-toggle .sub-toggle-icon { transform: rotate(180deg); }

  /* Sub-level rows sit one step in and read slightly smaller. */
  nav.main-nav #main-menu .dropdown li.has-sub > .sub-toggle {
    background: rgba(255,255,255,0.05);
  }
  nav.main-nav #main-menu .dropdown li.has-sub > .sub-toggle .sub-toggle-icon {
    font-size: 17px;
  }

  /* Comfortable tap targets throughout the menu. */
  nav.main-nav > .container > ul > li > a {
    padding: 16px 20px;
    font-size: 16px;
    min-height: 48px;
  }
  nav .dropdown li a {
    padding: 14px 32px;
    font-size: 15px;
    min-height: 46px;
    display: flex;
    align-items: center;
  }
  nav .sub-dropdown li a { padding-left: 48px; }
}

/* ── Header — Mobile ── */
@media (max-width: 768px) {
  header.site-header .container {
    height: auto;
    padding: 12px 16px;
    gap: 12px;
  }
  .brand img.brand-mark { height: 44px; }
  .brand img.brand-word { height: 26px; }
  .brand .tagline { font-size: 11px; margin-top: 1px; }
}

/* ── Top row — Mobile ── */
@media (max-width: 768px) {
  .top-row .container { height: auto; padding: 8px 16px; flex-wrap: wrap; gap: 6px; }
  .top-row .top-links { gap: 12px; }
  .top-row .top-date { font-size: 11px; }
}

/* ── Hero — Mobile ── */
@media (max-width: 480px) {
  .hero .container { padding-top: 36px; padding-bottom: 32px; }
  .hero p.lede { font-size: 15px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 20px; }
  .hero-stats .stat strong { font-size: 22px; }
}

/* ── Standard Grid — Mobile ── */
@media (max-width: 480px) {
  .standard-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .standard-tile .num { font-size: 22px; }
  .standard-tile { padding: 16px 8px; }
}

/* ── Resource Cards — Mobile ── */
@media (max-width: 620px) {
  .card-grid { grid-template-columns: 1fr; }
  .resource-card h3 { font-size: 16px; }
}

/* ── Board Toggle — Mobile ── */
@media (max-width: 480px) {
  .board-toggle { width: 100%; }
  .board-toggle button { flex: 1; text-align: center; font-size: 13px; padding: 9px 10px; }
}

/* ── About Band — Mobile ── */
@media (max-width: 600px) {
  .about-band .art { display: none; } /* Hide illustration on small phones */
  .about-band h2 { font-size: 22px; }
}

/* ── External Links — Mobile ── */
@media (max-width: 480px) {
  .links-grid { grid-template-columns: 1fr; }
  .ext-link { font-size: 13px; }
}

/* ── Global container padding + overflow guard — Mobile ──
   Matches the .container{padding:0 16px} the standard/class pages
   already set in their own $page_css, so every page (homepage,
   chapter pages, footer) lines up identically. */
@media (max-width: 700px) {
  html, body { overflow-x: hidden; }
  .container { padding-left: 16px; padding-right: 16px; }
}

/* ── Footer — Mobile ── */
@media (max-width: 540px) {
  .footer-top { padding-top: 36px; padding-bottom: 24px; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── Notice Strip — Mobile ── */
@media (max-width: 600px) {
  .notice-strip .container { font-size: 13px; padding: 12px 16px; }
}

/* ── Ad zones — hide leaderboard on mobile (too wide) ── */
/* Leaderboard units are responsive, so they stay visible on phones. */

/* ── Section padding — tighter on mobile ── */
@media (max-width: 600px) {
  .section { padding: 40px 0; }
  .section-head h2 { font-size: 24px; }
  .section-tight { padding: 28px 0; }
}

/* ============================================
   Mobile Search Icon + Dropdown
   ============================================ */

/* Hide mobile icon on desktop */
.mobile-search-btn { display: none; }
.mobile-search-bar { display: none; }

@media (max-width: 768px) {
  /* Hide desktop search bar */
  .header-search { display: none; }

  /* Show the 🔍 icon button */
  .mobile-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--blue-tint);
    border: 1.5px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    color: var(--blue);
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
  }
  .mobile-search-btn:hover,
  .mobile-search-btn.search-active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
  }

  /* Search dropdown bar — slides down */
  .mobile-search-bar {
    display: block;
    max-height: 0;
    overflow: hidden;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
  }
  .mobile-search-bar.search-open {
    max-height: 80px;
    padding: 12px 16px;
  }

  .mobile-search-form {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
  }
  .mobile-search-form input {
    flex: 1;
    border: 1.5px solid var(--line);
    border-right: none;
    background: var(--card);
    padding: 11px 16px;
    font-size: 14px;
    font-family: var(--font-body);
    border-radius: 999px 0 0 999px;
    outline: none;
    color: var(--ink);
  }
  .mobile-search-form input:focus { border-color: var(--blue); }
  .mobile-search-form input::placeholder { color: #9AA1AD; }
  .mobile-search-form button {
    border: 1.5px solid var(--blue);
    background: var(--blue);
    color: #fff;
    padding: 0 18px;
    height: 44px;
    border-radius: 0 999px 999px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-search-form button:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
}

/* ============================================
   Standard / Class Listing Pages
   Used by solutions/maharashtra/maha-std1-10.php
   and solutions/cbse/cbse-class1-10.php
   ============================================ */

/* --- Breadcrumb --- */
.breadcrumb { font-size: 13px; color: var(--ink-soft); padding: 14px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--blue); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: #ccc; }

/* --- Board switcher pill --- */
.board-switcher { display: inline-flex; align-items: center; gap: 10px; background: var(--blue-tint); border: 1.5px solid var(--blue); border-radius: 999px; padding: 8px 18px; font-size: 13.5px; font-weight: 600; color: var(--blue-deep); margin-bottom: 24px; text-decoration: none; }
.board-switcher:hover { background: var(--blue); color: #fff; }

/* --- Standard / Class selector: single swipeable row --- */
.std-nav { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-bottom: 36px; }
.std-nav::-webkit-scrollbar { display: none; }
.std-nav a { display: inline-block; flex: 0 0 auto; white-space: nowrap; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; border: 1.5px solid var(--line); color: var(--ink-soft); background: var(--card); }
.std-nav a:hover { border-color: var(--blue); color: var(--blue-deep); }
.std-nav a.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* --- Subject tabs --- */
.subject-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--line); margin-bottom: 32px; overflow-x: auto; scrollbar-width: none; }
.subject-tabs::-webkit-scrollbar { display: none; }
.subject-tabs button { border: none; background: transparent; padding: 13px 18px; font-size: 13.5px; font-weight: 600; font-family: var(--font-body); color: var(--ink-soft); cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.subject-tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.subject-panel { display: none; }
.subject-panel.active { display: block; }

/* --- Chapter rows --- */
.chapter-list { display: flex; flex-direction: column; gap: 10px; }
.chapter-row { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; display: flex; align-items: center; gap: 16px; transition: box-shadow .12s, border-color .12s; }
.chapter-row:hover { border-color: var(--blue); box-shadow: var(--shadow-card); }
.chapter-row:focus-within { border-color: var(--blue); box-shadow: var(--shadow-card); }
.chapter-num { min-width: 40px; height: 38px; padding: 0 8px; border-radius: 9px; background: var(--blue-tint); color: var(--blue-deep); font-family: var(--font-display); font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chapter-info { flex: 1; min-width: 0; }
.chapter-info strong { display: block; font-size: 15px; color: var(--ink); }
.chapter-info span { font-size: 13px; color: var(--ink-soft); margin-top: 2px; display: block; }
.chapter-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.chapter-actions a.dl { font-size: 13.5px; font-weight: 600; color: var(--blue); white-space: nowrap; }
.chapter-actions a.dl:hover { color: var(--blue-deep); text-decoration: underline; }

/* Whole row clickable: invisible stretched link sits under the share button */
.chapter-row a.dl.go { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; border-radius: var(--radius-sm); font-size: 0; line-height: 0; text-decoration: none; overflow: hidden; cursor: pointer; }
.chapter-row a.dl.go:hover { text-decoration: none; }
.chapter-row .wa-share { position: relative; z-index: 2; }

/* Chapter title is the real link; its ::after stretches over the whole row */
.chapter-row a.go-title { color: inherit; text-decoration: none; }
.chapter-row a.go-title::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; border-radius: var(--radius-sm); }
.chapter-row a.go-title:hover { color: var(--blue-deep); }
.chapter-row a.go-title:focus-visible { outline: none; }

/* --- Part / unit header --- */
.part-header { background: var(--blue-tint); border: 1px solid var(--blue); border-radius: var(--radius-sm); padding: 10px 20px; display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.part-badge { background: var(--blue); color: #fff; border-radius: 7px; padding: 4px 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.part-header strong { font-size: 14px; color: var(--blue-deep); }

/* --- Page + sidebar layout --- */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
@media (max-width: 860px) { .content-with-sidebar { grid-template-columns: 1fr; } }
.sidebar-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 20px; }
.sidebar-box .sb-title { background: var(--blue); color: #fff; font-weight: 700; font-size: 13.5px; padding: 12px 16px; }
.sidebar-box ul { padding: 8px 0; }
.sidebar-box ul li a { display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--paper-dim); }
.sidebar-box ul li:last-child a { border-bottom: none; }
.sidebar-box ul li a:hover { background: var(--blue-tint); color: var(--blue-deep); }
.sidebar-box ul li a .arrow { margin-left: auto; color: var(--ink-soft); font-size: 12px; }
