:root {
  color-scheme: light;
  --paper: #f5eee1;
  --cream: #fff9ed;
  --ink: #1d3328;
  --muted: #526054;
  --pine: #172e26;
  --forest: #244338;
  --line: #d6c8a9;
  --gold: #f1ca82;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
a { color: inherit; }
button { font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(71rem, calc(100% - 4rem)); margin-inline: auto; }
.skip { position: fixed; z-index: 3; inset: .5rem auto auto .5rem; transform: translateY(-160%); padding: .65rem; background: var(--cream); color: var(--ink); }
.skip:focus { transform: none; }
:focus-visible { outline: 3px solid #a05230; outline-offset: 4px; }
.site-header :focus-visible, .hero :focus-visible { outline-color: #ffdb90; }
.eyebrow { font-size: .71rem; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.site-header { background: var(--pine); color: #fff8e8; border-bottom: 1px solid #fff8e824; }
.nav { display: flex; min-height: 3.7rem; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: .55rem; font-size: 1rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand img { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; border: 1px solid #f1ca827d; }
.nav nav { display: flex; gap: clamp(.65rem, 3vw, 1.55rem); }
.nav nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .85rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.nav nav a:hover, .secondary-cta:hover { text-decoration: underline; text-underline-offset: .2em; }

.hero { position: relative; isolation: isolate; aspect-ratio: 16 / 9; background: #bcd9db; color: #142f24; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 78% 19%, #fff5e065, #fff5e000 52%); }
.hero-layout { width: min(91rem, calc(100% - 5rem)); display: flex; justify-content: flex-end; padding-top: clamp(2.15rem, 7.1vw, 8.4rem); }
.hero-copy { width: min(40rem, 45%); }
.hero h1 { font-size: clamp(2.3rem, 4.35vw, 5rem); font-weight: 820; line-height: 1.01; letter-spacing: -.055em; text-wrap: balance; }
.hero-intro { margin-top: .75rem; font-size: clamp(.94rem, 1.55vw, 1.23rem); font-weight: 650; line-height: 1.42; text-shadow: 0 1px 6px #fff8e7aa; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .35rem 1.15rem; align-items: center; margin-top: 1rem; }
.cta, .secondary-cta { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; font-size: .95rem; font-weight: 800; text-decoration: none; }
.cta { border-radius: .55rem; padding: .62rem 1.08rem; color: #fff9ec; background: #18392b; }
.cta:hover { background: #284b39; }
.secondary-cta { color: inherit; text-shadow: 0 1px 6px #fff8e7aa; }
.hero :focus-visible { outline-color: #683719; }

.sample { color: var(--ink); background: var(--cream); border: 1px solid #cdbc9b; border-radius: .8rem; padding: clamp(.85rem, 3vw, 1.45rem); box-shadow: 0 .7rem 2rem #6d583520; }
.sample-header { display: flex; align-items: end; justify-content: space-between; gap: .5rem; }
.sample .eyebrow { color: #80502e; font-size: .65rem; }
.tally { font-size: .8rem; }
.tally strong { font: 700 1.8rem var(--serif); }
.sum { border-radius: 1.2rem; padding: .34rem .65rem; background: #ede0c7; color: #49382a; font-weight: 700; font-variant-numeric: tabular-nums; }
#basket { width: 100%; height: .5rem; margin-block: .55rem .75rem; accent-color: var(--pine); }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .38rem; padding: .48rem; border-radius: .67rem; background: #e4d6b9; touch-action: none; user-select: none; -webkit-user-select: none; }
.tile { min-width: 0; min-height: 44px; aspect-ratio: 1.2; display: grid; place-items: center; position: relative; border: 1px solid #c9af80; border-radius: .42rem; background: #fff1d3; color: #4d3926; box-shadow: inset 0 -3px #d0b78663; cursor: pointer; }
.tile::before { content: ""; position: absolute; width: .68rem; height: .47rem; inset: .31rem auto auto .29rem; border-radius: 1px 4px 1px 1px; background: #ac634f; transform: rotate(-19deg); }
.tile:nth-child(3n+2)::before { background: #57816e; }
.tile:nth-child(3n+3)::before { background: #886585; }
.tile span { font: 700 clamp(1.32rem, 4vw, 1.78rem)/1 var(--serif); }
.tile:hover { background: #ffedbd; }
.tile[data-mark="selected"] { background: #f5d997; border-color: #87532b; box-shadow: inset 0 0 0 1px #87532b; }
.tile[data-mark="valid"] { background: #cfe0a7; border-color: #335540; box-shadow: inset 0 0 0 2px #335540; }
.tile[data-mark="hint"] { outline: 2px dashed #865027; outline-offset: -4px; }
.tile.is-empty { background: #eadfc8; border-style: dashed; color: #725c43; box-shadow: none; }
.tile.is-empty::before { display: none; }
.tile.is-empty[data-mark="selected"] { background: #f5d997; border-color: #87532b; }
.tile.is-empty[data-mark="valid"] { background: #cfe0a7; border-color: #335540; }
.tile:disabled { cursor: default; }
.status { margin-top: .3rem; min-height: 2.55rem; color: var(--ink); font-size: .83rem; font-weight: 680; line-height: 1.4; }
.input-help { margin-top: .48rem; color: var(--muted); font-size: .74rem; line-height: 1.38; }
.sample-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.sample-actions button { min-height: 44px; padding: .35rem .75rem; border-radius: .38rem; background: transparent; color: var(--ink); border: 1px solid #8e947d; font-size: .84rem; font-weight: 650; cursor: pointer; }
.sample-actions button:hover { background: #eee5d1; }
.sample-actions button:disabled { color: #64675a; border-color: #aaa994; cursor: default; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.save-help { max-width: 34rem; padding-block: .35rem; }
.save-help summary { min-height: 44px; align-content: center; color: var(--ink); font-size: .88rem; font-weight: 710; cursor: pointer; }
.save-help p { font-size: .86rem; line-height: 1.55; padding-bottom: .65rem; }
.footer-layout { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding-block: .45rem; border-top: 1px solid var(--line); font-size: .82rem; }
.footer-layout span { color: var(--ink); font-weight: 800; }
.footer-layout a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 2rem); }
  .hero { aspect-ratio: auto; background: var(--pine); color: #fff9ec; }
  .hero-media { position: relative; display: block; height: clamp(17rem, 91vw, 26rem); z-index: auto; }
  .hero-media img { object-position: 47% 53%; }
  .hero::after { display: none; }
  .hero-layout { width: calc(100% - 2rem); display: block; padding: 0; }
  .hero-copy { width: auto; padding-block: 1.2rem 1.55rem; }
  .hero h1 { font-size: clamp(2.55rem, 10vw, 4.5rem); text-wrap: initial; }
  .hero-intro { margin-top: .45rem; font-size: .98rem; color: #f8ead5; }
  .hero-intro, .secondary-cta { text-shadow: none; }
  .hero-actions { margin-top: .8rem; gap: .3rem .9rem; }
  .cta { background: var(--gold); color: #182c21; }
  .cta:hover { background: #ffdc9e; }
  .hero :focus-visible { outline-color: #ffdb90; }
}
@media (max-width: 480px) {
  .nav { gap: .5rem; }
  .nav nav { gap: .65rem; }
  .nav nav a { font-size: .76rem; }
  .brand { gap: .35rem; font-size: .85rem; }
  .brand img { width: 1.65rem; height: 1.65rem; }
}
@media (max-width: 340px) {
  .wrap { width: calc(100% - 1.5rem); }
  .brand { font-size: .79rem; }
  .nav nav a { font-size: .69rem; }
  .nav nav { gap: .48rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.footer-layout { flex-wrap: wrap; }
.footer-layout nav { display:flex; flex-wrap:wrap; gap:.2rem 1.1rem; }

.sample-journey { display:inline-flex; align-items:center; min-height:44px; font-size:.84rem; font-weight:700; text-underline-offset:.2em; }

.family-story { background: #edf0e3; padding-block: clamp(2rem,5vw,4rem); }
.story-layout { display:grid; grid-template-columns:minmax(0,16rem) minmax(0,35rem); justify-content:center; align-items:center; gap:clamp(1.5rem,5vw,4rem); }
.story-layout > img { width:100%; height:18rem; object-fit:cover; object-position:center 42%; border-radius:.55rem; }
.story-layout h2 { font-size:clamp(1.8rem,3vw,2.5rem); line-height:1.1; letter-spacing:-.035em; font-weight:800; }
.story-layout p { margin-top:.85rem; line-height:1.65; color:#3b5345; }
.parent-note { margin-top:.9rem; }
.parent-note summary { min-height:44px; align-content:center; font-size:.9rem; font-weight:700; cursor:pointer; }
.parent-note p { margin-top:.2rem; font-size:.94rem; }
@media(max-width:600px) { .story-layout { grid-template-columns:1fr; } .story-layout > img { height:14rem; object-position:center 45%; } }

.try-main { width:min(29rem,calc(100% - 2rem)); margin-inline:auto; padding-block:clamp(1.2rem,4vw,2.5rem) 2rem; }
.try-intro { margin-bottom:1.2rem; }
.try-intro h1 { font-size:clamp(2rem,5vw,2.7rem); line-height:1.05; letter-spacing:-.04em; font-weight:800; }
.try-intro p { margin-top:.6rem; font-size:.98rem; line-height:1.55; color:var(--muted); }
.try-page .sample-journey { flex-basis:100%; justify-content:center; margin-top:.25rem; padding:.55rem .75rem; border-radius:.4rem; background:var(--pine); color:var(--cream); text-decoration:none; }
.try-page .sample-journey:hover { background:var(--forest); }
@media(max-width:340px) { .try-main { width:calc(100% - 1.5rem); } }
