/* ──────────────────────────────────────────────────────────────
   LEAP Comp Calculator — agent-facing, private
   Heraldic theme matched to the LiteSim simulator: flat, hard edges,
   charcoal -> navy -> gold. Tokens mirror styles/v3-client.css.
   ────────────────────────────────────────────────────────────── */

:root {
  --primary:        #0a3d91;
  --primary-light:  #1a4da3;
  --primary-lightest:#e8f0fc;
  --accent:         #eaa159;
  --accent-dark:    #d08a3f;
  --charcoal:       #36454f;
  --charcoal-light: #4a5a66;
  --cream:          #fdf6ed;
  --cream-dark:     #f0d5b8;
  --secondary:      #2a8659;
  --danger:         #c53f3f;
  --neutral-border: #d0d7e2;
  --neutral-light:  #f0f2f5;

  --font-sans:    'League Spartan', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Monaco', monospace;
  --font-display: 'Anton', sans-serif;
  --font-accent:  'Alice', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--charcoal);
  background: #eef1f6;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ───────────────────────────────────────────────── */
.app-header {
  background: var(--charcoal);
  color: #fff;
  border-bottom: 4px solid var(--accent);
  padding: 1.25rem 1.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.app-header .brand {
  font-family: var(--font-display);
  font-size: 2.05rem;
  letter-spacing: 0.04em;
}
.app-header .brand .brand-sub {
  color: var(--accent);
  font-weight: 400;
}

/* View toggle, parked in the header; only shows once an agent is signed in. */
.app-header .header-nav { display: none; }
body.signed-in .app-header .header-nav { display: flex; }
.header-nav .seg.top-seg {
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}
.header-nav .seg.top-seg button {
  background: transparent;
  color: #e3e9f0;
  border-left-color: rgba(255, 255, 255, 0.2);
  padding: 0.42rem 1.35rem;
}
.header-nav .seg.top-seg button:hover { background: rgba(255, 255, 255, 0.12); }
.header-nav .seg.top-seg button.active { background: var(--accent); color: var(--charcoal); }
.header-nav .seg.top-seg button.active:hover { background: var(--accent); }
.app-header .who {
  font-size: 0.85rem;
  color: #cdd6e0;
  text-align: right;
}
.app-header .who .lock { color: var(--accent); font-weight: 700; }

/* ── Account (top-right profile + sign out) ───────────────── */
.account { position: relative; display: flex; align-items: center; gap: 0.6rem; }
.who-locked { font-size: 0.85rem; color: #cdd6e0; }
.who-locked .lock { color: var(--accent); font-weight: 700; }
.account-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2rem;
  padding: 0.25rem 0.75rem 0.25rem 0.3rem;
  cursor: pointer;
  color: #fff;
  font-family: var(--font-sans);
}
.account-profile:hover { background: rgba(255, 255, 255, 0.15); }
.account-avatar {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--charcoal);
  font-weight: 800;
  font-size: 0.76rem;
  flex: 0 0 auto;
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-name {
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-signout {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.85rem;
  border-radius: 0.35rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.account-signout:hover { background: var(--accent); color: var(--charcoal); }
.account-pop {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 30;
  background: #fff;
  color: var(--charcoal);
  border: 1px solid var(--neutral-border);
  border-radius: 0.45rem;
  padding: 0.65rem 0.85rem;
  min-width: 13rem;
  box-shadow: 0 12px 32px rgba(54, 69, 79, 0.2);
}
.account-pop-name { font-weight: 700; font-size: 0.9rem; }
.account-pop-email { font-size: 0.8rem; color: var(--charcoal-light); margin-top: 0.15rem; word-break: break-all; }
.account-pop-tag {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary);
  font-weight: 700;
  margin-top: 0.4rem;
}

.accent-bar { height: 4px; background: var(--accent); }

/* ── Layout ───────────────────────────────────────────────── */
.app-layout {
  max-width: 1360px;
  margin: 1rem auto 1.6rem;
  padding: 0 1.2rem;
  display: grid;
  grid-template-columns: 384px 1fr;
  gap: 1.6rem;
  align-items: start;
}
.sidebar .card + .card { margin-top: 1.2rem; }
@media (max-width: 860px) {
  .app-layout { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--neutral-border);
  border-radius: 0.5rem;
}
.card + .card { margin-top: 1.2rem; }
.card-head {
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  font-size: 1.05rem;
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem 0.5rem 0 0;
}
.card-body { padding: 1rem 0.9rem; }

/* ── Inputs ───────────────────────────────────────────────── */
.field { margin-bottom: 0.95rem; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--charcoal-light);
  margin-bottom: 0.32rem;
}
.field select,
.field input[type="text"],
.field input[type="number"] {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.55rem 0.6rem;
  border: 1.5px solid var(--neutral-border);
  border-radius: 0.35rem;
  background: #fff;
  color: var(--charcoal);
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
}
.field .hint { font-size: 0.74rem; color: var(--charcoal-light); margin-top: 0.28rem; }

/* carrier constants, read-only 2x2 under the carrier select */
.const-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0 0 0.95rem;
}
.const-cell {
  background: var(--primary-lightest);
  border: 1px solid #c4d6f2;
  border-radius: 0.35rem;
  padding: 0.4rem 0.55rem;
}
.const-cell .ck { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--charcoal-light); font-weight: 700; }
.const-cell .cv { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; color: var(--primary); margin-top: 0.1rem; }

