/* Letterbox: black bars, demo controls in muted grey outside the watch. */
:root {
  --good: #00e400;
  --moderate: #ffff00;
  --usg: #ff7e00;
  --unhealthy: #ff0000;
  --very_unhealthy: #8f3f97;
  --hazardous: #7e0023;
  --card: #1c1c1e;
  --muted: #8e8e93;
  --speak: #ff9f0a;   /* the agent spoke */
  --quiet: #636366;   /* the agent stayed quiet */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color: #fff;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 22px 16px 24px;
  min-height: 100vh;
}

/* ---------- demo frame (outside the watch) ---------- */


.chip {
  padding: 7px 14px;
  border: 1px solid #3a3a3c;
  border-radius: 999px;
  color: #aeaeb2;
  font-size: 14px;
  text-decoration: none;
}
.chip:hover { border-color: #636366; color: #fff; }
.chip.active { background: #fff; border-color: #fff; color: #000; font-weight: 600; }

.frame-notes {
  max-width: 640px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.frame-notes p { margin: 0 0 8px; }
.scenario-desc { color: #c7c7cc; }
.decision-ref { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.caption { font-size: 12px; color: #636366; }

/* ---------- the watch (Apple Watch 45 mm proportions) ---------- */

.stage {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
}

.watch {
  position: relative;
  width: 396px;
  height: 484px;
  padding: 16px;
  border-radius: 104px;
  background: linear-gradient(145deg, #3a3a3c 0%, #1c1c1e 45%, #2c2c2e 100%);
  box-shadow: 0 0 0 1px #48484a, 0 30px 80px rgba(255, 255, 255, 0.04);
}

.crown, .side-button {
  position: absolute;
  right: -9px;
  width: 10px;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(90deg, #2c2c2e, #636366);
}
.crown { top: 118px; height: 64px; }
.side-button { top: 214px; height: 88px; width: 7px; right: -6px; }

.screen {
  height: 100%;
  overflow-y: auto;
  border-radius: 88px;
  background: #000;
  padding: 26px 22px 28px;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }

.status {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 18px 10px;
  font-size: 17px;
  font-weight: 600;
}
.status-app { color: var(--good); }
.status-time { color: #fff; font-variant-numeric: tabular-nums; }
.back { color: #0a84ff; text-decoration: none; font-weight: 600; }

/* ---------- notification stack ---------- */

.stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.card {
  display: block;
  padding: 14px 16px 16px 18px;
  border-radius: 24px;
  background: var(--card);
  border-left: 5px solid var(--accent, #48484a);
  color: inherit;
  text-decoration: none;
}
.card:active { background: #2c2c2e; }

.card-head {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 6px;
}
.card-app { font-weight: 600; color: #fff; }

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent, #48484a);
}

.card-body {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.action {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  background: #2c2c2e;
  font-size: 17px;
  font-weight: 600;
}

/* ---------- "Why?" view ---------- */

.why { padding: 2px 8px 0; }
.why-kicker { margin: 0 0 4px; font-size: 15px; color: var(--muted); }
.why-title { margin: 0 0 12px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.why-lines { list-style: none; margin: 0; padding: 0; }
.why-lines li {
  padding: 7px 0 7px 14px;
  border-left: 3px solid var(--accent, #48484a);
  margin-bottom: 7px;
  font-size: 19px;
  line-height: 1.25;
}
.why-band { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- calm empty state ---------- */

.calm { text-align: center; padding-top: 34px; }
.calm-time {
  margin: 0;
  font-size: 84px;
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.calm-date { margin: 6px 0 30px; font-size: 18px; color: var(--good); font-weight: 600; }
.calm-headline { margin: 0 0 10px; font-size: 24px; font-weight: 600; }
.calm-why { margin: 0 12px; font-size: 18px; line-height: 1.3; color: var(--muted); }
.ring {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 9px;
  border: 3px solid var(--good);
  border-radius: 50%;
  vertical-align: -1px;
}

/* ---------- EPA band accents ---------- */

.band-good { --accent: var(--good); }
.band-moderate { --accent: var(--moderate); }
.band-usg { --accent: var(--usg); }
.band-unhealthy { --accent: var(--unhealthy); }
.band-very_unhealthy { --accent: var(--very_unhealthy); }
.band-hazardous { --accent: var(--hazardous); }

/* ---------- chart panel (demo frame, beside the watch) ---------- */

.chart-panel { width: 600px; max-width: 100%; }
.chart-title { margin: 0; font-size: 15px; font-weight: 600; color: #e5e5ea; }
.chart-sub { margin: 2px 0 8px; font-size: 13px; color: var(--muted); }
.chart { display: block; width: 100%; height: auto; font-family: var(--font); }

.zone { opacity: 0.1; }
.zone-good { fill: var(--good); }
.zone-moderate { fill: var(--moderate); }
.zone-usg { fill: var(--usg); }
.zone-unhealthy { fill: var(--unhealthy); }
.zone-very_unhealthy { fill: var(--very_unhealthy); }
.zone-hazardous { fill: var(--hazardous); }
.zone-label { font-size: 10px; fill: var(--muted); }

.grid { stroke: #2c2c2e; stroke-width: 1; }
.tick, .lane-label { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.lane { stroke: #2c2c2e; stroke-width: 1; }

.pm { fill: none; stroke: #f2f2f7; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.usual { fill: none; stroke: #8e8e93; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: 0.8; }
.pm-end { fill: #f2f2f7; stroke: #000; stroke-width: 2; }
.direct { font-size: 11px; fill: var(--muted); }
.direct.strong { fill: #f2f2f7; font-weight: 600; }
.ignored { fill: none; stroke: #f2f2f7; stroke-width: 2; stroke-dasharray: 2 2; }

.future { fill: #000; opacity: 0.55; pointer-events: none; }
.cursor { stroke: #f2f2f7; stroke-width: 1; pointer-events: none; }

.hit { fill: transparent; cursor: pointer; }
.chart a:hover .hit { fill: rgba(255, 255, 255, 0.06); }

.mark { cursor: pointer; }
.mark line { stroke: var(--quiet); stroke-width: 2; stroke-linecap: round; }
.mark text { font-size: 11px; fill: #e5e5ea; }
.mark-sent circle { fill: var(--speak); stroke: #000; stroke-width: 2; }
.mark-held circle { fill: #000; stroke: var(--speak); stroke-width: 2; }
.mark .focus-ring { fill: none; stroke: #f2f2f7; stroke-width: 1.5; }
.mark-ignored circle { fill: #000; stroke: var(--quiet); stroke-width: 2; stroke-dasharray: 2 2; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 6px 0 12px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}
.key { display: inline-block; margin-right: 6px; vertical-align: middle; }
.key-pm, .key-usual { width: 16px; height: 2px; border-radius: 1px; background: #f2f2f7; }
.key-usual { background: #8e8e93; }
.key-sent, .key-held, .key-ignored { width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; }
.key-sent { background: var(--speak); }
.key-held { border: 2px solid var(--speak); }
.key-ignored { border: 2px dashed var(--quiet); }
.key-quiet { width: 2px; height: 10px; background: var(--quiet); }

.pill {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #2c2c2e;
  color: #e5e5ea;
}
.pill-sent { background: var(--speak); color: #000; }
.pill-held { box-shadow: inset 0 0 0 1.5px var(--speak); background: transparent; }

.moon {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 9px;
  border-radius: 50%;
  box-shadow: inset -5px -2px 0 0 var(--speak);
  transform: rotate(-30deg);
  vertical-align: -1px;
}

/* ---------- masthead, navigator, story card (demo frame) ---------- */

.masthead, .navigator, .story { width: 1080px; max-width: 100%; }
.masthead { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.brand { font-size: 15px; font-weight: 600; color: #e5e5ea; }
.promise { font-size: 13px; color: var(--muted); }

.navigator { border-top: 1px solid #2c2c2e; border-bottom: 1px solid #2c2c2e; padding: 10px 0 4px; }
.nav-row { display: flex; gap: 12px; align-items: flex-start; }
.nav-group { flex: none; width: 190px; padding-top: 7px; font-size: 12px; color: var(--muted); }
.nav-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }

.story-title { margin: 0 0 4px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.story-lead { margin: 0 0 4px; font-size: 16px; line-height: 1.45; color: #e5e5ea; max-width: 820px; }
.story-desc { margin: 0 0 8px; font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 820px; }
.story-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 12px; }
.tags-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.tag { padding: 2px 9px; border-radius: 6px; background: #2c2c2e; color: #e5e5ea; font-size: 12px; }
.brief-ids { margin-left: 6px; font-size: 12px; color: var(--muted); }

.beats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.beat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  height: 100%;
  padding: 9px 12px;
  border: 1px solid #2c2c2e;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}
.beat:hover { border-color: #636366; }
.beat.current { border-color: var(--speak); box-shadow: inset 0 0 0 1px var(--speak); }
.beat-n {
  grid-row: span 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #f2f2f7; color: #000; font-size: 12px; font-weight: 700;
}
.beat.current .beat-n { background: var(--speak); }
.beat-title { font-size: 14px; font-weight: 600; }
.beat-note { font-size: 12px; line-height: 1.35; color: var(--muted); }

.chart-col { width: 600px; max-width: 100%; }

.beat-pin line { stroke: #48484a; stroke-width: 1; stroke-dasharray: 2 3; }
.beat-pin circle { fill: #f2f2f7; }
.beat-pin text { font-size: 11px; font-weight: 700; fill: #000; }
.beat-pin.current circle { fill: var(--speak); }
.beat-pin.current line { stroke: var(--speak); }

/* ---------- "at this moment" panel ---------- */

.moment { padding: 12px 14px; border: 1px solid #2c2c2e; border-radius: 12px; font-size: 13px; line-height: 1.45; color: #c7c7cc; }
.moment p { margin: 0 0 6px; }
.moment-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; color: var(--muted); }
.moment-head strong { color: #fff; }
.steps { display: flex; gap: 10px; }
.steps a { color: #0a84ff; text-decoration: none; white-space: nowrap; }
.steps .next-beat { font-weight: 600; }
.moment-sentence { font-size: 15px; color: #f2f2f7; }
.path { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; padding: 0; list-style: none; }
.layer { padding: 2px 8px; border-radius: 6px; font-size: 12px; background: rgba(48, 209, 88, 0.14); color: #a8e6b4; }
.layer.failed { background: rgba(255, 159, 10, 0.16); color: #ffd28a; }
.layer.stop { box-shadow: inset 0 0 0 1px var(--speak); }
.layer-detail { opacity: 0.85; }
.moment-reason { color: var(--muted); }
.moment-code { margin: 0; color: var(--muted); font-size: 12px; }
.moment-code code { font-family: ui-monospace, Menlo, monospace; color: #e5e5ea; }

.ring-muted { border-color: var(--muted); }

.promise a { color: #0a84ff; text-decoration: none; }
a.tag { text-decoration: none; }
a.tag:hover { background: #3a3a3c; }

/* ---------- capabilities page ---------- */

.caps { width: 1080px; max-width: 100%; border-collapse: collapse; font-size: 14px; }
.caps th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid #2c2c2e; }
.caps td { padding: 10px; border-bottom: 1px solid #1c1c1e; vertical-align: top; color: #e5e5ea; }
.caps td.brief { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); white-space: nowrap; }
.caps td.what { color: #c7c7cc; }
.caps .chip { margin: 0 6px 6px 0; display: inline-block; }
.caps .none { color: var(--muted); }
