/* Shared spacing and alignment across the public site and parent dashboard. */
.primary, .secondary, .text-button, .button {
  min-height: 42px;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.primary, .secondary { font-size: 13px; }
.primary, .secondary, .button { padding: 11px 16px; }
.button { border-radius: 10px; }
.error:empty, #page-subtitle:empty { display: none; }
.brand, .public-brand, .login-brand { flex-wrap: nowrap; white-space: nowrap; }
.brand img, .public-brand img, .login-brand img { display: block; flex: none; }
.sidebar { padding: 24px 18px; overflow-y: auto; scrollbar-width: thin; }
.sidebar > * { flex-shrink: 0; }
.sidebar .brand { gap: 8px; font-size: 18px; }
.nav-label { height: 0; margin: 24px 0 0; }
.nav { min-height: 42px; padding: 10px 12px; margin-bottom: 4px; gap: 12px; line-height: 1.3; }
.nav-icon { display: block; width: 20px; height: 20px; flex: 0 0 20px; }
.nav:hover { background: #f2f5ee; color: var(--green); }
.nav.active { background: #edf3e9; }
.account-nav { margin-top: 24px; }
.signout { margin-top: 0; }
.sidebar .help-nav { margin-top: auto; }
.page-title { align-items: center; }
.page-title h1 { margin-bottom: 8px; }
.page-title:has(#page-subtitle:empty) h1 { margin-bottom: 0; }
.page-title .dialog-actions { margin: 0; flex-shrink: 0; }
.dialog-actions { align-items: center; }
.device-info { min-width: 150px; }
.device-info h2, #account-email { overflow-wrap: anywhere; }
.device-actions { flex-wrap: wrap; }
.parent-code-device { color: var(--muted); margin-top: -6px; }
.parent-code-dialog .pair-code { overflow-wrap: anywhere; }
.parent-code-dialog .dialog-actions { margin-bottom: 0; }
.metric-top { align-items: center; min-height: 28px; }
.app-controls { flex-wrap: wrap; }
.app-controls .rule-select { min-height: 36px; }
.app-controls .text-button { min-height: 36px; }
.card-bottom { gap: 16px; flex-wrap: wrap; }
.parent-row > span { min-width: 0; }
.parent-row > button { flex-shrink: 0; }
.check input, .feature-card .check input, .policy-notice input { margin: 0; }
.feature-card .check { align-items: center; }
.form-columns, .check-grid, .group-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-columns > *, .check-grid > *, .group-row > *, .time-fields > * { min-width: 0; }
.feature-card label > input:not([type="checkbox"]) { margin-bottom: 0; }
.feature-card .limit-row input[type="checkbox"] { justify-self: start; }
.time-fields input { min-width: 0; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.days label { min-width: 0; }
.days span { width: 100%; }
.days input { margin: 0; padding: 0; }
dialog { max-height: calc(100dvh - 32px); }
dialog > h2, dialog form > h2 { padding-right: 22px; }
.close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; line-height: 1; }
.login-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 23px; font-weight: 650; text-decoration: none; margin-bottom: 48px; align-self: flex-start; }
.login-card .primary { justify-content: space-between; }
.login-card .text-button { justify-content: center; }
.login-card #forgot-password { margin-top: 12px; }
.login-card .consent-check { margin-bottom: 20px; }
.public-page { display: flex; flex-direction: column; }
.public-header, .public-footer { width: 100%; }
.public-header { padding: 24px 32px; }
.public-header nav a { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; }
.public-header .sign-in { border-radius: 10px; }
.public-main { flex: 1; width: 100%; }
.public-main h1 { margin-top: 0; }
.public-main > .public-intro { margin-bottom: 32px; }
.public-main summary { align-items: center; }
.public-main summary::after { flex-shrink: 0; }
.public-main summary::-webkit-details-marker { display: none; }
.public-main input, .public-main select, .public-main textarea { margin: 0 0 18px; }
.public-main .button { line-height: 1.3; }
.contact-card { justify-content: space-between; }
.contact-card .button { flex-shrink: 0; }
.public-footer { margin-top: auto; justify-content: space-between; align-items: center; gap: 20px; }
.public-footer nav { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.public-footer span { width: auto; }
.public-footer a { display: inline-flex; align-items: center; min-height: 32px; }
.public-footer a:hover, .public-header nav a:hover { color: #246954; text-decoration: underline; text-underline-offset: 4px; }
.home-main { max-width: 1100px; padding: 0 32px; margin: 64px auto 64px; }
.home-hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 72px; }
.home-copy { min-width: 0; }
.home-copy h1 { font-size: clamp(38px, 4.4vw, 58px); line-height: 1.1; letter-spacing: -2px; font-weight: 560; margin: 0 0 24px; }
.home-copy .eyebrow { margin-bottom: 22px; font-size: 10px; letter-spacing: 1.5px; }
.home-copy .public-intro { font-size: 17px; line-height: 1.7; margin: 0 0 28px; max-width: 430px; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.home-login { font-size: 14px; font-weight: 600; text-decoration: none; padding: 10px 0; }
.home-copy .home-note { font-size: 12px; margin: 16px 0 0; }
.home-preview { background: #fff; border: 1px solid #dce4d9; border-radius: 24px; padding: 28px; box-shadow: 0 18px 55px #294b3510; transform: rotate(2deg); min-width: 0; }
.preview-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; font-size: 17px; }
.preview-example { color: #7a877b; font-size: 11px; font-weight: 400; }
.preview-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 30px; font-size: 13px; color: #637468; }
.preview-total strong { color: #246954; font-size: 30px; font-weight: 550; }
.preview-total small { font-size: 13px; }
.preview-track { height: 7px; border-radius: 8px; background: #edf2e8; margin: 8px 0 22px; overflow: hidden; }
.preview-track > span { display: block; height: 100%; width: 64%; background: #91ac78; border-radius: inherit; }
.preview-app { display: flex; gap: 12px; align-items: center; padding: 17px 0; border-bottom: 1px solid #edf0e9; font-size: 14px; }
.preview-icon { background: #e6f0e9; color: #377a54; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; font-weight: 600; flex: none; }
.preview-icon.games { background: #f1eddd; color: #8c8151; }
.preview-app small { display: block; color: #7a877b; font-size: 11px; margin-top: 2px; }
.preview-app strong { margin-left: auto; white-space: nowrap; font-weight: 500; font-size: 13px; }
.preview-routine { display: flex; gap: 8px; align-items: center; margin-top: 23px; font-size: 12px; }
.preview-routine strong { margin-left: auto; font-size: 12px; font-weight: 500; }
.routine-dot { width: 6px; height: 6px; border-radius: 100%; background: #91ac78; }
.home-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; padding: 26px 0; border: 1px solid #e0e5dc; border-radius: 16px; background: #ffffff80; }
.home-features article { display: flex; align-items: flex-start; gap: 14px; padding: 0 26px; }
.home-features article + article { border-left: 1px solid #e0e5dc; }
.feature-icon { display: block; width: 22px; height: 22px; flex: 0 0 22px; margin-top: 1px; color: #48735a; }
.home-features h2 { font-size: 16px; line-height: 1.5; font-weight: 600; letter-spacing: -0.2px; margin: 0 0 4px; }
.home-features p { font-size: 13px; margin: 0; line-height: 1.6; color: #6b786d; }
.home-start { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #e9eee3; border-radius: 18px; margin-top: 44px; padding: 28px 32px; }
.home-start h2 { margin: 0 0 6px; }
.home-start p { margin: 0; font-size: 14px; }
.home-start .button { flex-shrink: 0; }
.download-main { max-width: 1100px; width: 100%; padding: 0 32px; margin: 48px auto 64px; gap: 60px; }
.download-intro { padding-top: 12px; }
.download-intro h1 { font-size: clamp(34px, 4vw, 48px); }
.download-button { padding: 14px 20px; }
@media (max-width: 1000px) {
  .sidebar { padding: 22px 14px; }
  .sidebar .brand { font-size: 16px; }
  .sidebar .brand img { width: 32px; height: 32px; }
  .device-actions { margin-left: 0; }
  .home-hero { gap: 36px; }
  .home-preview { padding: 22px; }
}
@media (max-width: 800px) {
  .home-main { margin-top: 36px; }
  .home-hero { grid-template-columns: 1fr; max-width: 540px; margin: auto; gap: 36px; }
  .home-preview { transform: none; }
  .home-features { grid-template-columns: 1fr; padding: 0 24px; margin-top: 36px; }
  .home-features article { padding: 20px 0; align-items: center; }
  .home-features article + article { border-left: 0; border-top: 1px solid #e0e5dc; }
  .feature-icon { margin-top: 0; }
  .download-main { grid-template-columns: 1fr; max-width: 600px; margin-top: 24px; gap: 32px; }
}
@media (max-width: 720px) {
  .sidebar { padding: 16px 18px; gap: 4px; overflow: visible; }
  .sidebar .brand { font-size: 18px; margin-bottom: 12px; }
  .sidebar .nav { margin: 0; padding: 9px 10px; gap: 7px; }
  .nav-icon { width: 18px; height: 18px; flex-basis: 18px; }
  .page-title { flex-wrap: wrap; gap: 16px; }
  .page-title .dialog-actions { width: 100%; gap: 8px; }
  .page-title .primary { font-size: 13px; padding: 11px 16px; }
  .page-title .primary::before { content: none; }
  .login-intro { padding: 28px; }
  .login-brand { margin-bottom: 0; font-size: 21px; }
  .login-intro h1 { display: none; }
  .login-card { padding: 32px 0; width: calc(100% - 48px); max-width: 380px; }
  .metric-top { min-height: 12px; }
  .home-start { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
  .public-header { padding: 18px 22px; gap: 16px; }
  .public-header nav { justify-content: space-between; gap: 16px; }
  .public-brand { font-size: 19px; }
  .public-main, .home-main, .download-main { padding-left: 22px; padding-right: 22px; }
  .home-main { margin-top: 28px; margin-bottom: 36px; }
  .home-copy h1 { font-size: 40px; letter-spacing: -1.5px; }
  .home-copy .public-intro { font-size: 16px; }
  .home-start { margin-top: 32px; padding: 24px; }
  .public-footer { padding: 22px; }
  .public-footer nav { gap: 8px 18px; }
  .form-columns, .check-grid, .group-row { grid-template-columns: minmax(0, 1fr); }
  .save-bar { padding: 14px; gap: 12px; }
  dialog { padding: 28px 22px; }
}

/* Consistent disclosure controls, with a predictable focus ring and aligned chevron. */
body:not(.public-page) summary, .restricted-help summary {
  list-style: none; position: relative; padding-left: 22px; line-height: 1.5;
}
body:not(.public-page) summary::-webkit-details-marker, .restricted-help summary::-webkit-details-marker { display: none; }
body:not(.public-page) summary::before, .restricted-help summary::before {
  content: ""; position: absolute; left: 3px; top: .45em; width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transform-origin: center;
}
body:not(.public-page) details[open] > summary::before, .restricted-help[open] > summary::before { transform: rotate(45deg); top: .3em; }
summary:focus-visible { outline: 2px solid #246954; outline-offset: 4px; border-radius: 3px; }
.device-overview { padding: 18px 24px; gap: 14px; }
.avatar { width: 42px; height: 46px; border-radius: 11px; }
.avatar svg { display: block; }
.policy-strip { padding: 10px 24px; }
.health-checklist { margin: 0; padding: 13px 24px; border-top: 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.health-checklist ul { margin: 10px 0 0; padding-left: 22px; color: var(--muted); }
.health-checklist li { margin: 6px 0; }
.apps-heading { padding: 18px 24px 12px; }
select:not([multiple]) {
  appearance: none; padding-right: 34px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%234c5d53' stroke-width='1.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 12px center !important;
}
@media(max-width:600px){
  .device-overview { padding: 16px; }
  .device-overview > .status { margin-left: auto; }
  .device-actions { width: 100%; }
  .device-actions button { flex: 1; }
  .device-actions [data-parent-code] { flex-basis: 100%; }
  .policy-strip, .health-checklist { padding-left: 16px; padding-right: 16px; }
  .apps-heading { padding: 16px; }
}
