/* app3/styles.css — MyFIRE conversational assistant
   Design tokens from app/blog/_templates/shared.css (cream #FAF8F4, green #2D6A4F).
   CSS specificity rule: any element shown/hidden via [hidden] attr must use
   :not([hidden]) { display: X } pattern — never plain .class { display: X } alone.
   This avoids the ob2-flow bug (class display:flex overrides [hidden] at same specificity).
*/

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --green:   #2D6A4F;
  --gd:      #1a4a35;
  --gl:      #e8f5ee;
  --gm:      #52b788;
  --amber:   #B5541A;
  --al:      #fdf0e8;
  --blue:    #1D4E89;
  --bl:      #ebf2fa;
  --ink:     #1A1714;
  --ink2:    #5A5550;
  --muted:   #9A9189;
  --cream:   #FAF8F4;
  --white:   #fff;
  --border:  #E8E4DE;
  --border2: #F0ECE6;
  --sh:      0 4px 32px rgba(26,23,20,.08);
  --sh2:     0 2px 12px rgba(26,23,20,.06);
  --r:       12px;
  --r2:      8px;
  --r3:      20px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,248,244,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
}
.app-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo span { color: var(--green); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-link {
  font-size: 13px;
  color: var(--ink2);
  transition: color .2s;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--green); font-weight: 600; }

.nav-learn-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--r2);
  transition: color 0.15s;
}
.nav-learn-link:hover { color: var(--green); }

/* ── Main layout ─────────────────────────────────────────────────────────── */
.app-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 5% 48px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .app-main {
    grid-template-columns: 1fr; /* single column — unified tab strip controls sections */
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
}

/* ── Large/external monitor (1400px+) — expand content, larger type ── */
@media (min-width: 1400px) {
  .app-nav-inner,
  .app-main,
  .footer-inner {
    max-width: 1440px;
  }
  .msg-bubble       { font-size: 16px; line-height: 1.7; }
  .chat-panel-title { font-size: 22px; }
  .suggest-btn      { font-size: 14px; padding: 8px 16px; }
  .chat-input       { font-size: 16px; }
  .deep-card h3     { font-size: 14px; }
  .deep-card-val    { font-size: 22px; }
  .deep-card-hint   { font-size: 12px; }
  .deep-card-icon   { font-size: 26px; }
  .deep-heading     { font-size: 28px; }
  .deep-subheading  { font-size: 14px; }
  #confirm-intro    { font-size: 14px; }
  .confirm-input    { font-size: 17px; }
}

/* ── Chat panel ──────────────────────────────────────────────────────────── */
.chat-panel {
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  box-shadow: var(--sh2);
  display: flex;
  flex-direction: column;
  min-height: 520px;
  max-height: 80dvh;
}

@media (min-width: 900px) {
  .chat-panel {
    position: static;
    max-height: none;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    box-shadow: none;
    min-height: calc(100dvh - 160px);
  }
}

.chat-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}
.chat-panel-title {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--ink);
}
.chat-panel-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Messages ────────────────────────────────────────────────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.msg { display: flex; max-width: 88%; }
.msg-assistant { align-self: flex-start; }
.msg-user      { align-self: flex-end;   flex-direction: row-reverse; }

.msg-bubble {
  padding: 12px 16px;
  border-radius: var(--r2);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.01em;
}
.msg-bubble p { margin: 0 0 0.75em; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble strong { font-weight: 600; }
.msg-bubble a { color: inherit; text-decoration: underline; }
.msg-assistant .msg-bubble {
  background: var(--gl);
  color: var(--gd);
  border-bottom-left-radius: 3px;
}
.msg-user .msg-bubble {
  background: var(--green);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.msg-hint {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* Phase 8: Stage 2 factual, non-alarming transition notice (not an error style) */
.msg-banner {
  display: inline-block;
  font-size: 12px;
  color: var(--ink2, var(--muted));
  background: var(--gl, rgba(45,106,79,0.06));
  border-radius: 6px;
  padding: 4px 10px;
}

/* Typing indicator */
.typing-wrap .msg-bubble {
  padding: 12px 16px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gm);
  animation: typingPulse 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typingPulse {
  0%, 80%, 100% { opacity: .3; transform: scale(.85); }
  40%            { opacity: 1;  transform: scale(1);   }
}

/* ── Confirm card ────────────────────────────────────────────────────────── */
.confirm-card {
  display: none;
  flex-direction: column;
  gap: 14px;
  margin: 0 16px 12px;
  background: var(--white);
  border: 1.5px solid var(--green);
  border-radius: var(--r2);
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(45,106,79,.1);
}
.confirm-card:not([hidden]) { display: flex; }

#confirm-intro {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.5;
}
.confirm-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.confirm-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.confirm-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  background: var(--white);
  overflow: hidden;
  transition: border-color .15s;
}
.confirm-input-wrap:focus-within { border-color: var(--green); }
.confirm-input-wrap.prefix { padding-left: 10px; }
.confirm-prefix {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}
.confirm-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  min-width: 0;
}
.confirm-error {
  font-size: 11px;
  color: var(--amber);
  min-height: 14px;
}
.btn-confirm {
  align-self: flex-start;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--r2);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
}
.btn-confirm:hover { background: var(--gd); }
.btn-confirm:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ── Suggestions ─────────────────────────────────────────────────────────── */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 8px;
  flex-shrink: 0;
}
.suggest-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.suggest-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--gl);
}
.suggest-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.suggest-btn.suggest-primary {
  background: #2D6A4F;
  color: white;
  border-color: #2D6A4F;
  font-weight: 500;
  padding: 10px 20px;
}

.suggest-btn.suggest-primary:hover {
  background: #1a4a35;
}

/* ── Chat input ──────────────────────────────────────────────────────────── */
.chat-input-form {
  padding: 10px 16px 14px;
  flex-shrink: 0;
  border-top: 1px solid var(--border2);
}
.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 8px 8px 14px;
  transition: border-color .15s;
}
.chat-input-wrap:focus-within { border-color: var(--green); }
.chat-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  resize: none;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
}
.chat-input::placeholder { color: var(--muted); }
.chat-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  border: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, opacity .15s;
}
.chat-send-btn:hover { background: var(--gd); }
.chat-send-btn:disabled { opacity: .4; cursor: default; }
.chat-send-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ── Deep cards sidebar ──────────────────────────────────────────────────── */
.deep-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.deep-heading {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 4px;
}
.deep-subheading {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.deep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (min-width: 600px) and (max-width: 899px) {
  .deep-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

.deep-card {
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow .2s, border-color .2s;
}
.deep-card.locked {
  opacity: .55;
  cursor: default;
}
.deep-card.unlocked {
  cursor: pointer;
  opacity: 1;
}
.deep-card.unlocked:hover {
  box-shadow: var(--sh);
  border-color: var(--border);
}

.deep-card-icon {
  font-size: 22px;
  line-height: 1;
}
.deep-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.deep-card-val {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--green);
  line-height: 1.2;
  min-height: 22px;
}
.deep-card.locked .deep-card-val {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.deep-card-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.app-footer {
  background: var(--ink);
  padding: 20px 5%;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-copy {
  font-size: 11px;
  color: rgba(250,248,244,.3);
  line-height: 1.6;
  max-width: 72ch;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
}
.footer-links a,
.footer-links span.footer-ver {
  font-size: 11px;
  color: rgba(250,248,244,.35);
  transition: color .2s;
}
.footer-links a:hover { color: rgba(250,248,244,.7); }
.footer-sep {
  font-size: 11px;
  color: rgba(250,248,244,.18);
  padding: 0 8px;
  user-select: none;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0,0,0,0);
  overflow: hidden;
}

/* ── Phase 2: Nav auth / save buttons ────────────────────────────────────── */
.nav-auth-btn {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--r2);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.nav-auth-btn:hover { background: var(--gd); }
.nav-auth-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.nav-auth-btn.signed-in {
  background: var(--gl);
  color: var(--gd);
  border: 1px solid rgba(45,106,79,.25);
}
.nav-auth-btn.signed-in:hover { background: #d3eddf; }

.nav-save-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 6px 14px;
  font-size: 13px;
  color: var(--ink2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
  font-family: inherit;
}
.nav-save-btn:hover { border-color: var(--green); color: var(--green); }
.nav-save-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ── Phase 2: Toast ──────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--r2);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 9999;
  white-space: nowrap;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Phase 2: Auth modal ─────────────────────────────────────────────────── */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(26,23,20,.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.auth-modal.open { display: flex; }

.auth-modal-box {
  background: var(--white);
  border-radius: var(--r);
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: var(--sh);
  max-height: 90dvh;
  overflow-y: auto;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color .15s;
}
.auth-modal-close:hover { color: var(--ink); }

.auth-modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 18px;
}

.auth-field { margin-bottom: 14px; }

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
  margin-bottom: 5px;
}

.auth-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 9px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  transition: border-color .15s;
  outline: none;
  box-sizing: border-box;
}
.auth-input:focus { border-color: var(--green); }

.auth-marketing {
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.5;
}

.auth-msg {
  margin-bottom: 12px;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: var(--r2);
  background: var(--gl);
  color: var(--gd);
  line-height: 1.5;
}
.auth-msg.error { background: #fdf0e8; color: var(--amber); }

.auth-submit-btn {
  width: 100%;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--r2);
  padding: 11px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: 14px;
}
.auth-submit-btn:hover { background: var(--gd); }
.auth-submit-btn:disabled { opacity: .6; cursor: default; }

.auth-toggle {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}

.auth-link-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--green);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.auth-link-btn:hover { color: var(--gd); }

.auth-user-email {
  font-size: 14px;
  color: var(--ink2);
  margin-bottom: 18px;
  font-weight: 500;
  word-break: break-all;
}

.auth-save-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.auth-save-row .auth-input { flex: 1; }

.auth-save-btn {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--r2);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.auth-save-btn:hover { background: var(--gd); }
.auth-save-btn:disabled { opacity: .6; cursor: default; }

.auth-scenarios-list {
  margin-bottom: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.auth-scenario-empty {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 16px 0;
  margin: 0;
}

.auth-scenario-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border2);
}
.auth-scenario-row:last-child { border-bottom: none; }

.auth-scenario-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.auth-scenario-date {
  font-size: 12px;
  color: var(--muted);
}

