/* Goodword. One CSS file. Tokens from SPEC.md Part G. Light theme for people, dark for the Pro side. */
:root {
  --bone: #F4F3EF;
  --ink: #15161A;
  --green: #0F6E56;
  --green-tint: #DDEFE7;
  --gold: #F2C94C;
  --dark: #22242A;
  --line: #D9D7CF;

  --bg: var(--bone);
  --fg: var(--ink);
  --surface: #FFFFFF;
  --muted: #5E6066;
  --accent: var(--green);
  --accent-fg: #FFFFFF;
  --accent-soft: var(--green-tint);
  --border: var(--line);

  --font-head: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --tap: 44px;
  --radius: 14px;
  --gutter: 16px;
  --max: 560px;
}

.theme-dark {
  --bg: var(--dark);
  --fg: var(--bone);
  --surface: #2B2E35;
  --muted: #A9ABB3;
  --accent: var(--gold);
  --accent-fg: var(--ink);
  --accent-soft: #3A3626;
  --border: #3A3D45;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.45;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) var(--gutter) 10px;
  max-width: var(--max); width: 100%; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 700; font-size: 22px; text-decoration: none; letter-spacing: -0.01em; }
.brand .mark { flex: none; border-radius: 7px; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px; text-decoration: none; border-radius: 999px; font-weight: 500; }
.nav a:hover { background: var(--accent-soft); }

.page { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 32px; }
.foot { padding: 16px var(--gutter) calc(env(safe-area-inset-bottom) + 16px); text-align: center; color: var(--muted); font-size: 14px; }

.h1 { font-family: var(--font-head); font-weight: 700; font-size: clamp(28px, 7vw, 36px); line-height: 1.1; letter-spacing: -0.02em; margin: 12px 0 8px; }
.h2 { font-family: var(--font-head); font-weight: 600; font-size: 22px; margin: 28px 0 8px; }
.lead { font-size: 17px; color: var(--muted); margin: 0 0 16px; }
.mono { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.01em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.label { display: block; font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 12px 0; }
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: block; }
.input {
  width: 100%; min-height: var(--tap); font: inherit; font-size: 17px; color: var(--fg);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input.code { font-family: var(--font-mono); font-size: 24px; letter-spacing: 0.3em; text-align: center; }
textarea.input { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--muted); min-height: var(--tap); }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 18px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer;
  background: var(--surface); color: var(--fg); border: 1px solid var(--border);
}
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.icon-btn { width: var(--tap); padding: 0; align-self: flex-end; }
.icon { flex: none; min-width: 32px; min-height: var(--tap); padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.inline { display: inline; margin: 8px 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.alt summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; color: var(--accent); font-weight: 500; }
.link { text-decoration: underline; }
.error { background: #FBE9E7; color: #7A1E12; border-radius: 10px; padding: 10px 12px; }
.theme-dark .error { background: #4A2A26; color: #FFD9D2; }

.seats { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.seat { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: var(--tap); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.seat.open { border-style: dashed; background: transparent; }
.seat.taken { border-color: var(--accent); }
.seat-name { flex: 1 1 auto; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { flex: none; white-space: nowrap; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 8px; font-size: 11px; }
.theme-dark .tag { color: var(--gold); }

.draft { background: var(--bg); border-radius: 10px; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.devices { list-style: none; padding: 0; margin: 0 0 12px; }
.device { display: flex; justify-content: space-between; min-height: var(--tap); align-items: center; border-bottom: 1px solid var(--border); }
.device.current span::after { content: " ·"; color: var(--accent); }
.danger { margin-top: 24px; }

@media (min-width: 600px) { body { font-size: 16px; } }

/* Wider screens: the phone column becomes a centered sheet under a full-width top bar, so tablets and
   desktops read as a site rather than a phone app floating in space. Tokens unchanged. */
@media (min-width: 640px) {
  :root { --max: 620px; --gutter: 24px; }
  .top { max-width: 1040px; padding-left: 28px; padding-right: 28px; }
  .page {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    padding: 28px var(--gutter) 36px; margin: 12px auto 28px;
  }
  .theme-dark .page { background: var(--surface); }
  .card, .variant, .seat, .numbers > div { background: var(--bg); }
  .foot { max-width: 1040px; margin: 0 auto; }
}
@media (min-width: 960px) {
  :root { --max: 680px; --gutter: 40px; }
  .brand { font-size: 24px; }
  .brand .mark { width: 32px; height: 32px; }
  .h1 { font-size: 40px; }
  .page { padding: 36px var(--gutter) 44px; margin-top: 24px; }
}

/* Session 3: ask loop */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 15px; cursor: pointer; }
.chip input:checked + span { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.who p { margin: 4px 0; }
.variants { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.variant { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.variant.is-copied { border-color: var(--accent); }
.quiet { color: var(--muted); }
.copied { position: absolute; top: 6px; right: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent); background: var(--surface); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 8px; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.variant.is-copied .copied { opacity: 1; }
.variant input { margin-top: 4px; flex: none; accent-color: var(--accent); }
.variant span { min-width: 0; overflow-wrap: anywhere; }
.variant:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.recipients { list-style: none; padding: 0; margin: 8px 0; }
.recipient { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--tap); border-bottom: 1px solid var(--border); padding: 4px 0; }
.recipient .check { min-height: auto; align-items: center; }
.small-btn { padding: 6px 12px; min-height: 40px; font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.asker .name, .answer .name, .name { font-family: var(--font-head); font-weight: 600; font-size: 20px; margin: 0 0 4px; }
.need, .why { margin: 8px 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 10px 10px 0; font-style: normal; }
.toast { background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 10px 12px; }
.theme-dark .toast { color: var(--gold); }
.money { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; }
.answers { list-style: none; padding: 0; margin: 0; }
.tag.warn { background: #FBE9E7; color: #7A1E12; }
.theme-dark .tag.warn { background: #4A2A26; color: #FFD9D2; }

/* Session 4: money */
.numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; padding: 0; }
.numbers > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.numbers dt { margin: 0; }
.numbers dd { margin: 0; }
.big { font-family: var(--font-head); font-weight: 700; font-size: 28px; line-height: 1.1; }
.theme-dark .big { color: var(--gold); }
.wide { width: 100%; }
.card.gold { border-color: var(--gold); }
.compare p { margin: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
.vouchers { list-style: none; padding: 0; margin: 0; }
.theme-dark .btn.primary { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.theme-dark .input { background: var(--surface); }
.hint { display: block; margin: -2px 0 8px; }
.pro-line { margin: 18px 0 0; text-align: center; }
.legal { display: flex; gap: 16px; justify-content: center; margin-top: 8px; }
.legal a { color: var(--muted); font-size: 13px; }
.chip.soon span { color: var(--muted); border-style: dashed; cursor: default; }
.chip.soon em { font-style: normal; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; margin-left: 6px; }
