/* learn.turnipink.com. Warm, soft, storybook palette (cream paper, sage, blush, dusty blue, gold) with classic serif
   headings. System fonts only: the CSP allows no third-party fonts. */
:root {
  --bg: #fbf8f2;
  --paper: #f4ede1;
  --surface: #ffffff;
  --ink: #3a3631;
  --muted: #7a7066;
  --line: #e7ddce;
  --sage: #7f9c86;
  --sage-deep: #4f6d58;
  --blush: #e9c4bc;
  --rose: #b9658a;
  --sky: #9db7c6;
  --gold: #c8a24f;
  --shadow: 0 1px 2px rgba(58, 54, 49, 0.06), 0 6px 18px rgba(58, 54, 49, 0.08);
  --student: #4f6d58;
  --family: #a5583a;
  --teacher: #55669a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1b19; --paper: #25221f; --surface: #2b2825; --ink: #efe9df; --muted: #b5ab9e; --line: #3b3631;
    --sage: #9dbba4; --sage-deep: #b7d1bd; --blush: #6e4d48; --rose: #e3a3bf; --sky: #7f9bab; --gold: #dcbd73;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.35);
    --student: #9dbba4; --family: #e7a383; --teacher: #a9b6e6;
  }
}
:root[data-theme="dark"] {
  --bg: #1d1b19; --paper: #25221f; --surface: #2b2825; --ink: #efe9df; --muted: #b5ab9e; --line: #3b3631;
  --sage: #9dbba4; --sage-deep: #b7d1bd; --blush: #6e4d48; --rose: #e3a3bf; --sky: #7f9bab; --gold: #dcbd73;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.35);
  --student: #9dbba4; --family: #e7a383; --teacher: #a9b6e6;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--sage-deep); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 40px 0 12px; }
h3 { font-size: 1.2rem; margin: 24px 0 8px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main { padding-bottom: 48px; }

/* header / footer */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.25rem; }
.brand img { width: 34px; height: 34px; }
.brand span { color: var(--muted); font-size: 0.95rem; font-family: var(--sans); }
.site-head nav { display: flex; gap: 18px; font-size: 0.95rem; }
.site-head nav a { color: var(--ink); text-decoration: none; }
.site-head nav a:hover { color: var(--sage-deep); text-decoration: underline; }
footer { margin-top: 32px; padding: 32px 0 48px; background: var(--paper); color: var(--muted); font-size: 0.9rem; }
footer a { color: var(--muted); }

/* home */
.hero { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; padding: 40px 0 16px; }
.hero img { width: min(280px, 70%); margin: 0 auto; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
@media (min-width: 760px) { .hero { grid-template-columns: 1.4fr 1fr; padding: 64px 0 32px; } .hero img { width: 100%; max-width: 320px; } }
.eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--rose); font-weight: 600; margin: 0 0 8px; }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; color: var(--ink); text-decoration: none; }
a.card:hover { border-color: var(--sage); transform: translateY(-2px); transition: transform 0.15s ease; }
.card .art { aspect-ratio: 2 / 1; background: var(--paper); object-fit: cover; width: 100%; }
.card .body { padding: 18px 20px 20px; }
.card h2, .card h3 { margin: 0 0 6px; }
.chip { display: inline-block; font-size: 0.78rem; padding: 2px 10px; border-radius: 999px; background: var(--paper); color: var(--muted); margin: 2px 4px 2px 0; }

