/* The waitlist's family pages (docs/KennelOS_Waitlist_W2_Plan.md §3). Phone first,
   no web fonts, no outside requests. Colors follow shared/assets/app.css. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #d9dee5;
  --text: #1c2430;
  --text-muted: #5c6773;
  --accent: #2f6f4f;
  --accent-soft: #e5f0ea;
  --warn: #8a5f17;
  --warn-soft: #f6eddc;
  --danger: #b23b3b;
  --info: #2d5b8a;
  --info-soft: #e3edf7;
  --on-accent: #ffffff;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161b;
    --surface: #1b2128;
    --border: #2e3741;
    --text: #e6eaef;
    --text-muted: #a3adb8;
    --accent: #6fbf94;
    --accent-soft: #1f3529;
    --warn: #e0b56a;
    --warn-soft: #3a2f1b;
    --danger: #ef8f8f;
    --info: #8db8e6;
    --info-soft: #1e2d3d;
    --on-accent: #0f1a14;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
}
main { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; }
/* On a phone, cards sit close to the screen's edges and to each other. */
@media (max-width: 520px) {
  main { padding: 10px 8px 40px; }
  .card { margin: 10px 0; }
}
header.page { padding: 8px 0 4px; }
header.page h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 2px; overflow-wrap: anywhere; }
header.page .actions { margin-top: 10px; }
header.page .intro { margin: 10px 0 0; white-space: pre-line; line-height: 1.5; }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 14px 0;
}
.card h2 { font-size: 1.05rem; margin: 0 0 8px; }
.card.turn { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.card.notice { background: var(--warn-soft); border-color: transparent; }
.big { font-size: 2rem; font-weight: 700; line-height: 1.1; margin-bottom: 2px; }
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: middle;
}
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.plain { background: var(--bg); color: var(--text-muted); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
dl.facts dt { color: var(--text-muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain > li { padding: 10px 0; border-top: 1px solid var(--border); }
ul.plain > li:first-child { border-top: 0; padding-top: 0; }
.row { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 6px; margin: 14px 0 0; }
.tabs button {
  flex: 1;
  font: inherit;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
input[type="search"], input[type="email"], input[type="text"], input[type="date"], textarea, select {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
button.primary {
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}
button.primary:disabled, button.secondary:disabled { opacity: 0.6; cursor: default; }
button.secondary, a.button.secondary {
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
button.danger { background: var(--danger); color: var(--on-accent); }
button.pup { text-align: left; }
.notice-card.small { margin: 8px 0; }
a.button { display: inline-block; text-decoration: none; text-align: center; }
a.button.primary { font-weight: 600; padding: 10px 16px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
#code:not(:placeholder-shown) { letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }
#email-form { margin-top: 14px; }
form.inline { display: flex; gap: 8px; flex-wrap: wrap; }
form.inline input { flex: 1 1 200px; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 9px 6px; border-top: 1px solid var(--border); vertical-align: top; }
table.list th { border-top: 0; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
/* The list's card is tighter than the others, and the number sits close to the
   name: its column fits "#999" in bold on one line, never wider. */
.card#list { padding: 6px 10px; }
table.list th:first-child, table.list td.num { padding-left: 6px; padding-right: 2px; }
table.list td.num { font-weight: 700; white-space: nowrap; width: 3em; font-variant-numeric: tabular-nums; }
table.list tr.mine td { background: var(--accent-soft); }
table.list tr.deciding td { background: var(--warn-soft); }
table.list tr.deciding td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
/* The date added: a bubble on the ⓘ at the row's end (hover, focus or tap). */
table.list .tip { width: 1.8em; text-align: right; padding-left: 0; }
.added-tip { position: relative; width: 1.35em; height: 1.35em; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font: italic 700 0.75rem/1 Georgia, serif; cursor: pointer; }
.added-tip:hover, .added-tip:focus-visible, .added-tip.open { color: var(--text); border-color: var(--text-muted); }
.added-tip::after { content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 6px); white-space: nowrap; padding: 5px 8px; border-radius: 6px; background: var(--text); color: var(--surface); font-family: var(--font); font-size: 0.8rem; font-weight: 400; font-style: normal; line-height: 1.2; box-shadow: 0 2px 6px rgba(0,0,0,0.18); opacity: 0; pointer-events: none; transition: opacity 0.12s; z-index: 5; }
.added-tip:hover::after, .added-tip:focus-visible::after, .added-tip.open::after { opacity: 1; }
ul.places { list-style: none; padding: 0; margin: 8px 0 4px; }
ul.places li { margin: 2px 0; }
.pups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pup { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; }
footer.page { margin-top: 28px; font-size: 0.85rem; color: var(--text-muted); }
.mt0 { margin-top: 0; }
textarea { resize: vertical; min-height: 6em; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: block; }
label.q, legend.q { display: block; font-weight: 600; margin: 0 0 6px; padding: 0; }
.req { color: var(--danger); }
.choices { display: flex; flex-direction: column; gap: 4px; }
label.choice { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
label.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.notice-card { background: var(--info-soft); border-color: transparent; }
details { border-top: 1px solid var(--border); padding: 10px 0; }
details:first-child { border-top: 0; padding-top: 0; }
summary { cursor: pointer; font-weight: 600; }
/* A litter's parents' health testing, folded under its parents line. */
details.parent-tests { border-top: 0; padding: 2px 0 0; }
details.parent-tests > summary { font-weight: 500; color: var(--text-muted); }
details.parent-tests ul.plain > li { padding: 4px 0; border-top: 0; }
/* A card that opens and closes (the public list's See Your Details): the heading
   is the summary, with the browser's own expand arrow in front of it. */
details.card.collapsible { border-top: 1px solid var(--border); padding: 16px; }
details.card.collapsible > summary h2 { display: inline; margin: 0; }
details.card.collapsible[open] > summary { margin-bottom: 10px; }
/* "Current Applicants: See Your Details" stays on one line on 360–389px phones. */
@media (max-width: 389px) { details.card.collapsible > summary h2 { font-size: 15.5px; } }
/* A family's status page: everything centered (decided 2026-10-08). */
main.centered { text-align: center; }
.signin-top { margin: 10px 0 4px; }
/* Passing on a turn: set apart from the pup buttons, in the warning tint. */
button.pass { font: inherit; font-weight: 600; padding: 10px 16px; border-radius: var(--radius); border: 1px solid #e3cfa6; background: var(--warn-soft); color: var(--warn); cursor: pointer; }
button.pass:hover { background: #efe0c4; }
.card.turn .deadline, .card.alert .deadline { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
.card.alert { border-color: #e3cfa6; }
main.centered .row, main.centered .actions, main.centered form.inline, main.centered .tabs, main.centered .pups { justify-content: center; }
main.centered dl.facts { display: inline-grid; text-align: left; margin: 6px auto 0; }
/* The kennel's emails read like letters (W2 step 6). */
main.centered ul.emails { text-align: left; }
ul.emails li + li { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
main.centered details.card.collapsible > summary { list-style-position: inside; }
/* The public list's Available Puppies and Coming up cards: centered like the status page. */
#available, #upcoming { text-align: center; }
#available > summary, #upcoming > summary { list-style-position: inside; }
button.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }
#app-form .actions { margin: 16px 0 8px; }
.mt8 { margin: 8px 0 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Embed mode (embedded.js; docs/KennelOS_Integrations_Plan.md §1): the page inside
   her own website. Her page has its own heading and background, so ours go; the
   cards stay. Light by default (a light site gets a light form whatever the
   visitor's setting), `theme=dark` or `theme=auto` on request. These selectors
   outrank the prefers-color-scheme block above. */
html.embedded body { background: transparent; }
html.embedded main { max-width: none; padding: 2px 2px 8px; }
html.embedded header.page h1,
html.embedded footer.page { display: none; }
html.embedded.theme-light {
  color-scheme: light;
  --bg: #f6f7f9; --surface: #ffffff; --border: #d9dee5; --text: #1c2430; --text-muted: #5c6773;
  --accent: #2f6f4f; --accent-soft: #e5f0ea; --warn: #8a5f17; --warn-soft: #f6eddc; --danger: #b23b3b;
  --info: #2d5b8a; --info-soft: #e3edf7; --on-accent: #ffffff;
}
html.embedded.theme-dark {
  color-scheme: dark;
  --bg: #12161b; --surface: #1b2128; --border: #2e3741; --text: #e6eaef; --text-muted: #a3adb8;
  --accent: #6fbf94; --accent-soft: #1f3529; --warn: #e0b56a; --warn-soft: #3a2f1b; --danger: #ef8f8f;
  --info: #8db8e6; --info-soft: #1e2d3d; --on-accent: #0f1a14;
}

/* The family pages' confirm dialog (common.js confirmDialog), in place of the
   browser's window.confirm. Same look as the app's .modal (shared/assets/app.css):
   a dimmed backdrop and a surface card, sized for a phone. */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 26, 38, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(15, 25, 40, 0.28);
  padding: 20px;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.modal h2 { margin: 0 0 8px; font-size: 1.15rem; }
.modal p { margin: 0 0 16px; line-height: 1.45; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-actions button { flex: 1 1 auto; }

/* A family's records with this kennel (more than one time on the list): one row
   each, date over the line, Viewing or Switch on the right, left-aligned. */
.records-card { text-align: left; }
.records { margin: 10px 0 0; padding: 0; list-style: none; }
.records .record { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.records .record > div { min-width: 0; }
.records .record .button, .records .record .badge { flex: 0 0 auto; }
.records a.button.secondary.small { padding: 6px 14px; font-size: 0.875rem; }
/* A turn's price line sits right on its deposit line. */
.turn p.price { margin-bottom: 2px; }
/* Each litter of a turn in its own block: a line and room between them. */
.turn .turn-litter { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.turn .turn-litter .pups { margin-bottom: 4px; }
.turn .turn-litter > p:first-child { margin-bottom: 2px; }
/* A turn's heading and each litter's name, a couple of points larger. */
.turn h2 { font-size: 1.3rem; }
.turn .turn-litter > p:first-child strong { font-size: 1.15rem; }
/* Sending your deposit (a turn card, once they've picked): set apart in the accent tint. */
.turn .deposit-block { margin-top: 12px; padding: 14px; border-radius: var(--radius); background: var(--accent-soft); }
.turn .deposit-block h3 { margin: 0 0 6px; font-size: 1.05rem; }
.turn .deposit-block .big { font-size: 1.6rem; }
.turn .deposit-block p:last-child { margin-bottom: 0; }

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

/* Available Puppies: the pups by sex in columns, Males left, Females right. */
.pup-cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px 16px; margin: 6px 0; }
.pup-col-head { font-weight: 600; }
.pup-col ul { margin: 2px 0 0; }
.pup-col ul.plain > li { padding: 2px 0; border-top: 0; }

/* A parent's info bubble (registered name, pedigree, health testing) and its popup. */
button.info-bubble { display: inline-flex; align-items: center; justify-content: center; width: 1.25em; height: 1.25em; margin: 0 2px 0 4px; padding: 0;
  border: 1px solid var(--accent); border-radius: 50%; background: none; color: var(--accent); font: italic 700 0.8em/1 Georgia, serif; cursor: pointer; vertical-align: 0.1em; }
button.info-bubble:hover, button.info-bubble:focus-visible { background: var(--accent); color: #fff; }
.modal.dog-info { text-align: left; }
.modal.dog-info h3 { margin: 12px 0 4px; font-size: 0.95rem; }
.modal.dog-info p { margin: 0; }
.modal.dog-info .modal-actions { margin-top: 16px; }
dl.info-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; }
dl.info-facts dt { font-weight: 600; }
dl.info-facts dd { margin: 0; }
ul.info-tests > li { padding: 2px 0; border-top: 0; }
