/* J & J site styles. Colors and sizes live in :root and nowhere else, so a
   color change is one edit here. Greens and cream are sampled from the
   business card logo they chose (2026-10-06). Orange is kept only for the Call
   and Ask for a visit buttons, so older visitors find them fast; set --orange
   to a green to go all green. The browser bar color in src/pages/layout.js
   (theme-color) repeats --green-dark; change both together.
   --green-grass is decoration only: it fails contrast as body text (3.37:1). */

:root {
  --cream: #FFFAE4;
  --cream-deep: #F1EBCF;
  --green-dark: #2C6849;
  --green-darker: #1F4B34;
  --green-grass: #4F9855;
  --green-soft: #C8DFC6;
  --green-pale: #E4F0D0;
  --orange: #E9935F;
  /* Text on the orange buttons (option C, picked 2026-10-07): a deep green
     from the logo instead of black. 5.06:1 on the orange, so it passes even
     on the smaller buttons. */
  --on-orange: #173D2B;
  --ink: #1E2A1A;
  --ink-soft: #3D4A38;
  --white: #FFFFFF;
  --alert-red: #8A2A0A;
  --focus: #0B57D0;
  /* The ring around a box while typing in it: orange, in two shades so it
     stands out at least 3:1 wherever the box sits. Deeper on cream and white
     pages, lighter on the green form panels. */
  --focus-field: #B4531A;

  --text-base: 1.1875rem;   /* 19px at default size, grows with phone text settings */
  --text-large: 1.3125rem;  /* 21px */
  --radius: 14px;
  --button-height: 3.5rem;  /* 56px */
  --page-width: 40rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.5;
  text-align: center;
}

body.has-contact-bar { padding-bottom: 6rem; }

img { max-width: 100%; height: auto; }

a { color: var(--green-dark); text-underline-offset: 0.15em; }
a:hover { color: var(--green-darker); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 0.5rem; }