.money-input { position: relative; }
.money-input span { position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%); color: var(--charcoal-light); font-weight: 700; }
.money-input input { padding-left: 1.5rem !important; font-family: var(--font-mono); }

/* lead-getter block */
.lg-toggle { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.lg-toggle input { width: 1.1rem; height: 1.1rem; }
.lg-toggle label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--charcoal); }
.lg-detail { padding: 0.7rem; background: var(--cream); border: 1px solid var(--cream-dark); border-radius: 0.35rem; }
.lg-detail.hidden { display: none; }
.seg {
  display: flex;
  width: 100%;
  border: 1.5px solid var(--neutral-border);
  border-radius: 0.35rem;
  overflow: hidden;
}
.lg-detail .seg { margin-bottom: 0.6rem; }
.seg button {
  flex: 1 1 0;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.45rem 0.5rem;
  border: none;
  border-left: 1px solid var(--neutral-border);
  background: #fff;
  color: var(--charcoal-light);
  cursor: pointer;
  transition: background 0.12s;
}
.seg button:first-child { border-left: none; }
.seg button:hover { background: var(--neutral-light); }
.seg button.active { background: var(--primary); color: #fff; }
.seg button.active:hover { background: var(--primary); }
.seg button.disabled,
.seg button:disabled {
  color: var(--neutral-border);
  background: var(--neutral-light);
  cursor: not-allowed;
  opacity: 0.65;
}
.seg button.disabled:hover,
.seg button:disabled:hover { background: var(--neutral-light); }

/* ── Results ──────────────────────────────────────────────── */
.summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.chip {
  flex: 1 1 0;
  min-width: 120px;
  background: var(--primary-lightest);
  border: 1px solid #c4d6f2;
  border-radius: 0.4rem;
  padding: 0.55rem 0.7rem;
}
.chip .k { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--charcoal-light); font-weight: 700; }
.chip .v { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; color: var(--primary); margin-top: 0.15rem; }

