:root {
  --cream: #fffaf0;
  --paper: #fffdf8;
  --ink: #17231f;
  --muted: #5f6965;
  --line: #202723;
  --green: #26765a;
  --green-soft: #dcefe5;
  --yellow: #f6ca56;
  --blue-soft: #dfe8fb;
  --coral-soft: #f8dfd5;
  --shadow: 5px 5px 0 #17231f;
  --radius: 14px;
  --font-body: 'Open Sans', sans-serif;
  --font-heading: 'Poppins', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }

button, select, input, textarea { color: inherit; }

button { cursor: pointer; }

a { color: inherit; }

.page-shell { width: min(1320px, calc(100% - 40px)); margin-inline: auto; }

.site-nav {
  display: flex;
  width: min(1320px, calc(100% - 40px));
  min-height: 76px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.tool-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 48px;
  align-items: end;
  padding-block: 64px 42px;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-heading);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.05; }

h1 { max-width: 850px; margin-bottom: 18px; font-size: clamp(2.7rem, 7vw, 6.4rem); letter-spacing: -.055em; }

.intro-copy { max-width: 760px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }

.privacy-note {
  display: grid;
  gap: 5px;
  padding: 20px 22px;
  border: 2px solid var(--line);
  background: var(--green-soft);
  box-shadow: var(--shadow);
}

.privacy-note strong { font-family: var(--font-heading); font-size: 1rem; }
.privacy-note span { color: #3f5049; font-size: .93rem; }

.workspace {
  display: grid;
  grid-template-columns: minmax(520px, .92fr) minmax(560px, 1.08fr);
  align-items: start;
  border-block: 2px solid var(--line);
  background: #fff;
}

.editor-column { min-width: 0; padding: 24px max(24px, calc((100vw - 1320px) / 2)); padding-right: 32px; }

.preview-column {
  position: sticky;
  top: 82px;
  min-width: 0;
  max-height: calc(100vh - 82px);
  overflow: auto;
  border-left: 2px solid var(--line);
  background: #eef0ed;
}

.workflow-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #c9cfcc;
}

.child-switcher { display: grid; grid-template-columns: auto auto minmax(150px, 1fr) auto; align-items: center; gap: 8px; min-width: 0; }
.child-switcher label { font-family: var(--font-heading); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.icon-button, .secondary-button, .primary-button, .danger-button, .text-button {
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
}

.icon-button { width: 44px; padding: 0; font-size: 1.2rem; }
.primary-button { padding: 11px 17px; color: #fff; background: var(--green); }
.secondary-button { padding: 10px 16px; }
.danger-button { padding: 10px 16px; color: #fff; background: #a3322d; }
.text-button { min-height: 40px; padding: 7px 14px; border-width: 1px; background: var(--yellow); }

button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { cursor: not-allowed; opacity: .45; transform: none; }

select, input, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1.5px solid #67726d;
  border-radius: 0;
  background: #fff;
}

textarea { resize: vertical; }

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

.progress-copy { display: grid; flex: 0 0 auto; gap: 2px; text-align: right; }
.progress-copy strong { font-family: var(--font-heading); font-size: .9rem; }
.progress-copy span { color: var(--green); font-size: .78rem; font-weight: 700; }

.setup-panel, .form-section, .finish-panel, .danger-panel {
  margin-bottom: 18px;
  border: 1.5px solid var(--line);
  background: var(--paper);
}

.setup-panel > summary, .danger-panel > summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-heading);
  font-weight: 800;
}

.setup-panel > summary::-webkit-details-marker, .danger-panel > summary::-webkit-details-marker { display: none; }
.setup-panel > summary::after, .danger-panel > summary::after { content: '+'; margin-left: auto; font-size: 1.3rem; }
.setup-panel[open] > summary::after, .danger-panel[open] > summary::after { content: '−'; }
.setup-panel summary small { color: var(--muted); font-family: var(--font-body); font-size: .78rem; font-weight: 600; }

.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 0 18px 18px; }
.setup-grid label, .nap-details label, .toolbar-group label { display: grid; gap: 6px; font-size: .78rem; font-weight: 800; }

.child-list { display: grid; gap: 8px; padding: 0 18px 14px; }
.child-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.child-row button { min-height: 44px; padding: 8px 12px; border: 1px solid #8b9490; background: #fff; font-weight: 700; }
.add-child-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 18px 12px; }
.field-help { margin: 0; padding: 0 18px 18px; color: var(--muted); font-size: .78rem; }

.form-section { padding: 22px; }
.section-title { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.section-title h2 { margin-bottom: 4px; font-size: 1.35rem; }
.section-title p { margin: 0; color: var(--muted); font-size: .88rem; }
.step-number { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--yellow); font-family: var(--font-heading); font-size: .8rem; font-weight: 800; }

