/* Self-hosted fonts (owner decision D2). */
/* Material Symbols Outlined (subset) - Apache License 2.0 */
@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("fonts/material-symbols-outlined-subset.woff2") format("woff2");
} /* Newsreader (latin-ext) - SIL Open Font License 1.1 */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Newsreader (latin) - SIL Open Font License 1.1 */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
/* Plus Jakarta Sans (latin-ext) - SIL Open Font License 1.1 */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Plus Jakarta Sans (latin) - SIL Open Font License 1.1 */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
/* JetBrains Mono (latin) - SIL Open Font License 1.1 */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/* Design tokens from DESIGN.md (Warm Editorial Stationery). */
:root {
  --paper: #fdf9f1;
  --card: #ffffff;
  --surface: #f7f3eb;
  --line: #e6ded3;
  --ink: #2b2823;
  --muted: #6e675f;
  --brand: #1b3b36;
  --brand-hover: #132a26;
  --oscar: #c2593f;
  --cleo: #8b5e3c;
  --alert: #c2593f;
  --alert-bg: #faeee9;
  --accent: #d9822b;
  /* Darker text variants keep small text above 4.5:1 contrast. */
  --oscar-text: #a8452d;
  --alert-text: #9c3725;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

/* Base */
* {
  box-sizing: border-box;
}
html {
  /* Keeps focused fields and scroll targets clear of the sticky header. */
  scroll-padding-top: 6rem;
}
/* Motion only for people who have not asked their device to reduce it. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  font-size: 1rem;
  line-height: 1.5;
}
button,
input,
textarea {
  font: inherit;
}
/* Tailwind's reset removes heading weights; restore a readable default. */
h1,
h2,
h3,
h4 {
  font-weight: 700;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex="-1"]:not(section):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
/* Containers focused by the app after navigation (for screen readers) show no
   ring; the ids and :focus-visible beat the [tabindex="-1"] rule above. */
#app:focus,
#step-heading:focus,
#care-sheet:focus,
#care-sheet:focus-visible,
.hub section[tabindex="-1"]:focus,
#catalog-sheets:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}
.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;
}
.skip-link {
  position: absolute;
  left: -10000px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.75rem;
  background: var(--card);
}
/* Material Symbols (self-hosted subset). The glyph comes from data-icon so
   icon names never become page text. */
