/* Reach — accessibility-first phone agent (demo)
   Tokens extend the Agentic Network design system (Foundation accent:
   institutional navy, teal, disciplined gold). */

:root {
  --ds-ink-950: #07131f;
  --ds-ink-900: #0b1e3a;
  --ds-ink-800: #123152;
  --ds-ink-700: #24476e;
  --ds-paper-50: #fffdf7;
  --ds-paper-100: #faf6ec;
  --ds-paper-200: #f1ead8;
  --ds-text-900: #17222d;
  --ds-text-700: #405364;
  --ds-text-300: #c7d2df;
  --ds-line-light: #ddd3ba;
  --ds-line-dark: rgba(255, 255, 255, .18);
  --ds-gold-600: #9a7200;
  --ds-gold-500: #c9a227;
  --ds-gold-300: #e8c85a;
  --ds-teal: #0e7c7b;
  --ds-teal-bright: #35b6b4;
  --ds-danger: #a31621;
  --ds-radius-md: 14px;
  --ds-radius-lg: 20px;
  --ds-font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --ds-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ds-ink-950);
  color: var(--ds-text-900);
  font-family: var(--ds-font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ds-gold-300); color: var(--ds-ink-950);
  padding: .7rem 1.2rem; border-radius: 999px; font-weight: 800;
  z-index: 50; transition: top .18s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--ds-gold-300);
  outline-offset: 3px;
  border-radius: 4px;
}
.stage-screen :focus-visible, .tabbar :focus-visible {
  outline-color: var(--ds-teal);
}

/* ---------- header ---------- */

