:root {
  color-scheme: light;
  --paper: #f7f6ee;
  --white: #fffef9;
  --ink: #21372c;
  --forest: #254636;
  --muted: #526356;
  --line: #d9ded0;
  --sage: #dce6d6;
  --butter: #f3df9c;
  --peach: #f2dccc;
  --display: "Fraunces", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
}

@font-face { font-family: "Fraunces"; src: url("./assets/fraunces.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("./assets/fraunces-italic.woff2") format("woff2"); font-weight: 400 800; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("./assets/dm-sans.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--body); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #956129; outline-offset: 4px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
.container { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 2; padding: 10px 16px; background: var(--white); transform: translateY(-160%); }
.skip:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--line); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 78px; }
.brand { display: inline-flex; width: fit-content; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; font: 740 2.2rem/.9 var(--display); letter-spacing: -.09em; }
.brand-period { color: #835726; }
.paw { position: relative; display: block; width: 36px; height: 36px; flex: none; border-radius: 12px; background: var(--forest); color: var(--white); }
.paw i, .paw b { position: absolute; display: block; background: currentColor; }
.paw i { width: 5px; height: 7px; border-radius: 50%; }
.paw i:nth-child(1) { top: 12px; left: 8px; transform: rotate(-22deg); }
.paw i:nth-child(2) { top: 8px; left: 13px; transform: rotate(-11deg); }
.paw i:nth-child(3) { top: 8px; right: 12px; transform: rotate(11deg); }
.paw i:nth-child(4) { top: 12px; right: 7px; transform: rotate(22deg); }
.paw b { top: 17px; left: 11px; width: 14px; height: 11px; border-radius: 55% 55% 45% 45%; }
nav { display: flex; align-items: center; gap: 34px; }
nav a { font-size: .94rem; font-weight: 680; text-decoration: none; }
nav a:hover, .text-link:hover { color: #805521; }
.auth-button { justify-self: end; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 10px 19px; border: 1px solid transparent; border-radius: 999px; font-weight: 720; text-decoration: none; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.button-primary { background: var(--forest); color: white; }
.button-primary:hover { background: #163527; }
.button-outline { background: transparent; color: var(--forest); border-color: #aab4a8; }
.button-outline:hover { background: var(--sage); border-color: var(--forest); }
.button:disabled { cursor: wait; opacity: .6; }
.text-link { font-weight: 700; text-underline-offset: .24em; }
.text-button { padding: 0; border: 0; background: none; color: inherit; text-decoration: underline; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.01fr); align-items: center; gap: clamp(34px, 5vw, 78px); padding-block: 64px 74px; }
.hero-copy { padding-block: 14px; }
.kicker { display: flex; align-items: center; gap: 9px; color: #415c49; letter-spacing: .105em; font-size: .81rem; font-weight: 800; line-height: 1.35; }
.kicker > span { width: 15px; height: 2px; border-radius: 5px; background: #a36b37; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; }
h1 { margin-block: 20px 22px; font-size: clamp(3.3rem, 5.55vw, 5.15rem); font-weight: 615; letter-spacing: -.072em; }
h1 em { font-weight: 545; color: #3b634b; }
.lede { max-width: 36ch; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.58; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin-top: 29px; }
.hero-actions .button { min-height: 54px; padding-inline: 22px; }
.hero-note { margin-top: 16px; font-size: .9rem; color: var(--muted); }
.hero-figure { position: relative; align-self: center; width: 100%; min-width: 0; min-height: 370px; aspect-ratio: 1.24; border-radius: 28px; overflow: hidden; background: var(--sage); box-shadow: 0 12px 42px #273a271f; }
.hero-figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 57% center; }
.hero-figure figcaption { position: absolute; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 10px; padding: 10px 15px 10px 10px; border-radius: 18px; color: var(--ink); background: var(--white); box-shadow: 0 6px 16px #15281f29; line-height: 1.3; }
.hero-figure strong, .hero-figure small { display: block; }
.hero-figure small { margin-top: 3px; font-size: .82rem; color: var(--muted); }
.paw.mini { background: var(--sage); color: var(--forest); }

.path { background: #e9ede2; border-block: 1px solid var(--line); padding-block: 58px 64px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 28px; }
h2 { margin-block: 12px 0; font-size: clamp(2.7rem, 4.1vw, 4.2rem); font-weight: 620; letter-spacing: -.064em; }
.section-note { max-width: 36ch; color: var(--muted); }
.lesson-plan { display: grid; justify-items: start; gap: 6px; }
.lesson-plan .text-button { color: var(--forest); }
.lesson-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lesson-card { display: flex; flex-direction: column; gap: 13px; align-items: flex-start; min-height: 235px; width: 100%; padding: 22px; overflow: hidden; border: 1px solid #d8dfd1; border-radius: 21px; color: var(--ink); background: var(--white); text-align: left; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.lesson-card:hover { border-color: #809b84; box-shadow: 0 8px 22px #1b322217; transform: translateY(-3px); }
.lesson-card.recommended { border-color: #587860; }
.lesson-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; color: var(--muted); font-size: .85rem; font-weight: 650; }
.lesson-tag { display: inline-flex; padding: 4px 10px; border-radius: 999px; color: var(--ink); background: var(--sage); }
.lesson-card[data-lesson="yard"] .lesson-tag { background: var(--butter); }
.lesson-card[data-lesson="inside"] .lesson-tag { background: var(--peach); }
.lesson-title { font: 660 2rem/1.15 var(--display); font-size: clamp(1.48rem, 2.6vw, 2.08rem); letter-spacing: -.045em; }
.lesson-description { color: var(--muted); line-height: 1.48; }
.lesson-action { margin-top: auto; color: var(--forest); font-weight: 770; text-decoration: underline; text-underline-offset: .23em; }

.progress-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); gap: 44px; align-items: center; padding-block: 65px 70px; }
.progress-copy .section-note { margin-top: 18px; }
.storage-note { color: var(--muted); margin-top: 15px; font-size: .9rem; }
.progress-card { padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 22px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.stats strong, .stats span { display: block; }
.stats strong { font: 650 2.16rem/1.25 var(--display); letter-spacing: -.05em; }
.stats span { margin-top: 4px; color: var(--muted); font-size: .9rem; }
.badge-row { display: flex; align-items: center; gap: 14px; margin-top: 17px; }
.badge-icon { display: grid; min-width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--butter); font-size: 1.5rem; }
.badge-row p { font-size: .9rem; color: var(--muted); }
#reset-button { margin-top: 16px; font-size: .9rem; }
footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 24px; }
.footer-inner .brand { font-size: 1.9rem; }
.footer-inner p { color: var(--muted); font-size: .9rem; }

dialog { width: min(540px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid var(--line); border-radius: 25px; background: var(--white); color: var(--ink); box-shadow: 0 16px 68px #0d211b45; }
dialog::backdrop { background: #102a20a0; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-shell { position: relative; padding: 32px; }
.icon-button { position: absolute; top: 15px; right: 15px; display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 50%; background: var(--sage); color: var(--ink); font-size: 1.58rem; line-height: 1; }
.icon-button:hover { background: #cfdcc9; }
.dialog-shell h2 { margin-block: 12px; padding-right: 22px; font-size: clamp(2.05rem, 6vw, 3.05rem); letter-spacing: -.055em; }
.dialog-shell .kicker { padding-right: 43px; }
.dialog-body { color: var(--muted); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.progress-meter { display: block; appearance: none; width: 100%; height: 6px; margin-block: 20px; overflow: hidden; border: 0; border-radius: 20px; background: var(--sage); }
.progress-meter::-webkit-progress-bar { background: var(--sage); }
.progress-meter::-webkit-progress-value { background: var(--forest); border-radius: 20px; }
.progress-meter::-moz-progress-bar { background: var(--forest); border-radius: 20px; }
.practice-step { padding: 17px; border-radius: 15px; color: var(--ink); background: #edf1e9; font-size: 1.08rem; }
.tip { margin-top: 14px; color: var(--muted); font-size: .94rem; }
.plan-form { display: grid; gap: 16px; margin-top: 16px; }
.plan-form label, .plan-form legend { font-weight: 720; }
.plan-form input[type="text"] { width: 100%; min-height: 46px; padding: 8px 12px; color: var(--ink); border: 1px solid #9baaa0; border-radius: 10px; background: white; }
.plan-form fieldset { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.plan-form legend { padding: 0 0 6px; }
.plan-form .option { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: #edf1e9; }
.quiz-choices { display: grid; gap: 8px; margin-top: 18px; }
.quiz-choice { width: 100%; padding: 12px 15px; border: 1px solid var(--line); border-radius: 13px; background: #edf1e9; color: var(--ink); text-align: left; }
.quiz-choice:hover, .quiz-choice[aria-pressed="true"] { background: var(--sage); border-color: #587860; }
.result-cue { margin-top: 14px; padding: 13px 15px; border-radius: 12px; background: var(--sage); color: var(--ink); }
.option input { width: 17px; height: 17px; accent-color: var(--forest); }
.plan-form input[type="text"]:user-invalid { border-color: #a53839; }
.toast { position: fixed; z-index: 3; bottom: 18px; left: 50%; width: max-content; max-width: calc(100% - 28px); padding: 12px 18px; transform: translateX(-50%); border-radius: 14px; background: var(--forest); color: white; box-shadow: 0 4px 20px #102a2040; font-size: .94rem; }

@media (max-width: 1060px) {
  .container { width: min(1200px, calc(100% - 56px)); }
  h1 { font-size: clamp(3rem, 6.75vw, 4.8rem); }
  .hero { gap: 28px; }
  .hero-figure { min-height: 355px; }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 32px); }
  .header-inner { min-height: 65px; gap: 10px; }
  .brand { font-size: 1.94rem; gap: 7px; }
  .brand .paw { transform: scale(.84); transform-origin: left center; margin-right: -5px; }
  nav { gap: 12px; }
  nav a { font-size: .85rem; }
  .auth-button { min-height: 42px; padding-inline: 12px; font-size: .87rem; }
  .hero { grid-template-columns: 1fr; padding-block: 27px 33px; gap: 24px; }
  .hero-copy { padding-block: 4px 0; }
  h1 { font-size: clamp(2.8rem, 9.9vw, 4.6rem); margin-block: 14px 14px; }
  .hero-actions { margin-top: 20px; }
  .hero-note { margin-top: 12px; }
  .hero-figure { min-height: 215px; aspect-ratio: 1.53; border-radius: 22px; }
  .hero-figure figcaption { bottom: 11px; right: 11px; }
  .path { padding-block: 34px 38px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .lesson-grid { grid-template-columns: 1fr; gap: 12px; }
  .lesson-card { min-height: 188px; padding: 18px; }
  .progress-section { grid-template-columns: 1fr; gap: 20px; padding-block: 39px 44px; }
  .footer-inner { flex-wrap: wrap; }
  .footer-inner p { order: 1; width: 100%; }
  .dialog-shell { padding: 25px 20px; }
}
@media (max-width: 430px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  nav { justify-content: center; gap: 8px; }
  .brand > .paw { display: none; }
  .auth-button { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
