:root {
  color-scheme: light;
  --canvas: #f4f7f4;
  --canvas-tint: #edf4ef;
  --surface: #ffffff;
  --surface-raised: #fbfdfb;
  --surface-soft: #e9f0eb;
  --ink: #14251c;
  --muted: #65766d;
  --faint: #8a9a91;
  --line: #dce6df;
  --brand: #a8e526;
  --brand-ink: #214a1a;
  --emerald: #096542;
  --emerald-deep: #043f2c;
  --violet: #7357e8;
  --violet-soft: #eeebff;
  --orange: #e88535;
  --orange-soft: #fff0e1;
  --positive: #12814f;
  --shadow: 0 18px 48px rgb(12 45 26 / 8%);
  --shadow-soft: 0 6px 20px rgb(12 45 26 / 6%);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #071510;
  --canvas-tint: #0d2119;
  --surface: #10261d;
  --surface-raised: #132c22;
  --surface-soft: #1b382b;
  --ink: #eef6f0;
  --muted: #aabbb0;
  --faint: #839589;
  --line: #294537;
  --brand: #b9ef4d;
  --brand-ink: #163d18;
  --emerald: #78d6a8;
  --emerald-deep: #1a7354;
  --violet: #b4a4ff;
  --violet-soft: #292449;
  --orange: #ffad5b;
  --orange-soft: #472d19;
  --positive: #78d6a8;
  --shadow: 0 20px 55px rgb(0 0 0 / 28%);
  --shadow-soft: 0 6px 20px rgb(0 0 0 / 18%);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 86% -12%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 26rem), var(--canvas); color: var(--ink); }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--emerald); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10; left: 1rem; top: -5rem; border-radius: 10px; padding: .8rem 1rem; background: var(--ink); color: var(--surface); text-decoration: none; font-weight: 700; transition: top .2s ease; }
.skip-link:focus { top: 1rem; }
.site-shell { width: min(1440px, 100%); margin: 0 auto; padding: 20px clamp(18px, 4vw, 56px) 28px; }