.site-head {
  background: var(--ds-ink-900);
  border-bottom: 1px solid var(--ds-line-dark);
  color: #fff;
}
.head-inner {
  max-width: 72rem; margin: 0 auto;
  padding: .8rem clamp(1.25rem, 4vw, 3rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-name {
  margin: 0; font-family: var(--ds-font-display);
  font-size: 1.55rem; font-weight: 700; line-height: 1.05; letter-spacing: -.01em;
}
.brand-sub { margin: 0; color: var(--ds-text-300); font-size: .86rem; line-height: 1.35; }

.chip {
  flex: none; display: inline-block;
  font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: .4rem .8rem; border-radius: 999px; border: 1.5px solid currentColor;
}
.chip-demo { color: var(--ds-gold-300); background: rgba(232, 200, 90, .08); }

/* ---------- layout ---------- */

.layout {
  max-width: 72rem; margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem) 3rem;
  display: grid; gap: 2.5rem; grid-template-columns: 1fr;
  background: var(--ds-paper-100);
}
@media (min-width: 980px) {
  .layout { grid-template-columns: minmax(340px, 430px) 1fr; gap: 3rem; align-items: start; }
  .agent-panel { position: sticky; top: 1.5rem; }
}

.stage-heading {
  font-family: var(--ds-font-display); font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; margin: 0 0 .6rem;
}
.stage-lede { font-size: 1.12rem; color: var(--ds-text-700); margin: 0 0 1.5rem; max-width: 34rem; }
.stage-caption { color: var(--ds-text-700); font-size: .92rem; max-width: 26rem; margin: 1rem auto 0; }

/* ---------- the phone ---------- */

.phone {
  background: var(--ds-paper-50);
  border: 10px solid var(--ds-ink-900);
  border-radius: 40px;
  box-shadow: 0 24px 60px rgba(7, 19, 31, .28);
  overflow: hidden;
  max-width: 400px; margin: 0 auto;
  display: flex; flex-direction: column;
  height: min(720px, 78vh); min-height: 540px;
}
@media (max-width: 460px) {
  .phone { border-width: 0; border-radius: 0; box-shadow: none; max-width: none; height: 78vh; }
  .stage-caption { max-width: none; }
}

.phone-statusbar {
  background: var(--ds-ink-900); color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  padding: .35rem 1.1rem; font-size: .78rem; font-weight: 600;
}
.statusbar-centre { color: var(--ds-gold-300); letter-spacing: .05em; text-transform: uppercase; font-size: .68rem; }

.stage-head { padding: .9rem 1.1rem .4rem; border-bottom: 1px solid var(--ds-line-light); }
.stage-head h2 { margin: 0; font-size: 1.3rem; line-height: 1.25; }
.stage-note { margin: .1rem 0 .5rem; color: var(--ds-text-700); font-size: .8rem; }

.stage-screen { flex: 1; overflow-y: auto; padding: .9rem 1rem 1.1rem; position: relative; }
.view-intro { color: var(--ds-text-700); font-size: .92rem; margin: 0 0 .9rem; }
.empty-note { color: var(--ds-text-700); font-size: .95rem; }

/* thread list */

.thread-list, .queue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.thread-row {
  width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid var(--ds-line-light); border-radius: var(--ds-radius-md);
  padding: .8rem .9rem; min-height: 56px;
  display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem;
  font: inherit; color: inherit;
}
.thread-row:hover { border-color: var(--ds-teal); }
.thread-name { font-weight: 750; font-size: 1.02rem; }
.thread-org { color: var(--ds-text-700); font-size: .84rem; }
.thread-preview { grid-column: 1 / -1; color: var(--ds-text-700); font-size: .9rem; }
.unread-dot {
  grid-row: 1; align-self: center;
  background: var(--ds-teal); color: #fff; font-size: .72rem; font-weight: 800;
  border-radius: 999px; padding: .18rem .55rem;
}

/* conversation */

.back-btn {
  min-height: 48px; padding: .5rem .9rem .5rem .4rem;
  background: none; border: none; cursor: pointer;
  color: var(--ds-teal); font: inherit; font-weight: 750; font-size: 1rem;
}
.thread-title { margin: .1rem 0 .8rem; font-size: 1.12rem; }
.bubble-stream { display: grid; gap: .55rem; margin-bottom: 1rem; }
.bubble {
  max-width: 85%; padding: .6rem .8rem; border-radius: 16px;
  font-size: .96rem; line-height: 1.5; overflow-wrap: anywhere;
}
.bubble.them { background: var(--ds-paper-200); border-bottom-left-radius: 4px; justify-self: start; }
.bubble.me { background: var(--ds-ink-900); color: #fff; border-bottom-right-radius: 4px; justify-self: end; }
.bubble .bubble-meta { display: block; font-size: .72rem; opacity: .75; margin-top: .25rem; }

.composer { display: flex; gap: .5rem; align-items: stretch; }
.composer textarea {
  flex: 1; font: inherit; font-size: .96rem;
  border: 1.5px solid var(--ds-line-light); border-radius: 12px;
  padding: .55rem .7rem; resize: vertical; min-height: 48px; background: #fff; color: inherit;
}
.send-btn {
  min-width: 64px; min-height: 48px; cursor: pointer;
  background: var(--ds-teal); color: #fff; border: none; border-radius: 12px;
  font: inherit; font-weight: 800;
}

/* queue */

.queue-card {
  background: #fff; border: 1.5px solid var(--ds-line-light); border-radius: var(--ds-radius-md);
  padding: .9rem;
}
.queue-card h3 { margin: 0 0 .15rem; font-size: 1.05rem; }
.queue-org { color: var(--ds-text-700); font-size: .86rem; margin: 0 0 .5rem; }
.fit-note { font-size: .92rem; margin: 0 0 .5rem; }
.fit-note strong { color: var(--ds-teal); }
.queue-status { font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.status-waiting { color: var(--ds-text-700); }
.status-drafted { color: var(--ds-gold-600); }
.status-sent { color: var(--ds-teal); }
.status-suppressed { color: var(--ds-danger); }
.suppress-note {
  border-left: 5px solid var(--ds-danger); background: #fdf0f1;
  padding: .55rem .7rem; font-size: .9rem; margin: .4rem 0 0; border-radius: 0 8px 8px 0;
}

/* approvals */

.approval-card {
  background: #fff; border: 2px solid var(--ds-gold-500); border-radius: var(--ds-radius-lg);
  padding: 1rem; margin-bottom: 1rem; box-shadow: 0 10px 30px rgba(7, 19, 31, .08);
}
.approval-kind {
  font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ds-gold-600); margin: 0 0 .2rem;
}
.approval-to { font-weight: 750; font-size: 1.05rem; margin: 0 0 .6rem; }
.approval-draft {
  width: 100%; font: inherit; font-size: .96rem; line-height: 1.55;
  border: 1.5px solid var(--ds-line-light); border-radius: 12px;
  padding: .6rem .7rem; background: var(--ds-paper-100); color: inherit; resize: vertical;
}
.approval-actions { display: flex; gap: .6rem; margin-top: .7rem; flex-wrap: wrap; }
.approve-btn {
  flex: 1 1 150px; min-height: 52px; cursor: pointer;
  background: var(--ds-gold-300); color: var(--ds-ink-950);
  border: none; border-radius: 999px; font: inherit; font-weight: 800; font-size: 1rem;
}
.skip-btn {
  flex: 0 1 110px; min-height: 52px; cursor: pointer;
  background: transparent; color: var(--ds-text-900);
  border: 1.5px solid var(--ds-text-700); border-radius: 999px; font: inherit; font-weight: 700;
}

/* tab bar */

.tabbar {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  border-top: 1.5px solid var(--ds-line-light); background: var(--ds-paper-100);
}
.tab {
  min-height: 58px; cursor: pointer; position: relative;
  background: none; border: none; font: inherit; font-weight: 700; font-size: .94rem;
  color: var(--ds-text-700); padding: .5rem .2rem;
}
.tab[aria-pressed="true"] { color: var(--ds-ink-900); box-shadow: inset 0 3px 0 var(--ds-teal); }
.badge {
  display: inline-block; min-width: 1.45rem; text-align: center;
  background: var(--ds-danger); color: #fff; border-radius: 999px;
  font-size: .76rem; font-weight: 800; padding: .08rem .35rem; vertical-align: super;
}

/* agent focus highlight — where the agent is "looking" */

.agent-focus {
  outline: 3px solid var(--ds-teal) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(14, 124, 123, .22);
  transition: box-shadow .2s var(--ease-out);
}

/* ---------- agent panel ---------- */

.agent-panel h2 {
  font-family: var(--ds-font-display); font-weight: 600;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin: 0 0 1rem; line-height: 1.12;
}

.flows { display: grid; gap: .7rem; margin-bottom: 1.4rem; }
.flow-btn {
  text-align: left; cursor: pointer; min-height: 60px;
  background: var(--ds-ink-900); color: #fff;
  border: none; border-radius: var(--ds-radius-md);
  padding: .8rem 1rem; font: inherit;
  display: grid; gap: .1rem;
  transition: transform .16s var(--ease-out);
}
.flow-btn:hover { transform: translateY(-1px); }
.flow-btn:disabled { opacity: .55; cursor: wait; transform: none; }
.flow-title { font-weight: 800; font-size: 1.02rem; }
.flow-sub { color: var(--ds-text-300); font-size: .86rem; }

.command-form label { font-weight: 750; display: block; margin-bottom: .45rem; }
.command-row { display: flex; gap: .5rem; }
.command-row input {
  flex: 1; min-width: 0; min-height: 52px;
  font: inherit; font-size: 1rem;
  border: 1.5px solid var(--ds-text-700); border-radius: 12px;
  padding: .5rem .8rem; background: #fff; color: inherit;
}
.mic-btn {
  flex: none; width: 52px; min-height: 52px; cursor: pointer;
  background: var(--ds-paper-50); color: var(--ds-teal);
  border: 1.5px solid var(--ds-teal); border-radius: 12px;
  display: grid; place-items: center;
}
.mic-btn svg { width: 24px; height: 24px; }
.mic-btn.listening { background: var(--ds-danger); border-color: var(--ds-danger); color: #fff; }
.mic-btn:disabled { opacity: .45; cursor: not-allowed; }
.run-btn {
  flex: none; min-height: 52px; padding: 0 1.3rem; cursor: pointer;
  background: var(--ds-gold-300); color: var(--ds-ink-950);
  border: none; border-radius: 999px; font: inherit; font-weight: 800;
}
.hint { color: var(--ds-text-700); font-size: .86rem; margin: .45rem 0 0; min-height: 1.2em; }

.switch-row { margin: 1.2rem 0 1.4rem; }
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 700; min-height: 48px; }
.switch input { width: 26px; height: 26px; accent-color: var(--ds-teal); }

.log-heading { font-size: 1.05rem; margin: 0 0 .6rem; }
.action-log {
  list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem;
  max-height: 380px; overflow-y: auto;
}
.action-log li {
  background: var(--ds-paper-50); border: 1px solid var(--ds-line-light);
  border-left: 5px solid var(--ds-teal);
  border-radius: 0 10px 10px 0; padding: .55rem .75rem; font-size: .94rem;
}
.action-log li.log-user { border-left-color: var(--ds-gold-500); }
.action-log li.log-refusal { border-left-color: var(--ds-danger); }
.action-log li.log-done { border-left-color: var(--ds-ink-900); font-weight: 650; }

/* ---------- footer ---------- */

.site-foot {
  background: var(--ds-ink-900); color: var(--ds-text-300);
  padding: 2.2rem clamp(1.25rem, 4vw, 3rem);
}
.site-foot p { max-width: 46rem; margin: 0 auto .8rem; font-size: .95rem; }
.site-foot strong { color: #fff; }
.foot-meta { color: var(--ds-gold-300); font-size: .85rem; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .flow-btn:hover { transform: none; }
}

/* research card (agent's org-profile step inside the thread view) */

.research-card {
  background: #eef6f6; border: 1.5px solid var(--ds-teal);
  border-radius: var(--ds-radius-md); padding: .7rem .8rem; margin-bottom: .9rem;
}
.research-kind {
  font-size: .72rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ds-teal); margin: 0 0 .2rem;
}
.research-text { margin: 0 0 .3rem; font-size: .92rem; }
.research-note { margin: 0; font-size: .78rem; color: var(--ds-text-700); }

/* ---------- v2: Today, missions, forms, studio, profile ---------- */

.tabbar { grid-template-columns: 1fr 1fr 1fr 1fr; }
.tab { font-size: .86rem; }

.today-greeting { font-family: var(--ds-font-display); font-size: 1.45rem; margin: .1rem 0 .4rem; }
.today-progress { display: flex; align-items: center; gap: .7rem; margin: .6rem 0 1rem; }
.sparks { display: inline-flex; gap: .4rem; }
.spark {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--ds-gold-500); background: transparent;
  transition: background .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.spark.lit { background: var(--ds-gold-300); box-shadow: 0 0 10px rgba(232, 200, 90, .75); }
.today-progress-text { margin: 0; font-weight: 700; font-size: .95rem; }

.next-action-btn {
  width: 100%; text-align: left; cursor: pointer; min-height: 76px;
  background: var(--ds-teal); color: #fff; border: none;
  border-radius: var(--ds-radius-lg); padding: 1rem 1.1rem; font: inherit;
  display: grid; gap: .15rem; box-shadow: 0 12px 28px rgba(14, 124, 123, .3);
}
.next-action-btn:disabled { opacity: .6; cursor: default; box-shadow: none; }
.next-action-kind { font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; opacity: .85; }
.next-action-label { font-weight: 850; font-size: 1.18rem; line-height: 1.25; }
.next-action-sub { font-size: .88rem; opacity: .92; }

.today-clear { font-weight: 750; color: var(--ds-teal); font-size: 1rem; margin: .8rem 0 0; }

.missions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .55rem; margin-top: 1rem; }
.mission-btn {
  cursor: pointer; min-height: 64px; text-align: left;
  background: #fff; border: 1.5px solid var(--ds-line-light); border-radius: var(--ds-radius-md);
  padding: .6rem .7rem; font: inherit; color: inherit; display: grid; gap: .1rem;
}
.mission-btn:disabled { opacity: .55; cursor: wait; }
.mission-title { font-weight: 800; font-size: .98rem; }
.mission-sub { color: var(--ds-text-700); font-size: .78rem; line-height: 1.35; }

.text-btn {
  background: none; border: none; cursor: pointer; min-height: 48px;
  color: var(--ds-teal); font: inherit; font-weight: 750; padding: .4rem 0; margin-top: .4rem;
}
.today-note { color: var(--ds-text-700); font-size: .82rem; margin: .3rem 0 0; }

.yours-tag { color: var(--ds-gold-600); font-weight: 800; }
.queue-draft-btn {
  min-height: 48px; cursor: pointer; margin-top: .55rem; padding: 0 1.1rem;
  background: var(--ds-ink-900); color: #fff; border: none; border-radius: 999px;
  font: inherit; font-weight: 750; font-size: .92rem;
}

.person-form {
  margin-top: 1.2rem; background: #fff; border: 1.5px solid var(--ds-line-light);
  border-radius: var(--ds-radius-lg); padding: 1rem;
}
.person-form h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.form-note { color: var(--ds-text-700); font-size: .86rem; margin: 0 0 .6rem; }
.person-form label, .studio label, .profile label {
  display: block; font-weight: 700; font-size: .9rem; margin: .65rem 0 .3rem;
}
.person-form input[type="text"], .person-form textarea, .person-form select,
.studio select, .profile input[type="text"], .profile select {
  width: 100%; min-height: 48px; font: inherit; font-size: .96rem;
  border: 1.5px solid var(--ds-line-light); border-radius: 10px;
  padding: .5rem .65rem; background: var(--ds-paper-50); color: inherit;
}
.person-form textarea { min-height: 64px; resize: vertical; }
.check-row { display: flex !important; align-items: flex-start; gap: .55rem; font-weight: 600 !important; cursor: pointer; }
.check-row input { width: 24px; height: 24px; flex: none; accent-color: var(--ds-danger); }
.form-submit {
  width: 100%; min-height: 52px; cursor: pointer; margin-top: .8rem;
  background: var(--ds-gold-300); color: var(--ds-ink-950); border: none;
  border-radius: 999px; font: inherit; font-weight: 800;
}

.flow-btn-gold { background: var(--ds-gold-500); color: var(--ds-ink-950); }
.flow-btn-gold .flow-sub { color: var(--ds-ink-800); }

.approval-actions-secondary { margin-top: .5rem; }
.mini-btn {
  min-height: 48px; cursor: pointer; padding: 0 1rem;
  background: var(--ds-paper-50); color: var(--ds-text-900);
  border: 1.5px solid var(--ds-text-700); border-radius: 999px;
  font: inherit; font-weight: 700; font-size: .92rem;
}
.mini-btn-danger { border-color: var(--ds-danger); color: var(--ds-danger); }
.bridge-note { color: var(--ds-text-700); font-size: .8rem; margin: .55rem 0 0; }
.saved-heading { font-size: 1.05rem; margin: 1.2rem 0 .6rem; }
.saved-card { border-color: var(--ds-line-light); box-shadow: none; }
.saved-text { font-size: .92rem; color: var(--ds-text-700); margin: 0 0 .4rem; white-space: pre-wrap; }

.studio, .profile {
  border: 1.5px solid var(--ds-line-light); border-radius: var(--ds-radius-lg);
  background: var(--ds-paper-50); padding: 1rem 1.1rem 1.1rem; margin-bottom: 1.4rem;
}
.studio h3, .profile h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
.studio-btn { width: 100%; margin-top: .8rem; }
.trust-row { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: .9rem; }

@media (prefers-reduced-motion: reduce) {
  .spark { transition: none; }
}

/* ---------- v2.1: counters, provenance, follow-ups, import, nudges ---------- */

.caps-line {
  color: var(--ds-text-700); font-size: .84rem; font-weight: 650;
  margin: .55rem 0 0;
}

.provenance {
  color: var(--ds-text-700); font-size: .78rem; font-style: italic;
  margin: 0 0 .45rem;
}
.approval-prov {
  color: var(--ds-text-700); font-size: .8rem; font-style: italic;
  margin: -.3rem 0 .55rem;
}

.followups {
  margin-top: 1.1rem; background: #fff;
  border: 1.5px solid var(--ds-teal); border-radius: var(--ds-radius-md);
  padding: .8rem .9rem;
}
.followups-title { margin: 0 0 .25rem; font-size: 1rem; color: var(--ds-teal); }
.followups-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .6rem; }
.followup-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; flex-wrap: wrap;
}
.followup-who { font-size: .92rem; }
.followup-due {
  display: inline-block; margin-left: .4rem;
  background: var(--ds-paper-200); border-radius: 999px;
  padding: .08rem .5rem; font-size: .74rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ds-text-700);
}
.followup-actions { display: inline-flex; gap: .45rem; flex-wrap: wrap; }