.auth-scenario-btns {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  margin-left: 8px;
}

.auth-scenario-load {
  background: var(--gl);
  color: var(--gd);
  border: 1px solid rgba(45,106,79,.3);
  border-radius: var(--r2);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.auth-scenario-load:hover { background: #c7e8d5; }

.auth-scenario-del {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  font-family: inherit;
}
.auth-scenario-del:hover { color: var(--amber); }

.auth-file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border2);
}

.auth-signout-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.auth-signout-btn:hover { color: var(--amber); }

/* ── Phase 2.5: Google OAuth button ─────────────────────────────────────── */
.auth-google-btn:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(26,23,20,.06);
}
.auth-google-btn:hover {
  border-color: #c8c4be;
  box-shadow: 0 2px 6px rgba(26,23,20,.1);
}
.auth-google-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.auth-google-btn:disabled { opacity: .6; cursor: default; }

.auth-divider:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Phase 2.5: Delete account (danger zone in logged-in view) ───────────── */
.auth-danger-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border2);
  display: flex;
  justify-content: flex-end;
}
.auth-delete-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  color: #c0392b;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  opacity: .8;
}
.auth-delete-btn:hover { opacity: 1; color: #a93226; }
.auth-delete-btn:focus-visible { outline: 2px solid #c0392b; outline-offset: 2px; }

/* ── Phase 2.5: Delete confirmation modal ───────────────────────────────── */
.delete-modal {
  position: fixed;
  inset: 0;
  background: rgba(26,23,20,.65);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.delete-modal.open { display: flex; }

.delete-modal-box {
  background: var(--white);
  border-radius: var(--r);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--sh);
}
.delete-modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: #c0392b;
  margin-bottom: 14px;
}
.delete-modal-body {
  font-size: 14px;
  color: var(--ink2);
  line-height: 1.65;
  margin-bottom: 10px;
}
.delete-modal-oauth {
  font-size: 13px;
  color: var(--ink2);
  background: var(--al);
  border-radius: var(--r2);
  padding: 10px 12px;
  line-height: 1.55;
  margin-bottom: 10px;
}
.delete-modal-error:not([hidden]) {
  display: block;
  font-size: 13px;
  color: var(--amber);
  background: #fdf0e8;
  border-radius: var(--r2);
  padding: 9px 12px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.delete-modal-btns {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.delete-cancel-btn {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 9px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
  cursor: pointer;
  transition: border-color .15s;
}
.delete-cancel-btn:hover { border-color: var(--border); color: var(--ink); }
.delete-confirm-btn {
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: var(--r2);
  padding: 9px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.delete-confirm-btn:hover { background: #a93226; }
.delete-confirm-btn:disabled { opacity: .6; cursor: default; }

/* ══════════════════════════════════════════════════════════════════════════════
   PHASE 3 — Workshop tabs
   ══════════════════════════════════════════════════════════════════════════════ */

/* .workshop replaces .deep-cards in the layout grid */
.workshop {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Locked state (pre-conversation) ──────────────────────────────────────── */
#workshop-locked:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Unlocked state ───────────────────────────────────────────────────────── */
#workshop-unlocked:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Back-to-assistant link */
.ws-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.ws-back-link {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 10px;
  transition: color .15s;
}
.ws-back-link:hover { color: var(--green); }

.ws-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-light, #e8f5ee);
  border: 1.5px solid var(--green);
  border-radius: var(--r2);
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
  margin-bottom: 8px;
}
.ws-download-btn:hover { background: var(--green); color: #fff; }
.ws-download-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

@media (max-width: 640px) {
  .no-print-mobile { display: none !important; }
}

/* ── Tab strip ────────────────────────────────────────────────────────────── */
.ws-tabs {
  display: flex;
  gap: 2px;
  background: var(--border2);
  border-radius: var(--r2) var(--r2) 0 0;
  padding: 3px 3px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.ws-tabs::-webkit-scrollbar { display: none; }

.ws-tab {
  flex: 1;
  min-width: 0;
  padding: 7px 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
  background: transparent;
  border: none;
  border-radius: var(--r2) var(--r2) 0 0;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.ws-tab:hover { background: rgba(255,255,255,.55); color: var(--ink); }
.ws-tab-active { background: var(--white); color: var(--green); }
.ws-tab:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }

/* ── Tab panes ────────────────────────────────────────────────────────────── */
.ws-pane {
  background: var(--white);
  border: 1px solid var(--border2);
  border-top: none;
  border-radius: 0 0 var(--r) var(--r);
  padding: 14px;
  min-height: 260px;
  overflow-y: auto;
  max-height: 540px;
}

@media (min-width: 900px) {
  .ws-pane { max-height: calc(100dvh - 300px); }
}

/* ── Ask MyFIRE persistent strip ──────────────────────────────────────────── */
.ask-strip {
  margin-top: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 8px 12px;
}
.ask-strip-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ask-strip-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: .05em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.ask-strip-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  min-width: 0;
}
.ask-strip-input::placeholder { color: var(--muted); }
.ask-strip-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  border: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background .15s;
}
.ask-strip-btn:hover { background: var(--gd); }
.ask-strip-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ── Shared section headings ──────────────────────────────────────────────── */
.ws-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.ws-section-sub {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

/* ── Plan tab ─────────────────────────────────────────────────────────────── */
.ws-plan-headline { margin-bottom: 12px; }
.ws-plan-fi-age {
  font-family: 'DM Serif Display', serif;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.25;
}
.ws-plan-fi-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Progress bar */
.ws-progress-wrap { margin-bottom: 12px; }
.ws-progress-track {
  height: 8px;
  background: var(--border2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}
.ws-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gm), var(--green));
  border-radius: 4px;
  transition: width .6s ease;
  min-width: 4px;
}
.ws-progress-label { font-size: 11px; color: var(--muted); }

/* Stat cards */
.ws-stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.ws-stat-card {
  background: var(--cream);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 10px 10px 8px;
}
.ws-stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.ws-stat-val {
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 2px;
}
.ws-mc-green { color: var(--green); }
.ws-mc-amber { color: var(--amber); }
.ws-stat-sub { font-size: 10px; color: var(--muted); line-height: 1.4; }

/* Inline run-MC button inside Plan stat card */
.ws-run-mc-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 10px;
  color: var(--green);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-weight: 600;
  font-style: normal;
}
.ws-run-mc-btn:disabled { opacity: .5; cursor: default; }

/* Projection chart */
.ws-chart-wrap {
  margin-bottom: 12px;
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 8px;
}
.ws-chart-fallback {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 20px;
  margin: 0;
}

/* Milestone rows */
.ws-milestones { margin-bottom: 10px; }
.ws-milestones-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink2);
  margin-bottom: 6px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ws-milestone-table { display: flex; flex-direction: column; gap: 2px; }
.ws-milestone-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: start;
  gap: 6px;
  padding: 6px 8px;
  background: var(--cream);
  border-radius: 6px;
  font-size: 12px;
}
.ws-ms-age { color: var(--ink2); font-weight: 500; }
.ws-ms-phase {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
}
.phase-accum  { background: #fdf0e8; color: var(--amber); }
.phase-bridge { background: #fff3e0; color: #b84c00; }
.phase-retire { background: var(--gl); color: var(--gd); }
.ws-ms-val {
  font-family: 'DM Serif Display', serif;
  font-size: 13px;
  color: var(--green);
}
.phase-depleted { background: #ffeef0; color: #c0392b; }
.ws-ms-label-group { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ws-ms-label { font-weight: 600; color: var(--ink); font-size: 12px; }
.ws-ms-sub { font-size: 10px; color: var(--muted); line-height: 1.3; }
.ws-ms-age-col { color: var(--ink2); font-weight: 500; font-size: 11px; white-space: nowrap; }

/* Part-time invite card */
.ws-stat-card-invite {
  border-color: var(--green);
  background: var(--gl);
}
.ws-stat-card-invite .ws-stat-label { color: var(--gd); }
.ws-model-semi-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .03em;
}
.ws-model-semi-btn:hover { opacity: .85; }
.ws-semi-invite-val { font-size: 13px !important; font-weight: 500; color: var(--gd); }

/* Plan health card */
.ws-plan-health-card { min-height: 72px; }
.ws-plan-health-body { width: 100%; }
.ws-ph-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.ws-ph-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--border2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: ws-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes ws-spin { to { transform: rotate(360deg); } }
.ws-ph-state {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.ws-ph-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.ws-ph-text { flex: 1; }
.ws-ph-title { font-size: 13px; font-weight: 700; line-height: 1.2; margin-bottom: 3px; }
.ws-ph-sub { font-size: 11px; color: var(--ink2); line-height: 1.4; }
.ws-ph-link-wrap { margin-top: 5px; }
.ws-ph-link {
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}
.ws-ph-link:hover { text-decoration: underline; }

/* Plan health color states */
.ph-green  .ws-ph-title { color: var(--gd); }
.ph-amber-light .ws-ph-title { color: #b45309; }
.ph-amber  .ws-ph-title { color: #92400e; }
.ph-red    .ws-ph-title { color: #991b1b; }

/* Year-by-year table */
.ws-year-details { margin-top: 8px; }
.ws-year-summary {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  padding: 5px 0;
}
.ws-year-scroll {
  margin-top: 6px;
  overflow-x: auto;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border2);
  border-radius: var(--r2);
}
.ws-proj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.ws-proj-table th {
  text-align: right;
  padding: 4px 8px;
  background: var(--cream);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  position: sticky;
  top: 0;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ws-proj-table th:first-child { text-align: left; }
.ws-proj-table td {
  padding: 3px 8px;
  border-bottom: 1px solid var(--border2);
  color: var(--ink2);
  text-align: right;
  white-space: nowrap;
}
.ws-proj-table td:first-child { text-align: left; font-weight: 500; }
.ws-proj-table tr:last-child td { border-bottom: none; }
.ws-proj-table tr:hover td { background: var(--cream); }

.ws-year-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 5px 0;
}
.ws-year-toggle-btn {
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  color: var(--green);
  background: none;
  border: 1px solid var(--green);
  border-radius: 5px;
  padding: 3px 9px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.ws-year-toggle-btn:hover { background: var(--green); color: #fff; }

.ws-year-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ws-year-state-select {
  font-size: 11px;
  font-family: inherit;
  color: var(--ink2);
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: 5px;
  padding: 3px 6px;
  cursor: pointer;
  max-width: 140px;
}
.ws-year-state-select:hover { border-color: var(--green); }

.ws-proj-table tr.yr-row-retire td { background: rgba(45,106,79,0.04); }
.ws-proj-table tr.yr-row-retire:hover td { background: rgba(45,106,79,0.08); }
.ws-proj-table tr.yr-row-depleted td { background: rgba(216,90,48,0.04); }
.ws-proj-table tr.yr-row-depleted:hover td { background: rgba(216,90,48,0.08); }
.yr-warn-icon { font-size: 12px; color: #D85A30; vertical-align: -1px; }

/* ── Analysis tab ─────────────────────────────────────────────────────────── */
.ws-mc-panel { margin-bottom: 14px; }
.ws-mc-idle-text {
  font-size: 12px;
  color: var(--ink2);
  line-height: 1.6;
  margin-bottom: 10px;
}
.ws-run-mc-full-btn {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--r2);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.ws-run-mc-full-btn:hover { background: var(--gd); }
.ws-run-mc-full-btn:disabled { opacity: .6; cursor: default; }

/* MC Action Guidance (fragile plans < 75%) */
.ws-mc-guidance {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.ws-mc-guidance-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.ws-mc-guidance-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ws-mc-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--r2);
  padding: 10px 14px;
}
.ws-mc-action-text {
  font-size: 14px;
  color: var(--text);
  flex: 1;
}
.ws-mc-action-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.ws-mc-action-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.ws-mc-action-btn:hover { background: var(--gd); }

/* Scenario B/C MC estimate badge */
.ws-sc-mc-est {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* Scenario B/C FIRE number note */
.ws-sc-fire-note {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 2px;
}

.ws-mc-big-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.ws-mc-big {
  font-family: 'DM Serif Display', serif;
  font-size: 38px;
  line-height: 1;
}
.ws-mc-big-label { font-size: 13px; color: var(--muted); }
.ws-mc-bar-wrap { margin-bottom: 6px; }
.ws-mc-bar-track {
  height: 6px;
  background: var(--border2);
  border-radius: 3px;
  overflow: hidden;
}
.ws-mc-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .5s ease;
}
.ws-mc-verdict {
  font-size: 12px;
  color: var(--ink2);
  margin-bottom: 10px;
  font-weight: 600;
}
.ws-mc-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.ws-mc-stat {
  background: var(--cream);
  border-radius: var(--r2);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ws-mc-stat-lbl {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ws-mc-stat-val {
  font-family: 'DM Serif Display', serif;
  font-size: 13px;
  color: var(--ink);
}
.ws-mc-footnote {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

/* Fan chart */
.ws-fan-chart-wrap {
  margin-bottom: 14px;
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 8px;
}

/* Scenario comparison */
.ws-scenarios { }
.ws-scenarios-intro {
  font-size: 12px;
  color: var(--ink2);
  margin-bottom: 8px;
  line-height: 1.5;
}
.ws-scenario-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}
.ws-sc-card {
  background: var(--cream);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 10px 12px;
}
.ws-sc-current { border-color: rgba(45,106,79,.4); background: var(--gl); }
.ws-sc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ws-sc-label {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ws-sc-a { background: var(--green); color: #fff; }
.ws-sc-b { background: var(--blue); color: #fff; }
.ws-sc-c { background: var(--amber); color: #fff; }
.ws-sc-name { font-size: 12px; font-weight: 600; color: var(--ink); }
.ws-sc-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(26,23,20,.05);
}
.ws-sc-stat:last-child { border-bottom: none; }
.ws-sc-stat-lbl { color: var(--muted); }
.ws-sc-stat-val { font-weight: 600; color: var(--ink); }
.ws-sc-input-row { margin-bottom: 8px; }
.ws-sc-input-lbl {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink2);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ws-sc-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  background: var(--white);
  padding-left: 8px;
  overflow: hidden;
  transition: border-color .15s;
}
.ws-sc-input-wrap:focus-within { border-color: var(--green); }
.ws-sc-prefix { font-size: 13px; color: var(--muted); font-weight: 500; }
.ws-sc-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  min-width: 0;
}
.ws-sc-delta { font-size: 11px; font-weight: 600; margin-left: 4px; }
.ws-sc-delta-good { color: var(--green); }
.ws-sc-delta-bad  { color: var(--amber); }
.ws-scenarios-footnote { font-size: 10px; color: var(--muted); line-height: 1.5; }

/* ── Withdrawal tab ───────────────────────────────────────────────────────── */
.ws-swr-panel { margin-bottom: 14px; }
.ws-swr-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.ws-swr-stat {
  background: var(--cream);
  border-radius: var(--r2);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ws-swr-stat-lbl {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ws-swr-stat-val {
  font-family: 'DM Serif Display', serif;
  font-size: 14px;
  color: var(--ink);
}
.ws-gauge-wrap { margin-bottom: 12px; }
.ws-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
.ws-gauge-track {
  height: 14px;
  background: var(--border2);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}
.ws-gauge-fill {
  height: 100%;
  border-radius: 7px;
  transition: width .5s ease;
}
.ws-gauge-ok   { background: linear-gradient(90deg, #a7f3d0, var(--green)); }
.ws-gauge-over { background: linear-gradient(90deg, var(--gm), var(--amber)); }
.ws-gauge-verdict {
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.5;
  padding: 8px 10px;
  border-radius: var(--r2);
}
.ws-verdict-ok   { background: var(--gl); color: var(--gd); }
.ws-verdict-warn { background: var(--al); color: var(--amber); }
.ws-wd-explainer { margin-top: 14px; }
.ws-wd-para {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.65;
  margin-bottom: 10px;
}
.ws-wd-links { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.ws-wd-link {
  font-size: 13px;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s;
}
.ws-wd-link:hover { color: var(--gd); }

/* ── Progress tab ─────────────────────────────────────────────────────────── */
.ws-progress-numbers { margin-bottom: 14px; }
.ws-prog-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.ws-prog-stat {
  background: var(--cream);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ws-prog-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ws-prog-val {
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  color: var(--green);
}
.ws-coming-soon {
  background: var(--cream);
  border: 1px dashed var(--border);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 14px;
}
.ws-coming-soon-badge {
  display: inline-block;
  background: var(--al);
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.ws-coming-soon-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.ws-coming-soon-desc {
  font-size: 12px;
  color: var(--ink2);
  line-height: 1.6;
  margin-bottom: 8px;
}
.ws-coming-soon-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ws-coming-soon-list li {
  font-size: 12px;
  color: var(--ink2);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.ws-coming-soon-list li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--gm);
}
.ws-ck-optin {
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 14px;
}
.ws-ck-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.ws-ck-desc {
  font-size: 12px;
  color: var(--ink2);
  margin-bottom: 10px;
  line-height: 1.5;
}
.ws-ck-form {
  display: flex;
  gap: 8px;
}
.ws-ck-email {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  min-width: 0;
  transition: border-color .15s;
}
.ws-ck-email:focus { border-color: var(--green); }
.ws-ck-btn {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--r2);
  padding: 7px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.ws-ck-btn:hover { background: var(--gd); }
.ws-ck-btn:disabled { opacity: .6; cursor: default; }
.ws-ck-note {
  font-size: 12px;
  color: var(--gd);
  margin-top: 8px;
  line-height: 1.5;
}

/* ── Phase 4: Couple mode ──────────────────────────────────────────────────── */
.ws-plan-fi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gl);
  margin-bottom: 4px;
}
.auth-household-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}
.auth-household-lbl {
  font-size: 13px;
  color: var(--gd);
  flex-shrink: 0;
}
.auth-household-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--gl);
  background: transparent;
  color: var(--gl);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.auth-household-btn.active {
  background: var(--gl);
  color: #fff;
}
.auth-household-btn:hover:not(.active) {
  background: rgba(45,90,60,.08);
}

/* ── Phase 5: Nav avatar ─────────────────────────────────────────────────── */
.nav-auth-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2D6A4F;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

/* ── Phase 5: Auth modal tabs ────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1.5px solid var(--border);
  margin: 12px 0 16px;
}
.auth-tab {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: var(--ink2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  transition: color .15s, border-color .15s;
}
.auth-tab:hover { color: var(--green); }
.auth-tab-active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}

/* ── Phase 5: Profile form ───────────────────────────────────────────────── */
.prof-field {
  margin-bottom: 14px;
}
.prof-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
  margin-bottom: 5px;
  letter-spacing: .01em;
}
.prof-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235A5550'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.prof-risk-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.prof-risk-btn {
  flex: 1;
  padding: 7px 4px;
  border-radius: var(--r2);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--ink2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.prof-risk-btn:hover { border-color: var(--green); color: var(--green); }
.prof-risk-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff !important;
}
.prof-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.prof-msg {
  font-size: 13px;
  color: var(--green);
  margin: 8px 0 4px;
}
.prof-save-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--r2);
  border: none;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: background .15s;
}
.prof-save-btn:hover { background: var(--gd); }

/* ── Phase 5: Panel overlays (income + expense) ──────────────────────────── */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,23,20,.45);
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.panel-overlay[aria-hidden="true"] { display: none; }
.panel-box {
  background: var(--white);
  border-radius: var(--r) var(--r) 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh);
  overflow: hidden;
}
.panel-box-wide {
  max-width: 640px;
}
@media (min-width: 640px) {
  .panel-overlay {
    align-items: center;
    padding: 24px;
  }
  .panel-box {
    border-radius: var(--r);
    max-height: 80vh;
  }
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}
.panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.panel-sub {
  padding: 12px 20px 8px;
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.5;
  flex-shrink: 0;
}
.panel-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--border2);
  color: var(--ink2);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.panel-close:hover { background: var(--border); }
.panel-add-btn {
  margin: 8px 20px 12px;
  padding: 8px 16px;
  border-radius: var(--r2);
  border: 1.5px dashed var(--gm);
  background: transparent;
  color: var(--green);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.panel-add-btn:hover { background: var(--gl); }
.panel-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border2);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.panel-total-label {
  font-size: 13px;
  color: var(--ink2);
}
.panel-total-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  flex: 1;
}
.panel-done-btn {
  padding: 9px 20px;
  border-radius: var(--r2);
  border: none;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.panel-done-btn:hover { background: var(--gd); }

/* ── Phase 5: Income list ────────────────────────────────────────────────── */
.income-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 0;
}
.income-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
  text-align: center;
}
.income-row {
  display: grid;
  grid-template-columns: 1fr 90px 80px 28px;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.income-row input {
  padding: 7px 10px;
  border-radius: var(--r2);
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-family: inherit;
  width: 100%;
}
.income-row input:focus {
  outline: none;
  border-color: var(--green);
}
.income-delete {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--border2);
  color: var(--ink2);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.income-delete:hover { background: #fde8e8; color: #c0392b; }

/* ── Phase 5: Expense list ───────────────────────────────────────────────── */
.expense-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 0;
}
.expense-group-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 10px 0 4px;
  border-top: 1px solid var(--border2);
  margin-top: 6px;
}
.expense-group-header:first-child {
  border-top: none;
  margin-top: 0;
}
.expense-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
}
.expense-label {
  font-size: 13px;
  color: var(--ink);
  flex: 1;
}
.expense-input {
  width: 90px;
  padding: 5px 8px;
  border-radius: var(--r2);
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-family: inherit;
  text-align: right;
  flex-shrink: 0;
}
.expense-input:focus {
  outline: none;
  border-color: var(--green);
}

/* ── Phase 5: Edit inputs section ────────────────────────────────────────── */
.ws-edit-inputs {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border2);
}
.ws-edit-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
}
.ws-edit-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ws-edit-btn {
  padding: 8px 16px;
  border-radius: var(--r2);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ws-edit-btn:hover {
  border-color: var(--green);
  background: var(--gl);
  color: var(--green);
}
.ws-edit-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink2);
}

/* ── Phase 5: After-Tax/mo column ────────────────────────────────────────── */
.ws-after-tax {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}

/* ── Phase 6: Example badge ───────────────────────────────────────────────── */
.example-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--al);
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  vertical-align: middle;
}

