/* ────── herekind legacy planning — design tokens ────── */
:root {
  --cream: #faf9f5;
  --cream-warm: #f2f1e9;
  --cream-darker: #e9e5d5;
  --paper: #ffffff;

  --ink: #323232;
  --ink-strong: #090909;
  --muted: #717171;
  --muted-2: #a1a1aa;

  --blue: #35619e;
  --blue-deep: #2a4d7e;
  --blue-light: #99b2d4;
  --blue-wash: #eaf0f8;

  --border: #e4e4e7;
  --border-soft: #efece4;

  --green-bg: #bbf7d0;
  --green-dot: #10b981;
  --aqua-bg:  #a5f3fc;
  --aqua-dot: #0ea5e9;
  --grey-bg:  #e5e7eb;
  --grey-dot: #6b7280;
  --amber-bg: #fef3c7;
  --amber-dot: #f59e0b;

  --shadow-card: 0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.10);
  --shadow-soft: 0 4px 18px rgba(20,30,55,0.06);
  --shadow-deep: 0 4px 24px rgba(0,0,0,0.10);

  --radius-card: 12px;
  --radius-pill: 999px;
  --radius-big:  28px;

  --font-serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-body:  "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-ui:    "Geist", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ────── layout ────── */
.app-shell {
  min-height: 100%;
  display: grid;
  grid-template-columns: 264px 1fr;
}
.main-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.app-header {
  height: 72px;
  border-bottom: 1px solid var(--blue-light);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cream);
}
.brand-mark {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.5px;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark .flower {
  width: 28px; height: 28px; display: inline-block;
}
.greet {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 300;
  color: var(--blue);
}

.app-content {
  padding: 40px 56px 80px;
  max-width: 1180px;
  width: 100%;
}

/* ────── sidebar ────── */
.sidebar {
  background: var(--cream);
  border-right: 1px solid var(--blue-light);
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
}
.sidebar-label {
  font-family: var(--font-ui);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 0 12px;
  margin-top: 6px;
}
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: #3f3f46;
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
  width: 100%;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-item:hover { background: rgba(53,97,158,0.06); }
.nav-item.active {
  background: var(--blue-wash);
  color: var(--blue);
}
.nav-item .ico { width: 18px; height: 18px; flex-shrink: 0; color: currentColor; }
.nav-pin {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding: 14px;
  background: var(--cream-warm);
  border-radius: 10px;
  border: 1px solid var(--border-soft);
}
.nav-pin .title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--blue);
}
.nav-pin .body {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink);
  line-height: 1.45;
}

/* ────── cards ────── */
.card {
  background: var(--paper);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.card-big {
  background: var(--cream-warm);
  border-radius: var(--radius-big);
  border: none;
  box-shadow: var(--shadow-soft);
}

/* ────── buttons ────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  background: var(--ink-strong);
  color: white;
  transition: transform 0.05s ease, opacity 0.12s, background 0.12s;
  cursor: pointer;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: translateY(1px); }
.btn-outline {
  background: transparent;
  color: var(--ink-strong);
  border-color: var(--border);
}
.btn-outline:hover { background: rgba(0,0,0,0.03); }
.btn-blue {
  background: var(--blue);
  color: white;
}
.btn-ghost {
  background: transparent;
  color: var(--blue);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--blue-wash); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }

/* ────── status pill ────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 10px;
  font-family: "Helvetica Neue", var(--font-body);
  font-size: 13px;
  color: var(--ink-strong);
  white-space: nowrap;
}
.status-pill .dot { width: 10px; height: 10px; border-radius: 50%; }
.status-complete { background: var(--green-bg); }
.status-complete .dot { background: var(--green-dot); }
.status-progress { background: var(--aqua-bg); }
.status-progress .dot { background: var(--aqua-dot); }
.status-notstarted { background: var(--grey-bg); }
.status-notstarted .dot { background: var(--grey-dot); }
.status-attention { background: var(--amber-bg); }
.status-attention .dot { background: var(--amber-dot); }

/* ────── headings ────── */
.h-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--blue);
}
.h-1 { font-size: 56px; line-height: 1.05; letter-spacing: -0.01em; }
.h-2 { font-size: 36px; line-height: 1.1; }
.h-3 { font-size: 28px; line-height: 1.15; }
.h-4 { font-size: 22px; line-height: 1.2; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ────── urgency banner ────── */
.urgency-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(95deg, #2a4d7e 0%, #35619e 60%, #4f7ab8 100%);
  color: white;
  padding: 16px 22px;
  border-radius: 14px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-deep);
}
.urgency-banner .label {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.78;
}
.urgency-banner .copy {
  font-family: var(--font-serif);
  font-size: 22px;
}
.urgency-banner .spacer { flex: 1; }
.urgency-banner button {
  background: rgba(255,255,255,0.14);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
}
.urgency-banner button:hover { background: rgba(255,255,255,0.22); }