.import-form code {
  background: var(--ds-paper-200); border-radius: 6px;
  padding: .05rem .35rem; font-size: .86em;
}
.import-list { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; gap: .5rem; }
.import-row {
  border: 1.5px solid var(--ds-line-light); border-radius: 10px;
  padding: .55rem .65rem; display: grid; gap: .35rem; background: var(--ds-paper-50);
}
.import-row.import-dupe { opacity: .65; }
.import-main { display: flex !important; align-items: flex-start; gap: .55rem; margin: 0 !important; cursor: pointer; }
.import-main input { width: 24px; height: 24px; flex: none; accent-color: var(--ds-teal); }
.import-note { display: block; color: var(--ds-text-700); font-size: .84rem; font-weight: 400; }
.import-dnc { display: flex !important; align-items: center; gap: .5rem; margin: 0 !important; font-size: .84rem !important; cursor: pointer; }
.import-dnc input { width: 22px; height: 22px; accent-color: var(--ds-danger); }
.import-badge {
  font-size: .76rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ds-danger);
}

.nudge-offer {
  border: 2px solid var(--ds-teal); border-radius: var(--ds-radius-lg);
  background: #eef6f6; padding: .9rem 1rem; margin-bottom: 1.4rem;
}
.nudge-offer[hidden] { display: none; }
.nudge-offer-text { margin: 0 0 .6rem; font-size: .98rem; }
.nudge-offer-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.approval-card:focus-visible { outline-color: var(--ds-teal); }

