@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&family=Figtree:wght@400;500;600;700&display=swap");

/* ------------------------------------------------------------------
   Classroom palette
   Chalkboard green for the big surfaces, marigold for actions,
   crayon colours that mark resource types and subjects,
   and a soft blue "notebook paper" page instead of plain white.
   Change the brand by editing these values.
------------------------------------------------------------------ */
:root {
  --board: #1F4D3A;          /* chalkboard green */
  --board-deep: #163A2B;
  --board-chalk: #E9F1EC;    /* chalk-white text on the board */
  --wood: #A8703F;           /* chalk tray */
  --wood-dark: #7E5029;
  --marigold: #F2A922;       /* main action colour */
  --marigold-dark: #D88E0A;
  --marigold-soft: #FFF2D6;
  --page: #F3F6FB;           /* page background (soft paper blue) */
  --paper: #FFFFFF;
  --rule: #D7E3F4;           /* notebook ruled lines */
  --margin-red: #E8877A;     /* notebook margin line */
  --ink: #1B2430;
  --muted: #4E5A68;
  --line: #DCE3EC;
  --line-strong: #C3CEDC;

  /* crayon colours: one per resource type */
  --c-ppt: #E2553F;          /* coral */
  --c-plan: #2F6FDB;         /* blue */
  --c-sheet: #2E9A5B;        /* leaf green */
  --c-bundle: #7B4FC9;       /* violet */

  --accent: var(--board);
  --accent-dark: var(--board-deep);
  --accent-soft: #E3EFE8;
  --highlight: var(--marigold);
  --highlight-soft: var(--marigold-soft);
  --surface: #EEF3F9;
  --bg: var(--page);
  --danger: #B42318;
  --ok: #1C8A5A;
  --radius: 14px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--page); line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--board); }