table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.grid th, table.grid td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--neutral-border);
}
table.grid th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--charcoal-light);
  background: var(--neutral-light);
}
table.grid td.num, table.grid th.num { text-align: right; font-family: var(--font-mono); }
table.grid tr.total td { font-weight: 800; border-top: 2px solid var(--charcoal); background: #fbfcfe; }
table.grid tr.sub td { color: var(--charcoal-light); font-size: 0.86rem; border-bottom: 1px dotted var(--neutral-border); }
table.grid tr.sub td:first-child { font-style: italic; padding-left: 1rem; }
table.grid tr.sub.neg td { color: var(--danger); }
table.grid tr.sub.override td:first-child { font-style: normal; font-weight: 700; color: var(--charcoal); }
table.grid tr.sub.note-row td.override-note {
  font-style: italic;
  font-size: 0.78rem;
  color: var(--charcoal-light);
  border-bottom: 1px dotted var(--neutral-border);
  padding: 0.15rem 0.6rem 0.45rem 1.4rem;
}
table.grid tr.total.grand td { border-top: 2px solid var(--charcoal); background: var(--cream); }
table.grid tr.leap td { background: var(--cream); }
table.grid .person { font-weight: 700; }
.strike { color: var(--charcoal-light); text-decoration: line-through; margin-right: 0.35rem; }
.final-val { color: var(--secondary); font-weight: 800; }

.note {
  font-family: var(--font-accent);
  font-size: 0.9rem;
  color: var(--charcoal-light);
  background: var(--cream);
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0.7rem;
  margin-top: 0.8rem;
  border-radius: 0 0.3rem 0.3rem 0;
}
.override-overview .ov-lead { margin: 0 0 0.6rem; line-height: 1.55; }
.override-overview ul.ov-cats { list-style: none; margin: 0; padding-left: 0; }
.override-overview ul.ov-cats > li { margin-bottom: 0.55rem; line-height: 1.5; }
.override-overview ul.ov-cats ul { margin: 0.25rem 0 0; padding-left: 1.2rem; list-style: disc; }
.override-overview ul.ov-cats ul li { margin-bottom: 0.1rem; }
.override-overview .ov-cat { font-weight: 700; color: var(--charcoal); }

.formula {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  background: #1e2630;
  color: #e8edf3;
  border-radius: 0.4rem;
  padding: 0.8rem 0.9rem;
  margin-top: 0.4rem;
  line-height: 1.7;
}
.formula .lbl { color: var(--accent); }
.formula .res { color: #8fd6a8; font-weight: 700; }
.formula .eq { color: #7f93a6; }

.section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--charcoal);
  margin: 1.3rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--accent);
}
.section-title:first-child { margin-top: 0; }

.lg-off { color: var(--charcoal-light); font-style: italic; font-size: 0.9rem; }

.app-footer {
  text-align: center;
  font-size: 0.74rem;
  color: #8a96a3;
  padding: 1.4rem 1rem 2rem;
}

/* ── Product toggle + grids reference ─────────────────────── */
/* The product bar lines up with the sidebar's left edge (same max-width and
   padding as .app-layout), so Life / Annuity / Tax sit above the carrier card. */
.product-bar {
  max-width: 1360px;
  margin: 1.4rem auto 0;
  padding: 0 1.2rem;
  display: flex;
  justify-content: flex-start;
}
.seg.top-seg { width: auto; border-width: 2px; }
.seg.top-seg button { padding: 0.55rem 1.5rem; font-size: 0.95rem; }
@media (max-width: 560px) {
  .seg.top-seg { width: 100%; }
}

.grids-wrap {
  max-width: 1360px;
  margin: 1.4rem auto;
  padding: 0 1.2rem;
}
.grids-wrap .card + .card { margin-top: 1.2rem; }
.grids-wrap .section-title:first-of-type { margin-top: 0.3rem; }

/* Governance note pinned to the very top of the comp grid. Big, bold, centered,
   all caps, no fill, so it reads as the headline rule over everything below. */
.grids-top-note {
  font-family: var(--font-accent);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--charcoal);
  padding: 0.4rem 1rem;
  margin-bottom: 0.9rem;
  line-height: 1.4;
}