input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus-field); outline-offset: 2px; }
.visit-panel, .form-panel { --focus-field: #F2B48C; }

/* Typing is centered in every box on the site, customer and owner pages alike. */
input, textarea, select { text-align: center; text-align-last: center; }

/* Anything marked hidden stays hidden, even a button whose own rule sets display. */
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; /* standard visually-hidden pattern; must win over any layout rule */
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

h1, h2, h3 { color: var(--green-dark); line-height: 1.15; margin: 0 0 0.75rem; }
h1 { font-size: 1.95rem; font-weight: 800; }
h2 { font-size: 1.6rem; font-weight: 800; }
h3 { font-size: 1.45rem; font-weight: 800; color: var(--ink); }

main, .site-header, .site-footer { max-width: var(--page-width); margin: 0 auto; }

.icon { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: var(--button-height);
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font: inherit;
  font-size: var(--text-large);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button-wide { width: 100%; }
.button-call { background: var(--orange); color: var(--on-orange); border-color: transparent; }
.button-call:hover { background: #EFA57A; color: var(--on-orange); }
.button-green { background: var(--green-dark); color: var(--white); }
.button-green:hover { background: var(--green-darker); color: var(--white); }
.button-outline { background: var(--white); color: var(--green-dark); border: 3px solid var(--green-dark); }
.button:disabled, .button[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }

.stacked-buttons { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }

/* ---------- Header and footer ---------- */

.site-header { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.1rem 1.25rem 1rem; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-decoration: none; }
.brand img { width: 15rem; max-width: 100%; height: auto; }
.brand-name { font-size: 1.6rem; font-weight: 800; line-height: 1.15; color: var(--green-dark); }

.site-footer { padding: 2.25rem 1.5rem 1.5rem; }
.site-footer img { width: 10rem; height: auto; }
.site-footer p { margin: 0.25rem 0; }
.footer-name { font-size: var(--text-large); font-weight: 800; color: var(--green-dark); }
.footer-phone { font-size: 1.45rem; font-weight: 800; }
.footer-links { display: flex; justify-content: center; gap: 1.25rem; flex-wrap: wrap; margin: 1rem 0 0.5rem; }
.footer-links a { padding: 0.6rem 0.25rem; }
.footer-small { font-size: 1rem; color: var(--ink-soft); }

.contact-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.75rem 0.75rem calc(0.9rem + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 2px solid var(--green-soft);
  box-shadow: 0 -4px 16px rgba(44, 104, 73, 0.12);
  z-index: 50;
}
.contact-bar .button { font-size: var(--text-base); }

/* ---------- Carousel ---------- */

.work { padding: 0 1rem; }
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 0.75rem;
  border-radius: 18px;
}
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; }
.slide img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  border: 3px solid var(--green-dark);
  background: var(--green-soft);
}
.slide figcaption { margin-top: 0.5rem; font-size: 1.1rem; color: var(--ink-soft); }
.carousel-controls {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) 4rem;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
}
.carousel-controls[hidden] { display: none; }
.carousel-status { margin: 0; font-weight: 700; }
.round-button {
  width: 4rem; height: 4rem;
  border-radius: 50%;
  border: 0;
  background: var(--green-dark);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.round-button .icon { width: 1.75rem; height: 1.75rem; }
.carousel-empty { padding: 2rem 1.25rem; border-radius: 18px; border: 3px solid var(--green-dark); background: var(--green-pale); }
.carousel-empty p { margin: 0.25rem 0; }

/* ---------- Sections ---------- */

.intro { padding: 2rem 1.25rem 0.5rem; }
.intro p { color: var(--ink-soft); margin: 0; }
.services { padding: 2.25rem 1rem 0.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.service-card { display: block; background: var(--white); border: 2px solid var(--green-soft); border-radius: 16px; padding: 1.2rem 1rem; color: var(--ink); text-decoration: none; }
.service-card:hover { border-color: var(--green-dark); color: var(--ink); }
.service-ask { display: block; margin-top: 0.35rem; font-weight: 800; color: var(--green-dark); text-decoration: underline; text-underline-offset: 0.15em; }
.service-card h3 { margin: 0; }
.service-card p { margin: 0.4rem 0 0; color: var(--ink-soft); }

/* ---------- Visit form ---------- */

.visit-panel {
  margin: 2.25rem 0.875rem 0;
  padding: 1.6rem 1.1rem;
  border-radius: 18px;
  background: var(--green-dark);
  color: var(--white);
  scroll-margin-top: 1rem;
}
.visit-panel h2 { color: var(--white); font-size: 1.75rem; }
.visit-panel p { color: var(--green-pale); }
.visit-panel a { color: var(--white); font-weight: 800; }
.visit-panel form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1rem; }

/* Address suggestions under an address box. In the page flow, not floating,
   so they never cover the next box on a small phone. */
.address-box { margin-top: 0.35rem; border-radius: 12px; background: var(--white); border: 2px solid var(--green-soft); overflow: hidden; text-align: left; }
.address-list { list-style: none; margin: 0; padding: 0; }
.address-option { padding: 0.85rem 1rem; min-height: 3rem; color: var(--ink); border-bottom: 1px solid var(--green-soft); cursor: pointer; text-align: center; }
.address-option:hover, .address-option[aria-selected="true"] { background: var(--green-pale); }
/* Google requires its name with the suggestions: Roboto 12 to 16px, one line, readable contrast. */
.address-box .address-credit { margin: 0; padding: 0.4rem 1rem; font-family: Roboto, Arial, sans-serif; font-size: 0.8rem; color: #5F6368; text-align: right; white-space: nowrap; }
.name-row { display: flex; flex-direction: column; gap: 1.1rem; }
@media (min-width: 30rem) { .name-row { flex-direction: row; } .name-row .field { flex: 1 1 0; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; text-align: center; }
.field label, .choice-group legend { font-weight: 700; color: var(--white); }
.field input, .field textarea {
  width: 100%;
  min-height: var(--button-height);
  padding: 0.85rem;
  border-radius: 10px;
  border: 3px solid var(--white);
  font: inherit;
  color: var(--ink);
  background: var(--white);
  text-align: center;
}
.field input[aria-invalid="true"] { border-color: var(--alert-red); }

.choice-group { border: 0; padding: 0; margin: 0; }
.choice-group legend { width: 100%; margin-bottom: 0.5rem; padding: 0; }
.choices { display: grid; gap: 0.6rem; }
.choices-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices-stack { grid-template-columns: 1fr; }
/* Tick boxes show an empty box when not ticked, so it is clear more than one can be picked. */
.choice input[type="checkbox"] + span::before { content: ""; display: inline-block; width: 1.1rem; height: 1.1rem; margin-right: 0.5rem; border: 2px solid currentColor; border-radius: 4px; }
.choice input[type="checkbox"]:checked + span::before { content: "\2713"; width: auto; height: auto; border: 0; margin-right: 0.35rem; }
.choices-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: flex; align-items: center; justify-content: center;
  min-height: var(--button-height);
  padding: 0.6rem 0.25rem;
  border-radius: 12px;
  border: 3px solid var(--white);
  font-weight: 700;
  color: var(--white);
}
/* Selected shows a check mark as well as the color change, so it never relies on color alone. */
.choice input:checked + span { background: var(--white); color: var(--green-dark); }
.choice input:checked + span::before { content: "\2713"; margin-right: 0.35rem; }
.choice input:focus-visible + span { outline: 3px solid var(--white); outline-offset: 3px; }

/* Scoped to the panel so it outranks ".visit-panel p", which would otherwise
   turn the error text pale green on white and make it unreadable. */
.visit-panel .field-error {
  margin: 0.4rem 0 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--white);
  color: var(--alert-red);
  font-weight: 700;
}
.form-alert {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--white);
  color: var(--alert-red);
  font-weight: 800;
}
.form-alert[hidden] { display: none; }
.form-fineprint { font-size: 1rem; margin: 0; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { display: flex; justify-content: center; }

.inline-phone { white-space: nowrap; }
/* A phone number split across two lines is easy to misread, so it stays whole. */
.site-header .button span { white-space: nowrap; }
/* Phone numbers on buttons: evenly spaced digits and a little air between
   them, so 4s, 1s and 6s do not run together for older eyes. */
.button-call span { font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }

/* ---------- Message and legal pages ---------- */

.message-page, .legal-page { padding: 1.5rem 1.25rem 1rem; }
.legal-page { text-align: left; }
.legal-page h1, .legal-page .legal-updated { text-align: center; }
.legal-page h2 { font-size: 1.35rem; margin-top: 1.75rem; }
.legal-updated { color: var(--ink-soft); }

/* ---------- Owner pages ---------- */

.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1rem; background: var(--green-dark); }
.admin-header h1 { margin: 0; color: var(--white); font-size: 1.35rem; }
.save-status { margin: 0; color: var(--green-pale); font-weight: 700; }
.admin-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: var(--page-width); margin: 0 auto; }
/* Four tabs: two rows of two on a phone so each word stays big, one row on a computer. */
.admin-tabs a { padding: 1rem; font-weight: 800; text-decoration: none; border-bottom: 4px solid transparent; }
.admin-tabs a[aria-current="page"] { border-bottom-color: var(--orange); color: var(--ink); }
.admin-main { padding: 1rem 1.1rem 2rem; display: flex; flex-direction: column; gap: 1rem; }
.admin-main.narrow { padding-top: 2rem; }
.admin-logo { margin: 0 auto; width: 12.5rem; height: auto; }
.admin-help { margin: 0; color: var(--ink-soft); }
.add-photo-button { font-size: 1.45rem; min-height: 4.25rem; }
.add-photo-button:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }

