/* Puppy Connection breeder portal and operator screens. One stylesheet, copied to both
   Workers' public folders by app/dev/setup.mjs, so the two tools look like one product.
   The shell is Option A from app/preview (Alex, 2026-10-02): a dark grouped menu like the
   Teapup editor, and a centered work area that uses the width up to 92rem. Colors are the
   concept site's tokens (css/style.css). */

:root {
  color-scheme: light only;
  --ink: #262626; --ink-soft: #414141; --muted: #6b665c;
  --gold: #f7d57f; --bronze: #bc9b5d; --olive: #7c6b40;
  --paper: #fcfcfc; --ground: #f5f2ea; --surface: #fff; --cream: #e7e2d2;
  --line: #e4dfd3; --line-strong: #cfc8b7; --row-hover: #fbf9f3;
  --ok: #2f6140; --ok-bg: #e4efe7; --alert: #92402f; --alert-bg: #f6e3de;
  --warn: #7d5f12; --warn-bg: #fbf0d3; --info-bg: #eceae4;
  --rail-bg: #262626; --rail-ink: #f3efe4; --rail-soft: #b9b2a2; --rail-line: rgba(255,255,255,.1);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 8px; --r-lg: 12px;
  --rail: 15.5rem;
  --tap: 44px;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #262626; --paper: #fcfcfc; --ground: #f5f2ea; --surface: #fff; --line: #e4dfd3; }
  html, body { background: #f5f2ea; color: #262626; }
}

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body { font: 15px/1.55 var(--sans); color: var(--ink); background: var(--ground); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0 0 .6rem; }
h1 { font-size: 1.6rem; margin: 0; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
p { margin: 0 0 .8rem; }
a { color: var(--olive); }
code { font-size: .88em; background: var(--info-bg); padding: .05rem .3rem; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 2px; }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tap);
  padding: .5rem 1.05rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff;
  color: var(--ink); font: 500 .92rem var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--bronze); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-gold { background: var(--gold); border-color: #e6c264; color: var(--ink); }
.btn-danger { color: var(--alert); border-color: #d9b3aa; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--olive); }
.btn-sm { min-height: 36px; padding: .3rem .75rem; font-size: .85rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }

label { display: block; font-weight: 500; font-size: .9rem; margin: 0 0 .3rem; }
.field { margin-bottom: .9rem; }
.hint { font-size: .82rem; color: var(--muted); margin-top: .25rem; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=date], input[type=number], input[type=search],
select, textarea { width: 100%; min-height: var(--tap); padding: .5rem .7rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: #fff; color: var(--ink); font: 1rem var(--sans); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--bronze); outline: none; box-shadow: 0 0 0 3px rgba(188,155,93,.25); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 1rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: .15rem; flex: none; }

/* state pills */
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 600;
  background: var(--info-bg); color: #55524b; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-alert { background: var(--alert-bg); color: var(--alert); }
.pill-gold { background: #fbefc8; color: var(--olive); }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }

/* notices */
.notice { border: 1px solid var(--line); border-left: 4px solid var(--bronze); border-radius: var(--radius); background: #fff;
  padding: .8rem 1rem; margin: 0 0 1.2rem; }
.notice > :last-child { margin-bottom: 0; }
.notice-ok { border-left-color: var(--ok); }
.notice-alert { border-left-color: var(--alert); }
.notice-sim { border-left-color: #6b7a8c; background: #f4f6f8; font-size: .88rem; }
.error { color: var(--alert); font-size: .9rem; margin-top: .5rem; }

/* app shell: dark grouped menu, sticky top bar, centered work area */
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100dvh; }
.rail { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--rail-bg); color: var(--rail-ink); }
.rail-head { padding: 1.2rem 1.2rem 1rem; display: flex; flex-direction: column; gap: .45rem; }
.rail-head a { display: block; width: 9.5rem; }
.rail-head img { width: 100%; height: auto; display: block; }
.rail-head .role { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.nav { flex: 1; overflow-y: auto; padding: .2rem .7rem 1rem; display: grid; gap: 2px; align-content: start; }
/* Group headings read as headings, not as dimmer links (Alex, 2026-10-10): gold, condensed
   spacing, and a rule above every group after the first. */
.nav-group { font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); opacity: .85; padding: 1.1rem .7rem .4rem; }
.nav-group ~ .nav-group { border-top: 1px solid var(--rail-line); margin-top: .5rem; padding-top: 1rem; }
.nav a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: var(--tap); padding: .45rem .7rem;
  border-radius: var(--radius); color: var(--rail-soft); text-decoration: none; font-weight: 550; }
.nav a { color: #e9e4d8; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.is-on { background: rgba(247,213,127,.16); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); border-radius: 0 8px 8px 0; }
.nav .tally { font-size: .75rem; font-variant-numeric: tabular-nums; padding: .05rem .5rem; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--rail-ink); }
.nav a.is-on .tally { background: var(--gold); color: var(--ink); }
.nav-note { font-size: .8rem; color: var(--rail-soft); padding: .5rem .7rem; line-height: 1.4; }
.rail-foot { display: flex; gap: .6rem; align-items: flex-start; padding: .9rem 1.2rem; font-size: .8rem; border-top: 1px solid var(--rail-line); color: var(--rail-soft); }
.rail-foot b { display: block; color: #fff; font-weight: 600; } .rail-foot span { display: block; }
.rail-foot .dot { width: 9px; height: 9px; border-radius: 50%; background: #4f9a63; margin-top: .35rem; flex: none; }
.rail-foot .dot.wait { background: var(--gold); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .6rem clamp(1rem, 2.5vw, 2.25rem);
  background: rgba(245,242,234,.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); min-height: 60px; }
.finder { flex: 1 1 0; max-width: 32rem; margin: 0; }
.finder input { min-height: 40px; }
.who { margin-left: auto; display: flex; align-items: center; gap: .6rem; min-width: 0; font-size: .9rem; }
.who .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work { flex: 1; padding: 1.6rem clamp(1rem, 2.5vw, 2.25rem) 4rem; }
.view { max-width: 92rem; margin-inline: auto; }
.view-narrow { max-width: 56rem; }

/* page header: title, one line of purpose, actions */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .8rem 1rem; margin-bottom: 1.2rem; }
.page-head > div:first-child { flex: 1 1 30rem; min-width: 0; }
.lede { margin: .3rem 0 0; color: var(--muted); max-width: 70ch; }
.head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* cards, panels and stats */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.card > :last-child { margin-bottom: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 1rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr)); gap: 1rem; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.stat { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .9rem 1.1rem; color: inherit; text-decoration: none; }
a.stat:hover { border-color: var(--bronze); }
.stat b { display: block; font: 600 1.7rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--muted); }
.attention { list-style: none; padding: 0; margin: 0; }
.attention li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.attention li:first-child { border-top: 0; padding-top: 0; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps .dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem;
  font-weight: 700; background: var(--ground); border: 1px solid var(--line-strong); }
.steps .done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps .now .dot { background: var(--gold); border-color: #e6c264; }
.empty { text-align: center; padding: 2.4rem 1rem; color: var(--muted); }
.empty b { display: block; color: var(--ink); font: 600 1.05rem var(--serif); margin-bottom: .3rem; }
.empty .btn { margin-top: .8rem; }

/* list toolbar, tables and paging */
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.toolbar input[type=search] { flex: 1 1 14rem; width: auto; min-height: 40px; }
.toolbar select { flex: 0 1 13rem; width: auto; min-height: 40px; }
.toolbar .count { margin-left: auto; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.panel > .table-wrap, .card > .table-wrap { border: 0; }
.table-wrap.boxed { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  font-weight: 600; padding: .65rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: .55rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list td b { font-weight: 600; }
table.list .sub { display: block; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
table.list .when { white-space: nowrap; }
table.list tr.clickable { cursor: pointer; }
table.list tr.clickable:hover td, table.list tr.clickable:focus-visible td { background: var(--row-hover); }
table.list tr.clickable:focus-visible { outline: 3px solid var(--bronze); outline-offset: -3px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.act { text-align: right; width: 1%; white-space: nowrap; }
.act .btn-row { margin: 0; flex-wrap: nowrap; justify-content: flex-end; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: .8rem; padding: .7rem 1rem; font-size: .88rem; border-top: 1px solid var(--line); }
.thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; background: var(--cream); display: block; }
.thumb-empty { width: 56px; height: 42px; border-radius: 6px; background: var(--ground); border: 1px dashed var(--line-strong);
  display: grid; place-items: center; font-size: .66rem; color: var(--muted); text-align: center; line-height: 1.1; }

.puppy-row { display: grid; grid-template-columns: 64px 1fr auto; gap: .8rem; align-items: center; padding: .65rem 0; border-top: 1px solid var(--line); }
.puppy-row:first-of-type { border-top: 0; }
.puppy-row .thumb, .puppy-row .thumb-empty { width: 64px; height: 48px; }
.puppy-row .meta { min-width: 0; }
.puppy-row .meta b { display: block; }
.puppy-row .chips { margin-top: .25rem; }
.puppy-row .btn-row { margin: 0; }
/* puppies inside a litter sit as small cards, several across on a wide screen */
.puppy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr)); gap: .7rem; margin-top: .4rem; }
.puppy-grid .puppy-row { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; background: #fff; }
.puppy-grid .puppy-row:first-of-type { border-top: 1px solid var(--line); }

/* A puppy inside a litter (2026-10-10, Alex: the Edit button floated mid-card and the actions
   sat at different heights). Edit sits top right beside the name, the standing line runs the
   full width, and the actions are a ruled row pinned to the bottom, so in a row of cards the
   actions line up whatever each card holds. */
.puppy-card { display: flex; flex-direction: column; gap: .5rem; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: .75rem .8rem .5rem; background: #fff; }
.pc-top { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: .8rem; align-items: start; }
.pc-top .thumb, .pc-top .thumb-empty { width: 72px; height: 72px; }
.pc-top .meta { min-width: 0; }
.pc-top .meta b { display: block; font-size: 1rem; line-height: 1.25; }
.pc-top .meta .small { display: block; margin-top: .1rem; line-height: 1.4; }
.pc-top .chips { margin-top: .35rem; }
.puppy-card .standing { margin: 0; }
.puppy-card .row-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0 1.2rem; padding-top: .3rem; border-top: 1px solid var(--line); }
.puppy-card .row-actions:empty { display: none; }
/* No side padding, so a link that wraps to a second line starts at the same edge as the first. */
.puppy-card .row-actions .btn { padding-left: 0; padding-right: 0; border: 0; background: none; }
.puppy-card .row-actions .btn:hover { text-decoration: underline; }

/* Plan P2.1, where a puppy stands, and P2.4, the quick actions under each puppy */
.standing { font-size: .84rem; color: var(--ink-soft); margin-top: .3rem; line-height: 1.4; }
.standing-ok { color: var(--ok); } .standing-warn { color: var(--warn); } .standing-alert { color: var(--alert); } .standing-gold { color: var(--olive); }
.puppy-row .row-actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: .2rem .3rem; margin: -.2rem 0 0 -.6rem; }
.puppy-row .row-actions:empty { display: none; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 0 1rem; }
table.list tr.total-row td { background: var(--ground); }

/* Plan P2.3, the profile extras */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.brand-slot { border: 1px solid var(--line); border-radius: 10px; padding: .8rem; background: #fff; min-width: 0; }
.brand-slot > b { display: block; margin-bottom: .5rem; }
.brand-slot img, .brand-empty { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: contain; border-radius: 8px; background: var(--ground); }
.brand-slot[data-kind="kennel"] img { object-fit: cover; }
.brand-slot img { max-height: 12rem; }
.brand-empty { display: grid; place-items: center; color: var(--muted); font-size: .85rem; border: 1px dashed var(--line-strong); aspect-ratio: auto; height: 5rem; }
.brand-slot .btn-row { margin-top: .5rem; }
.breed-picks { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem .8rem; margin: 0 0 1rem; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(13rem, 100%), 1fr)); gap: .25rem 1rem; }
.breed-picks legend { font-weight: 500; font-size: .9rem; padding: 0 .3rem; }
.breed-picks .check { align-items: center; min-height: 34px; font-size: .92rem; }
.brand-pics { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0 0 1rem; }
.brand-pics figure { margin: 0; width: 9rem; }
.brand-pics img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: var(--ground); border-radius: 8px; border: 1px solid var(--line); }
.brand-pics figcaption { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.help p { max-width: 70ch; }

/* segmented control and tab links */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; max-width: 100%; overflow-x: auto; }
.seg button, .seg a { border: 0; background: #fff; padding: .45rem .8rem; min-height: 40px; font: 500 .86rem var(--sans); cursor: pointer;
  color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.seg > * + * { border-left: 1px solid var(--line-strong) !important; }
.seg button.on, .seg a.on { background: var(--ink); color: #fff; }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }

/* the one drawer every edit opens in */
.scrim { position: fixed; inset: 0; background: rgba(20,20,20,.35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; height: 100dvh; width: min(580px, 100%); background: var(--paper); z-index: 50;
  box-shadow: -10px 0 30px rgba(0,0,0,.12); display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; }
.drawer-body { padding: 1.1rem 1.2rem 2rem; overflow-y: auto; flex: 1; }
.drawer-body h3 { margin-top: 1.4rem; }
.kv { width: 100%; border-collapse: collapse; font-size: .92rem; margin-bottom: 1rem; }
.kv { table-layout: fixed; }
.kv td { padding: .45rem 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.kv td:first-child { color: var(--muted); width: 38%; padding-right: 1rem; }

/* photo manager */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .6rem; margin: .4rem 0 .8rem; }
.photo { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo .tools { display: flex; justify-content: space-between; padding: .2rem; }
.photo .tools button { border: 0; background: transparent; cursor: pointer; font-size: .85rem; padding: .25rem .4rem; min-height: 32px; }
.photo .cover { position: absolute; top: 4px; left: 4px; }
.upload { border: 1px dashed var(--line-strong); border-radius: 8px; padding: .9rem; text-align: center; background: #fff; }

/* pay screen */
.pay-row { display: flex; gap: .8rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line); }
.pay-row:first-child { border-top: 0; }
.pay-row .why { font-size: .85rem; color: var(--muted); }
.total { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: 1.05rem; }
.total b { font: 600 1.4rem var(--serif); font-variant-numeric: tabular-nums; }

/* plain pages: sign-in, verify, simulated checkout, test mailbox */
body.plain { display: grid; place-items: start center; min-height: 100dvh; padding: 2.5rem 1rem; }
.plain-card { margin-inline: auto; width: min(540px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem 1.6rem 1.8rem; }
.plain-card form { margin-top: .8rem; }
.plain-card .btn { width: 100%; }
.brandmark { display: block; width: 11rem; margin-bottom: 1.2rem; }
/* Continue with Google, styled to Google's sign-in button guidance: white, gray border, the four-color G */
.btn-google { width: 100%; background: #fff; border-color: #747775; color: #1f1f1f; font-weight: 500; gap: .7rem; margin-top: .4rem; }
.btn-google:hover { background: #f8f9fa; border-color: #5f6368; }
.gsi-button { display: flex; justify-content: center; min-height: 44px; margin-top: .4rem; }
.gsi-button:empty { display: none; }
.or { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .85rem; margin: 1.1rem 0 .2rem; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
/* Plan P6.2, the emailed sign-in code. Big, spaced digits that read easily off a phone. */
.code-input { font-size: 1.5rem; letter-spacing: .35em; font-variant-numeric: tabular-nums; max-width: 12rem; }
.brandmark img { width: 100%; height: auto; display: block; }
.plain-mark { display: grid; place-items: center; background: var(--rail-bg); border-radius: 10px; padding: 1rem; margin: -.4rem -.4rem 1.2rem; }
.plain-mark img { width: 10rem; height: auto; display: block; }
.sim-flag { background: #f4f6f8; border: 1px solid #d7dde4; border-radius: 8px; padding: .5rem .7rem; font-size: .85rem; color: #3f4a57; }
/* privacy and terms (plan P7.1): a wider card for reading, links under every plain page */
.plain-card.plain-wide { width: min(760px, 100%); }
/* Workplan A11. The Visit site link at the top right of the signed-out pages. */
.plain-site { position: absolute; top: .9rem; right: clamp(1rem, 2.5vw, 2.25rem); font-size: .9rem; color: var(--muted); min-height: 34px; display: inline-flex; align-items: center; }
.plain-foot { display: flex; gap: 1.2rem; justify-content: center; margin: 1rem auto 0; font-size: .85rem; }
.plain-foot a { color: var(--muted); min-height: 34px; display: inline-flex; align-items: center; }
.work-foot { display: flex; gap: 1.2rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .85rem; }
.work-foot a { color: var(--muted); min-height: 34px; display: inline-flex; align-items: center; }
.draft-flag { background: #fff8e6; border: 1px solid #e6c264; border-radius: 8px; padding: .6rem .8rem; font-size: .9rem; }
.legal { max-width: 70ch; }
.legal h2 { font-size: 1.1rem; margin: 1.6rem 0 .4rem; }
.legal ul { padding-left: 1.2rem; } .legal li { margin: .3rem 0; }
.replace, .replace-block b { background: #fde8e8; color: #8a1f1f; font-weight: 600; padding: 0 .25rem; border-radius: 4px; }
.replace-block { border: 1px dashed #c96b6b; border-radius: 8px; padding: .7rem .8rem; }
.review-note { border-left: 4px solid #e6c264; background: #fff8e6; padding: .5rem .8rem; font-size: .9rem; }
.sim-table { width: 100%; border-collapse: collapse; margin: .6rem 0 1rem; }
.sim-table td { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.sim-table td + td { text-align: right; font-variant-numeric: tabular-nums; }
.sim-total td { font-weight: 700; border-bottom: 0; }
.mail { border: 1px solid var(--line); border-radius: 10px; padding: .8rem; margin: .8rem 0; }
.mail header { display: flex; flex-direction: column; gap: .1rem; margin-bottom: .4rem; }
.mail header span { font-size: .8rem; color: var(--muted); }
.mail pre { white-space: pre-wrap; font: .88rem/1.5 var(--sans); background: var(--ground); padding: .7rem; border-radius: 8px; margin: 0 0 .6rem; overflow-wrap: anywhere; }

/* plan P3: sortable headings, private notes, the terms editor and banner, attention details */
table.list th.num { text-align: right; }   /* table.list th outranks .num, so number headings need saying (2026-10-10) */
table.list th[data-sort] { padding: 0; }
table.list th .sort { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .3rem; width: 100%; min-height: 40px;
  padding: .65rem 1rem; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; white-space: nowrap; }
table.list th.num .sort { justify-content: flex-end; }
table.list th .sort::after { content: '\2195'; opacity: .35; }
table.list th[aria-sort=ascending] .sort::after { content: '\2191'; opacity: 1; }
table.list th[aria-sort=descending] .sort::after { content: '\2193'; opacity: 1; }
table.list th .sort:hover { color: var(--ink); }
table.list th .sort:focus-visible { outline: 3px solid var(--bronze); outline-offset: -3px; }
a.rail-foot { text-decoration: none; }
a.rail-foot:hover b { text-decoration: underline; }
.attention .att-sub { display: block; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.attention li > span { min-width: 0; }
.note { padding: .6rem 0; border-top: 1px solid var(--line); }
.note p { margin: .2rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.terms-text { min-height: 320px; }
.terms-preview { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; background: #fff; max-height: 420px; overflow: auto; overflow-wrap: anywhere; }
.terms-banner { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; }
.terms-banner p { margin: 0; }
.pay-row > .btn { margin-left: auto; }
table.list td.brk { overflow-wrap: anywhere; }
table.list .row-acts { margin-top: .4rem; }
.show-md, .show-sm { display: none !important; }
@media (max-width: 1100px) { table.list .show-md { display: block !important; } }

.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .7rem 1.1rem;
  border-radius: 10px; z-index: 60; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: calc(100% - 2rem); }

/* widths. The menu folds into a strip across the top below 860px */
@media (max-width: 1100px) { .hide-md { display: none; } }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; height: auto; }
  .rail-head { flex-direction: row; align-items: center; justify-content: space-between; padding: .55rem 1rem .35rem; }
  .rail-head a { width: 5.6rem; }
  .rail-head .role { font-size: .62rem; }
  /* every menu item stays visible, wrapping to a second line instead of hiding off the edge */
  .nav { display: flex; flex-wrap: wrap; padding: 0 .6rem .55rem; gap: .25rem; }
  .nav-group, .rail-foot, .nav-note { display: none; }
  .nav a { flex: none; min-height: 40px; padding: .35rem .65rem; font-size: .9rem; }
  .nav .tally { font-size: .7rem; padding: 0 .4rem; }
  .nav a.is-on { box-shadow: inset 0 -3px 0 var(--gold); }
  .topbar { position: static; padding-block: .5rem; min-height: 0; }
  .finder { max-width: none; }
  input, select, textarea { font-size: 16px !important; }
}
@media (max-width: 700px) {
  .hide-sm { display: none; }
  .topbar { flex-wrap: wrap; gap: .5rem; }
  .who .name { display: none; }
  /* Workplan A11. With Visit site added, the buttons take a second row rather than run off a
     narrow phone, so none of them is squeezed. */
  .who { flex-wrap: wrap; justify-content: flex-end; row-gap: .4rem; }
  /* The admin's search keeps its full width on a row of its own, and Visit site sits below it. */
  .topbar .finder { flex: 1 1 100%; }
  table.list td, table.list th { padding-inline: .45rem; }
  table.list td { overflow-wrap: anywhere; }
  table.list td:first-child, table.list th:first-child { padding-left: .8rem; }
  table.list th[data-sort] { padding: 0; }
  table.list th .sort { padding-inline: .45rem; }
  table.list th:first-child .sort { padding-left: .8rem; }
  /* on a phone only the sorted column shows its arrow, to keep the table inside the screen */
  table.list th[aria-sort=none] .sort::after { display: none; }
  .show-sm { display: inline !important; }
  .thumb, .thumb-empty { width: 44px; height: 33px; }
  table.list .when { white-space: normal; min-width: 5.5rem; }
  .toolbar .count { margin-left: 0; }
  .puppy-row { grid-template-columns: 56px 1fr; }
  .pc-top { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .pc-top .thumb, .pc-top .thumb-empty { width: 56px; height: 56px; }
  .puppy-row .btn, .puppy-row .btn-row { grid-column: 2; justify-self: start; }
  .head-actions { width: 100%; }
}
@media (max-width: 420px) { .stats { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) { .drawer { animation: slide .18s ease-out; } @keyframes slide { from { transform: translateX(30px); opacity: .6; } } }
@media print { .topbar, .rail, .drawer, .scrim { display: none !important; } .app { display: block; } }

/* People who can sign in, on the Account screen (2026-10-10). */
.member-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.member-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.member-list li > div { min-width: 0; overflow-wrap: anywhere; }
.member-form { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: .75rem; align-items: end; }
.member-form .field { margin: 0; }
@media (max-width: 640px) { .member-form { grid-template-columns: 1fr; } }

/* Admin: photos managed for a breeder, the sign-ins form and the mailing address (2026-10-11). */
.admin-photos { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: .8rem; }
.admin-photos li { display: flex; flex-direction: column; gap: .35rem; }
.admin-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--cream); }
.admin-photos .btn-row { margin: 0; gap: .3rem; }
.person-form { display: grid; grid-template-columns: 1fr 1.4fr .8fr auto; gap: .75rem; align-items: end; }
.person-form .field, .addr-form .field { margin: 0; }
.addr-form { display: grid; gap: .5rem; justify-items: start; margin-bottom: 1.2rem; }
.addr-form .field { width: 100%; }
@media (max-width: 760px) { .person-form { grid-template-columns: 1fr; } }
