:root {
  color-scheme: light;
  --ink: #22392e;
  --accent: #285443;
  --accent-hover: #1d4435;
  --muted: #56665a;
  --paper: #faf9f4;
  --surface: #fffefa;
  --line: #d8e0d3;
  --soft: #edf3e9;
  --selected: #e3eddc;
  --gold: #d7a46b;
  --error: #83382c;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color: var(--ink); background: var(--paper); }
body { margin: 0; font: 1rem/1.55 var(--sans); }
h1, h2, h3, h4, p { margin: 0 0 .7rem; }
h1, h2, h3, h4 { line-height: 1.18; }
h1 { font: 700 clamp(2.2rem, 6vw, 3.45rem)/1.08 var(--serif); letter-spacing: -.035em; }
h2 { font: 700 clamp(1.35rem, 3vw, 1.8rem)/1.2 var(--serif); letter-spacing: -.02em; }
h3 { font-size: 1rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, .button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #916735; outline-offset: 3px; }
small { font-size: .86rem; }
summary { cursor: pointer; font-weight: 640; }
details[open] > summary { margin-bottom: .65rem; }

.shell { width: min(1140px, calc(100% - 48px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 78px; border-bottom: 1px solid var(--line); gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; letter-spacing: -.04em; font-size: 1.3rem; font-weight: 750; color: var(--ink); }
.brand img { border-radius: 13px; }
.brand-dot { color: #728b62; }
.header-signin { text-decoration: none; font-weight: 650; }
.header-signin:hover { text-decoration: underline; }
.welcome { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(38px, 7vw, 102px); padding: clamp(38px, 8vw, 108px) 0 clamp(44px, 7vw, 94px); }
.welcome h1 { max-width: 640px; margin-bottom: 22px; font-size: clamp(3.25rem, 6.2vw, 6rem); line-height: .96; letter-spacing: -.065em; }
.welcome h1 em { display: block; padding-bottom: .15em; color: var(--accent); font-weight: 400; }
.welcome-intro { max-width: 33rem; font-size: clamp(1.02rem, 2vw, 1.23rem); color: var(--muted); line-height: 1.65; }
.signin-panel { border-left: 2px solid #9ab38f; padding-left: 20px; margin-top: 28px; scroll-margin-top: 28px; }
.signin-panel h2 { font: 680 1.13rem/1.3 var(--sans); letter-spacing: 0; }
.sign-in-slot:not(:empty) { margin-top: 10px; min-height: 44px; }
.sign-in-slot { min-width: 0; max-width: 100%; }
.login-status { margin: 8px 0; color: var(--muted); }
.login-status:empty { display: none; }
.privacy-note { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: .9rem; }
.privacy-note::before { content: '✓'; color: var(--accent); font-weight: 750; }
.product-preview {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(19px, 4vw, 41px);
  color: var(--ink);
  border: 1px solid #d5e2cd;
  border-radius: 24px;
  background: #e8f0e0;
}
.product-preview::before, .product-preview::after { content: ''; position: absolute; z-index: -1; border: 1px solid #cfdec5; width: 470px; height: 470px; border-radius: 50%; right: -145px; top: -100px; }
.product-preview::after { width: 355px; height: 355px; right: -85px; top: -44px; }
.preview-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mini-label { font-size: .875rem; font-weight: 650; color: var(--muted); }
.preview-period { font-size: .88rem; padding: 4px 12px; border: 1px solid #b8cdb0; border-radius: 40px; color: var(--accent); background: #f6faef; white-space: nowrap; }
.preview-paper { background: var(--surface); border: 1px solid #d6ddcd; border-radius: 17px; padding: clamp(18px, 3vw, 31px); margin-top: 24px; box-shadow: 0 12px 24px #38533613; }
.preview-date { font-size: .9rem; color: var(--accent); font-weight: 650; }
.preview-paper > h2 { font-size: clamp(1.65rem, 4vw, 2.45rem); }
.preview-paper > p:not(.preview-date) { color: var(--muted); }
.preview-observation { display: flex; gap: 12px; align-items: start; margin-top: 20px; padding: 13px; border-radius: 9px; background: var(--soft); }
.preview-observation strong { font-size: .92rem; display: block; margin-bottom: 2px; }
.preview-observation p { font-size: .88rem; color: var(--muted); }
.preview-mark { display: grid; place-items: center; width: 22px; height: 22px; background: var(--accent); border-radius: 6px; flex: 0 0 auto; color: white; font-size: .82rem; margin-top: 2px; }
.landing-details { padding: 32px 0 66px; border-top: 1px solid var(--line); }
.landing-details h2 { font-size: clamp(1.65rem, 4vw, 2.4rem); }
.landing-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; margin-top: 23px; }
.landing-proof article { border-left: 1px solid var(--line); padding-left: 16px; }
.landing-proof article p { color: var(--muted); }

.app-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; min-height: 62px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.app-header h1, .app-header h2 { margin: 0; font: 690 clamp(1.25rem, 4vw, 1.625rem)/1.17 var(--sans); letter-spacing: -.025em; }
.app-header input, .app-header select { width: auto; max-width: min(100%, 240px); }
.app-content { padding-top: 18px; padding-bottom: 30px; }
.nav { display: flex; gap: 6px; padding: 6px; margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.nav > :is(a, button) { flex: 1 1 0; display: grid; place-items: center; min-height: 44px; min-width: 0; padding: 6px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); text-align: center; text-decoration: none; line-height: 1.22; font-size: .875rem; font-weight: 650; }
.nav > :is(a, button)[aria-current], .nav > .active { color: var(--accent); background: var(--selected); border-color: #ccd9c6; }
.nav > :is(a, button):hover { color: var(--accent); background-color: var(--soft); }
.panel { padding: clamp(14px, 3vw, 25px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; }
.stack { display: grid; gap: 12px; }
.panel + .panel { margin-top: 12px; }
.stack > .panel + .panel { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.row > * { min-width: 0; }
.bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.muted { color: var(--muted); }
.notice { padding: 10px 14px; border: 1px solid #c0d4b9; border-radius: 9px; color: var(--accent); background: var(--soft); overflow-wrap: anywhere; }
.notice:empty { display: none; }
.notice.error, .notice[role='alert'], .error { color: var(--error); }
.notice.error, .notice[role='alert'] { border-color: #dfc0ab; background: #fbefe6; }
.button, button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 42px; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 9px; color: white; background: var(--accent); font-weight: 640; text-decoration: none; cursor: pointer; }
.button:hover, button:hover { background: var(--accent-hover); }
.button.secondary, button.secondary, .secondary { border-color: #b8c8b4; color: var(--accent); background: var(--surface); }
.button.secondary:hover, button.secondary:hover, .secondary:hover { background: var(--soft); }
button:disabled { opacity: .58; cursor: default; }
label { display: block; }
.field { display: grid; gap: 5px; font-size: .93rem; font-weight: 640; min-width: 0; }
input:not([type='checkbox'], [type='radio']), select, textarea { width: 100%; min-width: 0; max-width: 100%; min-height: 42px; border: 1px solid #a9baaa; border-radius: 9px; padding: 7px 10px; color: var(--ink); background: white; font-size: 1rem; }
select { appearance: none; padding-right: 31px; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { display: block; min-height: 88px; resize: vertical; }
input[type='checkbox'], input[type='radio'] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.mark { display: flex; align-items: flex-start; gap: 8px; }
.mark input { flex: 0 0 auto; margin-top: 3px; }
.tag { display: inline-block; border-radius: 30px; padding: 3px 9px; background: var(--selected); color: var(--accent); font-size: .875rem; }
.card, .care-card, .activity-entry { min-width: 0; padding: 13px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.activity-checklist { margin: 12px 0; }
.activity-checklist ol { padding-left: 22px; }
.activity-checklist li + li { margin-top: 10px; }
.development-cards { margin: 12px 0; }
.development-cards .source, .piaget-meta { font-size: .88rem; }
.piaget { margin: 12px 0; }
.note { overflow-wrap: anywhere; }
.note p { white-space: pre-wrap; }
canvas.growth-chart { display: block; width: 100%; min-width: 0; }
.measurement-fields, .measurement-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; margin: 12px 0; }
.measurement-charts:empty { display: none; }
.measurement-charts canvas { display: block; width: 100%; height: 130px; }
.measurements-table, .measurement-table { min-width: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { border-top: 1px solid var(--line); padding: 8px; }
th { font-weight: 650; }
.measurement-table time { white-space: nowrap; }

@media (max-width: 820px) {
  .welcome { gap: 30px; }
  .welcome h1 { font-size: clamp(3rem, 7vw, 4.5rem); }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 28px); }
  .site-header { min-height: 64px; }
  .brand { font-size: 1.13rem; }
  .brand img { width: 35px; height: 35px; border-radius: 10px; }
  .welcome { grid-template-columns: 1fr; gap: 30px; padding-top: 33px; padding-bottom: 36px; }
  .welcome h1 { max-width: 510px; }
  .landing-proof { grid-template-columns: 1fr; gap: 19px; }
  .nav { flex-wrap: wrap; border-radius: 10px; }
  .nav > :is(a, button) { flex-basis: calc(25% - 6px); }
  .product-preview { border-radius: 18px; }
}
@media (max-width: 490px) {
  .grid { grid-template-columns: 1fr; }
}
