:root {
  color-scheme: dark;
  --background: #100f0e;
  --panel: #1b1815;
  --text: #fbf4e9;
  --muted: #d6c7b4;
  --line: #736044;
  --gold: #eac988;
  font: 16px/1.5 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--background); }
h1, h2, h3, p { margin: 0 0 .65rem; }
h1, h2 { color: var(--gold); font-family: Georgia, serif; font-weight: 400; line-height: 1.16; }
h1 { font-size: clamp(2rem, 6vw, 2.7rem); }
h2 { font-size: 1.55rem; }
h3 { overflow-wrap: anywhere; font-size: 1.1rem; }
.eyebrow { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.masthead, .dashboard { width: min(100% - 2rem, 59rem); margin-inline: auto; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem 1rem; }
.masthead h1 { margin-bottom: 0; }
.dashboard { display: grid; gap: 1.1rem; padding-bottom: 2rem; }
.panel, .login, .family-card { border: 1px solid var(--line); border-radius: .45rem; background: var(--panel); padding: clamp(1rem, 3vw, 1.35rem); }
.login { width: min(100% - 2rem, 27rem); margin: min(12vw, 4rem) auto; }
.login form { display: grid; gap: .55rem; margin-top: 1rem; }
button, input, select, textarea { min-height: 44px; padding: .55rem .75rem; border-radius: .25rem; border: 1px solid var(--line); font: inherit; }
button { background: var(--gold); color: var(--background); font-weight: 650; cursor: pointer; }
button.secondary { color: var(--text); background: transparent; }
input, select, textarea { color: var(--text); background: var(--background); }
input, textarea { width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
a { color: var(--gold); overflow-wrap: anywhere; }
.create-form { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(7.5rem, .45fr) auto; align-items: end; gap: .65rem; }
label { display: block; margin-bottom: .35rem; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .8rem; margin: .85rem 0 1rem; }
.metrics div { border-top: 1px solid var(--line); padding-top: .45rem; }
dt { color: var(--muted); font-size: .9rem; }
dd { margin: .1rem 0 0; font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; }
.families { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: .7rem; }
.family-status { color: var(--muted); }
.family-status strong { color: var(--text); }
.family-note { margin-top: .75rem; }
.family-note p { margin-top: .4rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.new-family { border-color: var(--gold); }
.roster-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: .65rem; }
.roster-controls label { margin: 0; }
.roster-sync { color: var(--muted); font-size: .9rem; }
#reminder-copy { margin-bottom: .75rem; }
.family-card[hidden], .family-card button[hidden] { display: none; }
.notice { border-left: 3px solid var(--gold); padding: .65rem .85rem; background: var(--panel); }
.error { border-color: #f4a897; }
#copy-status:empty { display: none; }
.print-sheet { display: none; }
@media (max-width: 42rem) {
  .create-form { grid-template-columns: 1fr; }
}
@media print {
  body { background: white; color: black; }
  body > :not(.print-sheet) { display: none !important; }
  body[data-print="messages"] #print-messages,
  body[data-print="roster"] #print-roster { display: block; }
  .print-sheet h1 { color: black; }
  .print-sheet article { break-inside: avoid; border-top: 1px solid #999; padding: 1rem 0; }
  .print-sheet blockquote { margin: 0 0 .5rem; white-space: pre-wrap; overflow-wrap: anywhere; }
  .print-sheet table { width: 100%; border-collapse: collapse; }
  .print-sheet th, .print-sheet td { text-align: left; padding: .35rem; border-bottom: 1px solid #999; overflow-wrap: anywhere; }
}