.caption-step { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; border-radius: 16px; background: var(--white); border: 2px solid var(--green-soft); }
.caption-step[hidden] { display: none; }
.caption-step img { border-radius: 12px; max-height: 14rem; object-fit: cover; }
.caption-step label { font-weight: 700; }
.caption-step input { min-height: var(--button-height); padding: 0.85rem; border-radius: 10px; border: 2px solid var(--ink-soft); font: inherit; }

.undo-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.85rem 1rem; border-radius: 14px; background: var(--ink); color: var(--white); text-align: left; font-weight: 700; }
.undo-bar[hidden] { display: none; }
.undo-bar .button { min-height: 3rem; padding: 0.5rem 1rem; font-size: 1.1rem; }

.photo-list, .removed-list, .request-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.photo-card { background: var(--white); border: 2px solid var(--green-soft); border-radius: 18px; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.65rem; }
.photo-row { display: flex; align-items: center; gap: 0.75rem; }
.photo-number { flex: 0 0 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--green-dark); color: var(--white); font-weight: 800; font-size: 1.35rem; display: flex; align-items: center; justify-content: center; }
.photo-row img { flex: 1 1 auto; min-width: 0; height: 7rem; object-fit: cover; border-radius: 12px; }
.photo-caption { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }
.photo-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.photo-actions .button { font-size: 1rem; padding: 0.5rem 0.2rem; min-height: 3.25rem; border-width: 2px; }
.button-remove { background: var(--white); color: var(--alert-red); border: 2px solid var(--alert-red); }