.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  font-size: 1.5rem;
  line-height: 1;
  user-select: none;
}
.icon::before {
  content: attr(data-icon);
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: inherit;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}
/* Header navigation and footer links */
.nav-item {
  min-height: 44px;
  color: var(--color-on-surface-variant, #414846);
  font-weight: 600;
}
.nav-item:hover {
  color: var(--color-on-surface, #1c1c17);
}
.nav-blog,
.nav-blog:hover {
  color: var(--color-on-blog-orange, #1c1c17);
}
.nav-item[aria-current="page"] {
  color: #fff;
  background: var(--color-primary-container, #1b3b36);
  font-weight: 800;
}
/* Flex centers the label the way a button does, so links and buttons line up. */
.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-align: left;
}
.footer-link:hover {
  color: var(--color-primary, #032521);
  text-decoration: underline;
}
.add-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 1px dashed #1b3b36;
  border-radius: 0.5rem;
  color: #1b3b36;
  background: transparent;
  font-size: 1rem;
  font-weight: 800;
}
.add-row:hover {
  background: #f1ede5;
}
.text-button {
  padding: 0;
  border: 0;
  color: var(--brand);
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 800;
}

/* Form shell (Stitch builder look). Layout lives in Tailwind classes in
   src/form/shell.js; field controls are styled here. */
.fields-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 1rem;
}
.fields-grid > * {
  grid-column: 1 / -1;
}
@media (min-width: 640px) {
  .fields-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fields-grid > .field-short {
    grid-column: auto;
  }
}
.field {
  min-width: 0;
  margin: 0.75rem 0;
  padding: 0;
  border: 0;
}
.field label,
.field legend {
  display: block;
  margin-bottom: 0.4rem;
  padding: 0;
  color: #032521;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}
.required-mark {
  color: var(--oscar-text);
}
.field-help,
.counter {
  color: #414846;
  font-size: 0.875rem;
  line-height: 1.45;
}
.field-help {
  margin: 0 0 0.45rem;
}
.counter {
  margin: 0.35rem 0 0;
  text-align: right;
}
.field input:not([type="radio"]),
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.875rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: #1c1c17;
  background: #f7f3eb;
  box-shadow: 0 1px 2px #1b3b3614;
  font-size: 16px;
  line-height: 1.4;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.field textarea {
  min-height: 6.5rem;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  border-color: #1b3b36;
  background: #fff;
  box-shadow: 0 0 0 3px #1b3b3624;
}
/* Answers as segmented buttons (Stitch "pills"); the radio stays native and
   keyboard-operable, only visually hidden. */
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.5rem;
}
.choices label.choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 48px;
  margin: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: #414846;
  background: #f1ede5;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
}
.choices label.choice:hover {
  background: #ece8e0;
}
.choices input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.choices label.choice:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.choices label.choice:has(input:checked) {
  color: #fff;
  background: #1b3b36;
  font-weight: 800;
}
/* A check mark shows the selection without relying on color. */
.choices label.choice:has(input:checked)::before {
  content: "check";
  font-family: "Material Symbols Outlined";
  font-size: 1.125rem;
  font-weight: normal;
  line-height: 1;
  font-feature-settings: "liga";
}
.field-alert {
  padding: 0.9rem 1rem 1rem;
  border-left: 4px solid #ba1a1a;
  border-radius: 0.5rem;
  background: #ffdad340;
}
.alert-flag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.5rem;
  color: #7a1a07;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.alert-flag .icon {
  font-size: 1.25rem;
}
.has-error input:not([type="radio"]),
.has-error textarea,
.has-error .choices label.choice {
  border-color: #ba1a1a;
}
.error {
  display: flex;
  gap: 0.4rem;
  margin: 0.5rem 0 0;
  color: #93000a;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
}
/* A shape marks errors too, so the state never relies on color alone. */
.error::before {
  content: "!";
  display: grid;
  place-items: center;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 0.875rem;
  line-height: 1;
}
.error-summary {
  padding: 1rem 1.25rem;
  border-left: 6px solid #ba1a1a;
  border-radius: 0.75rem;
  background: #ffdad6;
}
.error-summary:focus {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.error-summary h3 {
  margin: 0 0 0.5rem;
  color: #93000a;
  font-size: 1.0625rem;
}
.error-summary ul {
  margin: 0;
  padding-left: 1.1rem;
}
.error-summary .text-button {
  min-height: 44px;
  color: #032521;
  text-align: left;
  text-decoration: underline;
}
.repeatable .row-card {
  margin: 0.75rem 0;
  padding: 1rem;
  border-radius: 0.75rem;
  background: #f7f3eb;
}
.row-card > legend {
  padding: 0 0.35rem;
  color: #032521;
  font-size: 1rem;
  font-weight: 700;
}
.row-card .field {
  margin: 0.75rem 0;
}
.row-card .field input:not([type="radio"]),
.row-card .field textarea {
  background: #fff;
}
.remove-row {
  min-height: 44px;
  text-decoration: underline;
}
.add-row {
  width: 100%;
}
.info-note {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid #8f4e00;
  border-radius: 0.5rem;
  color: #6d3a00;
  background: #ffdcc266;
  font-size: 0.9375rem;
  font-weight: 600;
}
.info-note .icon {
  font-size: 1.25rem;
}
.photo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.photo-thumb {
  width: 6rem;
  height: 6rem;
  flex: none;
  border-radius: 0.75rem;
  object-fit: cover;
  background: #f1ede5;
}
.photo-empty {
  display: grid;
  place-items: center;
  color: #717976;
}
.photo-empty .icon {
  font-size: 2.25rem;
}
.photo-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
}
.photo-actions input.photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  opacity: 0;
}
.photo-button {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  margin: 0 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0.5rem;
  color: #fff !important;
  background: #1b3b36;
  font-size: 1rem !important;
  font-weight: 700 !important;
  cursor: pointer;
}
.photo-button:hover {
  background: #032521;
}
.photo-actions:has(.photo-input:focus-visible) .photo-button {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.photo-button .icon {
  font-size: 1.25rem;
}
.step-tabs button:focus-visible {
  outline-offset: -3px;
}
/* Care sheet document (Stitch print layout). Layout uses Tailwind classes in
   src/sheet.js; label/value rows and print rules live here. */
.care-sheet:focus {
  outline: none;
}
.care-sheet dl,
.care-sheet dd {
  margin: 0;
}
.sheet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.15rem 0.75rem;
  padding: 0.3rem 0;
  break-inside: avoid;
}
@media (min-width: 640px) {
  .sheet-row {
    grid-template-columns: minmax(9rem, 0.8fr) minmax(0, 2fr);
  }
  .sheet-row-stacked {
    grid-template-columns: minmax(0, 1fr);
  }
}
.sheet-row dt,
.sheet-item-row dt {
  color: #032521;
  font-size: 0.9375rem;
  font-weight: 700;
}
/* Owner text may be one long unbroken word (a name, a URL-like note). Unlike
   Tailwind's break-word, "anywhere" also lets flex items shrink, so nothing
   pushes the page wider than the screen. */