/* ---------- v2.2: the sponsor stack panel ---------- */

.integrations {
  border: 1.5px solid var(--ds-line-light); border-radius: var(--ds-radius-lg);
  background: var(--ds-paper-50); padding: 1rem 1.1rem 1.1rem; margin-bottom: 1.4rem;
}
.integrations h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
.integrations label {
  display: block; font-weight: 700; font-size: .9rem; margin: .65rem 0 .3rem;
}
.integrations input[type="text"], .integrations input[type="password"] {
  width: 100%; min-height: 48px; font: inherit; font-size: .96rem;
  border: 1.5px solid var(--ds-line-light); border-radius: 10px;
  padding: .5rem .65rem; background: #fff; color: inherit;
}
.integration-row {
  border-top: 1.5px solid var(--ds-line-light);
  padding: .9rem 0 .4rem; margin-top: .9rem;
}
.integration-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; flex-wrap: wrap;
}
.integration-head h4 { margin: 0; font-size: 1rem; }
.integration-status {
  font-size: .76rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ds-text-700);
  background: var(--ds-paper-200); border-radius: 999px; padding: .2rem .6rem;
}
.integration-status.on { background: var(--ds-teal); color: #fff; }
.integration-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .7rem; }
.integration-msg { font-size: .88rem; color: var(--ds-text-700); margin: .55rem 0 .3rem; }
.integration-msg:empty { margin: 0; }

