:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #18232d;
  --muted: #60707e;
  --line: #dce3e9;
  --primary: #087f78;
  --primary-dark: #075e5a;
  --primary-soft: #e3f5f3;
  --coral: #d95d55;
  --coral-soft: #fff0ed;
  --blue: #3478c7;
  --blue-soft: #ebf3fd;
  --gold: #a96d08;
  --gold-soft: #fff5d9;
  --danger: #b83b42;
  --danger-soft: #fff0f1;
  --success: #17745f;
  --success-soft: #e8f6f1;
  --shadow: 0 7px 22px rgba(37, 55, 70, .07);
  --shadow-raised: 0 14px 38px rgba(37, 55, 70, .12);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; overflow-x: clip; background: var(--bg); color: var(--ink); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--primary-dark); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid #2e78bd; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 50; top: 8px; left: 12px; transform: translateY(-150%); border-radius: 10px; background: var(--ink); color: #fff; padding: 11px 15px; }
.skip-link:focus { transform: none; }
.shell { width: min(100%, 1060px); min-width: 0; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) calc(88px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
h1,h2,h3,h4,p { margin-top: 0; }
h1 { max-width: 18ch; margin-bottom: 5px; font-size: clamp(2rem, 9vw, 2.65rem); line-height: 1.02; letter-spacing: -.045em; }
h2 { margin-bottom: 9px; font-size: 1.12rem; line-height: 1.2; letter-spacing: -.015em; }
h3 { margin-bottom: 4px; font-size: 1.02rem; line-height: 1.25; }
p { margin-bottom: 10px; }
.eyebrow { margin: 0 0 4px; color: var(--primary-dark); font-size: .69rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.lede,.list-card p,.chore-card p,.mini-card p,.compact-row small,.choice-card small,.field-help,.more-link small { color: var(--muted); }
.app-header { display: grid; gap: 10px; padding: 2px 2px 17px; }
.app-header .lede { max-width: 54ch; margin: 0; font-size: .91rem; }
.session-actions { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 8px; }
.session-actions form,.assumption-banner form,.button-row form,.quick-actions form { margin: 0; }
.role-badge { display: inline-flex; align-items: center; min-height: 30px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); padding: 5px 10px; font-size: .72rem; font-weight: 800; }
.assumption-banner { position: sticky; z-index: 20; top: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; border-bottom: 1px solid #e9c464; background: #fff8df; padding: 7px max(12px, env(safe-area-inset-right)) 7px max(12px, env(safe-area-inset-left)); font-size: .8rem; box-shadow: 0 3px 14px rgba(37,55,70,.07); }
.assumption-banner span { color: #725510; }
.button,.role-switch a,.tab-nav a { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--primary); border-radius: 12px; background: var(--primary); color: #fff; padding: 7px 13px; font: inherit; font-size: .86rem; font-weight: 780; line-height: 1.15; text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 3px 10px rgba(8,127,120,.12); }
.button:hover { background: var(--primary-dark); }
.button.secondary,.role-switch a,.tab-nav a { border-color: var(--line); background: var(--surface); color: var(--primary-dark); box-shadow: none; }
.button.secondary:hover { border-color: #aec6c4; background: var(--primary-soft); }
.button.danger { border-color: #e7bec1; background: var(--surface); color: var(--danger); box-shadow: none; }
.button.danger:hover { background: var(--danger-soft); }
.button.compact,.session-actions .button,.assumption-banner .button { min-height: 44px; padding: 5px 10px; font-size: .77rem; }
.button.icon { width: 44px; padding: 0; }
.wide { width: 100%; }
.button-row,.quick-actions,.role-switch,.tab-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 10px; }
.section-heading h2 { margin: 0; }
.stack { display: grid; gap: 10px; }
.stack > h2 { margin: 5px 2px 0; }
.summary-grid,.dashboard-grid,.reason-grid { display: grid; gap: 10px; }
.summary-grid { margin: 12px 0; }
.dashboard-actions { margin-bottom: 12px; }
.panel,.mini-card,.chore-card,.list-card,.empty-state { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel { padding: 15px; }
.chore-card,.list-card { display: grid; width: 100%; gap: 11px; padding: 14px; }
.chore-card > *,.list-card > *,.panel > *,.mini-card > *,.meta-grid > * { min-width: 0; }
.chore-card h3,.list-card h3 { overflow-wrap: anywhere; }
.mini-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 13px 12px 16px; }
.mini-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--primary); content: ""; }
.mini-card:nth-child(3n+2)::before { background: var(--coral); }
.mini-card:nth-child(3n)::before { background: var(--gold); }
.mini-card h2,.mini-card p,.mini-card strong { margin: 0; }
.mini-card p { grid-column: 1; overflow-wrap: anywhere; font-size: .78rem; }
.mini-card strong { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 1.05rem; }
.priority-overdue { border-left: 5px solid var(--danger); }
.priority-due-soon { border-left: 5px solid var(--gold); }
.priority-later { border-left: 5px solid var(--blue); }
.badge { display: inline-flex; min-height: 24px; align-items: center; max-width: 100%; border-radius: 999px; background: var(--blue-soft); color: #245d99; padding: 3px 8px; font-size: .68rem; font-weight: 850; line-height: 1.15; text-transform: capitalize; overflow-wrap: anywhere; }
.badge-overdue,.badge-rejected,.badge-failed,.badge-inactive { background: var(--danger-soft); color: #922f36; }
.badge-due-soon,.badge-pending,.badge-submitted,.badge-provisional,.badge-reopened { background: var(--gold-soft); color: #7e5105; }
.badge-complete,.badge-completed,.badge-approved,.badge-active,.badge-paid { background: var(--success-soft); color: #12614f; }
.badge-later,.badge-open,.badge-offered { background: var(--blue-soft); color: #245d99; }
.person-badge { display: inline-flex; min-height: 24px; align-items: center; border-radius: 999px; background: var(--surface-soft); color: var(--ink); padding: 3px 9px; font-size: .72rem; font-weight: 850; line-height: 1.15; }
.person-aaron { background: var(--blue-soft); color: #245d99; }
.person-molly { background: var(--success-soft); color: #12614f; }
.person-lauren { background: var(--danger-soft); color: #922f36; }
.meta-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 0; }
.meta-grid div { min-height: 48px; border-radius: 11px; background: var(--surface-soft); padding: 7px 9px; }
dt { color: var(--muted); font-size: .66rem; font-weight: 760; letter-spacing: .03em; text-transform: uppercase; }
dd { margin: 1px 0 0; font-size: .88rem; font-weight: 780; overflow-wrap: anywhere; }
.workflow { display: grid; gap: 13px; }
.bounty-submission-form { display: grid; gap: 12px; }
fieldset { display: grid; min-width: 0; gap: 7px; margin: 0; border: 0; padding: 0; }
legend,label { font-size: .84rem; font-weight: 780; }
input,select,textarea,button { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea,.text-input { width: 100%; min-height: 46px; border: 1px solid #cbd5dd; border-radius: 11px; background: var(--surface); color: var(--ink); padding: 10px 11px; }
textarea { min-height: 86px; resize: vertical; }
input:focus,select:focus,textarea:focus { border-color: var(--primary); outline: 3px solid rgba(8,127,120,.14); }
input[type="checkbox"],input[type="radio"] { width: 21px; height: 21px; min-height: 21px; margin: 0; accent-color: var(--primary); }
.touch-choice input[type="checkbox"] { width: 44px; height: 44px; min-height: 44px; }
.tall-select { min-height: 9rem; }
.assignment-control { display: grid; gap: 8px; }
.field-help { display: block; margin-top: -8px; font-size: .76rem; line-height: 1.35; }
.checklist { display: grid; gap: 4px; min-width: 0; margin: 2px 0 9px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); padding: 11px; }
.check-row,.choice-card { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; min-height: 48px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 9px 10px; }
.touch-choice { grid-template-columns: 44px minmax(0,1fr); min-height: 64px; }
.checklist .check-row { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.checklist .check-row:last-child { border-bottom: 0; }
.choice-card small { grid-column: 2; margin-top: -7px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.compact-pill { display: inline-flex; align-items: center; min-height: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); padding: 2px 7px; color: var(--ink); font-size: .76rem; font-weight: 780; }
.checklist-progress { color: var(--primary-dark); font-size: .78rem; font-weight: 780; }
.complete { border-color: #a9d8ca; background: var(--success-soft); }
.warning { border-color: #e9cc7c; background: var(--gold-soft); }
.danger { border-color: #e7b8bc; background: var(--danger-soft); }
.needs-action { border-color: #e7b8bc; }
.state-callout { position: relative; border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px 11px 15px; }
.state-callout::before { position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 13px 0 0 13px; background: var(--blue); content: ""; }
.state-callout.complete::before { background: var(--success); }
.state-callout.warning::before { background: var(--gold); }
.state-callout.danger::before { background: var(--danger); }
.state-callout h2,.state-callout h3,.state-callout p { margin-bottom: 3px; }
.empty-state { border-style: dashed; background: linear-gradient(135deg,var(--surface),#f4faf9); padding: 22px 16px; text-align: center; box-shadow: none; }
.empty-state::before { display: grid; width: 42px; height: 42px; place-items: center; margin: 0 auto 9px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-dark); content: "✓"; font-size: 1.25rem; font-weight: 900; }
.empty-state p { max-width: 42ch; margin: 0 auto; color: var(--muted); }
.ledger,.timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.ledger li,.timeline li,.compact-row { display: grid; min-width: 0; gap: 2px; border-top: 1px solid var(--line); padding: 10px 0; overflow-wrap: anywhere; }
.ledger li { grid-template-columns: minmax(0,1fr) auto; }
.ledger small { grid-column: 1; color: var(--muted); }
.ledger strong { grid-column: 2; grid-row: 1 / span 2; align-self: center; padding-left: 8px; }
.bottom-nav { position: fixed; z-index: 15; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 1px; border-top: 1px solid rgba(203,213,221,.9); background: rgba(255,255,255,.94); padding: 5px max(4px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left)); box-shadow: 0 -8px 25px rgba(37,55,70,.09); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.parent-bottom-nav { grid-template-columns: repeat(5,minmax(0,1fr)); }
.bottom-nav a { position: relative; display: inline-flex; min-width: 44px; min-height: 54px; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 12px; color: var(--muted); padding: 3px 1px; font-size: clamp(.59rem,2.35vw,.7rem); font-weight: 750; line-height: 1.1; text-decoration: none; }
.nav-count { position: absolute; top: 1px; left: calc(50% + 7px); min-width: 19px; min-height: 19px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--surface); border-radius: 999px; background: var(--danger); color: #fff; padding: 0 4px; font-size: .61rem; font-weight: 900; line-height: 1; }
.bottom-nav a.active { background: var(--primary-soft); color: var(--primary-dark); }
.bottom-nav a.active::after { position: absolute; top: 3px; width: 20px; height: 3px; border-radius: 9px; background: var(--primary); content: ""; }
.tab-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.more-link { position: relative; display: grid; grid-template-columns: 40px minmax(0,1fr) 18px; min-height: 66px; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.more-link::after { color: #8c9aa5; content: "›"; font-size: 1.55rem; }
.more-link .tab-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark); padding: 8px; }
.more-link:nth-child(4n+2) .tab-icon { background: var(--coral-soft); color: var(--coral); }
.more-link:nth-child(4n+3) .tab-icon { background: var(--blue-soft); color: var(--blue); }
.more-link:nth-child(4n) .tab-icon { background: var(--gold-soft); color: var(--gold); }
.more-link span { display: grid; gap: 1px; min-width: 0; }
.more-link strong,.more-link small { overflow-wrap: anywhere; }
.auth-layout { display: grid; width: min(100%,440px); min-height: calc(100dvh - 70px); margin: 0 auto; align-content: center; gap: 20px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.auth-brand > span:last-child { display: grid; }
.auth-brand strong { font-size: 1rem; }
.auth-brand small { color: var(--muted); font-size: .74rem; }
.auth-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: linear-gradient(145deg,var(--primary),#12a29a); box-shadow: 0 9px 22px rgba(8,127,120,.24); }
.auth-mark svg { width: 27px; fill: none; stroke: white; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.auth-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); padding: 25px 20px 19px; box-shadow: var(--shadow-raised); }
.auth-card::before { position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg,var(--primary) 0 45%,var(--coral) 45% 69%,var(--blue) 69% 85%,#e0a32e 85%); content: ""; }
.auth-step { display: grid; grid-template-columns: 38px 38px 1fr; align-items: center; gap: 6px; margin-bottom: 18px; }
.auth-step > span { height: 4px; border-radius: 999px; background: #dce3e8; }
.auth-step > span.active { background: var(--primary); }
.auth-step small { justify-self: end; color: var(--muted); font-size: .7rem; font-weight: 760; }
.auth-kicker { margin-bottom: 5px; color: var(--primary-dark); font-size: .71rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.auth-card h1 { margin-bottom: 9px; font-size: clamp(1.9rem,8.5vw,2.45rem); }
.auth-intro { margin-bottom: 18px; color: var(--muted); font-size: .9rem; }
.auth-form { display: grid; gap: 8px; }
input.auth-input { min-height: 52px; padding: 12px 14px; font-size: 1rem; }
input.auth-code { text-align: center; font-size: 1.45rem; font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: .28em; }
.auth-button { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: space-between; margin-top: 5px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; padding: 11px 15px; font-weight: 800; cursor: pointer; box-shadow: 0 9px 20px rgba(8,127,120,.2); }
.auth-link { display: flex; min-height: 44px; align-items: center; justify-content: center; margin-top: 9px; color: var(--primary-dark); font-size: .8rem; font-weight: 700; text-align: center; }
.auth-error { border: 1px solid #e7b8bc; border-radius: 12px; background: var(--danger-soft); color: #8e2f35; padding: 10px 12px; font-size: .84rem; font-weight: 700; }
.auth-privacy { margin: 14px 0 0; color: var(--muted); font-size: .7rem; text-align: center; }
.auth-privacy span { color: var(--primary); font-size: .55rem; }
.hero { display: grid; min-height: min(72vh,620px); align-content: center; max-width: 680px; margin: 0 auto; }
.hero::before { display: grid; width: 62px; height: 62px; place-items: center; margin-bottom: 18px; border-radius: 20px; background: linear-gradient(145deg,var(--primary),#16a59c); color: #fff; content: "✓"; font-size: 2rem; font-weight: 900; box-shadow: 0 12px 28px rgba(8,127,120,.22); }
.hero h1 { max-width: 12ch; }
.status-card { display: flex; align-items: center; gap: 10px; max-width: 500px; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 12px 14px; box-shadow: var(--shadow); }
.status-card span { color: var(--muted); font-size: .8rem; }
.status-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px var(--success-soft); }
.rotation-summary[hidden] { display: none; }
.rotation-order { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.rotation-order ol { display: grid; gap: 7px; margin: 8px 0 0; padding: 0; list-style: none; }
.rotation-item { display: grid; min-height: 48px; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); padding: 4px; }
.rotation-item.dragging { opacity: .55; border-color: var(--primary); }
.rotation-handle,.rotation-position-controls button { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: var(--surface-soft); color: var(--primary-dark); font: inherit; font-weight: 850; }
.rotation-position-controls { display: flex; gap: 3px; }
.week-planner { margin-top: 14px; }
.week-planner-heading { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; }
.week-planner-heading h2,.week-planner-heading p { margin: 0; }
.week-arrow { display: grid; min-height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--primary-dark); font-size: 1.6rem; text-decoration: none; }
.week-day-tabs { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px; margin: 13px 0; }
.week-day-tabs button { display: grid; min-width: 0; min-height: 66px; place-items: center; gap: 1px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--ink); padding: 4px 1px; }
.week-day-tabs button[aria-selected="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.week-day-tabs button.today strong { text-decoration: underline 3px var(--coral); text-underline-offset: 3px; }
.week-day-tabs small { font-size: .62rem; }
.week-day-tabs span { min-width: 18px; border-radius: 999px; background: var(--blue-soft); font-size: .62rem; }
.week-day-panels h3 { margin-bottom: 8px; }
.week-chore-card { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; min-height: 58px; align-items: center; margin-top: 7px; border: 1px solid var(--line); border-radius: 13px; color: inherit; padding: 9px; text-decoration: none; }
.week-chore-card small { grid-column: 2; color: var(--muted); }
.week-empty { margin: 0; color: var(--muted); }
details { border-top: 1px solid var(--line); padding-top: 10px; }
summary { min-height: 44px; color: var(--primary-dark); font-weight: 750; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
@media (min-width: 720px) {
  body { font-size: 16px; }
  .shell { padding: 34px 28px 52px; }
  .app-header { grid-template-columns: 1fr auto; align-items: end; padding-bottom: 22px; }
  h1 { font-size: 3.15rem; }
  .summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-grid,.reason-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .chore-card,.list-card:not(.more-link) { grid-template-columns: 1.4fr 1fr auto; align-items: center; }
  .bottom-nav { position: static; width: fit-content; max-width: 100%; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 16px; padding: 5px; box-shadow: var(--shadow); }
  .bottom-nav a { min-width: 86px; padding: 4px 10px; font-size: .72rem; }
  .more-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .auth-layout { min-height: calc(100dvh - 68px); }
}

/* Child Home previews added after the shared visual-system redesign. */
.home-preview { display: grid; gap: 8px; margin-top: 18px; }
.section-heading a,.text-link { font-size: .8rem; font-weight: 780; }
.preview-card { display: flex; min-height: 62px; grid-template-columns: none; align-items: center; justify-content: space-between; color: inherit; text-decoration: none; }
.preview-card > span { display: grid; gap: 2px; min-width: 0; }
.preview-card small { color: var(--muted); }
.preview-value { color: var(--primary-dark); white-space: nowrap; }
.compact-empty { margin: 0; border: 1px dashed var(--line); border-radius: 13px; background: var(--surface-soft); color: var(--muted); padding: 11px 13px; }
@media (max-width: 359px) { .shell { padding-right: 10px; padding-left: 10px; } .button { padding-right: 10px; padding-left: 10px; } }
