:root {
  --ink: #2f342f;
  --muted: #697066;
  --paper: #f6f3ed;
  --paper-2: #eef0e8;
  --sage: #75836f;
  --sage-dark: #53614f;
  --clay: #b8846c;
  --line: rgba(47, 52, 47, .12);
  --card: rgba(255,255,255,.72);
  --shadow: 0 18px 55px rgba(55, 63, 54, .10);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, var(--paper-2), var(--paper) 38%, #f8f5ef);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(47,52,47,.05) .7px, transparent .7px);
  background-size: 14px 14px;
  opacity: .25;
}

h1,h2,h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.03em; }
a { color: inherit; }
button,input { font: inherit; }
button { cursor: pointer; }

.shell { width: min(1080px, calc(100% - 36px)); margin-inline: auto; position: relative; z-index: 1; }
.topbar { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 46px; height: 46px; display: block; border-radius: 14px; box-shadow: 0 6px 18px rgba(55,63,54,.08); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }

.gate-wrap { max-width: 760px; padding: 9vh 0 12vh; }
.eyebrow { color: var(--sage-dark); font-size: 12px; font-weight: 700; letter-spacing: .18em; margin-bottom: 18px; }
h1 { font-size: clamp(48px, 8vw, 84px); line-height: .98; margin: 0; max-width: 750px; }
.lede { max-width: 590px; color: var(--muted); font-size: clamp(18px, 3vw, 22px); margin: 26px 0 36px; }
.code-card { background: var(--card); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.74); box-shadow: var(--shadow); border-radius: var(--radius-xl); padding: 26px; max-width: 660px; }
.code-card label { display: block; font-weight: 650; margin-bottom: 12px; }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
input { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; background: rgba(255,255,255,.88); color: var(--ink); outline: none; }
input:focus { border-color: var(--sage); box-shadow: 0 0 0 4px rgba(117,131,111,.12); }
.primary-button,.quiet-button,.resource-action { border: 0; border-radius: 14px; padding: 14px 18px; font-weight: 700; }
.primary-button { background: var(--sage-dark); color: white; }
.primary-button:hover { filter: brightness(.96); }
.quiet-button { background: rgba(255,255,255,.6); color: var(--sage-dark); border: 1px solid var(--line); }
.remember-row { display:flex !important; align-items:center; gap:8px; margin:14px 2px 0 !important; color:var(--muted); font-size:13px; font-weight:500 !important; }
.remember-row input { width:16px; height:16px; min-width:16px; accent-color:var(--sage-dark); }
.form-message { min-height: 1.4em; margin: 10px 2px 0; color: #865646; font-size: 14px; }
.privacy-note { color: var(--muted); font-size: 13px; margin: 16px 6px; }

.class-hero { padding: 7vh 0 38px; border-bottom: 1px solid var(--line); }
.class-kicker { color: var(--sage-dark); font-weight: 700; letter-spacing: .11em; font-size: 12px; text-transform: uppercase; }
.class-hero h1 { font-size: clamp(42px, 7vw, 74px); margin: 10px 0 18px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.meta-pill { padding: 8px 12px; border: 1px solid var(--line); background: rgba(255,255,255,.45); border-radius: 999px; font-size: 13px; color: var(--muted); }
.class-copy { max-width: 720px; font-size: 18px; color: var(--muted); }
.class-welcome { margin-top: 18px; color: var(--ink); }
.sections { padding: 38px 0 90px; display: grid; gap: 26px; }
.section-card { background: rgba(255,255,255,.58); border: 1px solid rgba(255,255,255,.8); border-radius: var(--radius-xl); padding: clamp(22px, 4vw, 34px); box-shadow: 0 10px 35px rgba(55,63,54,.06); }
.section-card h2 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 42px); }
.section-description { color: var(--muted); margin: 0 0 22px; max-width: 720px; }
.resource-list { display: grid; gap: 14px; }
.resource { border-top: 1px solid var(--line); padding-top: 18px; }
.resource:first-child { border-top: 0; padding-top: 0; }
.resource-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.resource-title-wrap { display: flex; gap: 12px; align-items: flex-start; }
.resource-icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 13px; background: #ecefe7; color: var(--sage-dark); }
.resource h3 { font-family: inherit; letter-spacing: 0; font-size: 16px; font-weight: 750; margin: 1px 0 4px; }
.resource p { color: var(--muted); margin: 0; font-size: 14px; }
.resource-body { margin-top: 14px; }
.resource-frame { width: 100%; border: 0; border-radius: 18px; background: #e8e9e4; overflow: hidden; }
.video-frame { aspect-ratio: 16/9; }
.pdf-shell { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.58); }
.pdf-frame { display:block; width:100%; height:min(72vh,760px); min-height:520px; border:0; background:#ecebe6; }
.pdf-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:10px 12px; border-top:1px solid var(--line); background:rgba(246,243,237,.92); }
.pdf-actions .resource-action { margin:0; padding:10px 13px; font-size:13px; }
a.resource-action { display: inline-flex; text-decoration: none; background: rgba(117,131,111,.12); color: var(--sage-dark); margin-top: 2px; }
a.resource-action:hover { background: rgba(117,131,111,.18); }
audio { width: min(100%, 600px); }
.resource-image { display: block; width: min(100%, 780px); max-height: 560px; object-fit: contain; border-radius: 18px; background: #ecebe6; }
.footer { border-top: 1px solid var(--line); min-height: 90px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); font-size: 13px; }
.footer a { color: var(--sage-dark); }
.hidden { display: none !important; }

.ambient { position: fixed; border-radius: 50%; filter: blur(2px); opacity: .18; pointer-events: none; }
.ambient-a { width: 34vw; height: 34vw; min-width: 260px; min-height: 260px; background: #b5c4ad; top: -12vw; right: -8vw; }
.ambient-b { width: 28vw; height: 28vw; min-width: 220px; min-height: 220px; background: #d4b3a3; bottom: -12vw; left: -10vw; }

@media (max-width: 650px) {
  .pdf-frame { min-height: 460px; height: 64vh; }
  .shell { width: min(100% - 24px, 1080px); }
  .topbar { min-height: 78px; }
  .brand-copy small { display: none; }
  .gate-wrap { padding-top: 6vh; }
  .code-card { padding: 18px; border-radius: 22px; }
  .code-row { grid-template-columns: 1fr; }
  .primary-button { width: 100%; }
  .resource-head { display: block; }
  .footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 24px 0; }
}