.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--emerald-deep); color: var(--brand); box-shadow: 0 8px 18px rgb(2 70 40 / 18%); }
.brand-mark svg { width: 25px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.brand strong { display: block; font-size: 1.17rem; letter-spacing: -.05em; line-height: 1; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: .67rem; font-weight: 700; letter-spacing: .02em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.role-switch { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-soft); }
.role-switch__button, .theme-toggle { min-height: 42px; border: 0; border-radius: 11px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; color: var(--muted); background: transparent; font-size: .82rem; font-weight: 750; transition: color .18s ease, background .18s ease, transform .18s ease; }
.role-switch__button svg, .theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.role-switch__button:hover, .theme-toggle:hover { color: var(--ink); background: var(--surface-soft); }
.role-switch__button[aria-pressed="true"] { background: var(--emerald-deep); color: #fff; box-shadow: 0 4px 12px rgb(4 63 44 / 20%); }
:root[data-role="child"] .role-switch__button[aria-pressed="true"] { background: var(--violet); }
.theme-toggle { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-soft); }

.dashboard { margin-top: 24px; }
.preview-notice { margin: 0 0 18px; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: color-mix(in srgb, var(--surface) 80%, transparent); font-size: .78rem; text-align: center; }
.preview-notice svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: var(--emerald); stroke-width: 1.9; }
.eyebrow { margin: 0 0 8px; color: var(--emerald); font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.045em; }
h1 { margin-bottom: 14px; font-size: clamp(2.25rem, 4.2vw, 4.3rem); line-height: .99; }
h1 span { color: var(--emerald); }
h2 { margin-bottom: 0; font-size: 1.22rem; line-height: 1.15; }
h3 { margin-bottom: 4px; font-size: 1rem; }
.hero { min-height: 235px; display: flex; align-items: stretch; justify-content: space-between; gap: 40px; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 54px); color: #f5fff5; background: linear-gradient(118deg, #073d2c, #075a3e 66%, #118052); box-shadow: var(--shadow); position: relative; isolation: isolate; }
.hero::after { content: ""; position: absolute; z-index: -1; width: 330px; height: 330px; right: -68px; top: -130px; border: 44px solid rgb(168 229 38 / 18%); border-radius: 50%; }
.hero > div { max-width: 680px; }
.hero .eyebrow { color: #bbf45f; }
.hero__copy { max-width: 535px; margin: 0; color: #c5dfd0; line-height: 1.55; }
.hero-status { align-self: flex-end; min-width: 220px; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 17px; background: rgb(0 30 20 / 18%); backdrop-filter: blur(10px); }
.status-orb { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: #153d1f; background: var(--brand); }
.status-orb svg { width: 25px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-status strong, .hero-status small { display: block; }
.hero-status strong { font-size: .91rem; }
.hero-status small { margin-top: 3px; color: #b4cebf; font-size: .71rem; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.stat-card, .panel, .child-summary__card { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-soft); }
.stat-card { min-height: 155px; border-radius: var(--radius-md); padding: 19px; position: relative; overflow: hidden; }
.stat-card--accent { border-color: transparent; color: #f7fff6; background: linear-gradient(135deg, #096541, #0b8254); }
.stat-card--accent::after { content: ""; position: absolute; right: -15px; bottom: -37px; width: 100px; height: 100px; border: 17px solid rgb(168 229 38 / 23%); border-radius: 50%; }
.stat-card__icon { display: block; margin-bottom: 19px; color: var(--emerald); font-size: 1.15rem; font-weight: 900; }
.stat-card--accent .stat-card__icon { color: var(--brand); }
.stat-card p { margin-bottom: 3px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.stat-card--accent p, .stat-card--accent small { color: #c5ddcc; }
.stat-card strong { display: block; font-size: 1.5rem; letter-spacing: -.06em; }
.stat-card small { display: block; margin-top: 3px; color: var(--faint); font-size: .68rem; }

.content-grid { display: grid; gap: 18px; }
.content-grid--parent { grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr); }
.panel { border-radius: var(--radius-md); padding: clamp(20px, 3vw, 28px); }
.panel__heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 23px; }
.soft-badge, .schedule-range { padding: 7px 9px; border-radius: 9px; color: var(--muted); background: var(--surface-soft); font-size: .71rem; font-weight: 700; white-space: nowrap; }
.person-list { display: grid; gap: 12px; }
.person-card { display: grid; grid-template-columns: 45px 1fr auto; align-items: center; gap: 12px; padding: 13px; border-radius: 15px; background: var(--surface-raised); }
.avatar { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 16px; color: #fff; font-weight: 800; }
.avatar--mila { background: linear-gradient(145deg, #c98061, #7852d9); }.avatar--jonas { background: linear-gradient(145deg, #3c8bb0, #72ad5c); }
.person-card__main p { margin: 0 0 9px; color: var(--muted); font-size: .73rem; }.person-card__main h3 { margin: 0 0 2px; }
.progress { display: block; width: 100%; height: 5px; overflow: hidden; appearance: none; border: 0; border-radius: 99px; background: var(--surface-soft); }.progress::-webkit-progress-bar { background: var(--surface-soft); }.progress::-webkit-progress-value { border-radius: inherit; background: var(--brand); }.progress::-moz-progress-bar { border-radius: inherit; background: var(--brand); }
.status { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: .69rem; font-weight: 800; }.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }.status--positive { color: var(--positive); }.status--quiet { color: var(--faint); }
.week-chart { height: 172px; display: flex; align-items: end; justify-content: space-between; gap: 9px; border-bottom: 1px solid var(--line); padding: 12px 3px 0; }.week-chart div { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 8px; }.week-chart span { display: block; width: min(24px, 100%); border-radius: 8px 8px 3px 3px; background: #cfe3d6; }.chart-bar--24 { height: 24%; }.chart-bar--29 { height: 29%; }.chart-bar--38 { height: 38%; }.chart-bar--46 { height: 46%; }.chart-bar--55 { height: 55%; }.chart-bar--61 { height: 61%; }.chart-bar--76 { height: 76%; }.week-chart .is-today span { background: var(--brand); box-shadow: 0 5px 12px rgb(168 229 38 / 28%); }.week-chart small { color: var(--faint); font-size: .65rem; font-weight: 750; }.week-chart .is-today small { color: var(--emerald); }
.panel__hint { display: flex; align-items: center; gap: 7px; margin: 15px 0 0; color: var(--muted); font-size: .73rem; }.dot { width: 8px; height: 8px; border-radius: 50%; }.dot--lime { background: var(--brand); }
.activity-panel { grid-column: 1 / -1; }.activity-list { display: grid; gap: 13px; padding: 0; margin: 0; list-style: none; }.activity-list li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; }.activity-list strong { font-size: .82rem; }.activity-list p { margin: 2px 0 0; color: var(--muted); font-size: .72rem; }.activity-list time { color: var(--faint); font-size: .69rem; }.activity-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-size: .85rem; font-weight: 900; }.activity-icon--safe { color: var(--positive); background: color-mix(in srgb, var(--positive) 13%, transparent); }.activity-icon--time { color: var(--orange); background: var(--orange-soft); }.activity-icon--shield { color: var(--violet); background: var(--violet-soft); }

.child-view { display: none; }.child-hero { min-height: 270px; display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: clamp(28px, 5vw, 54px); overflow: hidden; border-radius: var(--radius-lg); color: #fff; background: linear-gradient(128deg, #5f4ecc, #8068ec 65%, #a67df1); box-shadow: var(--shadow); position: relative; }.child-hero::before, .child-hero::after { content: ""; position: absolute; border-radius: 50%; border: 26px solid rgb(255 255 255 / 9%); }.child-hero::before { width: 235px; height: 235px; left: -105px; bottom: -112px; }.child-hero::after { width: 150px; height: 150px; right: 20%; top: -115px; }.child-hero__intro { position: relative; z-index: 1; max-width: 570px; }.child-hero .eyebrow { color: #ece8ff; }.child-hero h1 span { color: #fff3af; }.child-hero p:not(.eyebrow) { margin-bottom: 0; color: #e2ddff; line-height: 1.55; }.time-ring { position: relative; z-index: 1; display: grid; place-items: center; width: 180px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(#ffcf65 0deg 266deg, rgb(255 255 255 / 23%) 266deg 360deg); box-shadow: inset 0 0 0 10px rgb(255 255 255 / 9%); }.time-ring::after { content: ""; position: absolute; inset: 19px; border-radius: inherit; background: #6b58d8; }.time-ring div { position: relative; z-index: 1; text-align: center; }.time-ring strong { display: block; font-size: 2.25rem; letter-spacing: -.08em; }.time-ring span { color: #e4dfff; font-size: .72rem; font-weight: 700; }
.child-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 18px 0; }.child-summary__card { min-height: 100px; display: flex; align-items: center; gap: 12px; border-radius: var(--radius-md); padding: 18px; }.child-summary__card p { margin: 0 0 2px; color: var(--muted); font-size: .74rem; font-weight: 700; }.child-summary__card strong { font-size: .98rem; }.child-summary__card .status { margin-left: auto; }.child-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; font-weight: 900; }.child-icon--green { color: var(--positive); background: color-mix(in srgb, var(--positive) 13%, transparent); }.child-icon--purple { color: var(--violet); background: var(--violet-soft); }.content-grid--child { grid-template-columns: minmax(0, 1.28fr) minmax(0, .72fr); }.rules-panel .eyebrow { color: var(--violet); }.rule-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }.rule-list li { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 15px; background: var(--surface-raised); }.rule-list__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: .9rem; font-weight: 900; }.rule-list__icon--purple { color: var(--violet); background: var(--violet-soft); }.rule-list__icon--orange { color: var(--orange); background: var(--orange-soft); }.rule-list__icon--green { color: var(--positive); background: color-mix(in srgb, var(--positive) 13%, transparent); }.rule-list strong { display: block; margin-bottom: 2px; font-size: .83rem; }.rule-list p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }.rule-list__value { color: var(--violet); font-size: .72rem; font-weight: 800; white-space: nowrap; }.kind-note { min-height: 100%; overflow: hidden; position: relative; border-radius: var(--radius-md); padding: 28px; color: #20185b; background: linear-gradient(145deg, #f0ecff, #ddd5ff); }.kind-note::after { content: ""; position: absolute; width: 138px; height: 138px; right: -54px; bottom: -66px; border: 24px solid rgb(115 87 232 / 13%); border-radius: 50%; }.kind-note .eyebrow { color: #725ada; }.kind-note h2 { max-width: 245px; margin-bottom: 13px; }.kind-note p:not(.eyebrow) { max-width: 270px; margin-bottom: 18px; color: #59517c; font-size: .81rem; line-height: 1.55; }.kind-note__sparkle { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 35px; border-radius: 14px; color: #7459e3; background: rgb(255 255 255 / 70%); font-size: 1.1rem; }.kind-note__label { position: relative; z-index: 1; display: inline-block; padding: 8px 10px; border-radius: 9px; color: #6b55d5; background: rgb(255 255 255 / 62%); font-size: .71rem; font-weight: 800; }

:root[data-role="child"] .parent-view { display: none; }:root[data-role="child"] .child-view { display: block; }:root[data-role="child"] .preview-notice svg { stroke: var(--violet); }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 0 4px; color: var(--faint); font-size: .7rem; }.footer p { margin: 0; }.footer p:last-child { text-align: right; }

@media (max-width: 920px) { .stats-grid { grid-template-columns: repeat(2, 1fr); }.content-grid--parent, .content-grid--child { grid-template-columns: 1fr; }.activity-panel { grid-column: auto; }.kind-note { min-height: 260px; }.child-hero { min-height: 240px; } }
@media (max-width: 660px) { .site-shell { padding: 12px 14px 22px; }.topbar { align-items: flex-start; }.topbar-actions { gap: 7px; flex-direction: column; align-items: stretch; }.theme-toggle { min-height: 34px; padding: 0 9px; font-size: .71rem; }.role-switch { box-shadow: none; }.role-switch__button { min-height: 34px; padding: 0 8px; font-size: .71rem; }.role-switch__button svg { display: none; }.hero, .child-hero { min-height: 0; padding: 29px 24px; border-radius: 22px; }.hero-status { align-self: auto; min-width: 0; }.hero { flex-direction: column; gap: 23px; }.hero-status { max-width: 260px; }.stats-grid { gap: 10px; margin: 12px 0; }.stat-card { min-height: 137px; padding: 15px; border-radius: 16px; }.stat-card__icon { margin-bottom: 15px; }.stat-card strong { font-size: 1.25rem; }.panel { padding: 19px; border-radius: 18px; }.panel__heading { margin-bottom: 18px; }.person-card { grid-template-columns: 39px 1fr; }.person-card .status { grid-column: 2; }.avatar { width: 39px; height: 39px; border-radius: 13px; }.activity-list li { grid-template-columns: 31px 1fr; }.activity-list time { grid-column: 2; }.child-hero { flex-direction: column; align-items: flex-start; gap: 24px; }.time-ring { align-self: center; width: 152px; }.child-summary { grid-template-columns: 1fr; gap: 10px; margin: 12px 0; }.rule-list li { grid-template-columns: 34px 1fr; gap: 9px; }.rule-list__icon { width: 34px; height: 34px; border-radius: 10px; }.rule-list__value { grid-column: 2; }.footer { flex-direction: column; gap: 6px; }.footer p:last-child { text-align: left; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