/* ---------- v2.3: impact panel, warmth report, judge mode, captured ---------- */

.impact {
  border: 1.5px solid var(--ds-line-light); border-radius: var(--ds-radius-lg);
  background: var(--ds-paper-50); padding: 1rem 1.1rem 1.1rem; margin: 1.2rem 0 .4rem;
}
.impact-title { margin: 0 0 .2rem; font-size: 1.15rem; }
.impact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin: .7rem 0 .9rem;
}
.impact-tile {
  background: #fff; border: 1.5px solid var(--ds-line-light);
  border-radius: var(--ds-radius-md); padding: .65rem .75rem; display: grid; gap: .05rem;
}
.impact-num { font-size: 1.7rem; font-weight: 850; color: var(--ds-ink-900); line-height: 1.1; }
.impact-label { font-weight: 800; font-size: .95rem; }
.impact-sub { font-size: .8rem; color: var(--ds-text-700); line-height: 1.4; }

.pitch-banner {
  background: var(--ds-ink-900); color: var(--ds-paper-50);
  border: 2px solid var(--ds-gold-500); border-radius: var(--ds-radius-lg);
  padding: 1rem 1.1rem 1.1rem; margin-bottom: 1.1rem;
}
.pitch-kicker {
  margin: 0 0 .35rem; font-size: .74rem; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ds-gold-300);
}
.pitch-text { margin: 0 0 .8rem; font-size: 1.02rem; line-height: 1.55; }