.break-words {
  overflow-wrap: anywhere;
}
.sheet-row dd,
.sheet-item-row dd {
  color: #1c1c17;
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sheet-row-alert dt,
.sheet-row-alert dd {
  color: #7a1a07;
}
.sheet-row-stacked {
  padding: 0.1rem 0;
}
.sheet-row-stacked dt {
  font-size: 0.875rem;
  font-weight: 600;
  color: #414846;
}
.sheet-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 0.5rem;
}
@media (min-width: 640px) {
  .sheet-item-row {
    grid-template-columns: minmax(8rem, 0.8fr) minmax(0, 2fr);
  }
}
.sheet-item,
.sheet-card,
.sheet-section-heading {
  break-inside: avoid;
}
.sheet-section-heading {
  break-after: avoid;
}

/* Cleo's Emergency Cards: cut-out cards (src/cards.js). */
.card-cut {
  margin-top: 1rem;
  border: 2px dashed var(--muted);
  border-radius: 6px;
  padding: 0.75rem;
  background: var(--card);
  break-inside: avoid;
}
.card-wallet {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.card-panel {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.25rem 0.5rem;
}
.card-panel-back {
  border-top: 2px dotted var(--muted);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}
@media (min-width: 640px) {
  .card-wallet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-panel-back {
    border-top: 0;
    border-left: 2px dotted var(--muted);
    margin-top: 0;
    padding-top: 0.25rem;
  }
}
.card-headline {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.card-title {
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--ink);
}
.card-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}
.card-row {
  font-size: 0.9375rem;
  color: var(--ink);
}
.card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.card-phone {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
}
.card-photo {
  width: 5.5rem;
  height: 5.5rem;
}
.card-critical {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--ink);
  border-left-width: 6px;
  border-radius: 4px;
}
.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
}
@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.card-rows {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.card-tiny {
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Hub catalog: pillars and sheet cards share one grid (src/hub.js). The
   lane and its list take no box, so every tile is the same size.
   All: dog tiles in the left column, cat tiles in the right, rows aligned.
   One species: pillar + three sheets as a 2 x 2 grid. */
.catalog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
.catalog-lane,
.catalog-list {
  display: contents;
}
.catalog-grid > .catalog-lane[hidden] {
  display: none;
}
.catalog-list > li {
  display: flex;
}
.catalog-list > li > article {
  width: 100%;
}
@media (min-width: 1024px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    column-gap: 2.5rem;
  }
  .catalog-grid[data-view="all"] {
    grid-auto-flow: row dense;
  }
  .catalog-grid[data-view="all"] [data-lane="dog"] > *,
  .catalog-grid[data-view="all"] [data-lane="dog"] .catalog-list > li {
    grid-column: 1;
  }
  .catalog-grid[data-view="all"] [data-lane="cat"] > *,
  .catalog-grid[data-view="all"] [data-lane="cat"] .catalog-list > li {
    grid-column: 2;
  }
}

/* Print: US Letter, sheet only */
@page {
  size: Letter;
  margin: 0.4in;
}
@media print {
  html,
  body {
    background: #fff !important;
  }
  /* A focus ring means nothing on paper, and on a sheet that spans pages it
     is drawn again at the top of every page. */
  *:focus,
  *:focus-visible {
    outline: none !important;
  }
  body > :not(#app),
  .no-print {
    display: none !important;
  }
  .print-plain {
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  /* Compact layout: the Dog Sitter sheet must fit two US Letter pages with
     typical answers (spec). Text stays at 9-10pt or larger. */
  .care-sheet {
    max-width: none !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 9.5pt;
    line-height: 1.22;
  }
  .care-sheet h1 {
    font-size: 16pt;
    line-height: 1.1;
  }
  .care-sheet h2 {
    font-size: 10.5pt;
  }
  .sheet-header {
    padding-bottom: 3pt !important;
  }
  /* The Oscar/Cleo line must not push a one-page sheet onto a second page. */
  .sheet-header .text-right > p {
    line-height: 1.15;
  }
  .sheet-tagline {
    font-size: 8pt !important;
  }
  .sheet-bio {
    padding: 6pt 8pt !important;
  }
  .sheet-photo {
    width: 0.9in !important;
    height: 0.9in !important;
  }
  .sheet-reference {
    width: 0.7in !important;
    height: 0.7in !important;
  }
  .sheet-header > div:first-child > span {
    width: 26pt !important;
    height: 26pt !important;
  }
  .sheet-bio-row {
    margin-top: 3pt !important;
  }
  .sheet-header .text-headline-sm {
    font-size: 13pt;
    line-height: 1.1;
  }
  .sheet-header .text-label-sm,
  .sheet-header .text-label-md {
    font-size: 8.5pt;
    line-height: 1.2;
  }
  .care-sheet .mt-5 {
    margin-top: 4pt !important;
  }
  .care-sheet .mt-4 {
    margin-top: 6pt !important;
  }
  .care-sheet .mt-2\.5 {
    margin-top: 4pt !important;
  }
  .sheet-section.alert {
    padding: 6pt 8pt !important;
  }
  .sheet-section-heading {
    padding: 1pt 6pt !important;
  }
  .sheet-section-heading .icon {
    font-size: 11pt !important;
  }
  .care-sheet .sheet-section-heading h2 {
    font-size: 9.5pt;
  }
  .sheet-card > p:first-child {
    margin-bottom: 1pt !important;
    font-size: 8.5pt !important;
  }
  .sheet-card > p:first-child .icon {
    display: none;
  }
  .sheet-card .text-body-md {
    line-height: 1.3 !important;
  }
  .sheet-card li .icon {
    font-size: 10pt !important;
  }
  .sheet-card ul {
    gap: 1pt !important;
  }
  .care-sheet .mt-3 {
    margin-top: 4pt !important;
  }
  .sheet-section:not(.alert) > dl {
    display: block !important;
    padding: 4pt 6pt !important;
    column-count: 2;
    column-gap: 0.3in;
  }
  .sheet-row {
    display: block;
    padding: 2pt 0;
    break-inside: avoid;
  }
  .sheet-section.alert > dl {
    display: block !important;
    column-count: 2;
    column-gap: 0.3in;
  }
  .sheet-row dd,
  .sheet-item-row dd {
    font-size: 9.5pt;
    line-height: 1.22;
  }
  .sheet-row dt,
  .sheet-item-row dt,
  .sheet-footer {
    font-size: 8.5pt;
  }
  .sheet-row-list dd {
    margin-top: 2pt;
  }
  /* One-page tools (walker): "Label: answer" on one line outside the alert
     block, which keeps its stacked, prominent layout. */
  .sheet-dense .sheet-section:not(.alert) .sheet-row:not(.sheet-row-list) dt,
  .sheet-dense .sheet-section:not(.alert) .sheet-row:not(.sheet-row-list) dd {
    display: inline;
  }
  .sheet-dense
    .sheet-section:not(.alert)
    .sheet-row:not(.sheet-row-list)
    dt::after {
    content: ": ";
  }
  .sheet-item {
    padding: 4pt 6pt !important;
  }
  .sheet-item-row {
    grid-template-columns: 1.05in minmax(0, 1fr);
  }
  .sheet-section.contacts .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4pt !important;
  }
  .sheet-card {
    padding: 4pt 6pt !important;
  }
  .sheet-card .text-body-sm,
  .sheet-card .text-body-md,
  .sheet-card li {
    font-size: 9.5pt !important;
  }
  .sheet-badges li {
    padding: 0 4pt !important;
    font-size: 8.5pt !important;
  }
  .sheet-bio .text-body-md,
  .sheet-bio p {
    font-size: 9.5pt !important;
  }
  .sheet-footer {
    margin-top: 6pt !important;
    padding-top: 3pt !important;
    line-height: 1.2;
  }
  .sheet-footer p {
    margin-bottom: 1pt !important;
  }
  /* The form code is already in the sheet header. */
  .sheet-footer p:last-child {
    display: none;
  }
  /* Ink-safe on every device: desktop browsers drop background colors when
     printing, but iPhone Safari prints them. Only the safety block keeps
     its fill; everything else is white with borders. */
  #care-sheet,
  #care-sheet *:not(.sheet-section.alert) {
    background-color: transparent !important;
    box-shadow: none !important;
  }
  /* Keep the structure visible when the printer drops background colors. */
  .sheet-bio,
  .sheet-card,
  .sheet-section-heading,
  .sheet-section:not(.alert) > dl,
  .sheet-item {
    border: 1px solid #c1c8c5;
  }
  .sheet-section.alert {
    border: 2px solid #000 !important;
    border-left-width: 6px !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .sheet-banner {
    border-color: #000 !important;
  }
  .sheet-section.alert h2,
  .sheet-banner,
  .sheet-row-alert dt,
  .sheet-row-alert dd {
    color: #000 !important;
  }
  .sheet-badges li {
    border-color: #000 !important;
    color: #000 !important;
  }
  .sheet-section-heading,
  .sheet-bio {
    break-inside: avoid;
  }
  /* The groomer's reference photo sits beside the preferences list. */
  .sheet-reference-figure {
    float: right;
    width: 2.2in;
    margin: 3pt 0 2pt 8pt !important;
    padding: 3pt 5pt !important;
    gap: 5pt !important;
  }
  .sheet-reference-figure figcaption {
    font-size: 8.5pt !important;
    line-height: 1.2;
  }
  .sheet-section.preferences > dl {
    display: flow-root !important;
  }
  .sheet-section.preferences::after {
    content: "";
    display: block;
    clear: both;
  }
  /* House notes are a separate page (spec: they must not crowd the sheet). */
  .sheet-section.house {
    break-before: page;
  }
  .care-sheet p,
  .care-sheet dd {
    orphans: 3;
    widows: 3;
  }
}

/* Emergency cards on paper: a standard wallet card (3.375 x 2.125 in)
   printed front and back side by side, and a full-width fridge card.
   Critical text keeps its size; the cards grow rather than shrink it. */
@media print {
  .card-cut {
    border: 1.5px dashed #000;
    border-radius: 0;
    padding: 0.12in;
    margin-top: 0.2in;
  }
  .card-wallet {
    grid-template-columns: 3.375in 3.375in !important;
    width: 6.75in;
    min-height: 2.125in;
    padding: 0;
  }
  .card-panel {
    padding: 0.1in 0.14in;
    gap: 2pt;
  }
  .card-panel-back {
    border-top: 0 !important;
    border-left: 1.5px dotted #000 !important;
    margin-top: 0 !important;
    padding-top: 0.1in !important;
  }
  .card-fridge {
    width: 7.5in;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6pt 14pt;
    margin-top: 8pt;
  }
  /* Beat the generic .care-sheet h2 print size. */
  .care-sheet .card-headline {
    font-size: 12pt;
  }
  .care-sheet .card-title {
    font-size: 18pt;
  }
  .card-label {
    font-size: 8pt;
    color: #000;
  }
  .card-row {
    font-size: 9.5pt;
  }
  .card-name {
    font-size: 10.5pt;
  }
  .card-wallet .card-name {
    font-size: 10pt;
  }
  .card-wallet .card-row {
    font-size: 9pt;
  }
  .card-phone {
    font-size: 12pt;
  }
  .card-critical {
    margin-top: 8pt;
    padding: 5pt 8pt;
    border-color: #000;
  }
  .card-critical .card-row {
    font-size: 10.5pt;
  }
  .card-rows {
    margin-top: 8pt;
  }
  .card-tiny {
    font-size: 7.5pt;
    color: #000;
  }
  .card-photo {
    width: 1in;
    height: 1in;
  }
  .cards-header p {
    font-size: 9pt;
  }
  .cards-footer {
    margin-top: 0.2in;
    font-size: 8pt;
    line-height: 1.25;
  }
}
