/* Watchtower design system — tokens and components from the design canvas
   (design/*.dc.html is the visual source of truth; dev guide §6). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../vendor/fonts/bricolage-grotesque-600.ada540c0e24a.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../vendor/fonts/bricolage-grotesque-700.ada540c0e24a.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../vendor/fonts/public-sans-400.e4c9b081863a.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../vendor/fonts/public-sans-500.e4c9b081863a.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../vendor/fonts/public-sans-600.e4c9b081863a.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("../vendor/fonts/spline-sans-mono-400.21113a44ca20.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("../vendor/fonts/spline-sans-mono-500.21113a44ca20.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-tint: #edeff4;
  --ink: #1d2433;
  --body: #3a4356;
  --muted: #5b6478;
  --faint: #8a91a3;
  --line: #d4d8e2;
  --line-soft: #e3e6ee;
  --accent: #c07a1e;
  --accent-text: #8f5a12;
  --accent-wash: #f4e8d4;
  --dark-bg: #12151d;
  --dark-surface: #1d2433;
  --dark-ink: #e7eaf2;
  --dark-muted: #98a0b3;
  --dark-soft: #c6cbd9;
  --dark-chip: #2a3145;
  --dark-line: #2e3446;
  --dark-accent: #e2a34a;
  --ok: #2e7d4f;
  --ok-wash: #ddeee3;
  --warn: #8a6d1f;
  --warn-wash: #f1ead0;
  --danger: #a3453f;

  --font-display: "Bricolage Grotesque", Arial, sans-serif;
  --font-text: "Public Sans", system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", monospace;
}

/* ---- shell ---- */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
}
.screen {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
a { color: var(--accent-text); }

/* ---- headers ---- */
.screen-head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.back {
  width: 44px; height: 44px; margin-left: -10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); text-decoration: none; font-size: 22px; line-height: 1;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
}
.beacon {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash);
}
.progress { display: flex; gap: 6px; align-items: center; }
.progress span { width: 20px; height: 4px; border-radius: 2px; background: var(--line); }
.progress span.on { background: var(--accent); }

/* ---- type ---- */
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text);
}
.headline {
  font-family: var(--font-display); font-size: 30px; font-weight: 700;
  line-height: 1.12; letter-spacing: -0.01em; margin: 0;
}
.page-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.section-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-top: 6px;
}
.summary { font-size: 14px; color: var(--body); line-height: 1.5; }
.meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.sub { font-size: 15px; color: var(--muted); line-height: 1.5; }

/* ---- cards ---- */
.card-list { display: flex; flex-direction: column; gap: 8px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.card--link { text-decoration: none; color: inherit; }
.card--link:hover { border-color: var(--accent); }
.card--question { border-top: 3px solid var(--accent); }
.card--alert { border-top: 3px solid var(--accent); }
.card--dark { background: var(--dark-surface); border: none; color: var(--dark-ink); padding: 20px 18px; }
.card-head { display: flex; align-items: center; gap: 8px; }
.card-title { font-weight: 600; font-size: 15.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.dot--met { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.dot--quiet { background: var(--line); }
.dot--big { width: 10px; height: 10px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }

/* ---- goal input ---- */
.goal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 14px; }
.goal-input {
  border: none; outline: none; resize: vertical; width: 100%;
  font-family: var(--font-text); font-size: 17px; line-height: 1.5; min-height: 76px;
  color: var(--ink); background: transparent;
}
.goal-input::placeholder { color: var(--faint); }
.goal-actions { display: flex; align-items: center; justify-content: flex-end; }
.send-btn {
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.example-chips { display: flex; flex-direction: column; gap: 8px; }
.example-chip {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 13px 18px; font-size: 14.5px; color: var(--body);
  text-decoration: none;
}
.example-chip:hover { border-color: var(--accent); }

/* ---- plan (step 2) ---- */
.bubble {
  align-self: flex-end; max-width: 300px; background: var(--accent-wash);
  border-radius: 16px 16px 4px 16px; padding: 13px 16px;
  font-size: 14.5px; line-height: 1.45; color: var(--body);
}
.plan-card { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; }
.plan-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.plan-row { display: flex; flex-direction: column; gap: 3px; }
.plan-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.plan-value { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span {
  display: inline-block; background: var(--surface); color: var(--body);
  border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px;
  font-size: 14px; min-height: 44px; box-sizing: border-box;
}
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- dark review card (step 3) ---- */
.card--dark .card-title { font-family: var(--font-display); font-size: 20px; }
.card--dark .summary { color: var(--dark-muted); }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono); font-size: 11px; background: var(--dark-chip);
  border-radius: 4px; padding: 4px 9px; color: var(--dark-soft);
}
.card--dark .foot {
  border-top: 1px solid var(--dark-line); padding-top: 12px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.card--dark .foot .meta { color: var(--dark-muted); }
.card--dark .foot .value { font-family: var(--font-mono); font-size: 15px; color: var(--dark-accent); }

/* ---- live (step 4) ---- */
.hero { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 48px; text-align: center; }
.beacon--hero {
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 12px var(--accent-wash), 0 0 0 26px rgba(192, 122, 30, 0.1);
}
.hero .headline { font-size: 28px; margin-top: 10px; }
.check-line { display: flex; align-items: center; gap: 10px; }
.check-icon {
  width: 26px; height: 26px; border-radius: 50%; background: var(--ok-wash);
  color: var(--ok); display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.check-icon--warn { background: var(--warn-wash); color: var(--warn); }

/* ---- buttons ---- */
.btn {
  display: block; width: 100%; border: none; cursor: pointer; text-align: center;
  text-decoration: none; border-radius: 999px; padding: 16px;
  font-family: var(--font-text); font-size: 16px; font-weight: 600;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-text); }
.btn--ghost { background: var(--surface); color: var(--body); border: 1px solid var(--line); font-weight: 500; font-size: 15px; padding: 14px; }
.btn--danger-ghost { color: var(--danger); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.fab {
  position: fixed; right: calc(50% - 215px + 20px); bottom: 24px;
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 26px; line-height: 1; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(29, 36, 51, 0.25);
}
@media (max-width: 470px) { .fab { right: 20px; } }
.spacer { flex: 1; }
.footnote { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.6; }
.error-note { color: var(--danger); font-size: 14px; }

/* ---- stat tiles + activity (detail) ---- */
.tiles { display: flex; gap: 10px; }
.tile {
  flex: 1; display: flex; flex-direction: column; gap: 3px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px;
}
.tile .value { font-family: var(--font-mono); font-size: 17px; }
.activity { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; }
.activity-row { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.activity-row:last-child { border-bottom: none; }
.activity-when { font-family: var(--font-mono); font-size: 11px; color: var(--muted); width: 76px; flex-shrink: 0; padding-top: 2px; }
.activity-what { font-size: 14px; line-height: 1.45; color: var(--body); flex: 1; }
.activity-cost { font-family: var(--font-mono); font-size: 11px; color: var(--muted); flex-shrink: 0; padding-top: 2px; }
.spec-row { font-size: 14px; color: var(--body); display: flex; gap: 10px; }
.spec-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); flex: 0 0 72px; padding-top: 3px;
}
.badge {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  background: var(--accent-wash); color: var(--accent-text); border-radius: 4px;
  padding: 3px 8px; flex-shrink: 0;
}

/* The leads slot (product spec §5b): invisible until it has content. */
.offers-slot:empty { display: none; }
.offers-slot { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
