:root {
  --navy: #12383a;
  --navy-2: #1c4f51;
  --blue: #0b7a63;
  --blue-soft: #e2f3ee;
  --ink: #0f1b2d;
  --muted: #5b6878;
  --line: #dfe5ec;
  --bg: #f4f6f9;
  --card: #ffffff;
  --good: #0f7b4f;
  --good-soft: #e3f5ec;
  --warn: #9a5b00;
  --warn-soft: #fff3dc;
  --bad: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 37, 64, .06), 0 8px 24px rgba(10, 37, 64, .06);
}

* { box-sizing: border-box; }

html { scroll-padding-top: 84px; }

body {
  margin: 0;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- chrome ---------- */

.demo-banner {
  background: #fff3dc;
  color: #5c3b00;
  font-size: 12.5px;
  text-align: center;
  padding: 6px 12px;
  border-bottom: 1px solid #f0d9a4;
}

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--navy);
  color: #fff;
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }

.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: #fff; color: var(--navy); font-weight: 800;
}
.brand-name { font-weight: 700; letter-spacing: .02em; font-size: 18px; }
.brand-name em { font-style: normal; font-weight: 400; opacity: .8; }
.brand-tag {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 1px 8px; opacity: .85;
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.ghost-btn {
  font: inherit; font-size: 14px; color: #fff; cursor: pointer;
  background: transparent; border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px; padding: 6px 14px;
}
.ghost-btn:hover { background: rgba(255, 255, 255, .1); }
.member-pill { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy-2); border: 1px solid rgba(255, 255, 255, .3);
  font-size: 11px; font-weight: 700;
}

main { padding-top: 8px; padding-bottom: 170px; }

/* ---------- welcome ---------- */

.welcome { padding: 56px 0 8px; }
.eyebrow { margin: 0 0 6px; color: var(--blue); font-weight: 600; }
.welcome h1 { margin: 0; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -.02em; color: var(--navy); }
.lede { margin: 12px 0 32px; color: var(--muted); max-width: 56ch; font-size: 17px; }

.suggest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.suggest-col { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.suggest-col h2 { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.suggest-col .chip { text-align: left; border-radius: 12px; padding: 10px 12px; }

.chip {
  font: inherit; font-size: 14px; color: var(--navy); cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
  transition: border-color .12s, background .12s;
}
.chip:hover { border-color: var(--blue); background: var(--blue-soft); }

/* ---------- thread ---------- */

.exchange { padding: 22px 0 6px; }
.q {
  margin: 0 0 14px auto; width: fit-content; max-width: 85%;
  background: var(--navy); color: #fff;
  padding: 10px 16px; border-radius: 18px 18px 4px 18px;
}
.a-text { margin: 0 0 12px; font-size: 17px; }
.a-text strong { color: var(--navy); }

.pending { display: inline-flex; gap: 5px; padding: 8px 0; }
.pending i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .35; animation: blink 1s infinite; }
.pending i:nth-child(2) { animation-delay: .15s; }
.pending i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: 1; } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; overflow: hidden;
}
.card h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.card-note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }

.followups { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* rows (accounts, bills, policies) */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 10px; border-top: 1px solid var(--line); border-radius: 8px;
}
.row:first-child { border-top: 0; }
.row.hl { background: var(--blue-soft); border-top-color: transparent; }
.row.hl + .row { border-top-color: transparent; }
.row-main { min-width: 0; }
.row-title { font-weight: 600; }
.row-sub { font-size: 13px; color: var(--muted); }
.row-amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-amt small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }

.big-stat { font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); font-variant-numeric: tabular-nums; }
.big-stat small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--blue-soft); color: var(--blue); }

/* spending */
.bars { display: grid; gap: 9px; margin-bottom: 16px; }
.bar { display: grid; grid-template-columns: 120px 1fr 90px; gap: 10px; align-items: center; font-size: 14px; }
.bar-track { height: 9px; background: #eef2f6; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--blue); border-radius: 99px; }
.bar-amt { text-align: right; font-variant-numeric: tabular-nums; }

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 6px 8px; }
td { padding: 9px 8px; border-top: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.pos { color: var(--good); font-weight: 600; }
tr.extra { display: none; }
.expanded tr.extra { display: table-row; }
.table-scroll { overflow-x: auto; }

/* forms inside cards */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.field input, .field select {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; width: 100%;
}
.field input:focus, .field select:focus, .composer input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--blue); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.link-btn { font: inherit; font-size: 14px; color: var(--blue); background: none; border: 0; padding: 0; cursor: pointer; margin-top: 10px; }
.link-btn:hover { text-decoration: underline; }
.error { color: var(--bad); font-size: 14px; }