/* Big bold divider splitting the individual section from the multi-agent one. */
.grids-section-head {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin: 3.4rem 0 1rem;
  padding-top: 1rem;
  border-top: 3px solid var(--charcoal);
}
.grids-section-head:first-of-type { margin-top: 0.2rem; }

/* Disclaimer notes across the comp grids read as clean bold caps with no fill,
   matching the top governance line. The override explanation keeps its panel. */
.grids-wrap .note:not(.override-overview) {
  background: none;
  border-left: none;
  border-radius: 0;
  margin-top: 0.45rem;
  padding: 0.2rem 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--charcoal);
  line-height: 1.5;
}
/* A disclaimer that ends a card sits tight to the bottom edge, instead of
   floating above a full pad of card-body padding. */
.grids-wrap .card-body > .note:not(.override-overview):last-child {
  padding-bottom: 0;
  margin-bottom: -0.5rem;
}

/* ── Sign-in shell ────────────────────────────────────────── */
.login-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px);
  padding: 2rem 1.2rem;
}
.login-card {
  background: #fff;
  border: 1px solid var(--neutral-border);
  border-top: 5px solid var(--accent);
  border-radius: 0.6rem;
  max-width: 420px;
  width: 100%;
  padding: 2.2rem 2rem;
  text-align: center;
  box-shadow: 0 12px 40px rgba(54, 69, 79, 0.12);
}
.login-brand {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.03em;
  color: var(--charcoal);
}
.login-brand span { color: var(--accent); font-weight: 400; display: block; font-size: 1.15rem; }
.login-sub {
  font-family: var(--font-accent);
  color: var(--charcoal-light);
  font-size: 0.95rem;
  margin: 0.9rem 0 1.5rem;
  line-height: 1.5;
}
.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 0.4rem;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  transition: background 0.12s;
}
.google-btn:hover { background: var(--primary-light); }
.google-btn .g-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 0.95rem;
}
.login-status {
  margin-top: 1rem;
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: var(--danger);
}

/* ── Case agreement ───────────────────────────────────────── */
/* Button under each product result that opens the agreement generator. */
.case-agreement-btn {
  margin-top: 1rem;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 0.4rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: background 0.12s;
}
.case-agreement-btn:hover { background: var(--primary-light); }
.case-agreement-btn:disabled {
  background: var(--neutral-light);
  color: var(--neutral-border);
  cursor: not-allowed;
}

.ca-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(30, 38, 48, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}
.ca-modal {
  background: #fff;
  width: 100%;
  max-width: 760px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 0.55rem;
  border-top: 5px solid var(--accent);
  box-shadow: 0 18px 50px rgba(20, 28, 38, 0.35);
  overflow: hidden;
}
.ca-head {
  position: relative;
  background: var(--charcoal);
  color: #fff;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  font-size: 1.2rem;
  padding: 0.85rem 1.1rem;
}
.ca-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.ca-close:hover { opacity: 1; }
.ca-body {
  padding: 1rem 1.1rem 1.1rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.ca-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 0.9rem;
}
.ca-field { display: flex; flex-direction: column; }
.ca-field label {
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--charcoal-light);
  margin-bottom: 0.28rem;
}
.ca-field input, .ca-field select {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.5rem 0.55rem;
  border: 1.5px solid var(--neutral-border);
  border-radius: 0.35rem;
  background: #fff;
  color: var(--charcoal);
}
.ca-field input:focus, .ca-field select:focus { outline: none; border-color: var(--primary); }
.ca-field.full { grid-column: 1 / -1; }

/* Version notice block (tentative vs final), shown in the live preview. */
.ca-notice {
  border-left: 3px solid var(--accent);
  background: var(--neutral-light);
  padding: 0.6rem 0.75rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--charcoal);
  border-radius: 0.25rem;
}
.ca-notice.final { border-left-color: var(--secondary); }

