:root {
  color-scheme: light;
  --ink: #172716;
  --ink-soft: #48564b;
  --paper: #faf5e1;
  --white: #fffdf7;
  --green: #3e5b45;
  --green-dark: #092615;
  --mint: #e4f0e3;
  --peach: #f3e1c9;
  --gold: #dfa838;
  --line: #d8dfd0;
  --muted: #68776a;
  --danger: #8c302b;
  --font-sans: "Nunito Sans Variable", "Nunito Sans", Arial, sans-serif;
  --font-display: "Fredoka Variable", "Fredoka", sans-serif;
  --shadow: 0 18px 50px rgba(30, 49, 42, 0.09);
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
}

button, textarea, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }

:focus-visible {
  outline: 3px solid #aa7c12;
  outline-offset: 3px;
}

.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(23, 39, 22, 0.1);
  background: rgba(250, 245, 225, 0.94);
}

.header-inner {
  width: min(1240px, calc(100% - 48px));
  min-height: 82px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green) url("/images/brand/kid-journey-icon-96.webp") center / cover no-repeat;
}
.brand-mark svg { display: none; }
.brand-name { font-weight: 750; font-size: 16px; letter-spacing: -0.02em; line-height: 1.2; }
.brand-name span { display: block; color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

.main-nav, .footer-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); }
.main-nav a, .footer-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease;
}
.main-nav a:hover, .footer-nav a:hover { color: var(--green); }

.hero {
  min-height: 585px;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: clamp(42px, 8vw, 104px);
  padding-block: 70px 80px;
}