body.judge-on .next-action-btn {
  min-height: 108px; padding: 1.3rem 1.2rem;
  box-shadow: 0 16px 40px rgba(14, 124, 123, .45);
  outline: 3px solid var(--ds-gold-300); outline-offset: 3px;
}
body.judge-on .next-action-label { font-size: 1.45rem; }

.captured-block {
  border: 1.5px dashed var(--ds-gold-500); border-radius: var(--ds-radius-md);
  background: var(--ds-paper-100); padding: .8rem .9rem; margin-top: .8rem;
}
.captured-kind {
  margin: 0 0 .5rem; font-size: .76rem; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; color: var(--ds-gold-600);
}
.captured-item { border-top: 1.5px solid var(--ds-line-light); padding: .6rem 0 .2rem; }
.captured-item:first-of-type { border-top: none; padding-top: 0; }
.captured-query { margin: 0 0 .2rem; font-size: .85rem; font-weight: 700; }
.captured-title { margin: 0 0 .15rem; font-weight: 800; }
.captured-snippet { margin: 0 0 .15rem; font-size: .92rem; }
.captured-url { margin: 0; font-size: .8rem; color: var(--ds-text-700); overflow-wrap: anywhere; }
.captured-note { margin: .6rem 0 0; font-size: .85rem; color: var(--ds-text-700); }

