/* Summit Integrations client pages.
 *
 * These pages are opened by a client on a phone, once, from a link in an email, usually on a bad
 * connection and often while standing in a van. So: one stylesheet, no framework, no CDN, no
 * icon set, and the same two self-hosted faces the staff application uses.
 *
 * The palette is the SPA token block (web/src/styles/tokens.css), taken verbatim so the two
 * surfaces are visibly the same company. The one inversion is the default: the staff application
 * is dark first because it is looked at for eight hours, and a document somebody is about to sign
 * is light first because that is what paper is. Dark follows the operating system.
 */

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-tight-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-tight-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --border: #e7e4dc;
  --border-strong: #d4d0c5;
  --text: #0a0a0a;
  --text-dim: #4b5563;
  --text-muted: #6b7280;
  --accent: oklch(0.55 0.18 285);
  --accent-dim: oklch(0.47 0.17 285);
  --accent-soft: oklch(0.55 0.18 285 / 0.10);
  --green: oklch(0.48 0.13 150);
  --green-soft: oklch(0.48 0.13 150 / 0.10);
  --red: oklch(0.52 0.20 25);

  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 999px;

  --font-sans: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --measure: 44rem;
  --gutter: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.14 0.004 270);
    --surface: oklch(0.17 0.005 270);
    --surface-2: oklch(0.20 0.006 270);
    --border: oklch(0.28 0.006 270);
    --border-strong: oklch(0.34 0.008 270);
    --text: oklch(0.97 0.003 270);
    --text-dim: oklch(0.78 0.005 270);
    --text-muted: oklch(0.65 0.008 270);
    --accent: oklch(0.78 0.15 285);
    --accent-dim: oklch(0.86 0.10 285);
    --accent-soft: oklch(0.72 0.17 285 / 0.16);
    --green: oklch(0.82 0.15 150);
    --green-soft: oklch(0.78 0.17 150 / 0.14);
    --red: oklch(0.76 0.17 25);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: 'cv05' 1;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ structure */