.hero-copy { max-width: 565px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}
.eyebrow-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--gold); }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); }
h1 {
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: clamp(44px, 6.2vw, 70px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
h1 em { color: var(--green); font-weight: 650; }
.hero-lede { max-width: 480px; margin-bottom: 28px; color: var(--ink-soft); font-size: 18px; line-height: 1.7; }

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(30, 49, 42, 0.15); }
.button:disabled { opacity: 0.7; transform: none; cursor: wait; box-shadow: none; }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-dark { background: var(--ink); color: #fff; }
.button-dark:hover { background: #30433b; }
.button-accent { background: var(--green); color: #fff; }
.button-accent:hover { background: var(--green-dark); }

.trust-points { display: flex; flex-wrap: wrap; gap: 11px 22px; margin: 29px 0 0; padding: 0; list-style: none; }
.trust-points li { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.trust-points li span { margin-right: 5px; color: #a87915; font-size: 10px; font-weight: 700; }

.hero-art {
  position: relative;
  width: 100%;
  max-width: 455px;
  margin-left: auto;
  margin-block: 0;
  display: grid;
  justify-items: center;
  padding: 0;
}
.hero-art::before {
  position: absolute;
  z-index: 0;
  top: 8%;
  left: 10%;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #96cfa3;
  content: "";
  opacity: 0.42;
}
.hero-mascot {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 420px);
}
.hero-mascot img {
  display: block;
  width: 100%;
  height: auto;
}
.hero-art-caption {
  position: relative;
  z-index: 1;
  margin: -2px 0 0;
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-align: center;
}

.studio-section { padding: 82px 0 72px; background: #eaf1e5; }
.studio-heading { max-width: 590px; margin: 0 auto 33px; text-align: center; }
.studio-heading .eyebrow { justify-content: center; margin-bottom: 10px; }
.studio-heading h2, .bottom-note h2, .document-main h1 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.studio-heading p:last-child { margin-bottom: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.studio-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 20px; align-items: stretch; }

.prompt-card, .result-card {
  border: 1px solid #e0e3dc;
  border-radius: 15px;
  background: var(--white);
  box-shadow: 0 9px 24px rgba(34, 59, 47, 0.045);
}
.prompt-card { padding: clamp(21px, 3vw, 31px); }
.field-label { display: block; margin-bottom: 9px; color: var(--ink); font-size: 14px; font-weight: 750; }
textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid #bec8c0;
  border-radius: 8px;
  background: #fffefa;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}
textarea::placeholder { color: #758079; opacity: 1; }
textarea:focus { outline: 3px solid rgba(40, 106, 86, 0.2); border-color: var(--green); }
.field-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.45; }
#scene-count { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 21px; }
.select-grid .field-label { margin: 0; }
.select-grid select {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 7px;
  padding: 8px 10px;
  border: 1px solid #bec8c0;
  border-radius: 7px;
  background: #fffefa;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.select-grid select:focus, input:focus-visible { outline: 3px solid rgba(40, 106, 86, 0.2); outline-offset: 2px; }
.detail-field { display: flex; gap: 10px; margin: 23px 0 22px; padding: 0; border: 0; }
.detail-field legend { width: 100%; }
.radio-card {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 11px;
  border: 1px solid #d8ded8;
  border-radius: 8px;
  cursor: pointer;
}
.radio-card:has(input:checked) { border-color: #4c806d; background: #f3f8f3; }
.radio-card input { width: 15px; height: 15px; flex: 0 0 15px; margin: 3px 0 0; accent-color: var(--green); }
.radio-card strong, .radio-card small { display: block; }
.radio-card strong { font-size: 13px; }
.radio-card small { margin-top: 3px; color: #6c7770; font-size: 12px; line-height: 1.4; }
.accessibility-field { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 0 0 18px; padding: 0; border: 0; }
.accessibility-field legend { grid-column: 1 / -1; }
.accessibility-field label { display: flex; align-items: flex-start; gap: 7px; color: #49564f; font-size: 13px; line-height: 1.45; }
.accessibility-field input, .answer-key-option input { width: 15px; height: 15px; flex: 0 0 15px; margin: 0; accent-color: var(--green); }
.answer-key-option { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 17px; padding: 11px; border: 1px solid #d8ded8; border-radius: 8px; cursor: pointer; }
.answer-key-option strong, .answer-key-option small { display: block; }
.answer-key-option strong { font-size: 13px; }
.answer-key-option small { margin-top: 3px; color: #6c7770; font-size: 12px; line-height: 1.4; }
.examples { margin: 0 0 22px; }
.examples .field-label { margin-bottom: 8px; }
.example-list { display: flex; flex-wrap: wrap; gap: 7px; }
.example-chip {
  padding: 7px 10px;
  border: 1px solid #deded6;
  border-radius: 20px;
  background: #fff;
  color: #49564f;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.example-chip:hover { border-color: #99b5a7; background: #edf5ee; }
.privacy-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 18px; color: #5f6c64; font-size: 12px; line-height: 1.55; }
.privacy-note svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: var(--green); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.generate-button { width: 100%; min-height: 50px; }
.generate-button svg { margin-left: auto; }
.button-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin 750ms linear infinite; }
.generate-button.is-loading .button-spinner { display: block; }
.generate-button.is-loading svg { display: none; }
.generator-status { min-height: 22px; margin: 11px 0 0; color: var(--ink-soft); font-size: 13px; }
.generator-status:not(:empty)::before {
  display: inline-block;
  width: 17px;
  height: 17px;
  margin-right: 7px;
  border-radius: 5px;
  background: url("/images/brand/kid-journey-icon-96.webp") center / cover no-repeat;
  content: "";
  vertical-align: -4px;
}
.generator-status[data-kind="error"] { color: var(--danger); }
.generator-status[data-kind="success"] { color: var(--green-dark); }
@keyframes spin { to { transform: rotate(360deg); } }

.result-card { min-width: 0; padding: 22px; }
.result-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.result-topline .eyebrow { margin-bottom: 4px; font-size: 9px; }
.result-topline h3 { margin-bottom: 0; font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: -0.015em; }
.paper-badge { padding: 5px 7px; border: 1px solid #deded6; border-radius: 4px; color: #69746d; font-size: 8px; font-weight: 700; letter-spacing: 0.11em; }
.preview-stage {
  position: relative;
  min-height: 400px;
  display: grid;
  place-items: center;
  margin: 18px 0 15px;
  overflow: hidden;
  border: 1px solid #e2e5df;
  border-radius: 8px;
  background: #f4f5f1;
}
.preview-placeholder { display: grid; justify-items: center; gap: 10px; max-width: 210px; padding: 20px; color: #717d75; text-align: center; }
.preview-placeholder svg { width: 75px; height: 75px; fill: none; stroke: #71877a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.preview-placeholder p { margin: 0; font-size: 11px; }
.generated-artwork { position: relative; z-index: 1; display: block; width: auto; max-width: 80%; height: 362px; max-height: 90%; border: 1px solid #e6e5de; background: white; box-shadow: 0 5px 18px rgba(31, 44, 38, 0.12); }
.preview-margin { position: absolute; inset: 9% 14%; pointer-events: none; border: 1px dashed rgba(40, 106, 86, 0.16); }
.result-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #68746d; font-size: 12px; }
.result-objective, .result-instruction { margin: 10px 0 0; color: #46554d; font-size: 14px; line-height: 1.6; }
.result-objective { font-weight: 650; }
.download-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.download-button { min-height: 44px; padding-inline: 13px; font-size: 13px; }
.download-button[hidden] { display: none; }
.template-disclosure { max-width: 850px; margin: 19px auto 0; color: #66736b; font-size: 13px; line-height: 1.65; text-align: center; }

.bottom-note { display: grid; grid-template-columns: 55px 1fr auto; align-items: center; gap: 21px; padding-block: 70px; }
.note-mark { width: 53px; height: 53px; overflow: hidden; border-radius: 16px 16px 16px 3px; }
.note-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bottom-note .eyebrow { margin-bottom: 6px; font-size: 9px; }
.bottom-note h2 { margin-bottom: 4px; font-size: clamp(22px, 3vw, 30px); }
.bottom-note p:last-child { margin: 0; color: var(--ink-soft); font-size: 15px; }
.text-link { color: var(--green-dark); font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }

.site-footer { border-top: 1px solid #e3dfce; background: #f6f1de; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 17px 28px; padding-block: 26px; }
.footer-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.footer-brand .brand-mark svg { width: 24px; }
.footer-brand .brand-name { font-size: 12px; }
.footer-brand .brand-name span { font-size: 9px; }
.footer-nav { justify-content: flex-end; flex-wrap: wrap; gap: 10px 20px; }
.footer-nav a { font-size: 12px; }
.footer-note { grid-column: 1 / -1; margin: 0; color: #737d76; font-size: 12px; }

/* Public information pages */
.document-wrap { width: min(900px, calc(100% - 48px)); margin-inline: auto; }
.document-main { min-height: 65vh; padding-block: 76px 100px; }
.document-main .eyebrow { margin-bottom: 12px; }
.document-main h1 { max-width: 720px; font-size: clamp(40px, 6vw, 60px); }
.document-intro { max-width: 680px; margin-bottom: 38px; color: var(--ink-soft); font-size: 18px; line-height: 1.7; }
.document-content { max-width: 740px; }
.document-content h2 { margin: 35px 0 10px; font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.document-content h3 { margin: 24px 0 7px; font-size: 14px; }
.document-content p, .document-content li { color: #47544d; font-size: 17px; line-height: 1.75; }
.document-content ul { padding-left: 21px; }
.document-content a { color: var(--green-dark); text-underline-offset: 3px; }
.notice-box { margin-top: 26px; padding: 18px 20px; border: 1px solid #e5d4a7; border-radius: 10px; background: #fbf5e4; color: #544823; font-size: 15px; font-weight: 550; line-height: 1.65; }
.page-kicker { display: flex; align-items: center; gap: 9px; color: #68756d; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.page-kicker::before { width: 24px; height: 1px; content: ""; background: #c9a34c; }
.contact-placeholder { padding: 20px; border: 1px dashed #b7c0b7; border-radius: 10px; background: #f5f7f2; }
.about-wordmark { display: block; width: min(100%, 300px); margin: -7px 0 22px; }
.about-wordmark img { display: block; width: 100%; height: auto; }
.about-banner { margin: 34px 0 42px; padding: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }
.about-banner img { display: block; width: 100%; height: auto; border-radius: 10px; }

@media (max-width: 850px) {
  .hero { min-height: 0; grid-template-columns: 1fr 0.85fr; gap: 36px; padding-block: 62px; }
  .studio-grid { grid-template-columns: 1fr; }
  .preview-stage { min-height: 430px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .wrap, .document-wrap { width: min(100% - 32px, 520px); }
  .header-inner { width: calc(100% - 32px); min-height: 70px; gap: 12px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-name { font-size: 13px; }
  .main-nav { gap: 12px; }
  .main-nav a { max-width: 84px; padding-inline: 4px; font-size: 12px; line-height: 1.3; text-align: center; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-block: 54px 60px; }
  h1 { font-size: clamp(43px, 13vw, 62px); }
  .hero-lede { font-size: 16px; }
  .hero-art { width: 100%; max-width: 380px; margin: 0 auto; }
  .hero-art-caption { font-size: 17px; }
  .studio-section { padding: 58px 0 51px; }
  .studio-heading { margin-bottom: 23px; }
  .studio-heading h2 { font-size: 36px; }
  .studio-heading p:last-child { font-size: 14px; }
  .prompt-card, .result-card { border-radius: 12px; }
  .prompt-card { padding: 20px 17px; }
  .detail-field { flex-direction: column; }
  .select-grid { grid-template-columns: 1fr; }
  .accessibility-field { grid-template-columns: 1fr 1fr; }
  .radio-card { padding: 10px 12px; }
  .result-card { padding: 15px; }
  .preview-stage { min-height: 380px; }
  .generated-artwork { height: 335px; max-width: 84%; }
  .result-footer { align-items: flex-start; flex-direction: column; }
  .download-actions { width: 100%; }
  .download-button { width: 100%; }
  .bottom-note { grid-template-columns: 45px 1fr; gap: 14px; padding-block: 45px; }
  .note-mark { width: 43px; height: 43px; font-size: 14px; }
  .bottom-note .text-link { grid-column: 2; }
  .footer-inner { padding-block: 22px; }
  .footer-nav { gap: 9px 15px; }
  .document-main { padding-block: 52px 72px; }
  .document-intro { font-size: 16px; }
  .document-content p, .document-content li { font-size: 15px; }
}

@media (max-width: 360px) {
  .header-inner { min-height: 0; flex-wrap: wrap; gap: 5px; padding-block: 9px; }
  .brand { min-height: 44px; }
  .main-nav { width: 100%; justify-content: space-between; gap: 3px; }
  .main-nav a { max-width: none; padding-inline: 3px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