/* ---------------- v2.4: packs, bridge, Pro ---------------- */

.pack-bar {
  border: 1.5px solid var(--ds-line-light); border-radius: var(--ds-radius-md);
  background: var(--ds-paper-100); padding: .8rem .9rem; margin-bottom: 1rem;
}
.pack-title { margin: 0 0 .3rem; font-size: 1rem; }
.pack-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
.pack-btn.pack-on {
  background: var(--ds-ink-900); color: var(--ds-paper-50); border-color: var(--ds-ink-900);
}
.pack-active { margin: .6rem 0 0; font-size: .9rem; line-height: 1.5; }

/* ---------------- v2.5: holding mode — the fleet ---------------- */

.holding-bar {
  border: 1.5px solid var(--ds-gold-500);
  background: #fffdf4;
}
.holding-btn { border-color: var(--ds-gold-500); }
.impact-scope { margin: 0 0 .6rem; font-size: .88rem; font-weight: 600; line-height: 1.45; }

.bridge-row { margin-top: .35rem; }

.pro-card {
  border: 2px solid var(--ds-gold-500); border-radius: var(--ds-radius-lg);
  background: #fff; padding: 1rem 1.1rem 1.1rem; margin-top: 1.2rem;
}
.pro-card h3 { margin-top: 0; }
.pro-btn { display: inline-block; text-decoration: none; margin-top: .4rem; }