/* ────── progress ring ────── */
.ring-wrap { position: relative; display: inline-block; }
.ring-wrap .label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ring-wrap .pct {
  font-family: var(--font-serif);
  color: var(--blue);
  font-size: 56px;
  line-height: 1;
}
.ring-wrap .pct-small {
  font-family: var(--font-serif);
  color: var(--blue);
  font-size: 28px;
}
.ring-wrap .sub {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 4px;
}

/* ────── pillar grid ────── */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.pillar-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  text-align: left;
  font: inherit;
}
.pillar-card:hover {
  border-color: var(--blue-light);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}
.pillar-card .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pillar-card .pillar-ico {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream-warm);
  color: var(--blue);
}
.pillar-card .name {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--blue);
  line-height: 1.1;
}
.pillar-card .count {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pillar-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--cream-darker);
  overflow: hidden;
}
.pillar-bar .fill {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.pillar-card .pct-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
}
.pillar-card .pct-label .num {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--blue);
}

/* ────── timeline / stages (legacy folder metaphor) ────── */
.folder-stack { display: flex; flex-direction: column; gap: 8px; }
.folder-row {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 18px;
  align-items: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.folder-row:hover { border-color: var(--blue-light); background: #fafbfc; }
.folder-tab {
  width: 44px; height: 36px;
  border-radius: 4px 4px 8px 8px;
  background: var(--cream-warm);
  border: 1px solid var(--cream-darker);
  position: relative;
}
.folder-tab.complete { background: var(--green-bg); border-color: #86c39a; }
.folder-tab.progress { background: var(--aqua-bg); border-color: #6bbed4; }
.folder-tab::before {
  content: "";
  position: absolute;
  top: -6px; left: 4px;
  width: 16px; height: 6px;
  background: inherit;
  border-radius: 3px 3px 0 0;
  border: 1px solid currentColor;
  border-color: inherit;
  border-bottom: none;
}
.folder-row .label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.folder-row .label .name {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--blue);
  line-height: 1.1;
}
.folder-row .label .meta {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}

/* ────── task / document rows ────── */
.task-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background .12s;
}
.task-row:hover { background: var(--cream); }
.task-row.active { background: var(--blue-wash); box-shadow: inset 3px 0 0 var(--blue); }
.task-row:last-child { border-bottom: none; }
.task-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--blue-light);
  background: white;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.task-check.done {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.task-check.done svg { width: 12px; height: 12px; }
.task-title {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--ink-strong);
}
.task-meta {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
}
.task-row.done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,0.25); }