.removed-section { margin-top: 1rem; padding: 1.1rem 0.9rem; border-radius: 18px; background: var(--cream-deep); }
.removed-section h2 { color: var(--ink); font-size: 1.35rem; }
.removed-section p { margin: 0.25rem 0 0.75rem; color: var(--ink-soft); font-size: 1.05rem; }
.removed-item { display: flex; align-items: center; gap: 0.6rem; background: var(--white); border-radius: 14px; padding: 0.6rem; }
.removed-item img { width: 4.5rem; height: 3.5rem; object-fit: cover; border-radius: 10px; }
.removed-item span { flex: 1 1 auto; text-align: left; font-weight: 700; font-size: 1.05rem; }
.removed-item .button { min-height: 3rem; font-size: 1rem; padding: 0.5rem 0.8rem; }

.request-card { background: var(--white); border: 2px solid var(--green-soft); border-radius: 18px; padding: 1rem; text-align: left; display: flex; flex-direction: column; gap: 0.5rem; }
.request-card h2 { margin: 0; font-size: 1.35rem; color: var(--ink); }
.request-card p { margin: 0; }
.request-status { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-weight: 800; font-size: 1rem; background: var(--green-pale); color: var(--green-dark); }
.request-status-new { background: var(--orange); color: var(--ink); }
.request-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.5rem; }
.request-actions .button { font-size: 1.05rem; min-height: 3.25rem; padding: 0.5rem; }
.schedule-step { display: flex; flex-direction: column; gap: 0.5rem; }
.schedule-step[hidden] { display: none; }
.schedule-step input { min-height: var(--button-height); padding: 0.75rem; border-radius: 10px; border: 2px solid var(--ink-soft); font: inherit; }

.admin-footer-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.admin-footer-actions form { margin: 0; }
.empty-note { color: var(--ink-soft); }
.error-note { color: var(--alert-red); font-weight: 800; }

/* Owner forms (Add a visit, invoices) use the same green panel as the
   customer form, so the look is familiar and the contrast already checked. */
.form-panel { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.25rem 1rem; border-radius: 18px; background: var(--green-dark); color: var(--white); text-align: center; }
.form-panel h2 { color: var(--white); font-size: 1.5rem; margin-bottom: 0.25rem; }
.form-panel label, .form-panel legend { font-weight: 700; color: var(--white); }
.form-panel > label { margin-top: 0.4rem; }
.form-panel input, .form-panel textarea, .form-panel select {
  width: 100%; min-height: var(--button-height); padding: 0.85rem; border-radius: 10px;
  border: 3px solid var(--white); font: inherit; color: var(--ink); background: var(--white); text-align: center;
}
.form-panel .error-note { color: var(--white); background: var(--alert-red); padding: 0.75rem; border-radius: 10px; margin: 0; }
.form-panel .button-outline { background: transparent; color: var(--white); border-color: var(--white); }
.form-panel .button-remove { background: var(--white); }
.invoice-lines { border: 0; padding: 0; margin: 0.4rem 0 0; display: flex; flex-direction: column; gap: 0.75rem; }
.invoice-lines legend { width: 100%; margin-bottom: 0.5rem; padding: 0; }
.line-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.line-item { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.85rem; border-radius: 14px; background: var(--green-darker); }
.line-item .button { min-height: 3rem; font-size: 1.05rem; }
.form-panel p { margin: 0; color: var(--green-pale); }
.form-panel .days-off-heading { margin-top: 1rem; }
.hours-rows { display: flex; flex-direction: column; gap: 0.6rem; }
.hours-row { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.8rem; border-radius: 14px; background: var(--green-darker); }
.form-panel .hours-row-name { margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--white); }
.hours-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.hours-times label { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 700; }
.hours-row.is-closed .hours-times { display: none; }
.days-off-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.days-off-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.6rem 0.8rem; border-radius: 12px; background: var(--white); color: var(--ink); font-weight: 700; }
.days-off-list .button { min-height: 2.75rem; padding: 0.4rem 0.8rem; font-size: 1rem; }
.confirm-step { display: flex; flex-direction: column; gap: 0.5rem; }
.form-total { margin: 0.5rem 0; font-size: 1.6rem; font-weight: 800; color: var(--white); }