.ca-preview {
  border: 1px solid var(--neutral-border);
  border-radius: 0.4rem;
  background: #fff;
  padding: 1.1rem 1.2rem;
  max-height: 46vh;
  overflow: auto;
}
.ca-doc-head { text-align: center; margin-bottom: 0.9rem; }
.ca-doc-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.03em;
  color: var(--primary);
}
.ca-doc-sub { font-size: 0.78rem; color: var(--charcoal-light); margin-top: 0.15rem; }
table.ca-meta { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.ca-meta td { padding: 0.22rem 0.4rem 0.22rem 0; vertical-align: top; border-bottom: 1px dotted var(--neutral-border); }
table.ca-meta td.k {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--charcoal-light);
  white-space: nowrap;
  width: 11rem;
}
table.ca-meta td.v { color: var(--charcoal); }
.ca-ack { font-family: var(--font-accent); font-size: 0.86rem; color: var(--charcoal-light); margin: 0.4rem 0 0.8rem; line-height: 1.5; }
.ca-sign { margin-top: 0.9rem; }
.ca-sign-who { font-weight: 700; font-size: 0.9rem; color: var(--charcoal); margin-bottom: 1.2rem; }
.ca-sign-lines { display: flex; gap: 1.4rem; }
.ca-sign-lines span {
  flex: 1 1 0;
  border-top: 1px solid var(--charcoal-light);
  padding-top: 0.2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--charcoal-light);
}
.ca-sign-lines span:last-child { flex: 0 0 32%; }

/* Case-agreement preview type scale (Ryan directive 2026-07-13): the preview
   mirrors the PDF's four sizes: title 1.5 / heading 1.05 / body 0.95 /
   small 0.8. Scoped to .ca-doc so the calculator screen keeps its own sizes. */
.ca-doc .ca-doc-title { font-size: 1.5rem; }
.ca-doc .ca-doc-sub { font-size: 0.95rem; font-weight: 700; color: var(--charcoal); }
.ca-doc .section-title { font-size: 1.05rem; }
.ca-doc table.ca-meta { font-size: 0.95rem; }
.ca-doc table.ca-meta td.k { font-size: 0.8rem; }
.ca-doc table.grid { font-size: 0.95rem; }
.ca-doc table.grid th { font-size: 0.8rem; }
.ca-doc table.grid tr.sub td { font-size: 0.8rem; }
.ca-doc .note { font-size: 0.95rem; }
.ca-doc .ca-ack { font-size: 0.95rem; }
.ca-doc .ca-sign-who { font-size: 0.95rem; }
.ca-doc .ca-sign-lines span { font-size: 0.8rem; }

.ca-status { min-height: 1.1rem; font-size: 0.86rem; color: var(--charcoal-light); }
.ca-status.ok { color: var(--secondary); font-weight: 700; }
.ca-status.err { color: var(--danger); font-weight: 700; }

.ca-actions { display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; }
.ca-btn {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: 0.4rem;
  border: 1.5px solid var(--neutral-border);
  background: #fff;
  color: var(--charcoal);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.ca-btn:hover { background: var(--neutral-light); }
.ca-btn.ghost { color: var(--charcoal-light); }
.ca-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.ca-btn.primary:hover { background: var(--primary-light); }
.ca-btn:disabled { opacity: 0.6; cursor: default; }

@media (max-width: 560px) {
  .ca-form { grid-template-columns: 1fr; }
}

/* Print fallback: if the agent prints while the preview is open, show just the
   document. The PDF download is the primary path; this keeps Ctrl+P usable. */
@media print {
  body * { visibility: hidden; }
  .ca-overlay, .ca-overlay * { visibility: visible; }
  .ca-overlay {
    position: absolute;
    inset: 0;
    background: #fff;
    padding: 0;
    display: block;
  }
  .ca-modal { max-width: none; max-height: none; box-shadow: none; border: none; }
  .ca-head, .ca-form, .ca-actions, .ca-status, .ca-close { display: none; }
  .ca-preview { max-height: none; overflow: visible; border: none; padding: 0; }
}
