/*
 * The discovery call page's look (his decisions of 16 October 2026): exactly the client app's
 * (public/portal/portal.css), so a prospect who later becomes a client sees one hand. Its two
 * colours and their tints, the system font, one 560px column, inset grouped lists, full-width
 * buttons, light only. The tokens are copied, not linked: on call.recomp.online nothing of the
 * client app is reachable, and the page carries no hue of its own (no open-time green, no bronze).
 *
 * Ink (#1e1d22) on ground (#f3f2ec). Every other shade is ink laid over ground at a set strength.
 * States are said in words and weight, never in colour. Nothing is wider than a 320px screen.
 * The two things the client app has no pattern for are drawn in its own grammar: the month of
 * days (a day with times is a filled round, the chosen one ink, the rest faint) and the times
 * (chips, as its quick choices are). Every tap is at least 44px square, at 320px too.
 */
:root {
  --ink: #1e1d22;
  --ground: #f3f2ec;
  --muted: rgba(30, 29, 34, 0.66);
  --faint: rgba(30, 29, 34, 0.45);
  --hair: rgba(30, 29, 34, 0.12);
  --fill: rgba(30, 29, 34, 0.06);
  --pressed: rgba(30, 29, 34, 0.10);
  --radius: 16px;
  --radius-btn: 14px;
  --tap: 44px;
  --gutter: 20px;
  --ease: 160ms ease;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  overflow-x: clip;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 4px 0 8px;
}
h1:focus { outline: none; }
h1:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
/* The small heading over a group, the client app's: upper case, muted, inset to the list's text. */
h2.sh, p.sh, .kicker {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 28px 0 8px 16px;
}
/* His name over the title, as the pre-call form and the emails name him. */
.kicker { margin: 0; }
p { margin: 0 0 12px; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 2px; }
b { font-weight: 600; }
ul { list-style: none; margin: 0; padding: 0; }

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top)) var(--gutter) calc(48px + env(safe-area-inset-bottom));
}
.muted { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); }
.sub { color: var(--muted); margin: 0 0 20px; }
/* His words about the call: the reason the page exists, set as plain paragraphs. */
.about p { margin: 0 0 14px; }
.about p:last-child { margin-bottom: 0; }
.msg { min-height: 1.2em; margin: 12px 0 0; font-size: 15px; }
.msg:empty { min-height: 0; margin: 0; }
.err { font-weight: 600; color: var(--ink); }
.back { margin: 0 0 8px -12px; }

/* ---------- inset grouped lists ---------- */
.list {
  background: var(--fill);
  border-radius: var(--radius);
  overflow: hidden;
}
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  margin: 0;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
}
.list > .row:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--hair);
}
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .label { font-size: 17px; text-wrap: balance; }
.row .label.big { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.row .sec { color: var(--muted); font-size: 15px; text-wrap: pretty; }
.row .chev { flex: none; color: var(--faint); }
a.row { cursor: pointer; transition: background var(--ease); }
a.row:active { background: var(--pressed); }
.row a { overflow-wrap: anywhere; }
.panel { padding: 16px; }
.list + .btn { margin-top: 20px; }
.panel p:last-child { margin-bottom: 0; }

/* ---------- buttons ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  margin: 12px 0 0;
  border-radius: var(--radius-btn);
  border: 0;
  background: var(--ink);
  color: var(--ground);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow var(--ease);
}
.btn.secondary { background: var(--fill); color: var(--ink); }
.btn.outline { background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn.tertiary { background: none; color: var(--ink); width: auto; min-height: var(--tap); padding: 8px 12px; font-weight: 600; }
.btn:active { box-shadow: inset 0 0 0 999px var(--pressed); }
.btn.outline:active { box-shadow: inset 0 0 0 1px var(--ink), inset 0 0 0 999px var(--pressed); }
.btn[disabled] { opacity: 0.4; cursor: default; }
.btn[disabled]:active { box-shadow: none; }
.btn .icon { margin-left: -4px; }
.icon { width: 22px; height: 22px; flex: none; }

/* ---------- inputs ---------- */
label { display: block; font-size: 15px; font-weight: 600; margin: 18px 0 6px; }
input[type="email"], input[type="text"], input[type="tel"], textarea, select {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-size: 17px; /* 16px or more stops iOS zooming into the field */
  -webkit-appearance: none;
  appearance: none;
}
textarea { min-height: 112px; resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: var(--faint); }
.hint { margin: 6px 0 0 16px; font-size: 13px; color: var(--muted); }
input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); }
form .btn { margin-top: 24px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* The honeypot: there for a robot that fills in every field, never seen or reached by a person. */
.vh { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; opacity: 0; pointer-events: none; }

/* ---------- the days: one month at a time, a filled round for a day with times ---------- */
/* Over the months, not over an inset list: its words line up with the month's name. */
h2.sh.pickhead { margin-left: 4px; }
.month { margin: 0 0 8px; }
.month + .month { margin-top: 20px; }
.month h3 { font-size: 17px; font-weight: 600; margin: 0 0 6px 4px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; }
.cal .wd { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; padding: 4px 0; }
.cal .day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--faint);
  font: inherit;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
/* The round sits inside the 44px tap; the tap is the whole cell. */
.cal .day > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background var(--ease), color var(--ease);
}
.cal button.day { color: var(--ink); font-weight: 600; cursor: pointer; }
.cal button.day > span { background: var(--fill); }
.cal button.day:active > span { background: var(--pressed); }
.cal button.day[aria-pressed="true"] > span { background: var(--ink); color: var(--ground); }
.cal button.day:focus-visible { outline: none; }
.cal button.day:focus-visible > span { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Today, said under its number as the calendar on a phone says it. */
.cal .day.today::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: currentColor;
}
.cal button.day.today::after { background: var(--ink); }

/* ---------- the times on the day chosen ---------- */
.dayhead { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 28px 0 4px; scroll-margin-top: 16px; }
.dayhead:focus { outline: none; }
.dayhead:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
/* The zone the times are in, and the switch: one quiet line. */
.zone { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 4px; margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.zone label { display: inline; margin: 0; font-size: 15px; font-weight: 400; }
.zone select {
  width: auto;
  max-width: 100%;
  min-height: var(--tap);
  padding: 8px 36px 8px 12px;
  font-size: 16px;
  font-weight: 600;
  /* The chevron, drawn in ink, as the select's own arrow is gone with its appearance. */
  background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231e1d22' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chip {
  min-height: 52px;
  padding: 8px 6px;
  border-radius: var(--radius-btn);
  border: 0;
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background var(--ease);
}
.chip:active { background: var(--pressed); }
/* Their call's own time, on the reschedule picker: there, and not a choice. */
.chip[disabled] { background: none; box-shadow: inset 0 0 0 1px var(--hair); color: var(--muted); cursor: default; }
.chip small { display: block; font-size: 12px; font-weight: 400; line-height: 1.2; }
.pickhint { color: var(--muted); margin: 16px 0 0; }
/* A sentence in place of the days (none free, his calendar not read, a time just taken) keeps the gap a heading would. */
#pick > .list:first-child { margin-top: 28px; }
#pick > .list + h2.sh { margin-top: 20px; }

/* ---------- the step after booking ---------- */
.step { margin-top: 32px; }
.step h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 8px; }

@media (max-width: 359px) {
  /* A 320px screen: the month runs a little into the gutter so each day keeps its 44px tap. */
  .cal { margin: 0 -14px; }
  .month h3 { margin-left: -10px; }
  .times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