/* ────── chips ────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cream-warm);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 12px;
  border: 1px solid var(--border-soft);
}
.chip.blue {
  background: var(--blue-wash);
  color: var(--blue-deep);
  border-color: #c8d5ea;
}

/* ────── modal ────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,28,52,0.42);
  display: flex; align-items: center; justify-content: center;
  z-index: 800;
  padding: 24px;
  animation: fadeIn 0.18s ease;
}
.modal {
  background: white;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 30px 60px rgba(0,0,0,0.18);
  max-height: 88vh;
  overflow: auto;
}
.modal-head { padding: 28px 32px 0; }
.modal-body { padding: 18px 32px 24px; }
.modal-foot {
  padding: 16px 32px 24px;
  display: flex; gap: 10px; justify-content: flex-end;
  border-top: 1px solid var(--border-soft);
  margin-top: 12px;
  padding-top: 18px;
}

/* ────── form ────── */
label.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
label.field .lbl {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-strong);
  font-weight: 500;
}
label.field .hint {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
}
.input, .textarea, .select {
  font: inherit;
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  outline: none;
  color: var(--ink-strong);
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(53,97,158,0.10); }
.textarea { resize: vertical; min-height: 90px; font-family: var(--font-body); }

/* ────── dropzone ────── */
.dropzone {
  border: 1.5px dashed var(--blue-light);
  background: var(--cream);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  font-family: var(--font-ui);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--blue); background: var(--blue-wash); }
.dropzone strong { color: var(--blue); font-weight: 500; }

/* ────── estate tables ────── */
.estate-table { font-family: var(--font-ui); font-size: 14px; }
.estate-table .row {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 1.2fr 110px 72px;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-soft);
  align-items: center;
}
.estate-table .row:last-child { border-bottom: none; }
.estate-table .row.head {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.estate-table .row .cell-strong {
  font-weight: 500;
  color: var(--ink-strong);
}
.estate-table .row .cell-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.estate-table .row.total {
  background: var(--cream);
  border-top: 2px solid var(--blue);
  border-bottom: none;
  color: var(--blue);
  font-family: var(--font-serif);
  font-size: 18px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.estate-table .row.total strong { font-weight: 500; }

.net-line {
  display: contents;
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--ink);
}
.net-line > span:first-child { padding: 4px 0; color: var(--ink); }
.net-line > span:last-child  { padding: 4px 0; text-align: right; color: var(--ink-strong); font-family: var(--font-serif); font-size: 18px; }
.net-line.net-total > span:first-child,
.net-line.net-total > strong:first-child { padding-top: 10px; border-top: 2px solid var(--blue); color: var(--blue); font-size: 16px; }
.net-line.net-total > span:last-child,
.net-line.net-total > strong:last-child { padding-top: 10px; border-top: 2px solid var(--blue); color: var(--blue); font-size: 26px; text-align: right; }

@media (max-width: 900px) {
  .estate-tiles { grid-template-columns: 1fr !important; }
  .explainer-grid { grid-template-columns: 1fr !important; }
  .net-tables { grid-template-columns: 1fr !important; }
  .estate-table .row {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    padding: 14px 18px;
  }
  .estate-table .row.head { display: none; }
  .estate-table .row > div:nth-child(2),
  .estate-table .row > div:nth-child(3) { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
  .estate-table .row > div:nth-child(4) { font-size: 18px; }
  .estate-table .row > div:nth-child(5) { grid-column: 2; }
}

/* ────── animations ────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(53,97,158,0.2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ────── connect a bank (open banking) ────── */
.bank-pick {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  font: inherit; text-align: left;
  transition: border-color .14s, background .14s, box-shadow .14s;
}
.bank-pick:hover { border-color: var(--blue); background: var(--blue-wash); box-shadow: 0 1px 0 rgba(53,97,158,0.04); }
.bank-pick-mark {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 9px;
  background: var(--blue-wash); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.consent-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border-soft); border-radius: 11px;
  overflow: hidden;
}
.consent-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px;
  font-size: 13.5px; color: var(--ink);
  border-bottom: 1px solid var(--border-soft);
}
.consent-row:last-child { border-bottom: none; }
.consent-row svg { color: var(--blue); flex-shrink: 0; }
.bank-spinner {
  display: inline-block;
  width: 38px; height: 38px;
  border: 3px solid rgba(53,97,158,0.18);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.acct-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer; font: inherit;
  transition: border-color .14s, background .14s;
}
.acct-row[data-on="true"] { border-color: var(--blue); background: var(--blue-wash); }
.acct-check {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: white;
  display: flex; align-items: center; justify-content: center;
  color: white;
}
.acct-check.on { background: var(--blue); border-color: var(--blue); }

