/* Taylor Vets client portal: one stylesheet for every page (BUILD.md s2, DESIGN.md s0 and s3).
   Brand palette from the Branding Guidelines (DESIGN.md s0). Mobile first, single column,
   rem sizes so the phone's text size applies, 44px touch targets, dark mode, no animation. */

@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/open-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/open-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/montserrat-latin-700-normal.woff2) format("woff2"); }

:root {
  --green: #40514E;  --mint: #E4F9F5;  --yellow: #FFDE59;  --navy: #060644;
  --ground: #E4F9F5; --card: #FFFFFF;  --text: #060644;    --muted: #56655F;
  --line: #C5D3D0;   --neutral: #DDE6E4; --link: #40514E;  --input-border: #40514E;
  --btn: #40514E;    --btn-text: #FFFFFF; --focus: #060644;
  --error: #A3241C;  --error-bg: #FBE3E0;
  --done-bg: #E4F9F5; --done-text: #40514E; --notice: #FFFFFF;
  --tabbar-h: 4.5rem;
  --head: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E1716; --card: #17221F;  --text: #E4F9F5;    --muted: #A9BDB8;
    --line: #34433F;   --neutral: #2A3735; --link: #9EE4D5;  --input-border: #9EB7B1;
    --btn: #E4F9F5;    --btn-text: #1C2826; --focus: #FFDE59;
    --error: #FF9C90;  --error-bg: #3A1714;
    --done-bg: #24413B; --done-text: #D8F6EF; --notice: #1D2B28;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-bottom: 10rem; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 1rem/1.5 var(--body); overflow-wrap: break-word; }
body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

h1, h2, h3, .h-small, legend, .btn, summary { font-family: var(--head); font-weight: 700; }
h1, h2, h3 { hyphens: auto; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .75rem; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 1.75rem 0 .75rem; }
h3, .card__title { font-size: 1.1875rem; line-height: 1.3; margin: 0 0 .5rem; }
.h-small { font-size: 1rem; color: var(--muted); margin: 1.5rem 0 .5rem; }
p { margin: 0 0 1rem; }
b, strong { font-weight: 700; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
ul.plain { list-style: none; margin: 0; padding: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }
.icon { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }
[hidden] { display: none !important; }
.icon-inline .icon { width: 1.125rem; height: 1.125rem; vertical-align: -.2em; }

/* Frame: header, staging banner, page, tab bar */
.skip-link { position: absolute; left: -999rem; top: .5rem; z-index: 100; background: var(--yellow); color: var(--navy);
  padding: .75rem 1rem; font-family: var(--head); font-weight: 700; }
.skip-link:focus { left: .5rem; }
.staging-banner { background: var(--yellow); color: var(--navy); padding: .5rem 1rem; font-size: .875rem; }
.staging-banner a { color: var(--navy); font-weight: 700; }
.top { display: flex; align-items: center; justify-content: space-between; background: var(--green);
  padding: calc(.5rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) .5rem max(1rem, env(safe-area-inset-left)); }
.top__logo { display: block; }
.top__logo img { display: block; height: 3.5rem; width: auto; }
.top__help { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .25rem; color: var(--mint);
  font-family: var(--head); font-weight: 700; }
.top :focus-visible, .tabbar :focus-visible { outline-color: var(--mint); }
.page { max-width: 40rem; margin: 0 auto; padding: 1.25rem max(1rem, env(safe-area-inset-right)) 2rem max(1rem, env(safe-area-inset-left)); }
.page:focus { outline: none; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--green); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: .25rem max(.25rem, env(safe-area-inset-right)) calc(.75rem + env(safe-area-inset-bottom)) max(.25rem, env(safe-area-inset-left)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .125rem; min-height: 3.5rem;
  color: var(--mint); text-decoration: none; font: 700 .8125rem/1.2 var(--head); }
.tabbar a[aria-current="page"] { color: var(--yellow); box-shadow: inset 0 3px 0 var(--yellow); }
.tabbar span { max-width: 100%; overflow-wrap: anywhere; text-align: center; }
@media (min-width: 48rem) { .tabbar { padding-left: calc(50% - 20rem); padding-right: calc(50% - 20rem); } }
/* Large text or a very narrow screen (200% zoom on a phone is about 190px wide): five labels no longer
   fit across, so the tab bar stops floating and its items wrap at the end of the page (WCAG 1.4.4, 1.4.10). */
@media (max-width: 20em) {
  body.has-tabbar { padding-bottom: 0; }
  .tabbar { position: static; height: auto; grid-template-columns: repeat(auto-fit, minmax(6.5em, 1fr)); padding: .25rem; }
  .has-tabbar .actionbar { bottom: 0; }
}

/* Buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: 3rem;
  padding: .625rem 1.125rem; border: 2px solid transparent; border-radius: 6px; font-size: 1rem; line-height: 1.25;
  text-align: center; text-decoration: none; cursor: pointer; }
.btn--primary { background: var(--btn); color: var(--btn-text); }
.btn--secondary { background: var(--card); color: var(--link); border-color: var(--link); }
.btn--choice { background: var(--card); color: var(--text); border-color: var(--line); justify-content: flex-start; font-size: 1.125rem; }
.btn--link { display: inline-flex; width: auto; min-height: 2.75rem; padding: .25rem 0; background: none; border: 0; color: var(--link);
  text-decoration: underline; text-underline-offset: .15em; }
.btn .icon { width: 1.25rem; height: 1.25rem; }
p > .btn { margin-top: .25rem; }
.inline-form { margin: 0; }

/* Sticky action bar: the main action sits low, within thumb reach (DESIGN.md s3) */
.actionbar { position: sticky; bottom: 0; z-index: 5; margin: 1.5rem -1rem 0; padding: .75rem 1rem 1rem;
  background: var(--card); border-top: 1px solid var(--line); }
.has-tabbar .actionbar { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
.actionbar .small { margin: .5rem 0 0; text-align: center; color: var(--muted); }
.actionbar__alt { margin: .5rem 0 0; text-align: center; }
.actionbar__alt a { display: inline-block; padding: .625rem 0; font-family: var(--head); font-weight: 700; }

/* Forms (GOV.UK patterns, DESIGN.md s4) */
.field { margin: 0 0 1.5rem; }
.field__heading { margin-bottom: .5rem; }
.field__heading label { display: block; }
.field__label { display: block; margin: 0 0 .25rem; font: 700 1.0625rem/1.3 var(--head); }
.field__hint { color: var(--muted); margin: 0 0 .5rem; }
.field__error { color: var(--error); font-weight: 700; margin: 0 0 .5rem; }
.field--error { border-left: 4px solid var(--error); padding-left: .875rem; }
.input { display: block; width: 100%; min-height: 3rem; padding: .5rem .75rem; border: 2px solid var(--input-border); border-radius: 6px;
  background: var(--card); color: var(--text); font: 400 1.125rem/1.4 var(--body); }
.field--error .input { border-color: var(--error); border-width: 3px; }
.input--code { max-width: 13rem; font: 700 1.75rem/1.2 var(--head); letter-spacing: .3em; }
.input--postcode { max-width: 10rem; text-transform: uppercase; }
.input--short { max-width: 12rem; }
.textarea { min-height: 7rem; resize: vertical; }
.fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.fieldset__legend { padding: 0; margin: 0 0 .5rem; font-size: 1.0625rem; }
.fieldset__legend h1, .fieldset__legend h2 { margin: 0; }
.caption { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; color: var(--muted); font: 700 .875rem/1.3 var(--head); }
.radios { display: flex; flex-direction: column; gap: .5rem; }
.radio { display: flex; align-items: center; gap: .75rem; min-height: 3.5rem; padding: .5rem .875rem; border: 2px solid var(--line);
  border-radius: 6px; background: var(--card); font-size: 1.125rem; cursor: pointer; }
.radio input { width: 1.5rem; height: 1.5rem; margin: 0; flex-shrink: 0; accent-color: var(--green); }
.radio:has(input:checked) { border-color: var(--input-border); }
.radio:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.radio input:focus-visible { outline: none; }
@media (min-width: 30rem) { .radios--inline { flex-direction: row; flex-wrap: wrap; } }
.error-summary { margin: 0 0 1.5rem; padding: 1rem; border: 3px solid var(--error); border-radius: 6px; background: var(--card); }
.error-summary h2 { margin: 0 0 .5rem; font-size: 1.125rem; }
.error-summary a { color: var(--error); font-weight: 700; }
.error-summary p:last-child { margin: 0; }

/* Panels */
.notice { margin: 0 0 1rem; padding: 1rem; border-radius: 8px; background: var(--notice); border: 1px solid var(--line); }
.notice--success { border-left: 6px solid var(--green); }
.notice--urgent { background: var(--yellow); color: var(--navy); border-color: var(--yellow); }
.notice--urgent .h-small { color: var(--navy); margin-top: 0; }
.notice > :last-child { margin-bottom: 0; }
.card { margin: 0 0 1rem; padding: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.card > :last-child { margin-bottom: 0; }
.card h2 { margin: 0 0 .5rem; }
.card__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 .5rem; }
.card__alt { margin: .75rem 0 0; }
.card .btn { margin-top: .25rem; }
.card--list { padding: 0; overflow: hidden; }
.card--list > h2 { padding: 1rem 1rem .5rem; margin: 0; }
.card__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; padding: .75rem 1rem;
  border-top: 1px solid var(--line); margin: 0; }
.card__row--link { flex-wrap: nowrap; color: var(--text); text-decoration: none; min-height: 3.25rem; }
.card__row--link > span { flex: 1 1 auto; min-width: 0; }
.card__row--link .icon { color: var(--muted); }
.card__foot { padding: .75rem 1rem 1rem; border-top: 1px solid var(--line); }
.card--empty { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.card--empty .icon { width: 2.5rem; height: 2.5rem; color: var(--link); }
.card--past { background: transparent; }
.card--inbox .pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .875rem; }
.stack { display: flex; flex-direction: column; gap: .75rem; margin: 0 0 1rem; }
.stack > .card { margin: 0; }
.stack-sm { display: flex; flex-direction: column; gap: .5rem; margin: 0 0 1rem; }
.stack-sm > .card { margin: 0; }

.pill { display: inline-block; padding: .1875rem .625rem; border: 1px solid transparent; border-radius: 999px;
  font: 700 .8125rem/1.3 var(--head); white-space: nowrap; }
.pill--due { background: var(--yellow); color: var(--navy); }
.pill--done { background: var(--done-bg); color: var(--done-text); }
.pill--later { background: var(--neutral); color: var(--text); }
.pill--plan { background: var(--green); color: #FFFFFF; }

.avatar { display: inline-block; flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: #DDE6E4 url(paw.svg) center / 55% no-repeat; }
.avatar--sm { width: 1.75rem; height: 1.75rem; }
.avatar--md { width: 3rem; height: 3rem; }
.avatar--lg { width: 5.5rem; height: 5.5rem; border: 3px solid var(--card); }
.pet-tag { display: inline-flex; align-items: center; gap: .5rem; font: 700 .9375rem/1.3 var(--head); }
.pet-card, .row-card { display: flex; align-items: center; gap: .875rem; padding: .875rem 1rem; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; min-height: 4rem; }
.pet-card__text, .row-card__text { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.pet-card__name { font: 700 1.125rem/1.3 var(--head); }
.pet-card__status { margin-top: .125rem; font-weight: 700; }
.pet-card .icon, .row-card .icon { color: var(--muted); }
.pet-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 0 0 1rem; }
.pet-head > div { min-width: 0; }
.pet-head h1 { margin: 0; overflow-wrap: anywhere; }
.pet-head p { margin: 0 0 .25rem; }

.summary { margin: 0; }
.summary__row { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.summary__row:first-child { padding-top: 0; }
.summary__row:last-child { border-bottom: 0; padding-bottom: 0; }
.summary dt { grid-column: 1; font-family: var(--head); font-weight: 700; }
.summary dd { grid-column: 1; margin: 0; overflow-wrap: anywhere; }
.summary .summary__action { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.summary__action a { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: -.6rem; font-family: var(--head); font-weight: 700; }

.savings { margin: 0 0 1rem; padding: 1.25rem 1rem; border-radius: 8px; background: var(--navy); color: #FFFFFF; }
.savings__label { margin: 0; font-size: 1rem; color: #FFFFFF; }
.savings__figure { margin: .25rem 0; font: 700 2.5rem/1.1 var(--head); color: var(--yellow); }
.savings__note { margin: 0; color: var(--mint); }
.big-figure { margin: .25rem 0 .5rem; font: 700 2rem/1.1 var(--head); }
.big-figure span { font-size: 1rem; color: var(--muted); }
.pet-switch ul { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.pet-switch a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border: 2px solid var(--line);
  border-radius: 999px; background: var(--card); color: var(--text); text-decoration: none; font-family: var(--head); font-weight: 700; }
.pet-switch a[aria-current="page"] { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.choice-list { display: flex; flex-direction: column; gap: .5rem; margin: 0 0 .75rem; }

.intro { margin: 0 0 1.25rem; }
.eyebrow { margin: 0 0 .25rem; color: var(--link); font: 700 .9375rem/1.3 var(--head); }
.lead { font-size: 1.125rem; }
ul.benefits { display: flex; flex-direction: column; gap: .875rem; margin: 0 0 1.25rem; padding: 1rem; border-radius: 8px;
  background: var(--card); border: 1px solid var(--line); }
.benefits li { display: flex; gap: .75rem; align-items: flex-start; }
.benefits .icon { color: var(--link); margin-top: .125rem; }

.details { margin: 1rem 0; border-top: 1px solid var(--line); padding-top: .25rem; }
.details summary { display: list-item; padding: .625rem 0; min-height: 2.75rem; color: var(--link); cursor: pointer; }
.details--more { border-top: 0; margin-top: 0; }
.back-link { display: inline-flex; align-items: center; gap: .125rem; min-height: 2.75rem; margin: 0 0 .5rem; color: var(--text);
  font-family: var(--head); font-weight: 700; }
.back-link .icon { width: 1.25rem; height: 1.25rem; }
.quiet-link { color: var(--muted); }
.call-us { margin-top: 1.5rem; }
.call-us .h-small { margin-top: 0; }
.call-link { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: .5rem; min-height: 2.75rem; font-family: var(--head); font-weight: 700; }
.call-link .icon { width: 1.25rem; height: 1.25rem; }
.closing { margin-top: 1.5rem; }
.sign-out { margin-top: 1.5rem; }

/* Hover only where there is a pointer: on phones a tap would leave it stuck on. */
@media (hover: hover) {
  a:hover { text-decoration-thickness: 3px; }
  .tabbar a:hover span { text-decoration: underline; }
  .btn:hover { text-decoration: underline; }
  .card__row--link:hover b { text-decoration: underline; }
  .pet-card:hover .pet-card__name, .row-card:hover b { text-decoration: underline; }
  .details summary:hover { text-decoration: underline; }
}
@media (prefers-color-scheme: dark) {
  .avatar { background-color: #CFE9E3; }
  .notice--urgent a { color: var(--navy); }
}
@media (forced-colors: active) {
  .tabbar a[aria-current="page"] { text-decoration: underline; }
  .pill { border-color: CanvasText; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Self-service (2026-10-22): the country and breed lists, and a date of birth as three short boxes (GOV.UK date input). */
.input--select { cursor: pointer; }
.field__label--more { margin-top: 1rem; }
.date-input { display: flex; flex-wrap: wrap; gap: 1rem; }
.date-input__item .input { width: 4.5rem; }
.date-input__item--year .input { width: 6.5rem; }

/* The details check-up (F1, 2026-10-23): a sheet over Home. Without JavaScript the dialog shows in place, as a card. */
.sheet { position: static; width: auto; max-width: 32rem; margin: 0 0 1rem; padding: 1.25rem 1rem; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.sheet:modal { position: fixed; width: calc(100% - 2rem); margin: auto; box-shadow: 0 .5rem 2rem rgba(6, 6, 68, .25); }
.sheet::backdrop { background: rgba(6, 6, 68, .45); }
.sheet h2 { margin: 0 0 .5rem; }
.sheet .inline-form { text-align: center; }
.checkup__pet { margin: 0 0 .25rem; font-size: 1.125rem; }
.push--home .btn--link { display: flex; margin: .25rem auto 0; }

/* Invoices (A6, 2026-10-23) */
.row-card .pill { flex-shrink: 0; }
.invoice { width: 100%; margin: 0 0 1rem; border-collapse: collapse; }
.invoice th, .invoice td { padding: .625rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.invoice thead th { color: var(--muted); font-size: .875rem; }
.invoice .num { padding-left: .75rem; text-align: right; white-space: nowrap; }
.invoice tfoot th, .invoice tfoot td { border-bottom: 0; }
.invoice__includes { display: block; margin-top: .125rem; color: var(--muted); font-size: .875rem; }

/* Printing an invoice, or any page: the page alone, black on white. */
@media print {
  .top, .tabbar, .actionbar, .js-print, .sheet, .push, .install, .closing { display: none !important; }
  body, .page { background: #FFFFFF !important; color: #000000 !important; }
  .card { border: 0; padding: 0; }
  a { color: #000000; text-decoration: none; }
}
