/* The apps' look: the onboarding's bark-brown backdrop (MeadowBackground), glass cards, cream
   text, honey accents. Fixed in both appearances, like the app. Shared by every app's pages. */
:root {
  color-scheme: dark;
  --ground: #16110c;
  --glass: rgba(255, 240, 215, 0.055);
  --glass-edge: rgba(255, 255, 255, 0.09);
  --chip: rgba(255, 255, 255, 0.1);
  --text: #fff7e8;
  --text-2: #d9cbb4;
  --label: #e4d7c1;
  --honey: #ffd42e;
  --clay-face: #ffc83d;
  --clay-top: #ffd866;
  --clay-edge: #c98a12;
  --clay-text: #3e2510;
  --leaf: #b9dd8e;
  --rounded: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--ground); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* MeadowBackground: warm bark brown darkening downwards, a soft glow at the top. Pinned to the
   screen like the app's, so the cards scroll over it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(460px circle at 50% 0, rgba(138, 106, 69, 0.2), rgba(138, 106, 69, 0)),
    linear-gradient(#271d15, #16110c 50%, #0a0806);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

a { color: var(--honey); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
strong { color: var(--text); font-weight: 650; }

/* Dark glass panels, like the lesson cards. */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.25);
  border-radius: 28px;
  padding: 24px;
  margin: 0 0 14px;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

/* Top: the app, the page title, the boar. */
.hero {
  position: relative;
  overflow: hidden;
  padding: 26px 24px 24px;
  margin-bottom: 18px;
}
.app {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font: 700 1.05rem/1.2 var(--rounded);
  color: var(--text);
  text-decoration: none;
}
.app img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--icon-bg, transparent);
}
.hero h1 {
  font: 800 clamp(2rem, 7vw, 2.6rem)/1.08 var(--rounded);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  max-width: calc(100% - 120px);
}
.hero p { color: var(--text-2); max-width: calc(100% - 120px); margin: 0 0 10px; }
.hero .updated {
  display: inline-block;
  margin: 8px 0 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--label);
  font: 600 0.82rem/1.4 var(--rounded);
}
.hero .boar {
  position: absolute;
  right: 14px;
  bottom: -6px;
  width: 112px;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}
@media (max-width: 480px) {
  .hero h1, .hero p { max-width: calc(100% - 84px); }
  .hero .boar { width: 82px; right: 8px; }
}

/* Section headings as the app's small tracked labels. */
h2 {
  font: 700 0.8rem/1.3 var(--rounded);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--label);
  margin: 0 0 12px;
}
h3 {
  font: 700 1.08rem/1.35 var(--rounded);
  color: var(--text);
  margin: 1.3em 0 0.3em;
}
p { margin: 0 0 0.8em; color: var(--text); }
.muted { color: var(--text-2); }

ul { list-style: none; padding: 0; margin: 0 0 0.8em; }
li {
  position: relative;
  padding-left: 22px;
  margin: 0.5em 0;
}
li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--honey);
}

/* Contents chips. */
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
  text-decoration: none;
  font: 600 0.88rem/1.3 var(--rounded);
}
.toc a:hover { background: rgba(255, 255, 255, 0.16); }

/* The app's chunky honey button. */
.clay {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 18px;
  background: linear-gradient(var(--clay-top), var(--clay-face) 45%);
  box-shadow: 0 5px 0 var(--clay-edge), 0 10px 18px rgba(0, 0, 0, 0.3);
  color: var(--clay-text);
  font: 700 1.02rem/1.2 var(--rounded);
  text-decoration: none;
  margin: 6px 0 12px;
  transition: transform 0.08s, box-shadow 0.08s;
}
.clay:hover { text-decoration: none; }
.clay:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--clay-edge), 0 4px 10px rgba(0, 0, 0, 0.3); }

section[id] { scroll-margin-top: 16px; }

footer {
  text-align: center;
  color: var(--text-2);
  font: 600 0.88rem/1.6 var(--rounded);
  padding: 18px 8px 0;
}
footer a { color: var(--text); }

/* Printed or saved as PDF: plain black on white, no map, no glass. */
@media print {
  :root { color-scheme: light; }
  html, body { background: #fff; color: #111; font-size: 11pt; }
  body::before, .hero .boar, .clay { display: none; }
  main { max-width: none; padding: 0; }
  .card { background: none; border: 0; border-radius: 0; padding: 0; margin: 0 0 14pt;
    -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hero h1, .hero p { max-width: none; }
  .hero h1, .app, h3, strong, p, li { color: #111; }
  footer a { color: #7a5600; }
  h2, .hero p, .hero .updated, footer { color: #444; }
  .hero .updated { background: none; padding: 0; }
  a { color: #7a5600; }
  li::before { background: #111; }
  section { break-inside: auto; }
  h2, h3 { break-after: avoid; }
}
