/* Hallmark · theme: custom · genre: playful · posture: restrained · shape: single column · redesign: restyle · hero: settled · job: book one night with a sitter · nav: the logo band, with four page links under it on Sonya's side · footer: two lines, the area she serves and the booking link · surface: absolute */
/* Phone first at 390 px, then a 720 px column. Cream paper, white panels, navy ink, one open night per card. */
/* Hallmark · waive 7b · surface: absolute, named in the stamp · the brand sheet lists white beside the cream as a page colour, so panels, fields and button labels take --white from the token block. */
/* Hallmark · waive 90a · src/views holds server-rendered Hono views and no component folder · each page writes its own form and its own buttons, so there is no shared build for the book and pay controls to sit in. */
/* Hallmark · dismissed 70 · each state line on /b and /sonya is read from the booking row when the page is built, so nothing prints a success no request earned. */
/* Hallmark · answered F1 · this client writes every page, email and message with straight quotes. */

/* The two families, copied from clients/sonya-on-site/logo/fonts and served from
   this origin, so no page asks another site for a font. Fredoka carries the page
   heading and the wordmark, Nunito carries everything else. */
@font-face {
  font-family: "SOS Fredoka";
  src: url("/fonts/Fredoka-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-var.ttf") format("truetype");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

/* The brand sheet in variables. Nothing outside this block names a colour.
   --navy-deep is navy at 80 percent, for hover and pressed fills. --error is
   6.3 on the cream and 5.5 on the pink surface. --muted is 6.4 on the cream, for
   hours and hints. --line is the hairline on a panel, --edge the stronger line a
   field needs to be seen at all. The soft tints carry navy text; sky and pink
   stay on surfaces and never stand in for type. */
:root {
  color-scheme: light;
  --navy: #304C82;
  --sky: #8BC3F1;
  --pink: #FBC4CF;
  --white: #FFFFFF;
  --cream: #FFF8F2;
  --navy-deep: #263D68;
  --error: #A8322A;
  --muted: #4A5C7A;
  --line: #E6DCD1;
  --edge: #64748F;
  --sky-soft: #DCEBFB;
  --pink-soft: #FBE3EA;
  --ink: var(--navy);
  --panel: var(--white);
  --font-display: "SOS Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
  --radius-card: 14px;
  --radius-control: 10px;
  --radius-field: 8px;
  --shadow: 0 2px 12px rgba(48, 76, 130, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  scrollbar-color: var(--sky) var(--cream);
  -webkit-text-size-adjust: 100%;
}

::selection {
  background: var(--pink);
  color: var(--navy);
}

.site-head {
  background: var(--white);
  border-bottom: 3px solid var(--sky);
  padding: 0.9rem 1.1rem;
}

/* The logo and the column it sits in line up with the page under it. */
.brand {
  display: block;
  max-width: 45rem;
  margin: 0 auto;
}

.brand img {
  display: block;
  height: 3rem;
  width: auto;
}

/* The wordmark on Sonya's own pages, where her logo is not shown. */
.brand-name {
  max-width: 45rem;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
}

main {
  max-width: 45rem;
  margin: 0 auto;
  padding: 1.4rem 1.1rem 3rem;
}

h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 0.7rem;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.4rem;
  font-weight: 700;
  text-wrap: balance;
  overflow-wrap: break-word;
}

p {
  margin: 0 0 0.9rem;
}

a {
  color: var(--ink);
}

/* The first line under a page title, one step up from the rest. */
.lede {
  font-size: 1.125rem;
  max-width: 55ch;
}

.booked-time,
.rule-note {
  color: var(--muted);
}

.booked-time {
  font-size: 1.125rem;
  margin: 0 0 1.2rem;
}

.site-foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 45rem;
  margin: 0 auto;
  padding: 1.1rem;
}

.site-foot p {
  margin: 0 0 0.3rem;
}

/* Buttons, links and form buttons made to look the same and to sit one under
   the next on a phone. */
.actions {
  display: grid;
  gap: 0.6rem;
  margin: 1.2rem 0;
}

.contact {
  display: grid;
  gap: 0.6rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-control);
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
}

/* The second voice: the same shape, filled with the panel instead of the ink. */
.btn-quiet {
  background: var(--panel);
  color: var(--navy);
}

.btn:hover {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
}

.btn-quiet:hover {
  background: var(--sky-soft);
  border-color: var(--navy);
}

.btn:active {
  background: var(--navy-deep);
}

.btn-quiet:active {
  background: var(--sky);
}

button:disabled,
.btn:disabled {
  background: var(--muted);
  border-color: var(--muted);
  color: var(--white);
  cursor: not-allowed;
  opacity: 0.6;
}

button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 120ms ease-out, border-color 120ms ease-out;
}

button:hover {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
}

.pay button {
  background: var(--white);
  color: var(--ink);
}