.result-box { margin-top: 14px; padding: 14px; border-radius: 12px; background: #f6f9fc; border: 1px solid var(--line); }
.result-box.success { background: var(--good-soft); border-color: #bfe5d1; }
.stat-row { display: flex; gap: 28px; flex-wrap: wrap; }
.stat-row > div { min-width: 120px; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-val { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--navy); }

/* timeline + lists */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 28px; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 2px solid var(--line);
}
.timeline li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--good); border-color: var(--good); }
.timeline li.now::before { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.timeline .t-title { font-weight: 600; }
.timeline .t-sub { font-size: 13px; color: var(--muted); }

.checklist { margin: 0; padding-left: 20px; }
.checklist li { margin: 6px 0; }

/* ---------- composer ---------- */

.composer-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 28px 0 10px;
  background: linear-gradient(to bottom, rgba(244, 246, 249, 0), var(--bg) 34%);
}
.composer { display: flex; gap: 8px; }
.composer input {
  flex: 1; min-width: 0; font: inherit; font-size: 17px; color: var(--ink);
  background: #fff; border: 1px solid #c9d3df; border-radius: 16px;
  padding: 15px 18px; box-shadow: var(--shadow);
}
.composer button {
  width: 54px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--navy); color: #fff; display: grid; place-items: center;
}
.composer button:hover { background: var(--navy-2); }
.composer-note { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted); padding: 0 16px; }

@media (max-width: 720px) {
  .suggest-grid { grid-template-columns: 1fr; }
  .form-grid, .form-grid.two { grid-template-columns: 1fr; }
  .welcome { padding-top: 32px; }
  .member-pill { display: none; }
  .bar { grid-template-columns: 96px 1fr 80px; }
}

/* ---------- guest (logged-out) experience ---------- */

a.ghost-btn { text-decoration: none; display: inline-block; }
a.btn { text-decoration: none; display: inline-block; }
.kb-note { margin: 22px 0 0; font-size: 13px; color: var(--muted); }

.checklist li.hl { background: var(--blue-soft); border-radius: 6px; padding: 4px 8px; margin-left: -8px; font-weight: 600; }

.related .row { align-items: flex-start; padding: 10px 4px; }
.row-link {
  font: inherit; font-weight: 600; color: var(--blue); cursor: pointer;
  background: none; border: 0; padding: 0; text-align: left;
}
.row-link:hover { text-decoration: underline; }
.src { color: var(--muted); text-decoration: none; font-size: 18px; padding: 0 4px; }
.src:hover { color: var(--blue); }
.card + .card { margin-top: 12px; }

/* ---------- side panel ---------- */

.panel-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(10, 37, 64, .38); }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(460px, 100vw);
  display: flex; flex-direction: column;
  background: var(--card); border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(10, 37, 64, .18);
  animation: panel-in .18s ease-out;
}
.panel[hidden], .panel-backdrop[hidden] { display: none; }
@keyframes panel-in { from { transform: translateX(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } }
body.panel-open { overflow: hidden; }

.panel-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #eef2f6; border-bottom: 1px solid var(--line);
}
.panel-dots { display: flex; gap: 5px; }
.panel-dots i { width: 9px; height: 9px; border-radius: 50%; background: #c9d3df; }
.panel-url {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; color: var(--muted);
}
.panel-close {
  width: 32px; height: 32px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--navy); font-size: 22px; line-height: 1;
}
.panel-close:hover { background: #dfe5ec; }

.panel-body { flex: 1; overflow-y: auto; padding: 18px 20px 28px; }
.panel-flag {
  margin: 0 0 16px; padding: 8px 12px; border-radius: 10px;
  background: var(--warn-soft); color: #5c3b00; font-size: 13px;
}
.panel-body h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; color: var(--navy); }
.panel-body h3 { margin: 22px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.panel-lede { margin: 0; font-size: 17px; }
.panel-more { display: flex; flex-wrap: wrap; gap: 8px; }

button.src { background: none; border: 0; cursor: pointer; font-size: 24px; line-height: 1; }
