/* Doddle — one page. Light only, on the Pro app's palette
   (prototype/apps/pro/src/index.css, packages/shared/src/tokens.css). */

:root {
  --bg: hsl(40, 20%, 97%);
  --ink: #111;
  --ink-hover: #2e2e2e;
  --muted: hsl(230, 10%, 45%);
  --line: hsl(40, 15%, 86%);
  --error: hsl(10, 70%, 45%);
  --hover: hsl(40, 20%, 94%);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 40px 28px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand svg { width: 28px; height: 28px; display: block; }

main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 64px 0; max-width: 620px; }

h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 700; margin: 0 0 22px; text-wrap: balance; }
.lede { font-size: clamp(17px, 2.2vw, 20px); line-height: 1.5; color: var(--muted); margin: 0 0 36px; max-width: 30em; text-wrap: pretty; }

.step { max-width: 440px; }
.step[hidden] { display: none; }
.row { display: flex; gap: 8px; }
.stack { display: grid; gap: 10px; }

input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }

/* Number, with a country picker in front when it isn't a UK mobile. */
.phone-field { flex: 1; min-width: 0; display: flex; gap: 8px; }
.phone-field #phone { flex: 1; }
.country { position: relative; flex: none; }
.country[hidden] { display: none; }
.country-button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 14px 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.country-button:hover { background: #fff; border-color: hsl(40, 10%, 72%); }
.country-button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }
.country-button.empty { color: var(--muted); font-weight: 400; }
#country-label { display: flex; align-items: center; gap: 7px; }
.country-button svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px hsla(230, 20%, 15%, 0.12);
}
.menu[hidden] { display: none; }
.country-menu { width: 300px; max-width: calc(100vw - 40px); }
#country-search { width: 100%; padding: 10px 12px; border-radius: 9px; font-size: 15px; }
.menu-list { list-style: none; margin: 0; padding: 0; max-height: 264px; overflow-y: auto; overscroll-behavior: contain; }
.country-menu .menu-list { margin-top: 6px; }
ul.menu.menu-list { padding: 6px; }
.menu-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}
.menu-list li[aria-selected="true"], .menu-list li:hover { background: var(--hover); }
.menu-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-list .dial { color: var(--muted); font-variant-numeric: tabular-nums; }
.menu-list .none { color: var(--muted); cursor: default; background: none; }
.menu-list .custom { color: var(--ink); }

/* "Your trade": the app's list, or their own words. */
.combo { position: relative; display: grid; }
.trade-menu { right: 0; }
#code { letter-spacing: 0.3em; }

button {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 12px;
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
button:hover { background: var(--ink-hover); }
button:disabled { opacity: 0.5; cursor: default; }
button.link { background: none; color: var(--muted); padding: 12px 0 0; font-weight: 400; font-size: 14px; text-decoration: underline; }

.label { font-weight: 600; margin: 0 0 12px; }
.stack .label { margin: 0 0 2px; }
.small { font-size: 14px; color: var(--muted); margin: 12px 0 0; }
.done { font-size: 20px; font-weight: 600; margin: 0; }
#step-done .small { font-size: 16px; margin-top: 6px; }
.error { color: var(--error); font-size: 14px; margin: 12px 0 0; max-width: 440px; }
#turnstile:empty { display: none; }
#turnstile { margin-top: 10px; }

footer {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  justify-content: space-between;
}
footer a { color: var(--muted); }
footer nav { display: flex; gap: 16px; }

@media (max-width: 560px) {
  .page { padding: 22px 20px 20px; }
  main { padding: 40px 0; }
  #step-phone .row, #step-code .row { flex-direction: column; }
  .country-button { padding: 0 12px 0 14px; }
}