/* ────── inbox ────── */
.inbox-row { transition: background 0.12s ease; }
.inbox-row:hover { background: var(--cream); }

@media (max-width: 900px) {
  .inbox-steps { grid-template-columns: 1fr !important; }
  .forward-hero {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    text-align: left;
  }
  .inbox-row {
    grid-template-columns: 44px 1fr !important;
    gap: 12px 14px !important;
  }
  .inbox-row > div:nth-child(3),
  .inbox-row > div:nth-child(4) {
    grid-column: 2;
    text-align: left !important;
  }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.screen { animation: slideUp 0.22s ease; }

/* ────── video / voice message recorder ────── */
.vm-rec-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #e5564b; flex-shrink: 0;
  animation: vmPulse 1.1s ease-in-out infinite;
}
@keyframes vmPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.vm-record-btn {
  width: 76px; height: 76px; border-radius: 50%;
  border: 4px solid var(--blue); background: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; transition: transform .12s ease;
}
.vm-record-btn:hover { transform: scale(1.04); }
.vm-record-btn:active { transform: scale(0.97); }
.vm-record-btn-inner {
  width: 52px; height: 52px; border-radius: 50%;
  background: #e5564b;
}
.vm-record-btn.recording { border-color: #e5564b; }
.vm-record-btn-stop {
  width: 26px; height: 26px; border-radius: 6px;
  background: #e5564b;
}

.vm-wave-bar {
  width: 5px; border-radius: 3px;
  background: var(--blue-light);
  height: 16px;
}
.vm-wave-bar.active {
  background: var(--blue);
  animation: vmWave 0.9s ease-in-out infinite;
}
@keyframes vmWave {
  0%, 100% { height: 14px; }
  50% { height: 72px; }
}

@media (max-width: 900px) {
  .vm-record-grid { grid-template-columns: 1fr !important; }
  .vm-theme-grid { grid-template-columns: 1fr 1fr !important; }
  .vm-entry-grid, .vm-recipient-grid { grid-template-columns: 1fr !important; }
}

/* ────── responsive ────── */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 84%;
    max-width: 320px;
    z-index: 900;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-deep);
  }
  .sidebar.open { transform: translateX(0); }
  .scrim {
    position: fixed; inset: 0; background: rgba(0,0,0,0.36);
    z-index: 850; animation: fadeIn .18s ease;
  }
  .app-header { padding: 0 20px; }
  .app-content { padding: 24px 18px 64px; }
  .pillar-grid { grid-template-columns: 1fr; }
  .h-1 { font-size: 38px; }
  .h-2 { font-size: 28px; }
  .urgency-banner { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 901px) {
  .menu-toggle { display: none; }
}
.menu-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--blue);
}

/* ────── floating help chat widget ────── */
.help-chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.help-chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(31, 54, 92, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.help-chat-toggle:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(31, 54, 92, 0.34); }
.help-chat-toggle.is-open { background: var(--blue-deep, #2a4a7a); }
.help-chat-panel {
  width: 340px;
  max-width: calc(100vw - 44px);
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(31, 54, 92, 0.22);
  overflow: hidden;
  animation: help-chat-in 0.16s ease-out;
}
@keyframes help-chat-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.help-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 12px;
  background: var(--cream-warm);
  border-bottom: 1px solid var(--border-soft);
}
.help-chat-head .title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--blue);
  line-height: 1.15;
}
.help-chat-head .sub {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.help-chat-x {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 2px;
  flex-shrink: 0;
}
.help-chat-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.help-chat-input { min-height: 76px; resize: vertical; }
.help-chat-ack {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--ink-strong);
  background: var(--green-bg);
  border-radius: 8px;
  padding: 8px 10px;
}
@media (max-width: 900px) {
  .help-chat { right: 14px; bottom: 14px; }
}