.masthead {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.masthead-inner,
.page,
.footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.masthead-inner {
  padding-top: 1.125rem;
  padding-bottom: 1.125rem;
}

.wordmark {
  display: inline-block;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.page {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.footer-inner p { margin: 0.25rem 0; }

/* ------------------------------------------------------------------ type */

h1 {
  margin: 0 0 0.75rem;
  font-size: 1.875rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.lede {
  margin: 0 0 2.5rem;
  color: var(--text-dim);
  font-size: 1.0625rem;
  max-width: 34rem;
}

.muted { color: var(--text-muted); font-size: 0.875rem; }
.push-top { margin-top: 2rem; }
.form-lede { margin: 0 0 1.5rem; }
.flush { margin: 0; }

.section-label {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-dim); }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
  word-break: break-all;
}

/* ------------------------------------------------------------------ the checklist */

.checklist {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.checklist > li {
  counter-increment: step;
  border-bottom: 1px solid var(--border);
}

.item {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.75rem 1rem;
  width: 100%;
  padding: 1.125rem 0.25rem;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}

button.item { cursor: pointer; }
a.item { text-decoration: none; color: inherit; }
a.item:hover .item-title, a.item:focus-visible .item-title { text-decoration: underline; }
button.item:hover .item-title { color: var(--accent); }

.item::before {
  content: counter(step);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.item-title {
  font-weight: 500;
  transition: color 0.12s ease;
}

.item-note {
  grid-column: 2 / -1;
  margin: 0.125rem 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------ chips */

.chip {
  display: inline-block;
  padding: 0.1875rem 0.625rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  white-space: nowrap;
}

.chip-done {
  border-color: transparent;
  background: var(--green-soft);
  color: var(--green);
}

/* ------------------------------------------------------------------ buttons and fields */

.btn {
  display: inline-block;
  padding: 0.6875rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--bg);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease;
}

.btn:hover { background: var(--accent-dim); }
.btn[disabled] { opacity: 0.55; cursor: default; }
/* `.btn` sets display, which beats the UA's [hidden] rule: the survey's submit button
   showed on every step. Anything hidden stays hidden (2026-09-24). */
.btn[hidden] { display: none; }

.btn-quiet {
  background: none;
  color: var(--text-dim);
  border-color: var(--border-strong);
}

.btn-quiet:hover { background: var(--surface-2); color: var(--text); }

.btn-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
}

input[type='text'],
input[type='email'],
input[type='tel'],
textarea {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

.field { margin-bottom: 1.25rem; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin: 1.25rem 0;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}

.check input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.1875rem 0 0;
  accent-color: var(--accent);
  flex: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ------------------------------------------------------------------ cards, notices */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.notice {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  padding: 1rem 1.125rem;
  margin: 0 0 2.5rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
}

.error {
  margin: 1rem 0 0;
  color: var(--red);
  font-size: 0.875rem;
}

.saved-state {
  display: inline-block;
  margin-left: 0.875rem;
  font-size: 0.875rem;
  color: var(--green);
}

/* ------------------------------------------------------------------ progress */

.progress {
  margin: 0 0 2.5rem;
}

.progress-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.625rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.progress-track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  transition: width 0.25s ease-out;
}

/* ------------------------------------------------------------------ the document view */

.document { margin-top: 0.5rem; }

.document-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.prose {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  color: var(--text);
}

.prose h1 { font-size: 1.5rem; margin: 0 0 1.25rem; }
.prose h2 { font-size: 1.125rem; margin: 2.25rem 0 0.75rem; }
.prose h3 { font-size: 1rem; margin: 1.75rem 0 0.5rem; }
.prose p { margin: 0 0 1.125rem; }
.prose ul, .prose ol { margin: 0 0 1.125rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.375rem; }

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.25rem 0;
}

.prose blockquote {
  margin: 0 0 1.125rem;
  padding: 0.25rem 0 0.25rem 1.125rem;
  border-left: 2px solid var(--border-strong);
  color: var(--text-dim);
}

.prose blockquote p { margin: 0; }

.prose table {
  width: 100%;
  margin: 0 0 1.5rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th, .prose td {
  border-bottom: 1px solid var(--border);
  padding: 0.625rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.prose tr:last-child td { border-bottom: 0; }

.sign {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.75rem;
}

.receipt {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.75rem;
}

.receipt p { margin: 0 0 0.625rem; }

/* ------------------------------------------------------------------ questionnaire */

.section-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-intro {
  margin: 0 0 1.5rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
}

.question { margin-bottom: 1.5rem; }
.question:last-of-type { margin-bottom: 0; }

.section-actions {
  display: flex;
  align-items: center;
  margin-top: 1.5rem;
}

.thanks {
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}

/* ------------------------------------------------------------------ the booking page
 *
 * Two rows of buttons and one line of type. A prospect arrives here from an advertisement on a
 * phone, so the date row scrolls sideways rather than wrapping into a wall, every target is at
 * least 44px tall, and the chosen state is a border and a weight rather than a colour alone.
 */

.meet {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.meet-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin: 0;
}

.meet-who { font-weight: 600; }

.meet-detail {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.days {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  scrollbar-width: thin;
}

.day {
  flex: none;
  padding: 0.625rem 0.875rem;
  min-height: 2.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-dim);
  font: inherit;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
}

.day-on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 500;
}

.times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
  gap: 0.5rem;
}

.slot {
  min-height: 2.75rem;
  padding: 0.625rem 0.5rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.slot:hover { border-color: var(--accent); }

.slot-on {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

/* ------------------------------------------------------------------ the survey page
 *
 * One question on screen at a time, which is why there is so little here: the page is a heading,
 * a prompt, one control and one button. Everything below is spacing and a tap target.
 *
 * Built for a thumb first. This page is reached from an Instagram or a Facebook ad, so a choice
 * is a full-width row at least 3rem tall, the postal field is large enough to read what was
 * typed into it, and nothing depends on hover. There is one accent, it is the token, and there
 * is no gradient and no shadow anywhere in this block.
 */

.survey { margin-top: 2rem; }

.step-count {
  margin: 0 0 1.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.step { margin-bottom: 2rem; }
.step[hidden] { display: none; }

.prompt {
  margin: 0 0 1.25rem;
  font-size: 1.375rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* Typed by hand and read back, so it is set large and in the monospaced face: a postal code is
   a code, and a visitor checking their own typing should be able to see it at a glance. */
.postal {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  max-width: 12rem;
}

.choices {
  display: grid;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 500;
  cursor: pointer;
}

.choice:hover { border-color: var(--accent); }

.choice input {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent);
  flex: none;
}

/* :has is not relied on for anything the page needs; this is the selected state and a browser
   without it simply shows the radio dot, which is the same information. */
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choice:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* D6c. Present only when the SERVER matched a service-area prefix, and never otherwise. */
.approval {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-left: 2px solid var(--green);
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  font-weight: 500;
}

.step-next { margin-top: 0.5rem; }
.step-next[hidden] { display: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 40rem) {
  .prompt { font-size: 1.25rem; }
  .choice { min-height: 3.5rem; }
  .survey .btn { width: 100%; }
}

/* ------------------------------------------------------------------ narrow screens */

@media (max-width: 40rem) {
  :root { --gutter: 1rem; }
  .page { padding-top: 2rem; padding-bottom: 3rem; }
  h1 { font-size: 1.5rem; }
  .lede { font-size: 1rem; margin-bottom: 2rem; }
  .card, .sign, .section-card, .receipt, .thanks { padding: 1.25rem; }
  .times { grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); }
  .item { grid-template-columns: 1.5rem 1fr; padding: 1rem 0; }
  .item .chip { grid-column: 2; justify-self: start; }
  .prose table, .prose thead, .prose tbody, .prose tr, .prose th, .prose td { display: block; }
  .prose thead { display: none; }
  .prose td { border-bottom: 0; padding: 0.125rem 0; }
  .prose tr { border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
}

/* ------------------------------------------------------------------ printing
 *
 * Clients print contracts. What is on paper is the document and nothing else: no navigation,
 * no signing form (a printed form is not a signature), and no link URLs bleeding into the
 * margin, because the URL carries the access token.
 */

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --border: #cccccc;
    --border-strong: #999999;
    --text: #000000;
    --text-dim: #333333;
    --text-muted: #555555;
    --accent: #000000;
  }
  body { font-size: 11pt; }
  .masthead, .footer { border: 0; }
  .masthead-inner { padding: 0 0 0.5rem; }
  .page { padding: 0; max-width: none; }
  .no-print { display: none !important; }
  .prose { border: 0; padding-top: 0; }
  .prose h1, .prose h2, .prose h3 { break-after: avoid; }
  .prose table, .prose blockquote, .receipt { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  a[href]::after { content: ''; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