/* One rule for every focus, shown at once and drawn outside the control. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

.hours,
.nights,
.bookings,
.dates,
.pay {
  list-style: none;
  margin: 0.4rem 0 1rem;
  padding: 0;
}

.hours li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.hours li:last-child {
  border-bottom: 0;
}

.hours li span:first-child {
  font-weight: 600;
}

.hours li span:last-child {
  color: var(--muted);
  text-align: right;
}

/* The main object on /book: one open night per card, tall enough for a thumb,
   the night named first and her hours for it under the name. */
.nights li {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.nights a {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  transition: background-color 120ms ease-out;
}

.nights a:hover {
  background: var(--sky-soft);
}

.nights a:active {
  background: var(--sky);
}

.night-name {
  font-weight: 600;
}

.night-hours {
  color: var(--muted);
  white-space: nowrap;
}

.notice {
  border: 1px solid var(--line);
  background: var(--pink-soft);
  border-radius: var(--radius-field);
  padding: 0.7rem 0.9rem;
  margin: 0 0 1rem;
}

/* Only what a page says went wrong is set in the red. */
.notice[role="alert"] {
  border-color: var(--error);
  color: var(--error);
}

.status {
  font-weight: 600;
}

form {
  margin: 0 0 1.2rem;
}

label {
  display: block;
  margin: 1rem 0 0.25rem;
  font-weight: 600;
}

/* A ticked box is one tap along its whole row. */
label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius-field);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  caret-color: var(--navy);
}

input[type="checkbox"] {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  min-height: 0;
  padding: 0;
  accent-color: var(--navy);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--navy);
}

textarea {
  min-height: 6rem;
}

.times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.8rem 0;
}

.times label {
  margin: 0.4rem 0 0.25rem;
}

/* One labelled control, its help line and the gap to the next one. */
.field {
  margin: 0 0 0.9rem;
}

.field label {
  margin-top: 0;
}

.field .hint {
  margin-bottom: 0;
}

/* A card on the cream: white, hairline, one soft shadow, 14 px corners. */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem 1rem;
  margin: 0 0 1rem;
}

.panel > :first-child {
  margin-top: 0;
}

.panel > :last-child {
  margin-bottom: 0;
}

.pay li {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom: 0.8rem;
  padding: 0.9rem;
}

.pay .method {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pay .copy {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  padding: 0.5rem 0.6rem;
  margin: 0 0 0.6rem;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}

.pay .hint,
.hint,
.rule-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.hold .pay {
  margin-top: 0.9rem;
}

/* The held booking: the money is the largest thing on the page, and the pay
   buttons follow it straight away. */
.amount {
  border-radius: var(--radius-card);
  background: var(--pink);
  color: var(--navy);
  padding: 0.9rem 1rem;
  margin: 0 0 0.8rem;
  font-size: 2.4rem;
  line-height: 1.15;
  text-wrap: balance;
}

.details,
.family {
  border-top: 1px solid var(--line);
  margin: 1.4rem 0;
}

.details > div,
.family > div {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.details dt,
.family dt {
  flex: 0 0 40%;
  max-width: 9rem;
  color: var(--muted);
}

.details dd,
.family dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* What the parent typed in her own words sits apart from the rows of values. */
.details .note,
.family .note {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  padding: 0.5rem 0.6rem;
}

/* Sonya's own pages, on her phone between jobs. */
.sonya main {
  padding-top: 0.9rem;
}

.group:first-of-type h2 {
  margin-top: 0.4rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 45rem;
  margin: 0 auto;
  padding: 0.4rem 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.tabs a {
  display: flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 0.7rem;
  border-radius: var(--radius-field) var(--radius-field) 0 0;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.tabs a:hover,
.tabs a[aria-current="true"] {
  background: var(--sky-soft);
  color: var(--navy);
}

.booking {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem 1rem;
  margin-bottom: 0.8rem;
}

.booking .when,
.booking .money {
  font-weight: 700;
  margin: 0 0 0.2rem;
}

.booking .state {
  color: var(--muted);
  margin: 0;
}

.booking .family {
  margin: 0.8rem 0;
}

.booking-actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.booking-actions form {
  margin: 0;
}

.family-page {
  margin: 0.8rem 0 0;
}

/* Her week, and the dates she changed by hand. */
.day {
  border-top: 1px solid var(--line);
  padding: 0.5rem 0 0.9rem;
}

.day-name {
  font-weight: 700;
  margin: 0.4rem 0 0;
}

.dates li {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0;
}

.dates .date {
  font-weight: 700;
  white-space: nowrap;
  margin: 0;
}

.dates .state {
  color: var(--muted);
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.dates form {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
}

.dates .btn {
  width: auto;
  min-height: 3rem;
  padding: 0.5rem 0.9rem;
}

.feed {
  overflow-wrap: anywhere;
}

.sign-out {
  max-width: 45rem;
  margin: 0 auto;
  padding: 0 1.1rem 2.4rem;
}

@media (min-width: 30rem) {
  .nights a {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 40rem) {
  .contact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .booking-actions {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