/* ── Phase 6: FIRE Timeline ──────────────────────────────────────────────── */
.fire-timeline {
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border2);
  background: var(--white);
}
.tl-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tl-label-today,
.tl-label-fire {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink2);
  white-space: nowrap;
}
.tl-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.tl-fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width .6s ease;
}
.tl-fill.example {
  background: var(--amber);
}
.tl-caption {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* ── Phase 6: Future Me Narrative ────────────────────────────────────────── */
.future-me-card {
  margin: 8px 12px 0;
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  background: var(--gl);
  border-radius: 0 var(--r2) var(--r2) 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}
.future-me-card strong {
  color: var(--gd);
}

/* ── Phase 6: What-If Cards (Plan Tab) ───────────────────────────────────── */
.ws-whatif-wrap {
  margin-top: 20px;
}
.ws-whatif-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.ws-whatif-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ws-whatif-card {
  border-radius: var(--r2);
  border: 1.5px solid var(--border);
  background: var(--white);
  overflow: hidden;
}
.ws-whatif-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  gap: 8px;
}
.ws-whatif-card summary::-webkit-details-marker { display: none; }
.ws-whatif-card summary::after {
  content: '+';
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
  flex-shrink: 0;
}
.ws-whatif-card[open] summary::after { content: '\2212'; }
.ws-whatif-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ws-whatif-pill.better  { background: var(--gl);     color: var(--green); }
.ws-whatif-pill.worse   { background: var(--al);     color: var(--amber); }
.ws-whatif-pill.neutral { background: var(--border2); color: var(--ink2); }
.ws-whatif-body {
  padding: 0 14px 12px;
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.5;
}
.ws-whatif-body strong { color: var(--ink); }