/* curriculum page */
.banner { position: relative; border-radius: 0 0 28px 28px; overflow: hidden; background: var(--paper); }
.banner img { width: 100%; aspect-ratio: 2 / 1; max-height: 380px; object-fit: cover; }
.title-card { position: relative; margin: -64px auto 0; max-width: 760px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 24px 24px 20px; text-align: center; }
.title-card .lede { margin: 0 auto; max-width: 36em; }
.crumb { margin: 18px 0 0; font-size: 0.9rem; }
.lede { color: var(--muted); font-size: 1.1rem; }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 0; }
.tabs a { padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 0.95rem; }
.tabs a:hover { border-color: var(--sage); }
.edition { padding-top: 24px; }
.edition > h2 { text-align: center; }
.headline { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.8rem); text-align: center; margin: 0 auto 8px; max-width: 28em; }
.description { max-width: 40em; margin: 0 auto 24px; text-align: center; }
.facts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin: 16px 0 8px; }
.fact { background: var(--paper); border-radius: 16px; padding: 16px 18px; }
.fact h3 { margin: 0 0 4px; font-size: 1rem; color: var(--sage-deep); }
.fact p { margin: 0; font-size: 0.95rem; }
.includes { columns: 2 280px; column-gap: 32px; list-style: none; padding: 0; margin: 8px 0; }
.includes li { break-inside: avoid; padding: 6px 0 6px 30px; position: relative; }
.includes li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 14px; height: 8px; border-left: 2.5px solid var(--sage); border-bottom: 2.5px solid var(--sage); transform: rotate(-45deg); }
.scope { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.unit { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.unit .num { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: var(--blush); color: var(--ink); font-family: var(--serif); font-weight: 700; margin-right: 8px; }
.unit h3 { display: flex; align-items: center; margin: 0 0 6px; font-size: 1.05rem; }
.unit p { margin: 0; font-size: 0.93rem; color: var(--muted); }
.gallery { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.gallery figure { margin: 0; }
.gallery a { display: block; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; aspect-ratio: 17 / 22; object-fit: cover; object-position: top; }
.gallery a:hover { border-color: var(--sage); }
.gallery figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 8px; line-height: 1.4; }
details.contents { margin: 28px 0 0; background: var(--paper); border-radius: 16px; padding: 4px 18px; }
details.contents > summary { cursor: pointer; padding: 12px 0; font-family: var(--serif); font-size: 1.15rem; }
details.contents details { border-top: 1px solid var(--line); padding: 6px 0; }
details summary { cursor: pointer; }

/* files */
.files { list-style: none; padding: 0 0 0 4px; margin: 8px 0; }
.files li { padding: 4px 0; overflow-wrap: anywhere; }
.badge { display: inline-block; min-width: 64px; text-align: center; font-size: 0.72rem; font-weight: 600; border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; margin-right: 6px; }
.badge.student { color: var(--student); }
.badge.family { color: var(--family); }
.badge.teacher { color: var(--teacher); }
.fmt, .count, .note { color: var(--muted); font-size: 0.85rem; }

/* products / buy */
.products { margin: 8px 0 16px; }
.product .body { display: flex; flex-direction: column; height: 100%; }
.product h3 { margin: 0 0 6px; }
.product p { margin: 0 0 8px; font-size: 0.95rem; }
.product .buy { margin-top: auto; padding-top: 8px; }
.price { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; }
.soon { display: inline-block; font-size: 0.85rem; padding: 4px 12px; border-radius: 999px; background: var(--paper); color: var(--muted); }
.buy-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.buy-form input { flex: 1 1 180px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.buy-form button { padding: 10px 22px; border: 0; border-radius: 999px; background: var(--sage-deep); color: var(--bg); font: inherit; font-weight: 600; cursor: pointer; }
.buy-form button:hover { filter: brightness(1.08); }
.buy-form button:disabled { opacity: 0.6; cursor: wait; }
.buy-form .note { flex-basis: 100%; margin: 0; }

/* notices, legal pages, order page */
.draft { background: var(--surface); border: 1px dashed var(--gold); color: var(--ink); padding: 10px 14px; border-radius: 12px; margin: 12px auto; max-width: 1048px; }
.prose { max-width: 720px; margin: 0 auto; padding-top: 24px; }
.prose h1 { margin-top: 16px; }
#order { max-width: 760px; margin: 0 auto; padding-top: 24px; }
.sample { text-align: center; margin: 20px 0 4px; }
.sample-btn { display: inline-block; padding: 12px 24px; border-radius: 999px; background: var(--sage-deep); color: var(--bg); text-decoration: none; font-weight: 600; }
.sample-btn span { font-weight: 400; opacity: 0.85; font-size: 0.85rem; margin-left: 6px; }
.sample-btn:hover { filter: brightness(1.08); }
