/* Family hub: big, plain, readable. Every color is a token; dark and light both meet WCAG AA. */
:root {
  --bg: #ffffff; --surface: #eef1f5; --text: #111418; --muted: #4a5360; --outline: #5b6573;
  --accent: #0d4fa8; --on-accent: #ffffff; --green: #0b6b2f; --red: #b3261e; --on-red: #ffffff;
  --radius: 14px; --gap: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10; --surface: #1d2127; --text: #f2f4f7; --muted: #b6bec9; --outline: #8a94a3;
    --accent: #7ab4ff; --on-accent: #0b0d10; --green: #6fd99a; --red: #ff8a80; --on-red: #0b0d10;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d10; --surface: #1d2127; --text: #f2f4f7; --muted: #b6bec9; --outline: #8a94a3;
  --accent: #7ab4ff; --on-accent: #0b0d10; --green: #6fd99a; --red: #ff8a80; --on-red: #0b0d10;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* Wide enough for the week to sit side by side; only stops over-stretch on an ultrawide.
   Prose stays readable via p { max-width } below, not by boxing the whole page. */
main { max-width: var(--content-max, 1400px); margin: 0 auto; padding: 16px; }
main > p, .card > p { max-width: 75ch; }
header { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 2px solid var(--outline); }
header a.home { font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; }
header nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
/* Header links are plain text links: big enough to tap, but not competing with the page's buttons. */
header nav a, header nav button { background: none; border: none; color: var(--accent); font-weight: 700; min-height: 44px; padding: 8px 2px; text-decoration: underline; text-underline-offset: 4px; }
header nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
h1 { font-size: 30px; margin: 8px 0 4px; }
h2 { font-size: 22px; margin: 28px 0 8px; }
p.muted, .muted { color: var(--muted); }
a { color: var(--accent); }
.card { background: var(--surface); border: 2px solid var(--outline); border-radius: var(--radius); padding: 14px 16px; margin: 10px 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.grow { flex: 1 1 220px; min-width: 0; }
.big { font-size: 20px; font-weight: 700; }
label { display: block; font-weight: 600; margin: 10px 0 4px; }
input:not([type=hidden]):not([type=checkbox]), select, textarea {
  width: 100%; font: inherit; padding: 12px; min-height: 48px; border-radius: 10px;
  border: 2px solid var(--outline); background: var(--bg); color: var(--text);
}
button, .button {
  font: inherit; font-weight: 700; min-height: 48px; padding: 10px 18px; border-radius: 10px;
  border: 2px solid var(--accent); background: var(--accent); color: var(--on-accent); cursor: pointer; text-decoration: none; display: inline-block;
}
button.quiet, .button.quiet { background: transparent; color: var(--text); border-color: var(--outline); }
button.danger { background: var(--red); border-color: var(--red); color: var(--on-red); }
form.inline { display: inline; margin: 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.notice { border-left: 8px solid var(--accent); }
.error { border-left: 8px solid var(--red); }
.ok { color: var(--green); font-weight: 700; }
.code { font: 700 28px/1.2 ui-monospace, Menlo, monospace; letter-spacing: 3px; word-break: break-all; }
.status { font-weight: 600; }
.stale { color: var(--red); font-weight: 700; }
nav.tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 14px 0 6px; padding-bottom: 8px; border-bottom: 2px solid var(--outline); }
nav.tabs a { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 4px; }
nav.tabs a[aria-current="page"] { color: var(--text); text-decoration: none; border-bottom: 4px solid var(--accent); }
/* Schedule items look like calendar entries (as on the phone, ADR-0023): a tinted band with a bar. */
.card.band { border: none; border-left: 8px solid var(--accent); }
h3 { font-size: 19px; margin: 18px 0 4px; }
input[type=time], input[type=date] { max-width: 260px; font-size: 20px; }
audio { width: 100%; margin-top: 6px; }
code { font: 15px ui-monospace, Menlo, monospace; word-break: break-all; }
label.inline { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; margin: 0 0 6px; }
input[type=checkbox] { width: 24px; height: 24px; }

/* Her week (ADR-0029): seven days, as many columns as the window holds; every item links to its edit page. */
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 10px 0 18px; }
.day { background: var(--surface); border: 2px solid var(--outline); border-radius: var(--radius); padding: 10px 12px; }
.day h3 { margin: 0 0 6px; }
.day-item { display: block; padding: 6px 8px; margin: 4px -4px; border-left: 4px solid var(--outline); border-radius: 6px; color: var(--text); text-decoration: none; }
.day-item.once { border-left-color: var(--accent); }
.day-item:hover, .day-item:focus-visible { background: var(--bg); outline: 2px solid var(--accent); }
.day-item .big { font-size: 17px; }

/* Formerly inline styles, which the hub's own CSP (style-src 'self') blocks. */
.field-end { align-self: end; padding-bottom: 2px; }
.plain-link { text-decoration: none; color: inherit; }
.pre { white-space: pre-wrap; }
.code-md { font-size: 20px; }
.code-sm { font-size: 18px; }
.span-all { grid-column: 1 / -1; }

/* Photos of her people (ADR-0030). */
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.photo-big { width: 160px; height: 160px; border-radius: var(--radius); object-fit: cover; flex: none; }
.no-photo { display: inline-flex; align-items: center; justify-content: center; background: var(--bg); border: 2px solid var(--outline); color: var(--muted); font-weight: 700; }
.thumb.no-photo { font-size: 24px; }
.photo-big.no-photo { font-size: 64px; }
.photo-card { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.photo-card .preview { display: block; margin: 10px 0; }
.photo-card .preview[hidden] { display: none; }