/* ── Memory tab ─────────────────────────────────────────────── */
.mem-section {
  margin-bottom: 14px;
}
.mem-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.mem-body {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--r2);
  padding: 10px 12px;
  min-height: 36px;
}
.mem-ai-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink2);
  white-space: pre-wrap;
  word-break: break-word;
}
.mem-plan-list {
  margin: 0;
  padding: 0 0 0 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
}
.mem-plan-list li { margin: 0; }
.mem-empty {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  font-style: italic;
}
.mem-loading {
  font-size: 12px;
  color: var(--muted);
}
.memory-desc {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.5;
  margin: 0 0 14px;
}
.memory-textarea {
  width: 100%;
  min-height: 140px;
  padding: 9px 11px;
  border-radius: var(--r2);
  border: 1.5px solid var(--border);
  background: var(--bg2);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color .15s;
}
.memory-textarea:focus { outline: none; border-color: var(--green); }
.memory-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.memory-actions .auth-submit-btn { flex: 0 0 auto; width: auto; padding: 9px 20px; }

/* ── Collapsible assistant panel (desktop only) ──────────────────────────── */

/* Collapse button — hidden on mobile, shown on desktop */
.chat-collapse-btn {
  display: none;
  flex-shrink: 0;
  align-self: center;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.chat-collapse-btn:hover { color: var(--green); border-color: var(--green); }
.chat-collapse-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

@media (min-width: 900px) {
  .chat-collapse-btn { display: inline-flex; align-items: center; gap: 3px; }
}

/* Collapsed sidebar strip */
.chat-collapsed-bar {
  display: none; /* hidden by default; shown via .chat-panel.collapsed below */
}

/* Grid transition when collapsing */
@media (min-width: 900px) {
  .app-main {
    transition: grid-template-columns 0.25s ease;
  }
  .app-main.chat-panel-collapsed {
    grid-template-columns: 40px 1fr !important;
  }

  /* Hide ALL direct children when collapsed, except the collapsed bar itself */
  .chat-panel.collapsed > *:not(.chat-collapsed-bar) {
    display: none !important;
  }

  .chat-panel.collapsed {
    overflow: hidden;
    min-height: 200px;
  }

  /* Show collapsed bar when collapsed */
  .chat-panel.collapsed .chat-collapsed-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 18px;
    flex: 1;
  }
}

/* Expand button (circle → arrow) */
.chat-expand-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: border-color .15s, background .15s;
  flex-shrink: 0;
}
.chat-expand-btn:hover { border-color: var(--green); background: var(--gl); }
.chat-expand-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* Vertical "Assistant" label */
.chat-vertical-label {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  user-select: none;
}

/* "Ask" pill button */
.chat-ask-pill {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  padding: 8px 5px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .5px;
  transition: background .15s;
  flex-shrink: 0;
}
.chat-ask-pill:hover { background: var(--gd); }
.chat-ask-pill:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ── Phase 9: Inputs tab ─────────────────────────────────────────────────── */

/* Skip link in chat panel */
.chat-skip-link {
  margin: 0;
  padding: 4px 16px 8px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}
.chat-skip-link a {
  color: var(--green);
  text-decoration: underline;
  font-weight: 500;
}
.chat-skip-link a:hover { color: var(--gd); }

/* Accordion container */
.ws-acc {
  border: 1px solid #e2e2e0;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

/* Accordion header button */
.ws-acc-hdr {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  background: #fafaf9;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  transition: background .12s;
}
.ws-acc-hdr:hover { background: #f2f2f0; }
.ws-acc-chevron {
  font-size: 10px;
  color: var(--muted);
  transition: transform .2s;
}
.ws-acc-open .ws-acc-chevron { transform: rotate(180deg); }

/* Accordion body — hidden by default, shown when .ws-acc-open */
.ws-acc-body {
  display: none;
  padding: 4px 14px 12px;
  border-top: 1px solid #e8e8e6;
}
.ws-acc-open .ws-acc-body { display: block; }

/* Row layout for each field */
.ws-inp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  min-height: 34px;
  gap: 8px;
}

/* Field label */
.ws-inp-label {
  flex: 1;
  font-size: 12px;
  color: #555;
  line-height: 1.3;
}

/* Number / select inputs */
.ws-inp-field {
  flex-shrink: 0;
  width: 110px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid #d5d5d3;
  border-radius: 5px;
  padding: 5px 8px;
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
  transition: border-color .15s;
}
.ws-inp-field:focus {
  outline: 2px solid var(--green);
  outline-offset: -1px;
  border-color: var(--green);
}

/* On/Off toggle buttons */
.ws-inp-toggle {
  flex-shrink: 0;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1.5px solid #d5d5d3;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  background: #fff;
  color: #555;
  transition: background .12s, color .12s, border-color .12s;
}
.ws-inp-toggle.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* Link-style button (e.g. "Edit streams →") */
.ws-inp-link-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 12px;
  font-family: inherit;
  color: var(--green);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.ws-inp-link-btn:hover { color: var(--gd); }

/* Indented sub-section shown when a toggle is active */
.ws-inp-sub {
  padding-left: 12px;
  border-left: 2px solid var(--gl);
  margin: 4px 0 4px 2px;
}

/* Status bar at top of Inputs tab */
.ws-inp-status {
  background: var(--gl);
  border-radius: 7px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}
.ws-inp-fi-result {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gd);
  flex: 1;
}
.ws-inp-updated {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}

/* Account breakdown sub-fields under savings */
.ws-inp-breakdown {
  margin: 2px 0 6px 10px;
  padding: 6px 8px;
  border-left: 2px solid var(--border2);
  background: var(--cream);
  border-radius: 0 var(--r2) var(--r2) 0;
}
.ws-inp-breakdown-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.ws-inp-breakdown-opt { font-weight: 400; text-transform: none; letter-spacing: 0; }
.ws-inp-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}
.ws-inp-breakdown-field-label { font-size: 11px; color: var(--ink2); flex: 1; }
.ws-inp-breakdown-input { width: 90px !important; font-size: 12px; }

/* Disclaimer at bottom of inputs tab */
.ws-inp-profile-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin: 12px 0 4px;
  padding: 8px 12px;
  border-left: 2px solid var(--border);
  font-style: italic;
}
.ws-inp-disclaimer {
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
  margin: 10px 0 2px;
  line-height: 1.5;
}

/* ── Phase 10: Withdrawal tab ────────────────────────────────────────────── */

/* Filing status toggle */
.wd-toggle-row {
  display: flex;
  gap: 4px;
}
.wd-toggle-btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 11.5px;
  font-family: inherit;
  font-weight: 500;
  border: 1.5px solid #d0d0cc;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.wd-toggle-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.wd-toggle-btn:hover:not(.active) { border-color: var(--green); color: var(--green); }