.choice-grid, .chip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.compact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mood-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.choice-button, .chip-button, .custom-chip {
  min-height: 44px;
  padding: 9px 10px;
  border: 1.5px solid #7c8782;
  background: #fff;
  font-weight: 700;
}
.choice-button[aria-pressed="true"], .chip-button[aria-pressed="true"] { border-color: var(--green); color: #fff; background: var(--green); }
.mood-grid .choice-button { display: grid; gap: 2px; justify-items: center; padding-inline: 4px; font-size: .76rem; }
.mood-icon { font-size: 1.25rem; line-height: 1; }

.meal-list { display: grid; gap: 10px; }
.meal-row { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; }
.meal-row > strong { font-family: var(--font-heading); font-size: .86rem; }
.meal-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.meal-options .choice-button { min-height: 40px; font-size: .78rem; }

.subsection-label { margin: 8px 0 9px; font-family: var(--font-heading); font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bathroom-label, .supplies-label { margin-top: 22px; }
.nap-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; padding: 12px; background: var(--green-soft); }

.chip-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chip-button { min-height: 42px; font-size: .8rem; }
.inline-add-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
.inline-add-row input { min-height: 40px; }
.custom-chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.custom-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 5px 8px; border-style: dashed; font-size: .78rem; }
.custom-chip button { border: 0; background: transparent; font-size: 1rem; line-height: 1; }