/* Open / Closed for each day of Justin's hours: same look as the form choices. */
.hours-toggle {
  min-height: 3rem; border-radius: 12px; border: 3px solid var(--white); background: transparent;
  color: var(--white); font: inherit; font-weight: 800; cursor: pointer;
}
.hours-toggle[aria-pressed="true"] { background: var(--white); color: var(--green-dark); }
.hours-toggle[aria-pressed="true"]::before { content: "\2713"; margin-right: 0.35rem; }
.hours-toggle:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.repeat-pick { display: flex; flex-direction: column; gap: 0.35rem; }
.schedule-step select, .repeat-pick select {
  min-height: var(--button-height); padding: 0.6rem; border-radius: 10px; border: 2px solid var(--ink-soft);
  font: inherit; background: var(--white); color: var(--ink);
}
.warning-note { margin: 0; padding: 0.75rem 0.9rem; border-radius: 12px; background: var(--cream-deep); border: 2px solid var(--alert-red); color: var(--ink); font-weight: 700; }
.waiting-note { padding: 0.6rem 0.8rem; border-radius: 12px; background: #FDE9DC; font-weight: 700; }
.card-steps { display: flex; flex-direction: column; gap: 0.5rem; }
.card-steps:empty { display: none; }
.request-status-requested { background: var(--orange); color: var(--ink); }
.request-status-skipped { background: var(--cream-deep); color: var(--ink-soft); }
.visit-card.is-skipped { background: var(--cream-deep); }
.visit-card.is-skipped h3, .visit-card.is-skipped .visit-time { text-decoration: line-through; }
.visit-card.is-requested { border-color: var(--orange); border-width: 3px; }

/* ---------- Pick a time (customer form) ---------- */

.slot-picker { display: flex; flex-direction: column; gap: 0.75rem; }
.slot-help { margin: 0; }
.slot-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.slot-day-button {
  min-height: var(--button-height); padding: 0.5rem; border-radius: 12px; border: 3px solid var(--white);
  background: transparent; color: var(--white); font: inherit; font-weight: 800; cursor: pointer;
}
.slot-day-button[aria-pressed="true"] { background: var(--white); color: var(--green-dark); }
.slot-day-button[aria-pressed="true"]::before { content: "\2713"; margin-right: 0.35rem; }
.slot-day-button:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.slot-day { border: 0; padding: 0.9rem 0.6rem; margin: 0; border-radius: 14px; background: var(--green-darker); }
.slot-day legend { float: left; width: 100%; margin-bottom: 0.6rem; font-weight: 800; color: var(--white); }
.slot-day .choices { clear: both; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.slot-day .choice span { white-space: nowrap; }
.slot-call .choice span { border-style: dashed; }

/* ---------- Calendar ---------- */

.calendar { background: var(--white); border: 2px solid var(--green-soft); border-radius: 18px; padding: 0.9rem 0.6rem; display: flex; flex-direction: column; gap: 0.75rem; }
.calendar-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.calendar-top h2 { margin: 0; font-size: 1.45rem; }
.calendar-step { min-width: 3.5rem; padding: 0.4rem; font-size: 1.9rem; line-height: 1; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.3rem; }
.calendar-weekday { font-weight: 800; color: var(--ink-soft); font-size: 1rem; padding-bottom: 0.2rem; }
.calendar-day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0.2rem 0; border-radius: 10px; border: 2px solid transparent;
  background: var(--cream); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer;
}
.calendar-day.is-today { border-color: var(--green-dark); }
.calendar-day.is-selected { background: var(--green-dark); color: var(--white); }
.calendar-number { font-size: 1.1rem; line-height: 1.1; }
.calendar-count { min-width: 1.5rem; margin-top: 0.15rem; padding: 0 0.3rem; border-radius: 999px; background: var(--orange); color: var(--ink); font-size: 0.9rem; font-weight: 800; line-height: 1.4; }
.calendar-count-done { background: var(--green-pale); color: var(--green-dark); }
.calendar-count-waiting { outline: 2px solid var(--ink); }
.calendar-day.is-off { background: repeating-linear-gradient(135deg, var(--cream-deep) 0 6px, var(--cream) 6px 12px); color: var(--ink-soft); }
.calendar-day.is-off.is-selected { background: var(--green-dark); color: var(--white); }
.day-heading { margin: 0.5rem 0 0.25rem; font-size: 1.45rem; }
.visit-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.visit-time { font-size: 1.45rem; font-weight: 800; color: var(--green-dark); }
.visit-card h3, .invoice-card h3 { margin: 0; }
.visit-card.is-done { background: var(--cream-deep); }
.coming-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.coming-item {
  width: 100%; display: flex; flex-direction: column; gap: 0.1rem; padding: 0.8rem 1rem; border-radius: 14px;
  border: 2px solid var(--green-soft); background: var(--white); color: var(--ink); font: inherit; text-align: center; cursor: pointer;
}
.coming-when { font-weight: 800; color: var(--green-dark); }
.coming-item.is-waiting { border-color: var(--orange); border-width: 3px; }

/* ---------- Invoices (Justin's page) ---------- */

.owed-card { padding: 1rem; border-radius: 18px; background: var(--white); border: 2px solid var(--green-soft); }
.owed-card p { margin: 0; font-weight: 700; color: var(--ink-soft); }
.owed-card .owed-total { font-size: 1.9rem; font-weight: 800; color: var(--green-dark); }
.request-status-unpaid { background: var(--orange); color: var(--ink); }
.request-status-void { background: var(--cream-deep); color: var(--ink-soft); }
.paid-methods { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.85rem; border-radius: 14px; background: var(--green-pale); }
.paid-question { font-weight: 800; text-align: center; }
.invoice-card.is-new { border-color: var(--green-dark); box-shadow: 0 0 0 3px var(--green-soft); }

/* ---------- Invoice (customer's page) ---------- */

.invoice-page { padding: 1.5rem 1.25rem 2.5rem; display: flex; flex-direction: column; gap: 1rem; }
.invoice-head { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.invoice-head img { width: 12.5rem; }
.invoice-head p { margin: 0; }
.invoice-business { font-size: 1.45rem; font-weight: 800; color: var(--green-dark); }
.invoice-page h1 { margin: 0.5rem 0 0; }
.invoice-status { margin: 0; padding: 0.85rem 1rem; border-radius: 14px; font-size: 1.3rem; font-weight: 800; }
.invoice-status-due { background: var(--orange); color: var(--ink); }
.invoice-status-paid { background: var(--green-dark); color: var(--white); }
.invoice-status-void { background: var(--cream-deep); color: var(--ink); }
.invoice-details p { margin: 0.2rem 0; }
.invoice-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 14px; overflow: hidden; }
.invoice-table th, .invoice-table td { padding: 0.8rem; border-bottom: 1px solid var(--green-soft); text-align: left; }
.invoice-table thead th { background: var(--green-pale); color: var(--green-dark); }
.invoice-table .invoice-amount { text-align: right; white-space: nowrap; }
.invoice-table tfoot th, .invoice-table tfoot td { font-size: 1.35rem; font-weight: 800; border-bottom: 0; }
.invoice-note { margin: 0; padding: 0.85rem 1rem; border-radius: 14px; background: var(--white); text-align: left; }
.invoice-pay h2 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.invoice-pay p { margin: 0.2rem 0; }
.invoice-actions { display: flex; flex-direction: column; gap: 0.75rem; }
.invoice-thanks { margin: 0; color: var(--ink-soft); }
.invoice-questions { margin: 0.5rem 0 0; font-weight: 700; }
.button-call span { white-space: nowrap; }
.invoice-card .visit-top { flex-wrap: wrap; }
.visit-time { white-space: nowrap; }

@media print {
  body { background: #FFFFFF; }
  .invoice-actions, .skip-link { display: none !important; }
  .invoice-page { padding: 0; }
  .invoice-status-due, .invoice-status-paid { background: #FFFFFF; color: #000000; border: 2px solid #000000; }
}

/* ---------- Bigger screens ---------- */

@media (min-width: 52rem) {
  :root { --page-width: 60rem; }
  h1 { font-size: 2.6rem; }
  /* The header gets more room than the content column so the logo, the full
     name and the call button sit on one line without squeezing each other. */
  .site-header { flex-direction: row; justify-content: space-between; gap: 2rem; max-width: 86rem; padding: 1.25rem 2rem; }
  .brand { flex-direction: row; gap: 1rem; }
  /* Logo and name grow with the screen so the header row is filled, not a
     small logo on the left and a lone button on the right. */
  .brand { gap: 1.25rem; }
  .brand img { width: clamp(10rem, 15vw, 14rem); }
  .brand-name { font-size: clamp(2rem, 3.2vw, 2.9rem); }
  .site-header .button-call { font-size: clamp(1.3rem, 1.8vw, 1.6rem); padding: 1rem 1.75rem; }
  .site-header .button-wide { width: auto; flex: 0 0 auto; }
  .intro .stacked-buttons { flex-direction: row; }
  .admin-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .slot-day .choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calendar-day { min-height: 4.25rem; }
  .work { max-width: 46rem; margin: 0 auto; }
  .services { flex-direction: row; flex-wrap: wrap; }
  .services h2 { flex: 1 0 100%; }
  .service-card { flex: 1 1 0; }
  .visit-panel { margin: 2.5rem auto 0; max-width: 40rem; }
  body.has-contact-bar { padding-bottom: 0; }
  .contact-bar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } /* user preference must win */
}
