:root {
  color-scheme: light;
  --paper: #f7f3ea;
  --paper-deep: #eee8db;
  --surface: #fffdf8;
  --surface-soft: #f4f7f1;
  --ink: #26342b;
  --ink-soft: #46534b;
  --muted: #6d776f;
  --green: #2f6b4f;
  --green-dark: #23533d;
  --green-soft: #dce9dc;
  --sage: #a9c3ad;
  --coral: #c8644f;
  --coral-soft: #f4ddd5;
  --gold: #c18a2c;
  --gold-soft: #f5e6bd;
  --blue-soft: #dde9ed;
  --danger: #a53b35;
  --danger-soft: #f8e2de;
  --border: #dcded4;
  --border-strong: #c4c9bd;
  --shadow-sm: 0 2px 10px rgb(38 52 43 / 7%);
  --shadow-md: 0 16px 45px rgb(38 52 43 / 10%);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shell: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
blockquote,
fieldset {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.25;
  text-wrap: balance;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 2.6vw, 2.2rem);
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

p {
  margin-bottom: 16px;
}

a {
  color: var(--green-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--coral);
}

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

button,
select {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

:focus-visible {
  outline: 3px solid rgb(47 107 79 / 28%);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

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

.narrow-shell,
.legal-shell {
  max-width: 820px;
}

.main-content {
  min-height: calc(100vh - 210px);
}

.muted,
.field-help,
.form-footnote {
  color: var(--muted);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

/* Header and navigation */
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgb(196 201 189 / 72%);
  background: rgb(247 243 234 / 94%);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px 14px 14px 5px;
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 8%);
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 1.12rem;
  letter-spacing: 0.08em;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.desktop-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-nav a,
.guest-nav > a:not(.button) {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-decoration: none;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.guest-nav > a:not(.button):hover {
  background: var(--surface);
  color: var(--green-dark);
}

.desktop-nav a.is-active {
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.guest-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.88rem;
  text-decoration: none;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 800;
}

.avatar-small {
  width: 34px;
  height: 34px;
  font-size: 0.82rem;
}

.avatar-large {
  width: 68px;
  height: 68px;
  font-size: 1.4rem;
}

.avatar-profile {
  width: 90px;
  height: 90px;
  margin-bottom: 16px;
  font-size: 2rem;
}

.mobile-nav {
  display: none;
}

/* Messages */
.alerts:not(:empty) {
  padding-top: 12px;
}

.alert {
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.alert-success {
  border-color: var(--sage);
  background: var(--green-soft);
}

.alert-error,
.alert-danger {
  border-color: #e5b2a9;
  background: var(--danger-soft);
  color: #772d29;
}

.alert-info {
  background: var(--blue-soft);
}

.alert-close {
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 1.35rem;
  line-height: 1;
}

/* Buttons and common components */
.button,
button.button {
  min-height: 46px;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 20px rgb(47 107 79 / 18%);
}

.button-primary:hover {
  background: var(--green-dark);
  color: #fff;
}

.button-quiet {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--green-dark);
}

.button-quiet:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.button-light {
  background: #fff;
  color: var(--green-dark);
}

.button-danger {
  background: var(--danger);
  color: #fff;
}

.button-danger:hover {
  background: #7e2b27;
  color: #fff;
}

.button-danger-outline {
  border-color: #d8a8a1;
  background: transparent;
  color: var(--danger);
}

.button-danger-outline:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.button-small {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.88rem;
}

.button-large {
  min-height: 54px;
  padding-inline: 26px;
}

.button-block {
  width: 100%;
}

.button-row,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tag,
.status-chip,
.ai-label {
  padding: 4px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.35;
}

.tag-quiet {
  background: var(--paper-deep);
  color: var(--muted);
}

.tag-light {
  background: rgb(255 255 255 / 20%);
  color: #fff;
}

.text-link,
.text-button {
  color: var(--green-dark);
  font-weight: 700;
}

.text-button {
  padding: 3px 0;
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.panel {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-heading,
.section-title-row,
.page-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.panel-heading {
  margin-bottom: 20px;
}

.panel-heading h2,
.panel-heading p,
.section-title-row h2,
.section-title-row p {
  margin-bottom: 0;
}

.content-stack {
  padding-block: 36px 72px;
}

.content-stack > * + * {
  margin-top: 24px;
}

.anchor-section {
  scroll-margin-top: 92px;
}

/* Landing */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(58px, 8vw, 108px) 0;
}

.hero::before,
.hero::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  filter: blur(2px);
  pointer-events: none;
}

.hero::before {
  width: 360px;
  height: 360px;
  top: -180px;
  right: -90px;
  background: rgb(220 233 220 / 60%);
}

.hero::after {
  width: 250px;
  height: 250px;
  bottom: -150px;
  left: -90px;
  background: rgb(244 221 213 / 72%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  align-items: center;
  gap: clamp(46px, 7vw, 92px);
}

.hero-copy h1 {
  max-width: 760px;
}

.hero-lead {
  max-width: 660px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
}

.hero-actions {
  margin-top: 30px;
}

.trust-list,
.plain-checks {
  padding: 0;
  list-style: none;
}

.trust-list {
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: var(--muted);
  font-size: 0.87rem;
}

.trust-list li::before,
.plain-checks li::before {
  margin-right: 7px;
  color: var(--green);
  content: "✓";
  font-weight: 900;
}

.preview-window {
  position: relative;
  padding: 24px;
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: 32px;
  background: rgb(255 253 248 / 90%);
  box-shadow: 0 28px 75px rgb(38 52 43 / 15%);
  transform: rotate(1.5deg);
}

.preview-window::before {
  position: absolute;
  z-index: -1;
  inset: 20px -22px -20px 25px;
  border-radius: 30px;
  background: var(--sage);
  content: "";
  opacity: 0.45;
}

.preview-heading {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.preview-heading div {
  display: grid;
}

.preview-heading small,
.preview-note small {
  color: var(--muted);
}

.preview-note {
  margin-top: 12px;
  padding: 18px;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
}

.preview-note-reading {
  background: var(--gold-soft);
}

.preview-note-sport {
  background: var(--green-soft);
}

.preview-note strong,
.preview-note p {
  display: block;
  margin-bottom: 4px;
}

.preview-note p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.preview-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgb(255 255 255 / 70%);
  font-size: 0.78rem;
  font-weight: 800;
}

.preview-insight {
  margin-top: 15px;
  padding: 15px 17px;
  border: 1px dashed var(--sage);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 10px;
  background: var(--surface-soft);
}

.preview-insight p {
  margin: 0;
  font-size: 0.88rem;
}

.section {
  padding: clamp(64px, 9vw, 108px) 0;
}

.section-soft {
  border-block: 1px solid var(--border);
  background: var(--surface-soft);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-heading > p:last-child {
  color: var(--muted);
}

.section-heading-left {
  margin: 0;
  text-align: left;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.feature-number {
  margin-bottom: 36px;
  display: block;
  color: var(--coral);
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(400px, 1.1fr);
  align-items: start;
  gap: clamp(50px, 9vw, 120px);
}

.step-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
}

.step-list > li > span,
.suggestion-list > li > span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--coral-soft);
  color: var(--coral);
  font-weight: 800;
}

.step-list p {
  margin: 4px 0 0;
  color: var(--muted);
}

.section-cta {
  padding-top: 24px;
}

.cta-card {
  padding: clamp(28px, 5vw, 54px);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.cta-card h2,
.cta-card .eyebrow {
  margin-bottom: 0;
  color: #fff;
}

/* Auth and forms */
.auth-section {
  padding: clamp(42px, 8vw, 92px) 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(42px, 8vw, 110px);
}

.auth-intro h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.auth-intro > p:not(.eyebrow) {
  max-width: 540px;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.auth-intro blockquote {
  margin: 34px 0 0;
  padding: 18px 22px;
  border-left: 4px solid var(--sage);
  color: var(--muted);
}

.plain-checks {
  display: grid;
  gap: 9px;
  color: var(--ink-soft);
}

.auth-card {
  padding: clamp(25px, 4vw, 42px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.auth-card-wide {
  max-width: 660px;
}

.card-heading {
  margin-bottom: 28px;
}

.card-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.stack-form {
  display: grid;
  gap: 20px;
}

.compact-form {
  margin-top: 22px;
}

.form-grid,
.inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.responsive-form {
  grid-template-columns: 1.2fr 1fr 1fr auto;
  align-items: end;
}

.field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.field label,
.field legend,
.score-field legend,
.choice-panel legend {
  color: var(--ink);
  font-weight: 750;
}

.field input,
.field select,
.field textarea,
.code-input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field textarea {
  min-height: 122px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--sage);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgb(47 107 79 / 10%);
  outline: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #98a098;
}

.field-help,
.form-footnote {
  display: block;
  font-size: 0.78rem;
  line-height: 1.55;
}

.field-compact {
  display: flex;
  align-items: center;
  gap: 9px;
}

.field-compact label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.8rem;
}

.field-compact select {
  min-width: 130px;
  min-height: 40px;
  padding-block: 7px;
}

.field-short {
  max-width: 280px;
}

.password-field,
.input-suffix {
  position: relative;
}

.password-field input {
  padding-right: 64px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  padding: 5px 7px;
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 700;
  transform: translateY(-50%);
}

.input-suffix input {
  padding-right: 60px;
}

.input-suffix span {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--muted);
  transform: translateY(-50%);
}

.check-row,
.consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.check-row input,
.consent-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--green);
}

.check-row a {
  margin-inline: 3px;
}

.check-row-top {
  margin-top: 4px;
}

.consent-row {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.consent-row strong,
.consent-row small {
  display: block;
}

.consent-row small {
  margin-top: 5px;
  color: var(--muted);
}

.choice-panel,
.score-field {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.choice-panel legend,
.score-field legend {
  padding-inline: 7px;
}

.field-divider {
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.auth-switch {
  margin: 24px 0 0;
  text-align: center;
}

.auth-switch + .form-footnote {
  margin: 15px 0 0;
  text-align: center;
}

/* Page headers, dashboards and empty states */
.page-banner,
.dashboard-head {
  padding: 42px 0 34px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.page-banner h1,
.dashboard-head h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.page-banner p:last-child,
.dashboard-head .page-heading-row > div > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.page-banner-checkin {
  background: linear-gradient(135deg, var(--gold-soft), var(--surface-soft));
}

.page-banner-report,
.page-banner-assistant {
  background: linear-gradient(135deg, var(--green-soft), var(--surface-soft));
}

.page-banner-family {
  background: linear-gradient(135deg, var(--coral-soft), var(--surface-soft));
}

.context-switcher,
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
}

.context-switcher {
  margin-top: 28px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.filter-bar {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.empty-state {
  text-align: center;
}

.empty-state-large {
  padding: clamp(45px, 8vw, 90px) 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.empty-state-large p {
  max-width: 590px;
  margin: 0 auto 24px;
  color: var(--muted);
}

.empty-state-large .button-row {
  justify-content: center;
}

.empty-state-compact {
  padding: 28px 15px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.empty-state-compact p {
  margin-bottom: 16px;
  color: var(--muted);
}

.empty-illustration {
  width: 66px;
  height: 66px;
  margin: 0 auto 18px;
  border-radius: 24px 24px 24px 7px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 1.55rem;
  font-weight: 800;
}

.dashboard-body {
  padding-block: 32px 72px;
}

.dashboard-body > * + * {
  margin-top: 40px;
}

.welcome-card {
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.child-summary,
.gentle-prompt {
  display: flex;
  align-items: center;
  gap: 15px;
}

.child-summary p,
.child-summary h2,
.gentle-prompt p {
  margin-bottom: 0;
}

.gentle-prompt {
  max-width: 450px;
  padding: 15px 18px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  min-height: 155px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
}

.stat-card-accent {
  background: var(--green);
  color: #fff;
}

.stat-card p,
.stat-card small {
  margin: 0;
  color: var(--muted);
}

.stat-card-accent p,
.stat-card-accent small,
.stat-card-accent strong {
  color: #fff;
}

.stat-card strong {
  color: var(--green-dark);
  font-size: 2.15rem;
  line-height: 1.1;
}

.stat-card strong span {
  margin-left: 3px;
  font-size: 0.8rem;
  font-weight: 600;
}

.stat-card .stat-text {
  font-size: 1.25rem;
}

.dashboard-grid,
.family-grid,
.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  padding: 16px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
}

.activity-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.activity-dot,
.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 5px var(--green-soft);
}

.category-reading,
.category-homework {
  background: var(--gold);
  box-shadow: 0 0 0 5px var(--gold-soft);
}

.category-sports,
.category-play {
  background: var(--coral);
  box-shadow: 0 0 0 5px var(--coral-soft);
}

.category-screen {
  background: #618399;
  box-shadow: 0 0 0 5px var(--blue-soft);
}

.activity-meta {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-meta time,
.activity-main small {
  color: var(--muted);
  font-size: 0.76rem;
}

.activity-main > strong {
  display: block;
}

.activity-main p {
  margin: 4px 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.activity-main small span {
  margin-left: 12px;
}

.insight-panel {
  background: linear-gradient(155deg, var(--surface), var(--green-soft));
}

.insight-list {
  display: grid;
  gap: 12px;
}

.insight-item {
  padding: 14px;
  border-radius: var(--radius-sm);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  background: rgb(255 255 255 / 72%);
}

.insight-item p,
.insight-item small {
  margin: 4px 0 0;
  color: var(--muted);
}

.insight-panel > .button {
  margin-top: 18px;
}

/* Check-in */
.checkin-form {
  padding: clamp(22px, 5vw, 40px);
}

.form-section {
  padding-block: 32px;
  border-top: 1px solid var(--border);
}

.form-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.form-section-heading {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
}

.form-section-heading > span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.form-section-heading h2,
.form-section-heading p {
  margin-bottom: 0;
}

.form-section-heading p {
  color: var(--muted);
  font-size: 0.88rem;
}

.form-section > .field + .field,
.form-section > .field + .score-field,
.form-section > .score-field + .score-field {
  margin-top: 22px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.category-option {
  position: relative;
}

.category-option input,
.score-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-option > span:last-child {
  font-size: 0.86rem;
}

.category-option {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fff;
  cursor: pointer;
}

.category-symbol {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.category-option:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 3px rgb(47 107 79 / 8%);
}

.category-option:has(input:focus-visible) {
  outline: 3px solid rgb(47 107 79 / 28%);
  outline-offset: 2px;
}

.score-field > p {
  color: var(--muted);
  font-size: 0.83rem;
}

.score-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.score-options label {
  position: relative;
  cursor: pointer;
}

.score-options label > span {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: #fff;
  font-weight: 800;
}

.score-options input:checked + span {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.score-options input:focus-visible + span {
  outline: 3px solid rgb(47 107 79 / 28%);
  outline-offset: 2px;
}

.score-options-mood label > span {
  min-height: 60px;
}

.score-options-mood b,
.score-options-mood small {
  display: block;
  line-height: 1.15;
  text-align: center;
}

.score-options-mood small {
  color: var(--muted);
  font-size: 0.68rem;
}

.score-options input:checked + span small {
  color: rgb(255 255 255 / 75%);
}

.file-drop {
  min-height: 145px;
  padding: 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--surface-soft);
  text-align: center;
  cursor: pointer;
}

.file-drop:hover {
  border-color: var(--green);
}

.file-drop-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 5px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 1.3rem;
}

.file-drop small {
  color: var(--muted);
}

.file-list {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.submit-panel {
  padding: 22px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: var(--green-soft);
}

.submit-panel p {
  margin: 0;
  font-size: 0.87rem;
}

/* Timeline */
.timeline {
  max-width: 850px;
  margin-inline: auto;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 34px 1fr;
}

.timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-rail::after {
  position: absolute;
  z-index: -1;
  width: 2px;
  height: 100%;
  top: 12px;
  background: var(--border);
  content: "";
}

.timeline-entry:last-child .timeline-rail::after {
  height: 20px;
}

.timeline-dot {
  margin-top: 28px;
}

.timeline-card {
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.timeline-card-head {
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timeline-card-head time {
  color: var(--muted);
  font-size: 0.78rem;
}

.timeline-card h2 {
  margin-bottom: 8px;
  font-size: 1.22rem;
}

.timeline-note {
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.record-metrics {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.record-metrics span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.76rem;
}

.media-grid {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.media-grid img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.record-insight {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid var(--sage);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.record-insight summary {
  color: var(--green-dark);
  font-weight: 800;
  cursor: pointer;
}

.record-insight p {
  margin: 10px 0 0;
}

.record-insight small {
  color: var(--muted);
}

.pagination {
  max-width: 850px;
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.pagination > *:last-child {
  justify-self: end;
}

/* Reports */
.report-child,
.account-link-card {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  font-weight: 700;
}

.report-child .avatar,
.account-link-card .avatar {
  width: 34px;
  height: 34px;
}

.report-filter {
  justify-content: space-between;
}

.segmented-control {
  padding: 4px;
  border-radius: 999px;
  display: flex;
  gap: 3px;
  background: var(--paper-deep);
}

.segmented-control a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
}

.segmented-control a.is-active {
  background: var(--surface);
  color: var(--green-dark);
  box-shadow: var(--shadow-sm);
  font-weight: 800;
}

.report-document {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.report-cover {
  padding: clamp(28px, 6vw, 58px);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  background: var(--green);
  color: #fff;
}

.report-cover h2 {
  margin: 16px 0 8px;
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.report-cover p,
.report-meta {
  margin: 0;
  color: rgb(255 255 255 / 78%);
}

.report-meta {
  min-width: 200px;
  display: grid;
  text-align: right;
}

.report-section {
  padding: clamp(26px, 5vw, 48px);
  border-top: 1px solid var(--border);
}

.report-summary {
  border-top: 0;
  background: var(--green-soft);
  font-size: 1.08rem;
}

.report-section-title {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.report-section-title > span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--green-dark);
  font-weight: 800;
}

.report-section-title h3 {
  margin: 0;
  font-size: 1.25rem;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.highlight-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.highlight-card p {
  margin: 6px 0;
  color: var(--ink-soft);
}

.highlight-card small {
  color: var(--muted);
}

.trend-list,
.suggestion-list,
.sidebar-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  list-style: none;
}

.trend-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
}

.trend-marker {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px var(--coral-soft);
}

.trend-list p,
.suggestion-list p {
  margin: 3px 0 0;
  color: var(--ink-soft);
}

.suggestion-section {
  background: var(--gold-soft);
}

.suggestion-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
}

.suggestion-list > li > span {
  width: 30px;
  height: 30px;
  background: rgb(255 255 255 / 72%);
}

.report-disclaimer {
  padding: 24px clamp(26px, 5vw, 48px);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.report-disclaimer p {
  margin: 4px 0 0;
}

.report-history {
  display: grid;
}

.report-history a {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: var(--ink);
  text-decoration: none;
}

.report-history a:first-child {
  border-top: 0;
}

.report-history a span:first-child {
  display: grid;
}

.report-history small {
  color: var(--muted);
}

/* Family and account */
.account-link-card {
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}

.account-link-card > span:nth-child(2) {
  display: grid;
}

.account-link-card small {
  color: var(--muted);
  font-weight: 400;
}

.family-tabs {
  overflow-x: auto;
  display: flex;
  gap: 8px;
  scrollbar-width: thin;
}

.family-tabs a {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--surface);
  color: var(--ink-soft);
  text-decoration: none;
}

.family-tabs a.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.family-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
}

.invite-card {
  min-width: 290px;
  padding: 18px;
  border-radius: var(--radius-sm);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 14px;
  background: var(--green);
  color: #fff;
}

.invite-card > span,
.invite-card > small,
.invite-card > form {
  grid-column: 1 / -1;
}

.invite-card > strong {
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.invite-card small {
  color: rgb(255 255 255 / 72%);
}

.invite-card .text-button {
  color: #fff;
}

.person-list {
  display: grid;
}

.person-row {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.person-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.person-row:hover {
  color: var(--green-dark);
}

.avatar-child {
  background: var(--gold-soft);
  color: #835b17;
}

.person-copy {
  display: grid;
}

.person-copy small {
  color: var(--muted);
}

.privacy-panel {
  background: linear-gradient(140deg, var(--surface), var(--green-soft));
}

.code-input {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-align: center;
}

.settings-layout {
  padding-block: 36px 72px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.profile-summary {
  position: sticky;
  top: 100px;
  text-align: center;
}

.profile-summary .avatar {
  margin-inline: auto;
}

.profile-summary h2,
.profile-summary p {
  margin-bottom: 5px;
}

.profile-summary p,
.profile-summary small {
  color: var(--muted);
}

.settings-stack {
  display: grid;
  gap: 20px;
}

.data-rights > p,
.privacy-panel > p {
  color: var(--ink-soft);
}

.request-history {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.request-row {
  padding: 11px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.request-row:first-of-type {
  border-top: 0;
}

.request-row > span:first-child {
  display: grid;
}

.request-row small {
  color: var(--muted);
}

.signout-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.signout-panel h2,
.signout-panel p {
  margin-bottom: 3px;
}

.signout-panel p {
  color: var(--muted);
}

/* Error */
.error-section {
  padding: clamp(70px, 13vw, 150px) 0;
}

.error-card {
  text-align: center;
}

.error-code {
  display: block;
  color: var(--green);
  font-size: clamp(4.5rem, 13vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.95;
  opacity: 0.18;
}

.error-card h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.error-card > p:not(.eyebrow) {
  max-width: 600px;
  margin-inline: auto;
  color: var(--muted);
}

.error-card .button-row {
  justify-content: center;
}

.request-id {
  margin-top: 28px;
  display: block;
  color: var(--muted);
}

/* Legal */
.legal-hero {
  padding: clamp(58px, 8vw, 96px) 0 48px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.legal-hero h1 {
  margin-top: 18px;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
}

.legal-lead {
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.legal-document {
  padding-block: 46px 90px;
}

.legal-summary {
  margin-bottom: 48px;
  padding: 26px;
  border: 1px solid var(--sage);
  border-radius: var(--radius);
  background: var(--green-soft);
}

.legal-summary ul {
  margin-bottom: 0;
  padding-left: 22px;
}

.legal-summary li + li,
.legal-document li + li {
  margin-top: 8px;
}

.legal-document > section {
  scroll-margin-top: 95px;
}

.legal-document > section + section {
  margin-top: 42px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.legal-document h2 {
  font-size: 1.45rem;
}

.legal-document p,
.legal-document li {
  color: var(--ink-soft);
}

.legal-footer-nav {
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-weight: 800;
}

/* Assistant */
.assistant-layout {
  padding-block: 36px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 24px;
}

.assistant-main {
  display: grid;
  gap: 22px;
}

.question-panel textarea {
  min-height: 150px;
}

.question-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.question-examples button {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--green-dark);
}

.question-examples button:hover {
  border-color: var(--green);
}

.assistant-answer {
  overflow: hidden;
  border: 1px solid var(--sage);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.assistant-answer > header {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--green-soft);
}

.assistant-answer > header h2,
.assistant-answer > header p {
  margin-bottom: 0;
}

.assistant-answer > section,
.answer-copy {
  padding: 24px 28px;
  border-top: 1px solid var(--border);
}

.answer-copy {
  border-top: 0;
  font-size: 1.06rem;
  white-space: pre-wrap;
}

.assistant-answer > section h3 {
  margin-bottom: 14px;
}

.answer-caveat {
  margin: 0 28px 20px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
}

.assistant-answer > footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}

.assistant-sidebar {
  display: grid;
  gap: 18px;
}

.assistant-sidebar .panel {
  padding: 22px;
}

.sidebar-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.87rem;
}

.sidebar-list li > span {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 800;
}

.caution-card {
  border-color: #dfb28b;
  background: var(--gold-soft);
}

.caution-card p {
  margin-bottom: 0;
  color: #674815;
  font-size: 0.86rem;
}

/* Footer */
.site-footer {
  padding: 35px 0;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
}

.footer-inner {
  text-align: center;
}

.footer-inner p {
  margin-bottom: 4px;
  font-size: 0.8rem;
}

.footer-links {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Responsive */
@media (max-width: 1000px) {
  .desktop-nav {
    gap: 0;
  }

  .desktop-nav a {
    padding-inline: 9px;
    font-size: 0.82rem;
  }

  .account-link > span:last-child {
    display: none;
  }

  .hero-grid,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .auth-intro {
    max-width: 760px;
  }

  .hero-preview {
    width: min(620px, 100%);
    margin-inline: auto;
  }

  .auth-card {
    width: min(680px, 100%);
    margin-inline: auto;
  }

  .auth-intro {
    text-align: center;
    margin-inline: auto;
  }

  .auth-intro > p,
  .auth-intro .plain-checks {
    margin-inline: auto;
  }

  .auth-intro blockquote {
    display: none;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .responsive-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assistant-layout {
    grid-template-columns: 1fr;
  }

  .assistant-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  body:has(.mobile-nav) {
    padding-bottom: 76px;
  }

  h1 {
    letter-spacing: -0.03em;
  }

  .header-inner {
    min-height: 62px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
    border-radius: 12px 12px 12px 4px;
  }

  .brand-copy small {
    display: none;
  }

  .desktop-nav {
    display: none;
  }

  .account-link {
    margin-left: auto;
  }

  .mobile-nav {
    position: fixed;
    z-index: 110;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 68px;
    padding: 7px max(10px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgb(255 253 248 / 97%);
    box-shadow: 0 -7px 24px rgb(38 52 43 / 8%);
    backdrop-filter: blur(15px);
  }

  .mobile-nav a {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: var(--muted);
    text-decoration: none;
  }

  .mobile-nav a > span {
    font-size: 1.18rem;
    line-height: 1.2;
  }

  .mobile-nav small {
    font-size: 0.66rem;
  }

  .mobile-nav a.is-active {
    color: var(--green-dark);
    font-weight: 800;
  }

  .mobile-nav .mobile-create > span {
    width: 42px;
    height: 42px;
    margin-top: -24px;
    border: 4px solid var(--surface);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--green);
    color: #fff;
    box-shadow: var(--shadow-md);
  }

  .hero {
    padding-top: 52px;
  }

  .hero-grid {
    gap: 48px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-actions,
  .trust-list {
    justify-content: center;
  }

  .preview-window {
    padding: 17px;
    transform: none;
  }

  .preview-window::before {
    display: none;
  }

  .preview-heading {
    grid-template-columns: auto 1fr;
  }

  .preview-heading .status-chip {
    display: none;
  }

  .feature-grid,
  .split-section,
  .dashboard-grid,
  .family-grid,
  .onboarding-grid,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .feature-number {
    margin-bottom: 18px;
  }

  .split-section {
    gap: 34px;
  }

  .cta-card,
  .page-heading-row,
  .welcome-card,
  .family-hero,
  .report-cover,
  .signout-panel,
  .submit-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .cta-card,
  .page-heading-row,
  .welcome-card,
  .family-hero,
  .report-cover,
  .signout-panel,
  .submit-panel {
    display: flex;
  }

  .page-heading-row .button,
  .submit-panel .button,
  .signout-panel .button {
    width: 100%;
  }

  .context-switcher,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .context-switcher,
  .filter-bar {
    display: flex;
  }

  .field-compact {
    align-items: stretch;
    flex-direction: column;
  }

  .field-compact select {
    width: 100%;
  }

  .section-title-row {
    align-items: end;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    min-height: 135px;
    padding: 16px;
  }

  .stat-card strong {
    font-size: 1.8rem;
  }

  .panel {
    padding: 20px;
  }

  .form-grid,
  .inline-form,
  .responsive-form {
    grid-template-columns: 1fr;
  }

  .field-divider {
    padding: 18px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .category-option {
    min-height: 78px;
    padding: 8px 4px;
  }

  .timeline-entry {
    grid-template-columns: 22px 1fr;
  }

  .timeline-card {
    padding: 18px;
  }

  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-cover {
    align-items: flex-start;
  }

  .report-meta {
    min-width: 0;
    text-align: left;
  }

  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .invite-card {
    min-width: 0;
  }

  .profile-summary {
    position: static;
  }

  .assistant-sidebar {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding-bottom: 25px;
  }
}

@media (max-width: 480px) {
  .brand-copy strong {
    font-size: 1rem;
  }

  .guest-nav .button {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 0.78rem;
  }

  .guest-nav > a:not(.button) {
    padding-inline: 6px;
  }

  .hero-copy h1 br,
  .auth-intro h1 br {
    display: none;
  }

  .hero-actions .button,
  .button-row .button {
    width: 100%;
  }

  .trust-list {
    display: grid;
  }

  .preview-note {
    padding: 14px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .stat-card {
    min-height: 125px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .score-options {
    gap: 5px;
  }

  .score-options label > span {
    min-height: 42px;
  }

  .timeline-card-head,
  .activity-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-card-head,
  .activity-meta {
    display: flex;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control a {
    flex: 1;
    text-align: center;
  }

  .report-section,
  .assistant-answer > section,
  .answer-copy {
    padding: 22px 18px;
  }

  .legal-footer-nav {
    flex-direction: column;
  }

  .request-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

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