/* Direction 2a · Clean & calm · Pro. Tokens and shared components; page files add only their own layout. */
:root {
  --bg: #F4F6F9; --surface: #fff; --line: #E4E8EE; --line-soft: #EEF1F5; --field: #D0D7E2;
  --ink: #0F1B2D; --text: #1D2939; --text-2: #344054; --muted: #475467; --faint: #667085; --off: #98A2B3;
  --blue: #1A5FD0; --blue-soft: #EEF4FD; --blue-line: #CFE0F8; --blue-ink: #173A73;
  --green: #0E7F41; --green-soft: #E7F6EE; --green-ok: #0E8A4F; --green-ink: #0E7A44;
  --red: #C4320A; --red-text: #B42318; --red-soft: #FDEDE7;
  --star: #B87A00; --navy: #0F1B2D; --navy-text: #C9D3E1;
  --r-sm: 10px; --r: 12px; --r-lg: 16px;
  --shadow-card: 0 10px 30px rgba(15, 27, 45, .12);
  --shadow-blue: 0 4px 12px rgba(26, 95, 208, .3);
  --shadow-green: 0 4px 12px rgba(18, 140, 74, .3);
  --wrap: 1100px; --page: 720px; /* every inner page (forms, Reviews, Contact, Terms) and its title bar share this width */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 'DM Sans', system-ui, sans-serif;
  /* Footer stays at the bottom of the screen on short pages. */
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
main:focus { outline: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Icons: Material Symbols Rounded, written as <span class="i">name</span> */
.i { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 22px; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; flex: none; user-select: none; }
.i.fill { font-variation-settings: 'FILL' 1; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 16px 0 20px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; }
.brand .mark .i { font-size: 20px; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
.top nav { display: none; gap: 30px; font-size: 16px; font-weight: 600; color: var(--text-2); }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.top nav a[aria-current="page"] { color: var(--blue); }
.chat { display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 14px; border-radius: 10px; border: 1.5px solid #CFE7DA; background: #F1FAF5; color: var(--green-ink); font-size: 16px; font-weight: 700; text-decoration: none; }
.chat .full { display: none; }

/* Footer */
.foot { padding: 24px 20px 28px; background: var(--navy); color: var(--navy-text); display: flex; flex-direction: column; gap: 14px; font-size: 16px; }
.foot .brand { color: #fff; font-size: 17px; }
.foot .brand .mark { width: 26px; height: 26px; border-radius: 7px; }
.foot .brand .mark .i { font-size: 18px; }
.foot a:not(.brand) { color: #fff; font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.foot .links { display: flex; flex-direction: column; gap: 2px; }

/* Page bar: back button, title, optional step progress */
.bar { position: sticky; top: 0; z-index: 15; background: #fff; border-bottom: 1px solid var(--line); padding: 0 12px; }
.bar-row { display: flex; align-items: center; gap: 6px; height: 64px; }
.bar h1 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.bar .sub { font-size: 14px; color: var(--muted); }
.back { width: 48px; height: 48px; border: 0; background: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.back .i { font-size: 24px; }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 0 8px 14px; }
.steps span { height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--blue); }
/* Phones: form and detail screens show only their own page bar, as in the design; the site header returns at 900px. */
@media (max-width: 899px) { body.has-bar .top { display: none; } }

/* Layout */
.page { padding: 14px 12px 20px; display: flex; flex-direction: column; gap: 12px; max-width: var(--page); margin: 0 auto; width: 100%; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 16px; display: flex; flex-direction: column; gap: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; margin: 0; }
.badge-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.badge-ic .i { font-size: 20px; }
.h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.title-xl { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.muted { color: var(--muted); }
.cap { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 16px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea { width: 100%; min-height: 56px; padding: 0 14px; border: 1.5px solid var(--field); border-radius: var(--r); background: #fff; font-size: 17px; }
.textarea { min-height: 120px; padding: 14px; line-height: 1.5; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus, .phone:focus-within { outline: none; border: 2px solid var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23475467'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 44px; }
.phone { display: flex; align-items: stretch; min-height: 56px; border: 1.5px solid var(--field); border-radius: var(--r); overflow: hidden; background: #fff; font-size: 17px; }
.phone .cc { display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--bg); border-right: 1px solid var(--line); font-weight: 600; flex: none; }
.phone input { flex: 1; min-width: 0; border: 0; padding: 0 14px; font-size: 17px; background: transparent; }
.phone input:focus { outline: none; }
.hint { font-size: 14px; color: var(--muted); }
.err { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--red-text); font-weight: 600; }
.err .i { font-size: 18px; }
.field.bad .input, .field.bad .textarea, .field.bad .select, .field.bad .phone { border: 2px solid var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.field.good .ok { color: var(--green-ok); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 20px; border-radius: var(--r); border: 0; background: var(--blue); color: #fff; font-size: 17px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow-blue); }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--field); box-shadow: none; }
.btn.wa { background: var(--green); box-shadow: var(--shadow-green); min-height: 58px; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--line); color: #5B6472; box-shadow: none; cursor: not-allowed; }
.btn.ghost:disabled { background: #fff; border-color: var(--line); }
.btn.busy { opacity: .7; pointer-events: none; }
.link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--blue); font-weight: 700; text-decoration: none; background: none; border: 0; padding: 0; font-size: 16px; }

/* Stepper */
.stepper { display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 0 6px 0 14px; border: 1.5px solid var(--field); border-radius: var(--r); }
.stepper .name { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.stepper .name .i { color: var(--muted); }
.stepper .ctl { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 48px; height: 48px; border-radius: 10px; border: 1.5px solid var(--field); background: #fff; color: var(--blue); font-size: 24px; display: flex; align-items: center; justify-content: center; }
.stepper button:disabled { color: var(--off); cursor: not-allowed; }
.stepper output { min-width: 32px; text-align: center; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; border: 1.5px solid var(--field); border-radius: var(--r); }
.stack > .stepper { border: 0; border-radius: 0; }
.stack > * + * { border-top: 1px solid var(--line) !important; }

/* Choice tiles (radio groups) */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border: 0; padding: 0; margin: 0; }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 8px; border: 1.5px solid var(--field); border-radius: var(--r); background: #fff; font-size: 16px; font-weight: 600; text-align: center; line-height: 1.2; cursor: pointer; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile .i { color: var(--muted); }
.tile:has(input:checked) { border: 2px solid var(--blue); background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.tile:has(input:checked) .i { color: var(--blue); }
.tile:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Segmented Yes/No */
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: var(--line-soft); flex: none; border: 0; margin: 0; }
.seg label { display: flex; align-items: center; justify-content: center; min-width: 58px; height: 44px; border-radius: 8px; font-size: 16px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--blue); color: #fff; font-weight: 700; }
.seg.light label:has(input:checked) { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(15, 27, 45, .12); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--blue); }

.fp { display: contents; } /* form page wrapper: invisible on phones, the desktop grid below */
.side { display: flex; flex-direction: column; gap: 12px; } /* a page's side panel (Review & send); a column on phones */

/* Pills, info box, checkbox */
.pill { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 13px; background: var(--blue-soft); border: 1px solid var(--blue-line); color: var(--blue); font-size: 13px; font-weight: 700; white-space: nowrap; }
.info { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--blue-soft); border: 1px solid var(--blue-line); font-size: 16px; line-height: 1.5; color: var(--blue-ink); }
.info .i { color: var(--blue); }
.check { display: flex; gap: 14px; align-items: center; padding: 14px 16px; min-height: 64px; border: 1.5px solid var(--field); border-radius: 14px; background: #fff; cursor: pointer; font-size: 16px; }
.check input { flex: none; appearance: none; width: 28px; height: 28px; margin: 0; border-radius: 7px; border: 2px solid var(--faint); background: #fff; display: grid; place-content: center; cursor: pointer; }
.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::after { content: 'check'; font-family: 'Material Symbols Rounded'; color: #fff; font-size: 22px; line-height: 1; }
.check a { color: var(--blue); font-weight: 700; }

/* Sticky summary bar at the bottom of forms */
.sumbar { position: sticky; bottom: 0; z-index: 10; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.sumbar .what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sumbar .what b { font-size: 16px; }
.sumbar .what span { font-size: 14px; color: var(--muted); }
.sumbar .btn { min-height: 52px; }
.actions { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }

/* Success screen */
.done { background: #fff; padding: 64px 24px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; border-bottom: 1px solid var(--line); }
.done .ring { width: 84px; height: 84px; border-radius: 42px; background: var(--green-soft); display: flex; align-items: center; justify-content: center; }
.done .ring span { width: 56px; height: 56px; border-radius: 28px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.done h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.015em; }
.done p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }

/* Stars, toast, placeholder media */
.stars { color: var(--star); letter-spacing: 1px; }
.stars .off { color: #8A94A6; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 600; box-shadow: var(--shadow-card); }
.ph { background: repeating-linear-gradient(135deg, #C7D3E3 0 10px, #D6E0EC 10px 20px); }
.ph.dark { background: repeating-linear-gradient(135deg, #9FB4CF 0 12px, #AFC2DA 12px 24px); }
.empty { padding: 24px 16px; text-align: center; color: var(--muted); }

@media (min-width: 900px) {
  .top { height: 72px; padding: 0 48px; }
  .top nav { display: flex; }
  .top .left { display: flex; align-items: center; gap: 44px; }
  .chat { background: var(--green); border-color: var(--green); color: #fff; padding: 0 18px; }
  .chat .full { display: inline; } .chat .short { display: none; }
  .foot { flex-direction: row; justify-content: space-between; align-items: center; padding: 28px 90px; font-size: 16px; }
  .foot .links { flex-direction: row; gap: 28px; align-items: center; }
  .page { padding-top: 24px; }
  /* Page bar: fixed under the header, same width as the page. */
  .bar { top: 72px; }
  .bar-row, .steps { max-width: var(--page); margin-left: auto; margin-right: auto; } /* lines up with the page under it */
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* ── Phones: a focused field never hides behind the header or the sticky bottom bar ─────────────────────────── */
html { scroll-padding-top: 88px; scroll-padding-bottom: 140px; }

/* ── Desktop: one frame for every inner page. Main column (forms, reviews, terms, the message form) on the left,
      a side panel that stays in view on the right (booking summary, confirm, rating, contact details, key points).
      The title bar spans both. Phones keep the single column above. ─────────────────────────────────────────── */
@media (min-width: 1000px) {
  :root { --main: 720px; --side: 340px; --frame: calc(var(--main) + var(--side) + 20px); --sticky: 160px; }
  .bar-row, .steps { max-width: var(--frame); }
  main > .fp, main[data-page=review], main[data-page=reviews], main[data-page=contact], main[data-page=terms], main[data-page=write] {
    display: grid; grid-template-columns: 1fr minmax(0, var(--main)) var(--side) 1fr; column-gap: 20px; align-content: start; }
  .fp > .bar, main[data-page] > .bar { grid-column: 1 / -1; margin-bottom: 20px; } /* both columns start on the same line */
  main[data-page=review] > .page, main[data-page=reviews] > .page, main[data-page=contact] > .page, main[data-page=terms] > .page { display: contents; }
  /* main column items */
  .fp > form.page, main[data-page=review] > .page > *, main[data-page=reviews] > .page > *, main[data-page=contact] > .page > *, main[data-page=terms] > .page > * {
    grid-column: 2; max-width: none; margin: 0; }
  .fp > form.page { padding: 0 0 32px; }
  main[data-page=review] > .page > *, main[data-page=reviews] > .page > *, main[data-page=contact] > .page > *, main[data-page=terms] > .page > * { margin-bottom: 12px; }
  /* side panel items: sticky, spanning the rows the main column uses */
  .fp > .sumbar, main[data-page=reviews] .rv-top, main[data-page=reviews] .rv-mine, main[data-page=contact] .ct-col, main[data-page=terms] .keys,
  main[data-page=review] .side {
    grid-column: 3; align-self: start; position: sticky; top: var(--sticky); }
  .fp > .sumbar { grid-row: 2 / span 20; }
  main[data-page=contact] .ct-col, main[data-page=terms] .keys { grid-row: 2 / span 40; }
  main[data-page=reviews] .rv-top { grid-row: 3 / span 40; }
  main[data-page=reviews] .rv-mine { grid-row: 2; position: static; }
  main[data-page=reviews] .rv-top:first-child { grid-row: 2 / span 40; }
  main[data-page=reviews] .rv-top { display: flex; flex-direction: column; gap: 12px; }
  /* no reviews yet: the empty summary is the page, so it takes the main column */
  main[data-page=reviews] .page:not(:has(.rv-list)) .rv-top { grid-column: 2; position: static; grid-row: auto; }
  main[data-page=reviews] .page > .card.empty { grid-column: 2 / 4; }
  /* the booking summary becomes a card instead of a bottom bar */
  .fp > .sumbar { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); bottom: auto; }
  .fp > .sumbar::before { content: 'Your request'; font-size: 19px; font-weight: 700; }
  .fp > .sumbar .what b { font-size: 17px; }
  .fp > .sumbar .btn { width: 100%; min-height: 56px; }
  /* Review & send: summary left, the confirm panel right */
  main[data-page=review] .side { grid-row: 2 / span 20; display: flex; flex-direction: column; gap: 12px; }
  /* Write a review: a focused task, centred across the frame */
  main[data-page=write] > form { grid-column: 2 / 4; }
}
