/* ALLRAYA scheduler. One type family (Atkinson Hyperlegible, designed for low-vision readers),
   navy for trust and action, the brand's sun gold for selection and highlights. */
:root {
  --navy: #1d3557;
  --navy-2: #284a73;
  --gold: #f2c14e;
  --gold-soft: #fcf1d2;
  --gold-ink: #7a5600;
  --sky: #eef2f6;
  --paper: #ffffff;
  --ink: #1f2d3d;
  --muted: #52606d;
  --line: #d5dde5;
  --ok: #2e7d4f;
  --ok-soft: #e3f3ea;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius-s: 6px;
  --radius-m: 12px;
  --font: 'Atkinson Hyperlegible', 'Segoe UI', Arial, sans-serif;
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--navy);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--sky); font-size: 19px; line-height: 1.55; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-2); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-s); }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.narrow { max-width: 680px; margin: 0 auto; padding: 32px 16px 64px; }
.prose { background: var(--paper); border-radius: var(--radius-m); padding: 28px; margin-top: 32px; }
.stack > * + * { margin-top: 14px; }

/* ---------- brand header ---------- */
.brand-bar { background: var(--navy); color: #fff; }
.brand-bar .inner { max-width: 680px; margin: 0 auto; padding: 18px 16px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { display: inline-block; color: var(--gold); text-decoration: none; font-weight: 700; font-size: 1.6rem; letter-spacing: .02em; line-height: 1; padding-top: .45em; }
.wordmark:hover { color: var(--gold); }
.sun-a { position: relative; display: inline-block; }
.sun-a svg { position: absolute; left: 50%; bottom: 72%; width: 1.25em; height: .7em; transform: translateX(-50%); }
.brand-bar .contact { color: #dfe7f1; font-size: .9rem; text-align: right; }
.brand-bar .contact a { color: #fff; }
.tagline { color: #c6d3e3; font-size: .85rem; margin-top: 4px; }

/* ---------- buttons and fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 24px; border: 2px solid var(--navy);
  background: var(--navy); color: #fff; font: inherit; font-weight: 700; border-radius: var(--radius-s); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn.secondary { background: var(--paper); color: var(--navy); }
.btn.secondary:hover { background: var(--sky); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.link { background: none; border: none; color: var(--navy); text-decoration: underline; min-height: 0; padding: 4px 2px; font-weight: 400; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.small-btn { min-height: 40px; padding: 6px 14px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }

label.field, .field { display: block; margin-bottom: 18px; }
.field > span, .label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .help { display: block; color: var(--muted); font-size: .88em; margin: -2px 0 6px; font-weight: 400; }
.req { color: var(--danger); font-weight: 700; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 2px solid #9aa9b8; border-radius: var(--radius-s); padding: 12px 14px; min-height: 52px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(29, 53, 87, .2); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-s); background: #fff; cursor: pointer; margin-bottom: 10px; }
.check input { width: 26px; height: 26px; flex: none; margin: 1px 0 0; accent-color: var(--navy); }
.check:has(input:checked) { border-color: var(--navy); background: #f5f8fc; }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-row .check { margin: 0; min-width: 110px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }

.notice { border-radius: var(--radius-s); padding: 14px 16px; margin: 0 0 18px; background: var(--gold-soft); border-left: 6px solid var(--gold); }
.notice.error { background: var(--danger-soft); border-left-color: var(--danger); }
.notice.ok { background: var(--ok-soft); border-left-color: var(--ok); }

/* ---------- booking flow ---------- */
.book-main { max-width: 680px; margin: 0 auto; padding: 20px 16px 72px; }
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 22px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); counter-reset: s; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 6px; padding-right: 10px; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; border: 2px solid var(--line); background: #fff; font-weight: 700; font-size: .78rem; }
.steps li.done::before { background: var(--navy); border-color: var(--navy); color: #fff; content: '\2713'; }
.steps li.now { color: var(--ink); font-weight: 700; }
.steps li.now::before { border-color: var(--gold); background: var(--gold); color: var(--navy); }
.panel { background: var(--paper); border-radius: var(--radius-m); padding: 26px 24px; }
@media (max-width: 560px) { .panel { padding: 20px 16px; } }
.panel > h1 { font-size: 1.55rem; }
.summary-chip { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .9rem; color: var(--muted); margin: -6px 0 18px; }
.summary-chip span + span::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin: 0 10px 2px; vertical-align: middle; }
.summary-chip strong { color: var(--ink); }
.nowrap { white-space: nowrap; }
.steps .step-count { display: none; }
@media (max-width: 560px) {
  .steps li:not(.now):not(.step-count) { display: none; }
  .steps .step-count { display: block; margin-left: auto; color: var(--muted); font-weight: 400; }
  .steps .step-count::before { display: none; }
}

.choice-list { display: grid; gap: 12px; }
.choice { display: flex; align-items: center; gap: 16px; text-align: left; width: 100%; padding: 16px; font: inherit; color: inherit;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius-m); cursor: pointer; }
.choice:hover { border-color: var(--navy); }
.choice[aria-pressed=true] { border-color: var(--navy); box-shadow: inset 0 0 0 2px var(--gold); }
.choice .title { font-weight: 700; font-size: 1.08rem; display: block; }
.choice .sub { color: var(--muted); font-size: .9rem; display: block; }
.avatar { width: 64px; height: 64px; border-radius: 50%; flex: none; object-fit: cover; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; }
.mode-icon { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--sky); display: grid; place-items: center; color: var(--navy); }
.cat-head { font-size: .95rem; color: var(--muted); margin: 18px 0 8px; font-weight: 700; }
.cat-head:first-child { margin-top: 0; }

/* the time picker: a strip of day tiles under a sunrise line */
.day-strip-wrap { display: flex; align-items: stretch; gap: 8px; margin-bottom: 18px; }
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; flex: 1; }
.day { font: inherit; border: 2px solid var(--line); border-radius: var(--radius-m); background: #fff; padding: 8px 2px 10px; cursor: pointer; color: var(--ink); text-align: center; position: relative; }
.day .dow { display: block; font-size: .78rem; color: var(--muted); }
.day .num { display: block; font-size: 1.35rem; font-weight: 700; line-height: 1.15; }
.day .mon { display: block; font-size: .72rem; color: var(--muted); }
.day .dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin: 4px auto 0; }
.day[disabled] { background: transparent; border-style: dashed; color: #9aa5b1; cursor: default; }
.day[disabled] .num { color: #9aa5b1; }
.day[aria-pressed=true] { border-color: var(--navy); background: var(--navy); color: #fff; }
.day[aria-pressed=true] .dow, .day[aria-pressed=true] .mon { color: #dbe4ef; }
.strip-nav { font: inherit; width: 44px; border: 2px solid var(--line); background: #fff; border-radius: var(--radius-m); cursor: pointer; color: var(--navy); font-size: 1.3rem; }
.strip-nav[disabled] { opacity: .35; cursor: default; }
@media (max-width: 560px) { .day .mon { display: none; } .day { padding: 6px 0 8px; } .day .num { font-size: 1.15rem; } .strip-nav { width: 34px; } }
.time-group h3 { font-size: .95rem; color: var(--muted); margin: 16px 0 8px; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.time { font: inherit; font-weight: 700; min-height: 52px; border: 2px solid var(--navy); background: #fff; color: var(--navy); border-radius: var(--radius-s); cursor: pointer; }
.time:hover { background: var(--sky); }
.time[aria-pressed=true] { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.sunline { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--gold), #f7d98b); margin: -4px 0 18px; }
.empty { text-align: center; padding: 26px 12px; color: var(--muted); }

.form-block { border-top: 2px solid var(--sky); margin-top: 22px; padding-top: 18px; }
.form-block h2 { font-size: 1.15rem; }
.agreement-text { max-height: 220px; overflow: auto; background: var(--sky); border-radius: var(--radius-s); padding: 14px 16px; font-size: .9rem; white-space: pre-wrap; margin-bottom: 10px; }
.review { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.review th { text-align: left; color: var(--muted); font-weight: 400; padding: 8px 14px 8px 0; vertical-align: top; width: 7.5em; }
.review td { padding: 8px 0; font-weight: 700; }
.review tr + tr { border-top: 1px solid var(--sky); }
.big-check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin-bottom: 14px; }
.staff-banner { background: var(--gold); color: var(--navy); font-size: .9rem; padding: 8px 16px; text-align: center; font-weight: 700; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 28px; }
.foot a { color: var(--muted); }

/* ---------- portal ---------- */
.portal-body { font-size: 16px; }
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.topbar .inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 18px; min-height: 60px; flex-wrap: wrap; }
.topbar .wordmark { font-size: 1.3rem; padding-top: .35em; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.tabs button { font: inherit; background: none; border: none; color: #c9d6e6; padding: 18px 12px 15px; cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button:hover { color: #fff; }
.tabs button[aria-selected=true] { color: #fff; border-bottom-color: var(--gold); font-weight: 700; }
.topbar .who { font-size: .85rem; color: #c9d6e6; display: flex; align-items: center; gap: 10px; }
.topbar .who button { color: #fff; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 16px 64px; }
.card { background: var(--paper); border-radius: var(--radius-m); padding: 20px; margin-bottom: 18px; }
.card > h2:first-child { margin-top: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.toolbar .field { margin: 0; }
.toolbar input, .toolbar select { min-height: 42px; padding: 8px 10px; }
.portal-body input[type=text], .portal-body input[type=email], .portal-body input[type=tel], .portal-body input[type=date], .portal-body input[type=time],
.portal-body input[type=number], .portal-body input[type=url], .portal-body select, .portal-body textarea { min-height: 42px; padding: 8px 10px; border-width: 1.5px; }
.portal-body .btn { min-height: 42px; padding: 8px 16px; }
.portal-body .check { padding: 8px 10px; }
.portal-body .check input { width: 20px; height: 20px; }
.day-head { font-weight: 700; margin: 22px 0 8px; display: flex; justify-content: space-between; align-items: baseline; }
.day-head:first-child { margin-top: 0; }
.appt { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; background: #fff; border: 1.5px solid var(--line);
  border-left: 6px solid var(--navy); border-radius: var(--radius-s); margin-bottom: 8px; cursor: pointer; width: 100%; text-align: left; font: inherit; color: inherit; }
.appt:hover { border-color: var(--navy); }
.appt.cancelled { border-left-color: #9aa5b1; opacity: .7; }
.appt.cancelled .name { text-decoration: line-through; }
.appt.completed { border-left-color: var(--ok); }
.appt.no_show { border-left-color: var(--danger); }
.appt .time-col { font-weight: 700; }
.appt .name { font-weight: 700; }
.pill { display: inline-block; font-size: .78rem; padding: 2px 9px; border-radius: 999px; background: var(--sky); color: var(--navy); margin-right: 4px; white-space: nowrap; }
.pill.gold { background: var(--gold-soft); color: var(--gold-ink); }
.pill.red { background: var(--danger-soft); color: var(--danger); }
.pill.green { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 640px) { .appt { grid-template-columns: 1fr; gap: 4px; } }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 27, 43, .45); z-index: 30; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--paper); z-index: 31; overflow-y: auto; padding: 22px 22px 60px; box-shadow: -8px 0 24px rgba(15, 27, 43, .18); }
.drawer .close { float: right; }
.kv { border-collapse: collapse; width: 100%; margin-bottom: 12px; }
.kv th { text-align: left; font-weight: 400; color: var(--muted); padding: 6px 12px 6px 0; vertical-align: top; width: 34%; }
.kv td { padding: 6px 0; vertical-align: top; }
.kv tr + tr { border-top: 1px solid var(--sky); }
table.grid { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.grid th { text-align: left; color: var(--muted); font-weight: 400; border-bottom: 1.5px solid var(--line); padding: 8px 10px 8px 0; }
table.grid td { border-bottom: 1px solid var(--sky); padding: 10px 10px 10px 0; vertical-align: top; }
.hours-day { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--sky); }
.hours-ranges { display: flex; flex-direction: column; gap: 6px; }
.hours-range { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hours-range input { width: 130px; }
.q-row { border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 12px; margin-bottom: 10px; background: #fbfcfd; }
.q-row .q-top { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 640px) { .q-row .q-top { grid-template-columns: 1fr; } }
.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: var(--radius-s); z-index: 50; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.error { background: var(--danger); }

/* ---------- printable SOA ---------- */
.print-page { background: #fff; }
.soa-list { list-style: none; padding: 0; }
.soa-list li { margin: 6px 0; }
@media print { .no-print { display: none; } .prose { padding: 0; margin: 0; } body { font-size: 12pt; } }

/* ---------- lobby screen ---------- */
.lobby { background: var(--navy); color: #fff; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.lobby header { padding: 4vh 5vw 0; display: flex; justify-content: space-between; align-items: center; }
.lobby .wordmark { font-size: 4.5vh; }
.lobby .clock { font-size: 3.2vh; color: #c9d6e6; }
.lobby main { display: grid; place-items: center; text-align: center; padding: 0 5vw; }
.lobby .sun { width: 40vh; max-width: 70vw; display: block; margin: 0 auto 2vh; }
.lobby .hello { font-size: 4vh; color: var(--gold); margin: 0; }
.lobby .names { font-size: 11vh; line-height: 1.1; font-weight: 700; margin: 1vh 0 2vh; }
.lobby .names .name + .name::before { content: '& '; color: var(--gold); }
.lobby .sub { font-size: 3.4vh; color: #dbe4ef; }
.lobby footer { padding: 0 5vw 4vh; font-size: 2.6vh; color: #9fb3cc; text-align: center; }
@media (prefers-reduced-motion: no-preference) { .lobby .names { animation: rise 900ms ease-out both; } }
@keyframes rise { from { opacity: 0; transform: translateY(3vh); } to { opacity: 1; transform: none; } }

/* profile photo */
.photo-row { display: flex; gap: 18px; align-items: center; margin: 4px 0 18px; }
.avatar.photo-lg { width: 96px; height: 96px; font-size: 1.8rem; }
.avatar { object-position: center; }