/* Small note inside accordion header */
.wd-est-note {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}

/* ── Recommendation card ─────────────────────────────────────────────────── */
.wd-rec-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d7edd7;
  margin-bottom: 12px;
}
.wd-rec-header {
  background: #e8f5e8;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #d7edd7;
}
.wd-rec-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #2d7a2d;
  margin-bottom: 4px;
}
.wd-rec-headline {
  font-size: 13.5px;
  font-weight: 700;
  color: #1a5c1a;
  line-height: 1.35;
}
.wd-rec-body { padding: 12px 14px; }
.wd-rec-steps { display: flex; flex-direction: column; gap: 8px; }
.wd-rec-step {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}
.wd-rec-step-num {
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.wd-rec-step-text strong { font-weight: 600; }

/* ── KPI row ─────────────────────────────────────────────────────────────── */
.wd-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.wd-kpi-card {
  border: 1px solid #e8e8e4;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  background: #fafaf8;
}
.wd-kpi-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  margin-bottom: 4px;
  line-height: 1.3;
}
.wd-kpi-val {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 3px;
}
.wd-kpi-g { color: #1a8c1a; }
.wd-kpi-r { color: #c0392b; }
.wd-kpi-b { color: #1a6baa; }
.wd-kpi-sub {
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.3;
}

/* ── Year-by-year table ──────────────────────────────────────────────────── */
.wd-table-card {
  border: 1px solid #e2e2e0;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}
.wd-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f7f7f5;
  border-bottom: 1px solid #e2e2e0;
}
.wd-table-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
}
.wd-table-toggle {
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  color: var(--green);
  background: none;
  border: 1px solid var(--green);
  border-radius: 5px;
  padding: 3px 9px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.wd-table-toggle:hover { background: var(--green); color: #fff; }
.wd-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wd-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.wd-table-wrap thead th {
  padding: 7px 8px;
  text-align: right;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--muted);
  background: #f9f9f7;
  border-bottom: 1px solid #e8e8e4;
  white-space: nowrap;
}
.wd-table-wrap thead th:first-child { text-align: left; }
.wd-table-wrap tbody td {
  padding: 6px 8px;
  text-align: right;
  border-bottom: 1px solid #f0f0ec;
  vertical-align: middle;
  white-space: nowrap;
}
.wd-table-wrap tbody td:first-child { text-align: left; }
.wd-table-wrap tbody tr:last-child td { border-bottom: none; }
.wd-table-wrap tbody tr:hover td { background: #fafaf8; }

/* Strategy tags */
.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2px;
}
.tag-green  { background: #e6f5e6; color: #1a6b1a; }
.tag-blue   { background: #e6f0fa; color: #1a4d8a; }
.tag-purple { background: #f0e6fa; color: #6a1aaa; }
.tag-amber  { background: #fdf3e0; color: #8a5c00; }
.tag-red    { background: #fde8e8; color: #aa1a1a; }

/* Amount colours in table cells */
.amt-blue   { color: #1a6baa; font-weight: 500; }
.amt-purple { color: #6a1aaa; font-weight: 500; }
.amt-green  { color: #1a8c1a; font-weight: 500; }
.amt-red    { color: #c0392b; font-weight: 500; }

/* ── Insight cards (2×2 grid) ────────────────────────────────────────────── */
.wd-insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.wd-insight-card {
  border: 1px solid #e8e8e4;
  border-radius: 8px;
  padding: 11px 10px;
  background: #fafaf8;
}
.wd-insight-icon {
  font-size: 18px;
  margin-bottom: 5px;
  line-height: 1;
}
.wd-insight-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}
.wd-insight-text {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── CTA banner ──────────────────────────────────────────────────────────── */
.wd-cta-banner {
  background: #f0f7f0;
  border: 1px solid #c8e6c8;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: center;
  margin-bottom: 10px;
}
.wd-cta-text {
  font-size: 12px;
  color: var(--text);
  margin: 0 0 6px;
}
.wd-cta-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color .12s;
}
.wd-cta-link:hover { color: var(--gd); }

/* ── Roth Conversion Opportunity card ─────────────────────────────────────── */
.wd-roth-card {
  background: #EAF2ED;
  border: 0.5px solid #C3DECE;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
}
.wd-roth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.wd-roth-title { font-size: 14px; font-weight: 500; color: #2D6A4F; }
.wd-roth-learn-link { font-size: 12px; font-weight: 500; color: #2D6A4F; }
.wd-roth-learn-link:hover { color: var(--gd); }
.wd-roth-body { font-size: 13px; color: var(--ink2); line-height: 1.6; margin-bottom: 14px; }
.wd-roth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.wd-roth-stat {
  background: var(--white);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.wd-roth-stat-val { font-size: 16px; font-weight: 600; color: #2D6A4F; }
.wd-roth-stat-lbl { font-size: 10px; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.wd-roth-subnote { font-size: 11px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
.wd-roth-cta-btn {
  display: inline-block;
  background: #2D6A4F;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
}
.wd-roth-cta-btn:hover { background: var(--gd); }
.wd-roth-disclaimer { font-size: 11px; color: var(--muted); margin-top: 10px; margin-bottom: 0; }
@media (max-width: 599px) {
  .wd-roth-stats { grid-template-columns: 1fr; }
}

/* ── Fix 2: Plan tab chart view toggle ──────────────────────────────────── */
.ws-chart-toggle-row {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}
.ws-chart-toggle-btn {
  padding: 4px 12px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  border: 1.5px solid #d0d0cc;
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.ws-chart-toggle-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.ws-chart-toggle-btn:hover:not(.active) { border-color: var(--green); color: var(--green); }

/* ── Fix 3: Withdrawal estimate note and small-balance message ──────────── */
.wd-est-note-full {
  font-size: 11px;
  color: var(--muted);
  background: #f7f7f5;
  border: 1px solid #e8e8e4;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 0 0 10px;
  line-height: 1.5;
}
.wd-est-note-full strong { color: var(--text); font-weight: 600; }
.wd-est-note-real { background: var(--gl); color: var(--gd); border: none; }
.wd-small-bal-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f7f9f7;
  border: 1px solid #d0e8d0;
  border-radius: 8px;
  padding: 14px 12px;
  margin-top: 4px;
}
.wd-small-bal-icon { font-size: 20px; flex-shrink: 0; line-height: 1; }
.wd-small-bal-text {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
}
.wd-small-bal-text strong { font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════════════
   Mobile polish — 390 px viewport  (V3.26.06.79)
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 599px) {

  /* ── Nav: hide page links, keep auth button ─────────────────────────────── */
  .nav-link { display: none; }

  /* ── Chat: larger tap targets, wider bubbles, shorter placeholder ────────── */
  .chat-send-btn { width: 44px; height: 44px; }
  .chat-input    { min-height: 44px; }
  .msg           { max-width: 92%; }

  /* ── Charts: cap height so they don't dominate the screen ───────────────── */
  #ws-proj-chart,
  #ws-fan-chart  { max-height: 160px; }

  /* ── Inputs tab: stretch fields to fill available width ─────────────────── */
  .ws-inp-field  { flex: 1; width: auto; }

  /* Account breakdown: stack label above full-width input ─────────────────── */
  .ws-inp-breakdown-row   { flex-direction: column; align-items: flex-start; gap: 2px; }
  .ws-inp-breakdown-input { width: 100% !important; }

  /* ── Withdrawal: KPI cards → 2-column (3 in 1 row is too narrow) ────────── */
  .wd-kpi-row { grid-template-columns: 1fr 1fr; }

  /* ── What-if cards: pill wraps below question text when line is too long ─── */
  .ws-whatif-card summary { flex-wrap: wrap; align-items: flex-start; }
  .ws-whatif-pill         { margin-left: auto; }

  /* ── Auth modal: full-screen sheet on mobile ─────────────────────────────── */
  .auth-modal     { padding: 0; align-items: flex-start; }
  .auth-modal-box {
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   Mobile bottom navigation  (V3.26.06.81)
   ══════════════════════════════════════════════════════════════════════════════ */

.mobile-bottom-nav {
  display: none; /* shown at ≤899px */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 899px) {
  .mobile-bottom-nav { display: flex; }

  /* Hide horizontal tab strip — bottom nav handles tab switching on mobile */
  .ws-tabs { display: none !important; }

  /* Hide workshop back link — Ask tab in bottom nav serves this purpose */
  .ws-back-link { display: none; }

  /* Pad workshop content so fixed bottom nav doesn't cover last items */
  .workshop { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

  /* Nav: hide page links and Save button; auth button remains visible */
  .nav-link       { display: none; }
  .nav-save-btn   { display: none !important; }
  .nav-learn-link { display: none; }
}

.mobile-tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px 8px;
  min-height: 44px;
  font-family: inherit;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-tab i    { font-size: 20px; line-height: 1; }
.mobile-tab span { font-size: 9px; line-height: 1.2; }

.mobile-tab.active   { color: var(--green); }
.mobile-tab.active i { color: var(--green); }

.mobile-tab:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ── Unified tab strip (desktop ≥900px) ──────────────────────────────────── */
.unified-tab-strip {
  display: none; /* hidden on mobile */
}
@media (min-width: 900px) {
  .unified-tab-strip {
    display: flex;
    justify-content: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
    gap: 2px;
    position: sticky;
    top: 60px;
    z-index: 90;
  }
}
.unified-tab {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  white-space: nowrap;
  transition: color 0.15s;
  font-family: inherit;
}
.unified-tab i { font-size: 14px; }
.unified-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}
.unified-tab:hover:not(.active):not(.locked) { color: var(--ink); }

/* Unread indicator: Stage 2 posted a message while chat panel is hidden */
.unified-tab, .mobile-tab { position: relative; }
.ask-tab-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.mobile-tab .ask-tab-badge { top: 2px; right: calc(50% - 20px); }

/* Hide/show panels via unified nav — desktop only */
.uni-hidden { display: none !important; }

/* Desktop overrides: hide old navigation chrome */
@media (min-width: 900px) {
  .ws-tabs          { display: none !important; }
  .ws-back-link     { display: none !important; }
  .chat-collapse-btn  { display: none !important; }
  .chat-collapsed-bar { display: none !important; }
}

/* Desktop workshop: full-width, remove sidebar sizing */
@media (min-width: 900px) {
  .workshop {
    width: 100%;
    max-width: 100%;
    padding-top: 0;
  }
  .ws-pane { max-height: none; overflow-y: visible; }
}

/* Plan tab two-column layout (desktop) */
@media (min-width: 900px) {
  .ws-plan-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px 32px;
    align-items: start;
    padding: 20px 24px;
  }
  .ws-plan-left-col  { min-width: 0; overflow: hidden; }
  .ws-plan-right-col { min-width: 0; }
}

/* V3.26.06.86 — Desktop layout fixes */

/* FIX 1: Override old collapse-sidebar grid — unified tab nav owns panel visibility */
@media (min-width: 900px) {
  .app-main.chat-panel-collapsed {
    grid-template-columns: 1fr !important;
    transition: none;
  }
}

/* FIX 2: Remove ws-pane chrome on desktop — each tab's content handles its own layout */
@media (min-width: 900px) {
  .ws-pane {
    padding: 0;
    border: none;
    border-radius: 0;
    min-height: 0;
    overflow: visible;
  }
}

/* FIX 3: Larger FI age headline on desktop */
@media (min-width: 900px) {
  .ws-plan-fi-age    { font-size: 28px; }
  .ws-plan-headline  { margin-bottom: 20px; }
}

/* FIX 4: Hide nav page links on desktop — unified tab strip replaces them */
@media (min-width: 900px) {
  .nav-link { display: none; }
}

/* -- V3.26.06.88 -- Reimagined Plan tab hero + 2x2 what-if grid ---------- */

.plan-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 24px;
  background: var(--gl);
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.plan-hero-left  { flex: 1; min-width: 220px; }
.plan-hero-right { flex: 0 0 auto; min-width: 220px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.plan-hero-eyebrow { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.plan-hero-age {
  font-size: 40px;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  margin-bottom: 6px;
}
.plan-hero-sub { font-size: 14px; color: var(--ink2); margin-bottom: 16px; }
.plan-tl { margin-top: 0; }
.plan-tl-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.plan-tl-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gm), var(--green));
  border-radius: 4px;
  transition: width .6s ease;
  min-width: 4px;
}
.plan-tl-pct { font-size: 12px; color: var(--muted); margin-top: 6px; }
.plan-health-pill-wrap { width: 100%; }
.plan-health-pill-wrap .ws-ph-loading { font-size: 12px; }
.plan-health-pill-wrap .ws-ph-state {
  padding: 10px 14px;
  border-radius: var(--r2);
  background: var(--cream);
  border: 1px solid var(--border);
}
.plan-health-pill-wrap .ws-ph-state.ph-green      { background: var(--gl);   border-color: rgba(45,106,79,.3); }
.plan-health-pill-wrap .ws-ph-state.ph-amber-light { background: #fefce8;     border-color: #fbbf24; }
.plan-health-pill-wrap .ws-ph-state.ph-amber       { background: #fff7ed;     border-color: #fb923c; }
.plan-health-pill-wrap .ws-ph-state.ph-red         { background: #fef2f2;     border-color: #f87171; }
.plan-key-nums  { display: flex; gap: 16px; flex-wrap: wrap; }
.plan-key-num   { display: flex; flex-direction: column; }
.plan-key-val   { font-size: 16px; font-weight: 700; color: var(--ink); }
.plan-key-label { font-size: 11px; color: var(--muted); margin-top: 1px; }
.plan-roadmap-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--r2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.plan-roadmap-btn:hover { background: var(--gd); }
.plan-roadmap-btn[hidden] { display: none; }
.plan-body { display: flex; flex-direction: column; }
@media (min-width: 900px) {
  .plan-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 0 24px;
    align-items: start;
    padding: 20px 24px;
  }
  .plan-body-left  { padding: 0; }
  .plan-body-right { padding: 0; }
}
.plan-body-left  { min-width: 0; padding: 16px 16px 0; }
.plan-body-right { min-width: 0; padding: 16px 16px 0; }
.plan-ease-card {
  padding: 14px 16px;
  background: var(--al);
  border: 1px solid rgba(181,84,26,.2);
  border-radius: var(--r2);
  margin-bottom: 16px;
}
.plan-bridge-card {
  padding: 14px 16px;
  background: var(--bl);
  border: 1px solid rgba(29,78,137,.2);
  border-radius: var(--r2);
  margin-bottom: 16px;
}
.plan-ease-title { font-size: 13px; font-weight: 700; color: var(--amber); margin-bottom: 4px; }
.plan-bridge-card .plan-ease-title { color: var(--blue); }
.plan-ease-sub { font-size: 12px; color: var(--ink2); margin-bottom: 8px; }
.plan-ease-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
@media (min-width: 900px) {
  .ws-whatif-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ws-whatif-card {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: default;
  }
  .ws-whatif-card summary { display: none; }
  .ws-whatif-body { display: block; padding: 0; font-size: 12px; }
}
.ws-whatif-card-q { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.3; }
@media (min-width: 900px) {
  .ws-header-row { display: none; }
}
@media (max-width: 899px) {
  .plan-hero       { flex-direction: column; padding: 16px; gap: 16px; }
  .plan-hero-right { min-width: 0; width: 100%; }
  .plan-body-left, .plan-body-right { padding: 12px 12px 0; }
}

/* -- V3.26.07.01 -- Plan tab polish ---------------------------------------- */

/* Plan health compact pill */
.plan-health-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--border2);
  color: var(--ink2);
}
.plan-health-pill.state-strong    { background: #EAF2ED; color: #2D6A4F; border: 0.5px solid #C3DECE; }
.plan-health-pill.state-good      { background: #FFF9E6; color: #854F0B; border: 0.5px solid #E8D98A; }
.plan-health-pill.state-attention { background: #FDF3E3; color: #854F0B; border: 0.5px solid #E8C98A; }
.plan-health-pill.state-fragile   { background: #FCEBEB; color: #A32D2D; border: 0.5px solid #F0BABA; }

/* Milestone 3-column grid */
.ws-milestone-row {
  display: grid;
  grid-template-columns: 60px 1fr 70px;
  align-items: start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
}
.ws-milestone-row:last-child { border-bottom: none; }
.ms-age-col {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 1px;
}
.ms-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ms-dot.dot-accum    { background: var(--amber); }
.ms-dot.dot-bridge   { background: #b84c00; }
.ms-dot.dot-retire   { background: var(--green); }
.ms-dot.dot-depleted { background: #c0392b; }
.ms-label { font-size: 12px; font-weight: 500; color: var(--ink); }
.ms-sub   { font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.ms-value-col {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
  padding-top: 1px;
}

/* Hero right: compact right-aligned layout */
.plan-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  flex-shrink: 0;
}
.plan-key-numbers { display: flex; gap: 28px; }
.plan-key-number  { text-align: right; }
.pkn-value {
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}
.pkn-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.plan-download-btn {
  font-size: 11px;
  color: #2D6A4F;
  border: 0.5px solid #2D6A4F;
  border-radius: 6px;
  padding: 5px 14px;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}
.plan-download-btn[hidden] { display: none; }
.plan-download-btn:hover   { background: var(--gl); }

/* Hide ask strip on desktop */
@media (min-width: 900px) {
  .ask-strip { display: none; }
}

/* -- V3.26.07.02 -- Ask tab + visual polish -------------------------------- */

/* FIX 1: Hide example timeline on desktop (Plan tab has its own timeline) */
@media (min-width: 900px) {
  .fire-timeline { display: none; }
}

/* FIX 4: Center footer text */
.footer-inner { text-align: center; }
.footer-copy  { max-width: none; }
.footer-links { justify-content: center; }

/* Visual sharpness: message bubbles */
.msg-bubble { line-height: 1.7; }
.msg-assistant .msg-bubble { color: var(--ink); }

/* Visual sharpness: assistant header */
.chat-panel-title { font-weight: 600; }
.chat-panel-sub   { font-size: 11px; }

/* Visual sharpness: suggestion chips */
.suggest-btn { padding: 8px 16px; }

/* Visual sharpness: message input area */
.chat-input-wrap { min-height: 48px; align-items: center; }
.chat-input      { font-size: 14px; }

/* -- V3.26.07.04 -- Inputs tab restructure --------------------------------- */

/* Helper text under fields */
.ws-inp-helper {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  margin: -2px 0 6px;
  padding: 0;
}
.ws-inp-helper-link { color: var(--green); text-decoration: underline; }
.ws-inp-helper-link:hover { color: var(--gd); }

/* Account breakdown group labels (Tax-deferred / Roth / Other) */
.ws-inp-breakdown-group-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--green);
  margin: 7px 0 3px;
}

/* Helper text inside breakdown block (e.g. HSA note) */
.ws-inp-breakdown-helper {
  font-size: 10px;
  color: var(--muted);
  margin: 1px 0 3px;
}

/* Subsection divider label (Guaranteed income / Other income sources) */
.ws-inp-subsec-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border2);
  margin-bottom: 6px;
}

/* Named sub-heading (Social Security) */
.ws-inp-subsec-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin: 6px 0 2px;
}

/* ── Analysis tab redesign (V3.26.07.10) ── */

/* Verdict card */
.ana-verdict-card {
  background: var(--white);
  border: 0.5px solid var(--border2);
  border-radius: var(--r);
  padding: 20px 24px;
  margin-bottom: 14px;
}
.ana-verdict-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
}
.ana-verdict-left { min-width: 0; }
.ana-verdict-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.ana-stat-block { text-align: right; }
.ana-stat-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: block; margin-bottom: 2px; }
.ana-stat-val { font-size: 13px; font-weight: 500; }

/* Success bar */
.ana-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 4px;
}
.ana-bar-track {
  height: 8px;
  background: var(--cream);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.ana-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.ana-bar-sub {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin-bottom: 0;
}
.ana-verdict-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.ana-rerun-btn {
  font-size: 11px;
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  background: var(--cream);
  cursor: pointer;
  color: var(--ink);
}
.ana-rerun-btn:hover { background: var(--gl); border-color: var(--green); color: var(--green); }
.ana-source-note { font-size: 10px; color: var(--muted); }

/* Eyebrow */
.ana-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}

/* Action cards */
.ana-actions-section { margin-bottom: 14px; }
.ana-action-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ana-action-card {
  background: var(--white);
  border: 0.5px solid var(--border2);
  border-left: 3px solid #2D6A4F;
  border-radius: var(--r2);
  padding: 12px 14px;
}
.ana-action-lbl {
  font-size: 9px;
  color: #2D6A4F;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.ana-action-change {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 4px;
}
.ana-action-result {
  font-size: 12px;
  color: #2D6A4F;
  font-weight: 500;
  margin-bottom: 10px;
}
.ana-action-btn {
  font-size: 10px;
  color: #2D6A4F;
  border: 0.5px solid #2D6A4F;
  border-radius: 6px;
  padding: 4px 10px;
  background: none;
  cursor: pointer;
}
.ana-action-btn:hover { background: var(--gl); }
.ana-action-card-hsa { grid-column: 1 / -1; border-left-color: #7B61FF; }
.ana-action-card-hsa .ana-action-lbl { color: #7B61FF; display: flex; align-items: center; gap: 5px; }
.ana-action-card-hsa .ana-action-result { color: var(--ink2); font-weight: 400; }

/* Scenario section */
.ana-scenario-section { margin-bottom: 14px; }
.ana-sc-outer-card {
  background: var(--white);
  border: 0.5px solid var(--border2);
  border-radius: var(--r);
  overflow: hidden;
}
.ana-sc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 0.5px solid var(--border2);
  flex-wrap: wrap;
  gap: 6px;
}
.ana-sc-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.ana-sc-col {
  padding: 14px 18px;
  border-right: 0.5px solid var(--border2);
}
.ana-sc-col:last-child { border-right: none; }
.ana-sc-col-a { background: rgba(45,106,79,0.03); }
.ana-sc-badge {
  display: inline-block;
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 500;
  margin-bottom: 10px;
}
.ana-sc-badge-a { background: #EAF2ED; color: #2D6A4F; }
.ana-sc-badge-b { background: #EBF3FB; color: #185FA5; }
.ana-sc-badge-c { background: #FAEEDA; color: #854F0B; }
.ana-sc-fi-age { font-size: 28px; font-weight: 500; line-height: 1.1; }
.ana-sc-fi-label { font-size: 10px; color: var(--muted); margin-bottom: 10px; }
.ana-sc-input-lbl { font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.ana-sc-input {
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  background: var(--white);
  color: var(--ink);
}
.ana-sc-rows { margin-top: 4px; }
.ana-sc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 0.5px solid var(--border2);
  font-size: 11px;
  color: var(--ink);
}
.ana-sc-row:last-child { border-bottom: none; }
.ana-sc-row span:first-child { color: var(--ink2); }
.ana-sc-note { font-size: 10px; color: var(--muted); margin-top: 8px; }

/* Projection section */
.ana-proj-section { margin-bottom: 14px; }
.ana-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.ana-chart-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.ana-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--ink2);
}
.ana-legend-line { width: 20px; flex-shrink: 0; }
.ana-proj-chart-wrap { margin-bottom: 10px; }

/* Annotation cards */
.ana-annot-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.ana-annot-card { border-radius: var(--r2); padding: 8px 10px; }
.ana-annot-worst { background: #FCEBEB; border: 0.5px solid #F0BABA; }
.ana-annot-base  { background: rgba(234,242,237,0.35); border: 0.5px solid var(--border2); }
.ana-annot-best  { background: #EBF3FB; border: 0.5px solid #B5D4F4; }
.ana-annot-lbl {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.ana-annot-worst .ana-annot-lbl { color: #A32D2D; }
.ana-annot-base  .ana-annot-lbl { color: #2D6A4F; }
.ana-annot-best  .ana-annot-lbl { color: #185FA5; }
.ana-annot-val {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 3px;
}
.ana-annot-desc {
  font-size: 10px;
  color: var(--ink2);
  line-height: 1.4;
  margin-top: 2px;
}

/* Mobile */
@media (max-width: 899px) {
  .ana-verdict-grid    { grid-template-columns: 1fr; }
  .ana-verdict-right   { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .ana-stat-block      { text-align: left; }
  .ana-action-cards    { grid-template-columns: 1fr; }
  .ana-sc-cols         { grid-template-columns: 1fr; }
  .ana-sc-col          { border-right: none; border-bottom: 0.5px solid var(--border2); }
  .ana-sc-col:last-child { border-bottom: none; }
  .ana-annot-cards     { grid-template-columns: 1fr; }
  .ana-verdict-bottom  { flex-direction: column; align-items: flex-start; }
  .ana-source-note     { display: none; }
}
/* ── end Analysis tab redesign ── */
/* ── Withdrawal tab summary card (V3.26.07.11) ── */

.wd-summary-card {
  background: var(--cream);
  border: 0.5px solid var(--border2);
  border-radius: var(--r2);
  padding: 12px 16px;
  margin-bottom: 14px;
}
.wd-summary-line {
  font-size: 11px;
  color: var(--ink2);
  line-height: 1.6;
  margin-bottom: 4px;
  word-break: break-word;
}
.wd-tab-link {
  font-size: 11px;
  color: var(--green);
  text-decoration: none;
  display: inline-block;
}
.wd-tab-link:hover { text-decoration: underline; }
.wd-warning-amber {
  font-size: 11px;
  color: #854F0B;
  background: #FAEEDA;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
}
.wd-filing-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.wd-filing-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink2);
  flex-shrink: 0;
}
.wd-low-bal-banner {
  background: #FAEEDA;
  border: 0.5px solid #E8C98A;
  border-radius: var(--r2);
  padding: 10px 14px;
  font-size: 12px;
  color: #854F0B;
  margin-bottom: 12px;
  line-height: 1.5;
}
.wd-low-bal-btn {
  display: inline-block;
  margin-top: 6px;
  background: none;
  border: 0.5px solid #854F0B;
  border-radius: 6px;
  color: #854F0B;
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
  font-family: inherit;
}
.wd-low-bal-btn:hover { background: rgba(133,79,11,0.08); }

@media (max-width: 899px) {
  .wd-filing-section .wd-toggle-row { width: 100%; }
  .wd-filing-section .wd-toggle-btn { flex: 1; }
}

/* ── Net worth tracker (Progress tab) ────────────────────────────────────────── */
.nw-tracker {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 16px;
}
.nw-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.nw-header-actions { display: flex; align-items: center; gap: 10px; }
.nw-prices-status  { font-size: 12px; color: var(--muted); }
.nw-refresh-btn {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  background: var(--cream);
  color: var(--ink2);
  cursor: pointer;
}
.nw-refresh-btn:hover { background: var(--border2); }
.nw-date-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.nw-label    { font-size: 13px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.nw-date-input {
  font-size: 13px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  color: var(--ink);
  background: var(--white);
}
.nw-section {
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.nw-section-debt { border-color: #fce4dc; background: #fffaf9; }
.nw-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.nw-live-badge, .nw-manual-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.nw-live-badge   { background: #e8f5ee; color: var(--green); border: 1px solid #b7e0c8; }
.nw-manual-badge { background: var(--cream); color: var(--muted); border: 1px solid var(--border); }
.nw-gold-price   { font-size: 12px; color: var(--ink2); margin-bottom: 8px; font-style: italic; }
.nw-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.nw-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 6px 6px;
  border-bottom: 1px solid var(--border2);
}
.nw-table td { padding: 4px 6px; vertical-align: middle; }
.nw-table tr:not(:last-child) td { border-bottom: 1px solid var(--border2); }
.nw-calc { font-weight: 600; color: var(--green); }
.nw-input {
  width: 100%;
  font-size: 13px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  color: var(--ink);
  background: var(--white);
  box-sizing: border-box;
}
.nw-input:focus { outline: 2px solid var(--green); outline-offset: -1px; border-color: var(--green); }
.nw-add-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nw-add-btn:hover { color: var(--gd); }
.nw-del-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--cream);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.nw-del-btn:hover { background: #fce4dc; color: #c0392b; border-color: #fca99a; }
.nw-section-total { font-size: 13px; font-weight: 700; color: var(--green); margin-top: 6px; text-align: right; }
.nw-crypto-val { font-weight: 600; color: var(--green); white-space: nowrap; }
.nw-summary-card {
  background: linear-gradient(135deg, #f0f9f4, #e8f5ee);
  border: 1px solid #b7e0c8;
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 16px;
}
.nw-cur-toggle { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.nw-cur-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  color: var(--ink2);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.nw-cur-btn.active, .nw-cur-btn:hover { background: var(--green); color: var(--white); border-color: var(--green); }
.nw-display-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.nw-display-item { display: flex; flex-direction: column; gap: 4px; }
.nw-display-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.nw-display-val { font-size: 18px; font-weight: 700; color: var(--ink); font-family: 'DM Serif Display', serif; }
.nw-display-primary { color: var(--green); font-size: 22px; }
.nw-display-debt    { color: var(--amber); }
.nw-investable-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255,255,255,.7);
  border-radius: var(--r2);
  margin-bottom: 14px;
  gap: 8px;
  flex-wrap: wrap;
}
.nw-investable-lbl { font-size: 13px; color: var(--ink2); }
.nw-investable-val { font-size: 16px; font-weight: 700; color: var(--green); white-space: nowrap; }
.nw-fire-bar-wrap  { margin-bottom: 16px; }
.nw-fire-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink2);
  margin-bottom: 6px;
  font-weight: 600;
  gap: 8px;
}
.nw-fire-bar-track {
  height: 10px;
  background: rgba(255,255,255,.6);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 4px;
}
.nw-fire-fill {
  height: 100%;
  background: var(--green);
  border-radius: 5px;
  transition: width .5s ease;
}
.nw-fire-bar-note { font-size: 11px; color: var(--muted); }
.nw-save-btn {
  width: 100%;
  padding: 12px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--r2);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.nw-save-btn:hover:not(:disabled) { background: var(--gd); }
.nw-save-btn:disabled { opacity: .6; cursor: not-allowed; }
.nw-save-note { font-size: 13px; color: var(--green); margin-top: 8px; text-align: center; }
.nw-history {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.nw-history-item { padding: 10px 0; border-bottom: 1px solid var(--border2); }
.nw-history-item:last-child { border-bottom: none; }
.nw-history-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.nw-history-date { font-size: 13px; font-weight: 600; color: var(--ink2); flex: 1; min-width: 80px; }
.nw-history-nw   { font-size: 16px; font-weight: 700; color: var(--green); }
.nw-delta { font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.nw-delta-pos { color: var(--green); background: #e8f5ee; }
.nw-delta-neg { color: var(--amber); background: #fdf0e8; }
.nw-history-detail { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .nw-display-row { grid-template-columns: 1fr 1fr; }
  .nw-display-primary { font-size: 18px; }
  .nw-investable-row { flex-direction: column; align-items: flex-start; }
}

/* ── Onboarding overlay (save-triggered account creation) ─────────────────── */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.ob-nav {
  height: 48px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-bottom: 0.5px solid var(--border2);
  flex-shrink: 0;
}
.ob-logo { font-size: 16px; font-weight: 500; color: var(--ink); }
.ob-logo span { color: var(--green); }
.ob-dots { display: flex; align-items: center; gap: 6px; }
.ob-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); transition: all 0.2s;
}
.ob-dot.active { background: var(--green); width: 20px; border-radius: 3px; }
.ob-dot.done   { background: var(--green); }
.ob-skip {
  font-size: 12px; color: var(--muted);
  background: none; border: none; cursor: pointer;
}
.ob-step { display: none; flex: 1; align-items: center; justify-content: center; padding: 32px 20px; }
.ob-step.active { display: flex; }
.ob-card {
  background: var(--white);
  border: 0.5px solid var(--border2);
  border-radius: 20px;
  padding: 36px;
  width: 100%; max-width: 480px;
  box-shadow: 0 8px 32px rgba(26,23,20,0.06);
}
.ob-eyebrow {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green); margin-bottom: 8px;
}
.ob-headline {
  font-size: 22px; font-weight: 500;
  color: var(--ink); line-height: 1.2; margin-bottom: 6px;
}
.ob-sub { font-size: 13px; color: var(--ink2); line-height: 1.6; margin-bottom: 24px; }
.ob-google-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--white);
  font-size: 13px; font-weight: 500; color: var(--ink);
  cursor: pointer; margin-bottom: 14px;
}
.ob-google-btn:hover { border-color: var(--green); }
.ob-divider { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ob-divider-line { flex: 1; height: 0.5px; background: var(--border2); }
.ob-divider-text { font-size: 11px; color: var(--muted); }
.ob-field { margin-bottom: 12px; }
.ob-label { font-size: 11px; font-weight: 500; color: var(--ink2); margin-bottom: 4px; display: block; }
.ob-input {
  width: 100%; border: 0.5px solid var(--border);
  border-radius: 8px; padding: 9px 12px;
  font-size: 13px; color: var(--ink);
  background: var(--white); box-sizing: border-box;
}
.ob-input:focus { outline: none; border-color: var(--green); }
.ob-error {
  font-size: 12px; color: #D85A30;
  background: #FCEBEB; border-radius: 6px;
  padding: 8px 12px; margin-bottom: 10px;
}
.ob-primary-btn {
  width: 100%; background: var(--green); color: white;
  border: none; border-radius: 10px; padding: 12px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  margin-top: 4px; margin-bottom: 14px;
}
.ob-primary-btn:hover { background: #1a4a35; }
.ob-primary-btn.ob-disabled { opacity: 0.4; pointer-events: none; }
.ob-signin-link { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 4px; }
.ob-signin-link a { color: var(--green); cursor: pointer; }
.ob-privacy-note {
  font-size: 11px; color: var(--muted); text-align: center;
  margin-top: 16px; padding-top: 16px;
  border-top: 0.5px solid var(--border2); line-height: 1.5;
}
.ob-privacy-note a { color: var(--green); }
.ob-welcome-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #EAF2ED; color: var(--green);
  font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 20px; margin-bottom: 16px;
}
.ob-choice-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.ob-choice-card {
  border: 1.5px solid var(--border2); border-radius: 12px;
  padding: 14px; cursor: pointer; transition: all 0.15s;
  position: relative; display: flex; gap: 12px;
}
.ob-choice-card:hover { border-color: var(--green); }
.ob-choice-card.selected { border-color: var(--green); background: rgba(45,106,79,0.03); }
.ob-cc-check {
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; background: var(--green);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: white; font-size: 11px;
  font-weight: 600; opacity: 0; transition: opacity 0.15s;
}
.ob-choice-card.selected .ob-cc-check { opacity: 1; }
.ob-cc-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.ob-cc-title {
  font-size: 14px; font-weight: 500; color: var(--ink);
  margin-bottom: 4px; display: flex; align-items: center;
  gap: 7px; flex-wrap: wrap;
}
.ob-badge-privacy {
  font-size: 9px; font-weight: 500; padding: 2px 6px;
  border-radius: 4px; background: #EAF2ED; color: var(--green);
}
.ob-badge-convenient {
  font-size: 9px; font-weight: 500; padding: 2px 6px;
  border-radius: 4px; background: #EBF3FB; color: #185FA5;
}
.ob-cc-desc { font-size: 12px; color: var(--ink2); line-height: 1.5; margin-bottom: 8px; }
.ob-cc-features { display: flex; flex-direction: column; gap: 3px; }
.ob-cc-feat { font-size: 11px; color: var(--muted); }
.ob-cc-feat.yes { color: var(--ink2); }
.ob-local-warning {
  background: #FAEEDA; border: 0.5px solid #E8C98A;
  border-radius: 8px; padding: 9px 12px;
  font-size: 11px; color: #854F0B; line-height: 1.5;
  margin-bottom: 16px; display: none;
}
.ob-local-warning.visible { display: block; }
.ob-ai-note { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.5; margin-top: 4px; }
.ob-ai-note a { color: var(--green); cursor: pointer; }
.ob-success-icon { font-size: 48px; text-align: center; margin-bottom: 16px; }
.ob-success-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.ob-success-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--cream); border-radius: 8px;
  padding: 10px 12px; font-size: 12px; color: var(--ink2); line-height: 1.5;
}
.ob-data-bar {
  background: var(--cream); border: 0.5px solid var(--border2);
  border-radius: 8px; padding: 10px 14px;
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 16px; gap: 10px;
}
.ob-data-bar-left { font-size: 12px; color: var(--ink2); line-height: 1.5; }
.ob-data-bar-left strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 1px; }
.ob-data-bar-right { display: flex; gap: 6px; flex-shrink: 0; }
.ob-mini-btn {
  font-size: 11px; padding: 5px 10px; border-radius: 6px; cursor: pointer;
  border: 0.5px solid var(--border); background: var(--white); color: var(--ink2);
}
.ob-mini-btn.primary { background: var(--green); color: white; border-color: var(--green); }
.ob-settings-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 12px; }

/* Local mode bar (shown in app after local choice) */
.local-mode-bar {
  background: #EAF2ED; border-bottom: 0.5px solid #C3DECE;
  padding: 8px 20px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--green);
}
.lmb-btns { display: flex; gap: 6px; flex-shrink: 0; }
.lmb-btn {
  font-size: 11px; padding: 5px 12px; border-radius: 6px; cursor: pointer;
  border: 0.5px solid #C3DECE; background: white; color: var(--green);
}
.lmb-btn.primary { background: var(--green); color: white; border-color: var(--green); }

/* Storage mode setting in Profile tab */
.storage-mode-setting { margin-top: 4px; }
.sms-options { display: flex; gap: 8px; margin-bottom: 6px; margin-top: 4px; }
.sms-btn {
  flex: 1; padding: 8px; border-radius: 8px;
  border: 0.5px solid var(--border); background: var(--cream);
  font-size: 12px; color: var(--ink2); cursor: pointer;
}
.sms-btn.active { background: #EAF2ED; border-color: #C3DECE; color: var(--green); font-weight: 500; }
.sms-note { font-size: 11px; color: var(--muted); line-height: 1.5; }

@media (max-width: 599px) {
  .ob-card { padding: 24px 20px; border-radius: 16px; }
  .ob-headline { font-size: 20px; }
  .ob-nav { padding: 0 16px; }
  .ob-data-bar { flex-direction: column; align-items: flex-start; }
  .local-mode-bar { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 16px; }
}

/* ── Floating AI chat widget (desktop only, non-Ask tabs) ──────────────────── */
#float-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

#float-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--r3);
  padding: 10px 18px 10px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(45,106,79,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
#float-bubble:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(45,106,79,0.4); }
#float-bubble i { font-size: 16px; }

#float-window {
  position: relative;
  width: 340px;
  height: 480px;
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh);
  animation: floatIn 0.2s ease;
}

/* Grows the window up/left from its bottom-right anchor */
#float-resize-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  z-index: 3;
}
#float-resize-handle:hover { background: rgba(45,106,79,0.1); }
@keyframes floatIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); transform-origin: bottom right; }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.float-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--border);
  background: var(--white);
  cursor: grab;
  flex-shrink: 0;
  user-select: none;
}
.float-header:active { cursor: grabbing; }
.float-header-left { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink); }
.float-header-right { display: flex; gap: 2px; }
.float-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
}
.float-icon-btn:hover { background: var(--border2); color: var(--ink); }

.float-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--cream);
}
.float-msg-ai {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: 4px 10px 10px 10px;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 88%;
  align-self: flex-start;
}
.float-msg-ai strong { color: var(--green); }
.float-msg-user {
  background: var(--green);
  border-radius: 10px 4px 10px 10px;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--white);
  max-width: 80%;
  align-self: flex-end;
}
.float-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 8px 11px;
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: 4px 10px 10px 10px;
  align-self: flex-start;
  width: fit-content;
}
.float-typing-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); animation: floatBounce 1.1s infinite; }
.float-typing-dot:nth-child(2) { animation-delay: 0.18s; }
.float-typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes floatBounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

.float-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 0.5px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
}
.float-input {
  flex: 1;
  border: 0.5px solid var(--border);
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--ink);
  background: var(--cream);
  outline: none;
  font-family: inherit;
}
.float-input:focus { border-color: var(--green); background: var(--white); }
.float-send-btn {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.float-send-btn:hover { background: var(--gd); }

@media (max-width: 899px) {
  #float-chat-widget { display: none !important; }
}
/* ── end Withdrawal summary card ── */