a:hover { color: var(--board-deep); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3vw, 34px); }
h3 { font-size: 22px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.strong { font-weight: 700; }
.accent-text { color: var(--board); }
.eyebrow { font-size: 13px; font-weight: 700; color: #9A5B00; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.section { padding-top: 56px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 22px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.hidden, [hidden] { display: none !important; }

/* Section headings get a short chalk-style underline in crayon colours */
.section > h2, .section-head h2 { position: relative; padding-bottom: 10px; }
.section > h2::after, .section-head h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--c-ppt) 0 25%, var(--marigold) 25% 50%, var(--c-sheet) 50% 75%, var(--c-plan) 75%);
}

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 2px solid var(--board); background: var(--board); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; font-size: 16px; }
.btn:hover { background: var(--board-deep); border-color: var(--board-deep); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 15px; }
.btn-outline { background: var(--paper); color: var(--board); }
.btn-outline:hover { background: var(--accent-soft); color: var(--board); border-color: var(--board); }
.btn-yellow { background: var(--marigold); border-color: var(--marigold); color: var(--ink); box-shadow: 0 3px 0 var(--marigold-dark); }
.btn-yellow:hover { background: #F7B83E; border-color: #F7B83E; color: var(--ink); }
.btn-ghost { background: transparent; border-color: rgba(233,241,236,0.6); color: var(--board-chalk); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }
.btn-danger { background: var(--paper); color: var(--danger); border-color: var(--danger); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.linklike { background: none; border: 0; padding: 8px 4px; color: var(--ink); font-weight: 600; cursor: pointer; min-height: 40px; }

/* ---------------- Header ---------------- */
.site-header { background: var(--board-deep); position: relative; z-index: 5; border-bottom: 4px solid var(--marigold); }
.site-header .brand, .site-header .main-nav a:not(.btn), .site-header .linklike { color: #fff; }
.site-header .brand:hover { color: #fff; }
.brand-accent { color: var(--marigold); }
.footer-brand .brand-text { font-family: var(--display); font-weight: 800; font-size: 22px; color: #fff; }
.site-header .btn { background: var(--marigold); border-color: var(--marigold); color: var(--ink); box-shadow: 0 2px 0 var(--marigold-dark); }
.site-header .btn:hover { background: #F7B83E; border-color: #F7B83E; color: var(--ink); }
.site-header .header-search { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.22); color: #CFE0D6; }
.site-header .header-search input { color: #fff; }
.site-header .header-search input::placeholder { color: #B9CEC2; }
.site-header .header-search:focus-within { background: #fff; border-color: var(--marigold); color: var(--muted); }
.site-header .header-search:focus-within input { color: var(--ink); }
body.home .header-search { display: none; }

.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-top: 14px; padding-bottom: 14px; }
.header-row .main-nav { margin-left: auto; }
.subbar { border-top: 1px solid rgba(255,255,255,0.12); }
.subbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 10px; padding-bottom: 12px; }
.subbar-row > * { min-width: 0; }
.subbar .header-search { flex: 1 1 320px; max-width: 560px; min-width: 0; height: 44px; padding: 0 5px 0 16px; background: #fff !important; border: 0 !important; color: var(--muted) !important; }
.subbar .header-search input { color: var(--ink) !important; }
.subbar .header-search input::placeholder { color: #7A8796 !important; }
.subbar .header-search .btn { min-height: 34px; padding: 0 16px; font-size: 14px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick a { color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 13px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.3); }
.quick a:hover { border-color: var(--marigold); color: #FFD27A; }
.quick a[aria-current="page"] { background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
@media (max-width: 700px) { .subbar .header-search { flex: 1 1 100%; max-width: none; } .quick { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; } .quick a { white-space: nowrap; } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.header-search { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); border-radius: 999px; padding: 0 16px; height: 46px; background: var(--page); color: var(--muted); }
.header-search:focus-within { border-color: var(--board); background: var(--paper); }
.header-search input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; font-size: 15px; color: var(--ink); }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font-weight: 600; font-size: 15px; }
.main-nav a:not(.btn) { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.main-nav a[aria-current="page"]:not(.btn) { color: #fff; text-decoration: underline; text-decoration-color: var(--marigold); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.main-nav a:not(.btn):hover { color: #FFD27A; text-decoration: underline; text-decoration-color: var(--marigold); text-decoration-thickness: 3px; text-underline-offset: 6px; }
#nav-account { display: flex; align-items: center; gap: 12px; }

/* ---------------- Hero: the chalkboard ---------------- */
.hero {
  color: var(--board-chalk);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,0.07), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(255,255,255,0.05), transparent 50%),
    var(--board);
  border-bottom: 18px solid var(--wood);
  box-shadow: inset 0 -4px 0 var(--wood-dark);
  position: relative;
}
/* chalk tray lip with two chalk sticks */
.hero::after {
  content: ""; position: absolute; bottom: -14px; right: 12%; width: 54px; height: 9px; border-radius: 5px;
  background: #F4F1E8; box-shadow: 70px 0 0 #F6C8C0, -40px 1px 0 #CFE3F7;
}
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; padding-top: 30px; padding-bottom: 32px; }
.hero-copy { flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.hero h1 { color: #fff; }
.hero h1.hero-title { font-size: clamp(24px, 2.4vw, 31px); line-height: 1.2; max-width: none; text-decoration: none; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -2px; }
.hchip { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; padding: 7px 14px; border-radius: 999px; box-shadow: 0 2px 0 rgba(0,0,0,0.18); }
.hchip i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hchip:hover { color: var(--ink); background: #FFF8E8; transform: translateY(-1px); }
.hchip-kit { background: var(--marigold); box-shadow: 0 2px 0 var(--marigold-dark); }
.hchip-kit:hover { background: #F7B83E; }
.hero-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; font-weight: 600; color: var(--board-chalk); }
.hero-facts li { display: flex; gap: 7px; align-items: center; }
.hero-facts li::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--marigold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B2430' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat; }
.hero-facts a { color: var(--marigold); text-decoration: underline; text-underline-offset: 3px; }
.hero-facts a:hover { color: #FFD27A; }
.hero-art .t-big { color: #fff; font-size: 22px; }
.formats-section { padding-top: 24px; gap: 16px; }
.formats-section h2 { font-size: clamp(22px, 2.2vw, 28px); }
.format { padding: 16px 18px 14px !important; gap: 6px !important; }
.format p { font-size: 14px !important; }
.format-only { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background: var(--c); padding: 4px 10px; border-radius: 999px; }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.format { --c: var(--board); position: relative; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--c); border-radius: var(--radius); padding: 20px 20px 18px; box-shadow: 0 2px 0 rgba(27,36,48,0.04); }
.format:hover { color: var(--ink); border-color: color-mix(in srgb, var(--c) 45%, white); border-top-color: var(--c); }
.format:hover .format-k { text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.format p { color: var(--muted); font-size: 15px; flex: 1; }
.format-k { font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1.15; color: color-mix(in srgb, var(--c) 72%, black); }
.format-price { align-self: flex-start; font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--c) 12%, white); color: color-mix(in srgb, var(--c) 75%, black); padding: 5px 10px; border-radius: 6px; }
@media (max-width: 700px) { .hero-art { display: none; } .hero-inner { padding-top: 32px; padding-bottom: 40px; } }
.hero-inner { flex-wrap: nowrap !important; }
.hero-copy { flex: 1 1 auto !important; }
.slim-search { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 12px; padding: 5px 5px 5px 14px; max-width: 560px; box-shadow: 0 8px 22px rgba(0,0,0,0.22); color: var(--muted); }
.slim-search svg { flex: none; }
.slim-search input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 16px; padding: 8px 6px; color: var(--ink); background: transparent; }
.slim-search .btn { min-height: 40px; padding: 0 18px; }
.hero-side { flex: 0 0 400px; position: relative; height: 236px; }
.hero-side .doc { position: absolute; width: 150px; height: 200px; background: #fff; border-radius: 6px; box-shadow: 0 14px 30px rgba(0,0,0,0.35); padding: 0 0 10px; overflow: hidden; display: flex; flex-direction: column; gap: 7px; }
.hero-side .dh { color: #fff; font: 800 11px var(--body); padding: 6px 10px; letter-spacing: 0.03em; }
.hero-side .plan { left: 0; top: 10px; transform: rotate(-6deg); }
.hero-side .sheet { right: 0; top: 0; transform: rotate(5deg); }
.hero-side .tb, .hero-side .tr { display: grid; grid-template-columns: 1fr 2fr 2fr; gap: 4px; padding: 0 10px; }
.hero-side .tb i { height: 9px; background: var(--board); border-radius: 2px; }
.hero-side .tr i { height: 16px; background: #EEF3F9; border-radius: 2px; }
.hero-side .nm { font-size: 8px; color: var(--muted); padding: 0 10px; white-space: nowrap; }
.hero-side .q { display: flex; gap: 5px; align-items: center; padding: 0 10px; font-size: 9px; color: var(--ink); }
.hero-side .q span { flex: 1; height: 6px; background: var(--rule); border-radius: 3px; }
.hero-side .opt { display: flex; gap: 6px; padding: 0 10px 0 22px; }
.hero-side .opt span { font-size: 8px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 50%; width: 13px; height: 13px; display: flex; align-items: center; justify-content: center; }
.hero-side .ln { margin: 0 10px 0 22px; border-bottom: 1px solid var(--line-strong); height: 8px; }
.hero-side .slide { position: absolute; left: 50px; top: 56px; width: 300px; background: var(--page); border: 3px solid #fff; border-radius: 8px; box-shadow: 0 16px 34px rgba(0,0,0,0.4); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.hero-side .st { display: flex; justify-content: space-between; align-items: center; font: 800 16px var(--display); color: var(--ink); }
.hero-side .st em { font: 800 10px var(--body); font-style: normal; color: #fff; background: var(--c-plan); padding: 3px 9px; border-radius: 999px; }
.hero-side .sf { display: flex; gap: 6px; }
.hero-side .sf span { font-size: 9px; font-weight: 700; background: var(--ink); color: #fff; padding: 2px 7px; border-radius: 4px; }
.hero-side .ptag { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); background: var(--marigold); color: var(--ink); font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 0 var(--marigold-dark); }
@media (max-width: 900px) { .hero-inner { flex-wrap: wrap !important; } .hero-side { display: none; } }
.find { display: flex; flex-direction: column; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.find-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.find-row > b { width: 70px; font-size: 14px; color: var(--muted); font-weight: 700; }
.find-items { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 400px; }
.cbtn { text-decoration: none; color: var(--board); font-weight: 700; font-size: 15px; padding: 8px 14px; border-radius: 10px; border: 2px solid var(--accent-soft); background: var(--accent-soft); }
.cbtn:hover { border-color: var(--board); color: var(--board); }
.find .chip { padding: 7px 14px; font-size: 14px; }
.strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; background: var(--marigold-soft); border: 2px solid #F5D9A0; border-radius: 18px; padding: 18px 24px; }
.strip-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-weight: 700; }
.strip-steps .n { width: 30px; height: 30px; border-radius: 50%; background: var(--board); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; margin-right: 8px; border: 2px solid var(--marigold); }
.strip-steps .arr { color: var(--muted); }
.strip-ticks { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; font-weight: 600; color: var(--muted); list-style: none; margin: 0; padding: 0; }
.strip-ticks li::before { content: "✓ "; color: var(--ok); font-weight: 800; }
body.home .section { padding-top: 40px; }
.format-ppt { --c: var(--c-ppt); } .format-plan { --c: var(--c-plan); } .format-sheet { --c: var(--c-sheet); } .format-bundle { --c: var(--c-bundle); background: color-mix(in srgb, var(--c-bundle) 5%, white); }
.format-badge { position: absolute; top: -14px; right: 16px; box-shadow: 0 2px 0 var(--marigold-dark); background: var(--marigold); color: var(--ink); font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 6px; }
.hero h1 { text-decoration: underline; text-decoration-color: rgba(242,169,34,0.85); text-decoration-thickness: 6px; text-underline-offset: 10px; text-decoration-skip-ink: none; }
.hero-pill { font-size: 13px !important; padding: 5px 12px !important; align-self: flex-start; background: rgba(255,255,255,0.1); border: 1px dashed rgba(233,241,236,0.45); padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.hero-lead { font-size: 17px; line-height: 1.6; color: #CFE0D6; max-width: 48rem; }
.hero-search { display: flex; flex-wrap: wrap; gap: 8px; background: var(--paper); padding: 6px; border-radius: 14px; max-width: 40rem; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.hero-search input { flex: 1 1 200px; min-width: 0; border: 0; font-size: 16px; padding: 10px 12px; outline: none; color: var(--ink); }
.hero-search select { border: 2px solid var(--line); border-radius: 10px; padding: 0 12px; height: 44px; background: var(--page); color: var(--ink); }
.hero-art { flex: 0 1 300px; min-width: 0; position: relative; height: 180px; }
.hero-art > div { position: absolute; border-radius: 10px; box-shadow: 0 14px 30px rgba(0,0,0,0.32); padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.hero-art .a1 { left: 4%; top: 30px; width: 62%; aspect-ratio: 16/10; transform: rotate(-5deg);
  background: repeating-linear-gradient(#fff 0 23px, var(--rule) 23px 24px); border-left: 6px solid var(--margin-red); }
.hero-art .a2 { right: 2%; top: 0; width: 60%; aspect-ratio: 16/10; background: var(--marigold-soft); transform: rotate(4deg); border-top: 8px solid var(--c-plan); }
.hero-art .a3 { left: 18%; bottom: 0; width: 66%; aspect-ratio: 16/9; background: var(--c-ppt); border: 4px solid #fff; justify-content: space-between; }
.hero-art .a3 .k { color: #FFE3A3 !important; }
.hero-art .k { font-size: 11px; font-weight: 700; }
.hero-art .t { font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--ink); }
.hero-art .bar { height: 6px; background: #E6ECEA; border-radius: 4px; }

/* ---------------- Class tiles (one crayon colour each) ---------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tile { --c: var(--board); text-decoration: none; color: var(--ink); border-radius: var(--radius); padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 4px;
  background: color-mix(in srgb, var(--c) 12%, white); border: 2px solid color-mix(in srgb, var(--c) 28%, white); border-top: 8px solid var(--c); }
.tile:hover { color: var(--ink); border-color: var(--c); }
.tile strong { font-family: var(--display); font-size: 26px; color: color-mix(in srgb, var(--c) 70%, black); }
.tile:nth-child(5n+1) { --c: #D9862A; }
.tile:nth-child(5n+2) { --c: var(--c-ppt); }
.tile:nth-child(5n+3) { --c: var(--c-sheet); }
.tile:nth-child(5n+4) { --c: var(--c-plan); }
.tile:nth-child(5n+5) { --c: var(--c-bundle); }

/* ---------------- Subject chips (tinted by subject colour) ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { --c: var(--muted); text-decoration: none; color: color-mix(in srgb, var(--c) 72%, black); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 13%, white); border: 2px solid color-mix(in srgb, var(--c) 30%, white); }
.chip:hover { border-color: var(--c); color: color-mix(in srgb, var(--c) 80%, black); }
.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }

/* ---------------- Notebook band (free samples) ---------------- */
.ruled {
  background:
    linear-gradient(90deg, transparent 0 46px, var(--margin-red) 46px 48px, transparent 48px),
    repeating-linear-gradient(var(--paper) 0 31px, var(--rule) 31px 32px);
  border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule);
  margin-top: 56px; padding-bottom: 48px;
}
.ruled > .section { padding-top: 40px; }
@media (max-width: 700px) { .ruled { background: repeating-linear-gradient(var(--paper) 0 31px, var(--rule) 31px 32px); } }

/* ---------------- Resource cards ---------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { --c: var(--board); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--paper);
  border: 1px solid var(--line); border-bottom: 5px solid var(--c); box-shadow: 0 2px 0 rgba(27,36,48,0.04); }
.card:hover { color: var(--ink); border-color: color-mix(in srgb, var(--c) 45%, white); border-bottom-color: var(--c); }
.card:hover .card-title { text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.card-ppt { --c: var(--c-ppt); }
.card-lesson-plan { --c: var(--c-plan); }
.card-worksheet { --c: var(--c-sheet); }
.card-bundle { --c: var(--c-bundle); }
.card-thumb { position: relative; aspect-ratio: 16/10; display: flex; align-items: flex-end; padding: 16px; overflow: hidden; }
.card-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card-thumb-title { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.1; position: relative; }
.tag { position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 6px; display: inline-flex; gap: 6px; align-items: center; }
.tag-free { background: var(--marigold); color: var(--ink); }
.tag-dark { background: rgba(27,36,48,0.82); color: #fff; }
.card-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .eyebrow { color: color-mix(in srgb, var(--c) 78%, black); display: inline-flex; align-items: center; gap: 7px; }
.card .eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.card-title { font-weight: 700; font-size: 16px; line-height: 1.35; }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; }
.price { font-family: var(--display); font-weight: 800; font-size: 22px; }
.empty { padding: 40px; text-align: center; border: 2px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); background: var(--paper); }

/* ---------------- Panels ---------------- */
.panel { background: var(--marigold-soft); border-radius: 24px; padding: 44px 40px; border: 2px solid #F5D9A0; }
.band { background: var(--board); color: var(--board-chalk); border-radius: 24px; padding: 44px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  border-bottom: 10px solid var(--wood); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.step-n { width: 52px; height: 52px; border-radius: 50%; background: var(--board); color: #fff; font-family: var(--display); font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; border: 3px solid var(--marigold); }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--paper); }

/* ---------------- Browse ---------------- */
.browse { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 32px; padding-bottom: 80px; }
.filters { flex: 1 1 240px; max-width: 100%; display: flex; flex-direction: column; gap: 18px; background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--board); border-radius: var(--radius); padding: 22px; }
.filters fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.filters legend { font-weight: 700; margin-bottom: 6px; }
.filters label { display: flex; gap: 10px; align-items: center; min-height: 32px; cursor: pointer; }
.filters input[type=checkbox], .filters input[type=radio] { width: 18px; height: 18px; accent-color: var(--board); }
.results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
select.input, input.input, textarea.input { width: 100%; border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--paper); min-height: 46px; }
select.input:focus, input.input:focus, textarea.input:focus { border-color: var(--board); outline: none; }
textarea.input { min-height: 100px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > span.label { font-weight: 600; font-size: 15px; }
.hint { font-size: 13px; color: var(--muted); }

/* ---------------- Resource page ---------------- */
.res { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 24px; }
.res-left { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.res-right { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.viewer { position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: var(--board); border: 10px solid var(--board); border-bottom-width: 16px; border-bottom-color: var(--wood); display: flex; align-items: center; justify-content: center; }
.viewer img { width: 100%; height: 100%; object-fit: contain; background: #fff; user-select: none; -webkit-user-drag: none; border-radius: 4px; cursor: zoom-in; }
.viewer.is-page { aspect-ratio: auto; }
.viewer.is-page img { height: auto; }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(12,20,16,0.92); display: flex; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.lb-bar button, .lb-nav { background: rgba(255,255,255,0.14); color: #fff; border: 0; border-radius: 10px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 700; cursor: pointer; padding: 0 12px; }
.lb-bar button:hover, .lb-nav:hover { background: rgba(255,255,255,0.26); }
.lb-stage { flex: 1; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 0 16px 24px; }
.lb-stage img { width: 100%; max-width: 1200px; height: auto; background: #fff; border-radius: 6px; user-select: none; -webkit-user-drag: none; cursor: zoom-out; }
.lb-stage.is-slide { align-items: center; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
body.lb-open { overflow: hidden; }
.viewer .locked { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 24px; color: var(--board-chalk); }
.viewer .locked .muted { color: #CFE0D6; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.thumbs button { position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; padding: 0; cursor: pointer; border: 3px solid transparent; background: var(--paper); }
.thumbs button[aria-current="true"] { border-color: var(--marigold); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; background: #E9EEF3; }
.thumbs .lk { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; font-weight: 700; flex-direction: column; gap: 4px; background: rgba(238,243,249,0.94); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--board); }
.badge-y { background: var(--marigold-soft); color: #8A5200; }
.buybox { background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--marigold); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 8px 24px rgba(27,36,48,0.06); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.ticks li { display: flex; gap: 10px; align-items: center; }
dl.details { margin: 0; display: grid; grid-template-columns: auto 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; background: var(--paper); }
dl.details dt { padding: 12px 16px; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line); }
dl.details dd { margin: 0; padding: 12px 16px; font-weight: 600; border-bottom: 1px solid var(--line); }
.prose ul { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.prose ul li::marker { color: var(--c-sheet); }
.prose { display: flex; flex-direction: column; gap: 12px; }
.prose h2 { font-size: 24px; margin-top: 12px; }
article.prose { background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--board); border-radius: var(--radius); padding: 36px clamp(20px, 4vw, 48px); }

/* ---------------- Forms & auth ---------------- */
.auth { max-width: 460px; margin: 48px auto 80px; background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--marigold); border-radius: 18px; padding: 32px clamp(20px, 4vw, 36px); box-shadow: 0 10px 30px rgba(27,36,48,0.07); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tabs { display: flex; gap: 8px; }
.tabs button { flex: 1; min-height: 44px; border-radius: 999px; border: 2px solid var(--line-strong); background: var(--paper); font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--board); border-color: var(--board); color: #fff; }

/* ---------------- Tables (account/admin) ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--accent-soft); color: var(--board-deep); font-weight: 700; white-space: nowrap; }
.status { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 6px; background: var(--surface); }
.status-paid, .status-live { background: #E3F4EA; color: #136B44; }
.status-created, .status-draft { background: var(--marigold-soft); color: #8A5200; }

/* ---------------- Footer: back to the board ---------------- */
.site-footer { background: var(--board-deep); color: #C9DBD0; margin-top: 56px; border-top: 12px solid var(--wood); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-top: 44px; padding-bottom: 28px; }
.footer-row > * { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer-row strong { color: #fff; }
.footer-brand { flex: 1 1 260px; max-width: 24rem; }
.footer-brand strong { font-family: var(--display); font-size: 22px; }
.site-footer a { color: #C9DBD0; text-decoration: none; }
.site-footer a:hover { color: var(--marigold); }
.footer-base { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 18px; padding-bottom: 24px; font-size: 13px; }

/* ---------------- Toast & misc ---------------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 12px; opacity: 0; transition: .2s; z-index: 50; max-width: calc(100% - 32px); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--danger); }
.toast-ok { background: #136B44; }
.notice { background: var(--marigold-soft); border: 1px solid #F5D9A0; border-radius: 12px; padding: 14px 16px; font-size: 15px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--board); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .toast { transition: none; } }

@media (max-width: 640px) {
  .panel, .band { padding: 28px 20px; }
  .hero-art { height: 260px; }
  .main-nav { gap: 6px 14px; }
  .hero::after { display: none; }
}

/* Keep the hero lead and chips on one line on smaller laptops / zoomed browsers */
.hero-lead { font-size: 16px; }
.hchip { font-size: 14px; padding: 6px 12px; gap: 7px; }
.hero-chips { gap: 7px; }
@media (max-width: 1250px) {
  .hero-side { zoom: 0.78; }
  .hero-inner { gap: 20px; }
}
@media (max-width: 1120px) {
  .hero-side { zoom: 0.62; }
  .hero-lead { font-size: 15px; }
  .hchip { font-size: 13.5px; padding: 6px 11px; }
}
@media (max-width: 1000px) { .hero-side { display: none; } }
@media (max-width: 1250px) { .format-k { font-size: 19px; } .format p { font-size: 13.5px !important; } }
/* Short laptop screens: tighten spacing so the four cards fit without scrolling */
@media (min-width: 900px) and (max-height: 760px) {
  .hero-inner { padding-top: 22px; padding-bottom: 24px; }
  .hero-copy { gap: 10px; }
  .formats-section { padding-top: 18px !important; gap: 12px; }
  .formats-section .section-head p { display: none; }
  .format { padding: 14px 16px 12px !important; }
}