.textarea-meta { display: flex; justify-content: space-between; gap: 20px; margin: 7px 0; color: var(--muted); font-size: .76rem; font-weight: 700; }
.quick-note-row { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-note-row button { min-height: 36px; padding: 7px 10px; border: 1px solid #8a928f; background: #fff; font-size: .76rem; font-weight: 700; }

.finish-panel { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 22px; background: var(--green-soft); }
.finish-panel h2 { margin-bottom: 6px; font-size: 1.45rem; }
.finish-panel p { margin: 0; color: var(--muted); font-size: .84rem; }
.finish-actions { display: grid; gap: 8px; }
.danger-panel { padding-bottom: 17px; }
.danger-panel p { margin: 0; padding: 0 18px 14px; color: var(--muted); font-size: .84rem; }
.danger-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-inline: 18px; }

.preview-toolbar { display: grid; grid-template-columns: 1fr 170px; gap: 10px; padding: 18px; border-bottom: 1.5px solid var(--line); background: var(--cream); }
.preview-stage { display: grid; place-items: center; min-height: 620px; padding: 30px; }
.report-page-stack { display: grid; gap: 30px; justify-items: center; width: 100%; }

.daily-report {
  --report-accent: #26765a;
  --report-soft: #dcefe5;
  --report-ink: #1b2a24;
  --report-heading: 'Poppins', sans-serif;
  --report-body: 'Open Sans', sans-serif;
  position: relative;
  width: min(100%, 650px);
  aspect-ratio: 8.5 / 11;
  overflow: hidden;
  color: var(--report-ink);
  background: #fffefb;
  box-shadow: 0 14px 34px rgba(23, 35, 31, .18);
  font-family: var(--report-body);
  container-type: inline-size;
}

.daily-report[data-paper="a4"] { aspect-ratio: 210 / 297; }

.report-inner { position: relative; z-index: 2; display: grid; grid-template-rows: auto 1fr auto; height: 100%; padding: 5.8% 7.6% 5.8%; }
.report-header { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; padding-bottom: 3.5%; border-bottom: 2px solid var(--report-accent); }
.report-kicker { margin-bottom: 1.1%; color: var(--report-accent); font-family: var(--report-body); font-size: clamp(8px, 1.1vw, 13px); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.report-title { margin: 0; max-width: none; font-family: var(--report-heading); font-size: clamp(18px, 7.4cqw, 48px); line-height: .98; letter-spacing: -.045em; white-space: nowrap; }
.report-title-long { font-size: clamp(15px, 5cqw, 32px); letter-spacing: -.035em; }
.report-date { text-align: right; font-size: clamp(9px, 1.2vw, 14px); font-weight: 700; white-space: nowrap; }
.report-date span { display: block; margin-bottom: 4px; color: var(--report-accent); font-size: .72em; letter-spacing: .12em; text-transform: uppercase; }

.report-content { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: 'mood meals' 'rest day' 'note note'; gap: 3.1% 4.4%; align-content: start; padding-block: 4.2%; min-height: 0; }
.report-block { min-width: 0; padding: 3.3%; border: 1px solid color-mix(in srgb, var(--report-accent) 32%, white); background: color-mix(in srgb, var(--report-soft) 40%, white); }
.report-block h3 { margin: 0 0 3.8%; color: var(--report-accent); font-family: var(--report-heading); font-size: clamp(10px, 1.45vw, 16px); letter-spacing: .04em; text-transform: uppercase; }
.report-block p, .report-block li, .report-list-row { font-size: clamp(9px, 1.26vw, 14px); line-height: 1.38; }
.report-block p:last-child { margin-bottom: 0; }
.report-mood { grid-area: mood; }
.report-meals { grid-area: meals; }
.report-rest { grid-area: rest; }
.report-day { grid-area: day; }
.report-note { grid-area: note; padding: 3%; }
.report-note p { max-height: 7.5em; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.report-list-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 4px; border-bottom: 1px solid color-mix(in srgb, var(--report-accent) 20%, white); }
.report-list-row:last-child { border-bottom: 0; }
.report-list-row strong { flex: 0 0 auto; }
.report-list-row span { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.mood-display { display: flex; gap: 10px; align-items: center; font-family: var(--report-heading); font-size: clamp(13px, 2vw, 22px); font-weight: 800; }
.mood-display span:first-child { font-size: 1.6em; }
.report-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.report-tag { padding: 3px 7px; border-radius: 999px; color: var(--report-ink); background: #fff; font-size: clamp(8px, 1.05vw, 12px); font-weight: 700; }

.report-footer { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end; padding-top: 2.5%; border-top: 2px solid var(--report-accent); font-size: clamp(8px, 1.02vw, 12px); }
.report-footer strong { display: block; font-family: var(--report-heading); font-size: 1.1em; }
.report-footer-note { max-width: 36ch; color: #5a625e; text-align: right; }

.daily-report[data-style="soft"] { --report-accent: #9b5e77; --report-soft: #f8dfeb; --report-heading: 'Fraunces', serif; --report-body: 'DM Sans', sans-serif; background: #fffafd; }
.daily-report[data-style="soft"] .report-inner { padding: 6.4%; }
.daily-report[data-style="soft"] .report-header { display: block; padding: 4% 5% 3.5%; border: 0; border-radius: 24px; background: var(--report-soft); text-align: center; }
.daily-report[data-style="soft"] .report-title { max-width: none; font-size: clamp(25px, 4.1vw, 46px); }
.daily-report[data-style="soft"] .report-date { margin-top: 2.5%; text-align: center; }
.daily-report[data-style="soft"] .report-date span { display: inline; margin-right: 5px; }
.daily-report[data-style="soft"] .report-content { gap: 2.7%; padding-block: 3%; }
.daily-report[data-style="soft"] .report-block { border: 0; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px #edd5df; }
.daily-report[data-style="soft"] .report-note { background: var(--report-soft); }
.daily-report[data-style="soft"] .report-footer { padding-inline: 3%; border: 0; }

.daily-report[data-style="playful"] { --report-accent: #315ea8; --report-soft: #e0e9fb; --report-heading: 'League Spartan', sans-serif; --report-body: 'Inter', sans-serif; background: #fffdf5; }
.daily-report[data-style="playful"] .report-inner { padding: 6.6% 7.2% 5.7%; }
.daily-report[data-style="playful"] .report-header { grid-template-columns: minmax(0, 1fr) auto; border: 0; }
.daily-report[data-style="playful"] .report-title { text-transform: uppercase; }
.daily-report[data-style="playful"] .report-content { grid-template-areas: 'mood rest' 'meals day' 'note note'; }
.daily-report[data-style="playful"] .report-block { position: relative; border: 2px solid var(--report-ink); border-radius: 0; box-shadow: 5px 5px 0 var(--yellow); }
.daily-report[data-style="playful"] .report-note { box-shadow: 5px 5px 0 #ef826e; }
.daily-report[data-style="playful"] .report-footer { border-color: var(--report-ink); }

.daily-report[data-style="nature"] { --report-accent: #426e54; --report-soft: #e4eee3; --report-heading: 'Lora', serif; --report-body: 'DM Sans', sans-serif; background: #fbfcf6; }
.daily-report[data-style="nature"] .report-inner { padding: 5.8% 8.4% 6.4%; }
.daily-report[data-style="nature"] .report-header { grid-template-columns: 1fr; border: 0; }
.daily-report[data-style="nature"] .report-title { max-width: none; }
.daily-report[data-style="nature"] .report-date { margin-top: 2%; color: var(--report-accent); text-align: left; }
.daily-report[data-style="nature"] .report-date span { display: inline; margin-right: 6px; }
.daily-report[data-style="nature"] .report-content { grid-template-columns: .86fr 1.14fr; grid-template-areas: 'mood meals' 'rest day' 'note note'; border-top: 1px solid var(--report-accent); }
.daily-report[data-style="nature"] .report-block { padding: 2.8% 0; border: 0; border-bottom: 1px solid #cfdccc; background: transparent; }
.daily-report[data-style="nature"] .report-note { padding-inline: 3%; border: 0; border-radius: 14px; background: var(--report-soft); }
.report-continuation .report-content { display: block; padding-top: 5%; overflow: hidden; }
.report-continuation .report-note { min-height: 70%; padding: 5%; }
.report-continuation .report-note p { max-height: none; font-size: clamp(11px, 1.55vw, 17px); line-height: 1.6; }

.output-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 18px; border-top: 1.5px solid var(--line); background: var(--cream); }
.output-panel .primary-button { grid-column: span 2; }
.output-panel p { grid-column: 1 / -1; margin: 3px 0 0; color: var(--muted); font-size: .78rem; }

.support-section { padding-block: 74px; }
.support-section > div:first-child { display: grid; grid-template-columns: .75fr 1.25fr; gap: 50px; align-items: start; }
.support-section h2 { max-width: 800px; font-size: clamp(2.1rem, 5vw, 4.8rem); letter-spacing: -.045em; }
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.support-grid article { min-height: 190px; padding: 24px; border: 1.5px solid var(--line); background: #fff; }
.support-grid article:nth-child(1) { background: var(--green-soft); }
.support-grid article:nth-child(2) { background: var(--blue-soft); }
.support-grid article:nth-child(3) { background: var(--coral-soft); }
.support-grid h3 { margin-bottom: 12px; font-size: 1.2rem; }
.support-grid p { color: #495550; }
.related-links { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-top: 32px; padding-top: 24px; border-top: 1px solid #aeb7b3; }
.related-links a { font-weight: 700; }

.print-source, .print-artifact { display: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: minmax(470px, .92fr) minmax(470px, 1.08fr); }
  .editor-column { padding-inline: 22px; }
  .preview-stage { padding: 20px; }
  .mood-grid { grid-template-columns: repeat(3, 1fr); }
  .chip-grid { grid-template-columns: repeat(3, 1fr); }
  .compact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .tool-intro { grid-template-columns: 1fr; gap: 24px; padding-block: 46px 30px; }
  .workspace { display: block; }
  .editor-column { padding: 20px; }
  .preview-column { position: static; max-height: none; border-top: 2px solid var(--line); border-left: 0; }
  .preview-stage { min-height: auto; }
  .support-section > div:first-child { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 620px) {
  .page-shell { width: min(100% - 24px, 1320px); }
  .site-nav { width: min(100% - 24px, 1320px); min-height: 68px; gap: 12px; }
  .site-nav nav { gap: 9px; }
  .site-nav nav a:not(.nav-pill) { display: none; }
  .tool-intro { padding-block: 34px 24px; }
  h1 { font-size: clamp(2.55rem, 14vw, 4rem); }
  .privacy-note { box-shadow: 3px 3px 0 #17231f; }
  .editor-column { padding: 14px 12px 20px; }
  .workflow-bar { display: grid; }
  .child-switcher { grid-template-columns: auto minmax(0, 1fr) auto; }
  .child-switcher label { grid-column: 1 / -1; }
  .progress-copy { text-align: left; }
  .setup-grid { grid-template-columns: 1fr; }
  .setup-panel > summary { align-items: flex-start; }
  .setup-panel summary small { display: none; }
  .form-section { padding: 18px 14px; }
  .section-title { gap: 10px; }
  .mood-grid { grid-template-columns: repeat(3, 1fr); }
  .choice-grid, .chip-grid, .compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meal-row { grid-template-columns: 1fr; gap: 5px; }
  .meal-options { grid-template-columns: repeat(2, 1fr); }
  .finish-panel { grid-template-columns: 1fr; }
  .finish-actions { grid-template-columns: 1fr; }
  .preview-toolbar { grid-template-columns: 1fr 1fr; padding: 12px; }
  .preview-stage { padding: 14px 8px; overflow: auto; }
  .daily-report { width: 100%; min-width: 0; }
  .output-panel { grid-template-columns: 1fr; padding: 12px; }
  .output-panel .primary-button, .output-panel p { grid-column: 1; }
  .support-section { padding-block: 48px; }
  .support-grid { grid-template-columns: 1fr; }
  .support-grid article { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body > :not(.print-artifact) { display: none !important; }
  body { margin: 0 !important; background: #fff !important; }
  .print-artifact { display: block !important; }
  .print-artifact .daily-report {
    width: var(--education-print-width) !important;
    height: var(--education-print-height) !important;
    aspect-ratio: auto !important;
    box-shadow: none !important;
    break-after: page;
    page-break-after: always;
  }
  .print-artifact .daily-report:last-child { break-after: auto; page-break-after: auto; }
}
