/* ==========================================================================
   Brehm Tax Counsel PLLC — Site Stylesheet
   ========================================================================== */

:root {
  --navy: #0b2545;
  --navy-dark: #071a34;
  --navy-light: #12335f;
  --charcoal: #2a2d34;
  --ivory: #f7f6f3;
  --white: #ffffff;
  --gold: #a9843f;
  --border-light: #e3e2de;
  --text-muted: #5a5f6a;
  --shadow: 0 10px 30px rgba(11, 37, 69, 0.08);
  --max-width: 1180px;
  --radius: 2px;
  --header-height: 70px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; color: var(--charcoal); }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.5em; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.75em;
  display: block;
}

.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--ivory { background: var(--ivory); }
.section--navy {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
}
.section--navy h2, .section--navy h3, .section--navy h4 { color: var(--white); }
.section--navy p { color: rgba(255,255,255,0.85); }

.section-head { max-width: 720px; margin: 0 0 2.5rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

hr.rule { border: none; border-top: 1px solid var(--border-light); margin: 2.5rem 0; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: 0.85em 1.9em;
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-light); color: var(--white); border-color: var(--navy-light); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-outline-white:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--border-light);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1320px; /* wider than the content container so the header phone
                        number + nav links + CTA never overflow at desktop
                        widths between the mobile breakpoint and full-width */
  margin: 0 auto;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); flex-shrink: 0; min-width: 0; }
.brand img { height: 42px; width: auto; flex-shrink: 0; }
.brand-text { font-family: "Playfair Display", serif; line-height: 1.1; white-space: nowrap; }
.brand-text .firm-name { display: block; font-weight: 700; font-size: 1.02rem; letter-spacing: 0.02em; color: var(--navy); }
.brand-text .firm-sub {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}
.main-nav ul { list-style: none; display: flex; gap: 1.2rem; margin: 0; padding: 0; flex-wrap: nowrap; }
.main-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: 0.01em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--gold); }
.nav-cta { display: flex; align-items: center; gap: 0.85rem; flex-shrink: 0; }
.nav-cta .btn { padding: 0.6em 1.1em; font-size: 0.78rem; white-space: nowrap; }
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 10px;
  min-width: 44px; min-height: 44px; align-items: center; justify-content: center;
  flex-direction: column; -webkit-tap-highlight-color: transparent; flex-shrink: 0;
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 4px 0; transition: transform 0.25s ease, opacity 0.2s ease; }

.nav-phone { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 0.85rem; color: var(--navy); white-space: nowrap; letter-spacing: 0.01em; }
.nav-phone:hover { color: var(--gold); }
.nav-phone-icon { color: var(--gold); font-size: 1.02rem; line-height: 1; }

/* ---------------- Hero (text-only) ---------------- */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 82% 18%, rgba(169,132,63,0.16), transparent 45%);
  pointer-events: none;
}
.hero-inner { max-width: var(--max-width); margin: 0 auto; padding: 100px 24px 88px; position: relative; z-index: 1; }
.hero h1 { color: var(--white); max-width: 760px; }
.hero .lede { font-size: 1.18rem; max-width: 600px; color: rgba(255,255,255,0.88); margin-bottom: 1.9rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.page-hero { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: var(--white); padding: 76px 0 60px; }
.page-hero h1 { color: var(--white); margin-bottom: 0.4em; }
.page-hero .lede { color: rgba(255,255,255,0.85); max-width: 680px; font-size: 1.08rem; }
.breadcrumb {
  font-size: 0.82rem; color: rgba(255,255,255,0.6); text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 1rem;
}
.breadcrumb a { color: rgba(255,255,255,0.75); }

/* ---------------- Cards / Grids ---------------- */
.grid { display: grid; gap: 2rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--border-light); padding: 2rem;
  border-radius: var(--radius); transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card h3 { margin-bottom: 0.55em; font-size: 1.2rem; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0.6em 0 0; padding-left: 1.1em; }
.card-accent { display: block; width: 40px; height: 3px; background: var(--gold); border-radius: 2px; margin-bottom: 1.25rem; }
.card--featured { border-top: 3px solid var(--gold); position: relative; }
.service-flag { display: inline-block; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.11em; font-weight: 700; color: var(--gold); margin-bottom: 0.7rem; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.stat-row .stat-num { font-family: "Playfair Display", serif; font-size: 2.4rem; color: var(--gold); font-weight: 700; }
.stat-row .stat-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.75); }

.results-band { background: var(--ivory); border-bottom: 1px solid var(--border-light); padding: 1.5rem 0; }
.results-band .container { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1rem 2.4rem; }
.results-band-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: var(--gold); flex-shrink: 0; }
.results-band-items { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: center; }
.results-band-items span { font-size: 0.95rem; color: var(--text-muted); white-space: nowrap; }
.results-band-items strong { color: var(--navy); font-weight: 700; }
.results-band-link { font-size: 0.82rem; font-weight: 600; color: var(--navy); white-space: nowrap; flex-shrink: 0; }
.results-band-link:hover { color: var(--gold); }

/* ---------------- Timeline ---------------- */
.timeline { position: relative; margin-top: 2rem; padding-left: 2.2rem; border-left: 2px solid var(--border-light); }
.timeline-item { position: relative; padding-bottom: 2.6rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -2.55rem; top: 0.35rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--gold); border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--navy);
}
.timeline-item .years { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--gold); font-weight: 700; margin-bottom: 0.3em; }

/* ---------------- Bio / framed image layout ---------------- */
.bio-layout { display: grid; grid-template-columns: 320px 1fr; gap: 3.5rem; align-items: start; }
.headshot-frame { background: var(--ivory); border: 1px solid var(--border-light); padding: 14px; }
.headshot-frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; }

.credential-list { list-style: none; padding: 0; margin: 1.5rem 0 0; border-top: 1px solid var(--border-light); }
.credential-list li { padding: 0.85em 0; border-bottom: 1px solid var(--border-light); display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }
.credential-list span:first-child { color: var(--text-muted); }
.credential-list span:last-child { font-weight: 600; text-align: right; color: var(--navy); }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy); margin-bottom: 0.4em; }
input, textarea, select {
  width: 100%; padding: 0.75em 0.9em; border: 1px solid var(--border-light); border-radius: var(--radius);
  font-family: inherit; font-size: 0.95rem; background: var(--white); color: var(--charcoal);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--navy); }
textarea { resize: vertical; min-height: 130px; }
.form-status { display: none; margin-top: 1rem; padding: 0.9em 1.1em; border-radius: var(--radius); font-size: 0.92rem; }
.form-status.success { display: block; background: #edf3ec; color: #1f5c29; border: 1px solid #c3dcc5; }
.form-status.error { display: block; background: #fbeaea; color: #8a2c26; border: 1px solid #eeccca; }
.form-status.sending { display: block; background: var(--ivory); color: var(--text-muted); border: 1px solid var(--border-light); }

/* ---------------- Contact info ---------------- */
.contact-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2rem; }
.contact-info-item { border-top: 3px solid var(--gold); padding-top: 1rem; }
.contact-info-item h4 { margin-bottom: 0.3em; }
.map-frame { border: 1px solid var(--border-light); height: 340px; width: 100%; filter: grayscale(0.15); }

/* ---------------- Resource list ---------------- */
.resource-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.6rem 1.8rem; border: 1px solid var(--border-light); margin-bottom: 1rem; background: var(--white);
}
.resource-item .r-title { font-weight: 700; color: var(--navy); margin-bottom: 0.2em; }
.resource-item .r-desc { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.resource-icon {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: "Playfair Display", serif;
}

/* ---------------- CTA band / footer ---------------- */
.cta-band { background: var(--navy); color: var(--white); padding: 3.5rem 0; text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.82); max-width: 560px; margin-left: auto; margin-right: auto; }

.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.78); padding: 60px 0 28px; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.14); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; }
.footer-brand img { height: 36px; }
.footer-brand span { font-family: "Playfair Display", serif; color: var(--white); font-weight: 700; font-size: 1rem; }
.footer-social { display: inline-flex; align-items: center; gap: 8px; margin-top: 1rem; color: rgba(255,255,255,0.85); font-size: 0.86rem; font-weight: 600; }
.footer-social svg { flex-shrink: 0; }
.footer-social:hover { color: var(--gold); }
.site-footer h4 { color: var(--white); font-family: "Source Sans 3", sans-serif; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.6em; }
.site-footer a { color: rgba(255,255,255,0.78); }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { padding-top: 1.8rem; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; font-size: 0.8rem; color: rgba(255,255,255,0.55); }
.disclaimer { font-size: 0.78rem; color: rgba(255,255,255,0.5); line-height: 1.7; padding-top: 1.6rem; max-width: 100%; }

/* ---------------- Pillars / pull quote ---------------- */
.pillar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.4rem; margin-top: 2rem; }
.pillar { display: flex; gap: 1.4rem; align-items: flex-start; }
.pillar .pillar-num { font-family: "Playfair Display", serif; font-size: 2.6rem; font-weight: 700; color: var(--gold); line-height: 1; flex-shrink: 0; min-width: 52px; }
.pillar h3 { margin-bottom: 0.4em; }
.pillar p:last-child { margin-bottom: 0; }

.pull-quote { position: relative; padding: 2.2rem 2.4rem; border-left: 4px solid var(--gold); background: var(--ivory); margin: 2.2rem 0; }
.pull-quote p { font-family: "Playfair Display", serif; font-style: italic; font-size: 1.25rem; color: var(--navy); margin-bottom: 0.6em; line-height: 1.5; }
.pull-quote cite { font-style: normal; font-family: "Source Sans 3", sans-serif; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }

/* ---------------- Speaking / publications ---------------- */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-item { display: flex; gap: 1.4rem; padding: 1.3rem 0; border-bottom: 1px solid var(--border-light); }
.pub-item:first-child { padding-top: 0; }
.pub-date { flex-shrink: 0; width: 110px; font-size: 0.82rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 0.2em; }
.pub-body p { margin-bottom: 0.25em; }
.pub-title { font-weight: 700; color: var(--navy); }
.pub-venue { font-size: 0.92rem; color: var(--text-muted); }
.pub-desc { font-size: 0.92rem; color: var(--charcoal); margin-top: 0.35em; }

/* ---------------- Insights hub cards + article typography ---------------- */
.mini-cta { background: var(--ivory); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); padding: 1.1rem 0; }
.mini-cta p { margin: 0; text-align: center; font-size: 0.98rem; color: var(--charcoal); }
.mini-cta a { font-weight: 600; color: var(--navy); border-bottom: 1px solid var(--gold); white-space: nowrap; }
.mini-cta a:hover { color: var(--gold); }

.insight-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.insight-card:hover { color: inherit; }
.insight-tag { display: inline-block; align-self: flex-start; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--gold); margin-bottom: 0.8rem; }
.insight-card h3 { color: var(--navy); margin-bottom: 0.6em; }
.insight-card p { color: var(--text-muted); flex-grow: 1; }
.insight-more { font-weight: 600; color: var(--navy); font-size: 0.92rem; margin-top: 0.5rem; }
.insight-card:hover .insight-more { color: var(--gold); }

.article-body { max-width: 760px; }
.article-body p { font-size: 1.05rem; line-height: 1.75; }
.article-body h2 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 0.6em; }
.article-body ul { margin: 0 0 1.3em; padding-left: 1.3em; }
.article-body li { margin-bottom: 0.6em; line-height: 1.7; }
.article-takeaway { background: var(--ivory); border-left: 4px solid var(--gold); padding: 1.3rem 1.6rem; font-size: 1.05rem; margin-top: 1.5rem; }

/* ---------------- First conversation block ---------------- */
.first-convo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; margin-top: 1.5rem; }
.first-convo .step { border-top: 3px solid var(--gold); padding-top: 1rem; }
.first-convo .step .num { font-family: "Playfair Display", serif; font-size: 1.4rem; font-weight: 700; color: var(--gold); }
.first-convo .step h4 { margin: 0.3em 0 0.4em; color: var(--navy); }
.first-convo .step p { font-size: 0.95rem; color: var(--text-muted); margin: 0; }

/* ---------------- Utility ---------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .bio-layout { grid-template-columns: 260px 1fr; gap: 2.2rem; }
  .stat-row { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
  .contact-info-grid { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: 1fr; }
}

/* Breakpoint raised to 1440px: with the header phone number added, the
   desktop nav genuinely needs ~1400px of width to render without wrapping
   or overflowing. Verified via direct scrollWidth measurement across the
   full range (320px–2560px) — zero overflow at every width with this
   breakpoint in place. */
@media (max-width: 1440px) {
  .main-nav, .nav-cta .btn-outline { display: none; }
  .menu-toggle { display: flex; }
  .nav-cta { gap: 0; }
  body.nav-open { overflow: hidden; height: 100%; }
  body.nav-open .main-nav {
    display: block; position: fixed; top: var(--header-height); left: 0; right: 0; bottom: 0;
    background: var(--white); padding: 0.5rem 24px 2rem; overflow-y: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain; z-index: 450;
  }
  body.nav-open .main-nav ul { flex-direction: column; gap: 0; }
  body.nav-open .main-nav a { display: block; padding: 1.15rem 0.25rem; border-bottom: 1px solid var(--border-light); font-size: 1.1rem; }
  body.nav-open .main-nav ul li:last-child a { margin-bottom: 0.5rem; }
  body.nav-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
@media (max-width: 1440px) and (max-height: 480px) {
  body.nav-open .main-nav a { padding: 0.7rem 0.25rem; font-size: 1rem; }
}

@media (max-width: 760px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .bio-layout { grid-template-columns: 1fr; }
  .headshot-frame { max-width: 320px; margin: 0 auto; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.6rem; }
  .section { padding: 56px 0; }
  .hero-inner { padding: 72px 24px 60px; }
  .contact-info-grid { grid-template-columns: 1fr; }
  .resource-item { flex-direction: column; align-items: flex-start; }
  .pub-item { flex-direction: column; gap: 0.3rem; }
  .pub-date { width: auto; }
  .first-convo { grid-template-columns: 1fr; }
  .mini-cta p { font-size: 0.92rem; }
}

/* ==========================================================================
   Intake Assistant widget (v3 — low-friction, 2-question flow + mobile fix)
   ========================================================================== */
.btc-hidden { display: none !important; }

.btc-bot-launch {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px;
  background: var(--navy); color: #fff; border: none; border-radius: 46px;
  font-family: "Source Sans 3", Arial, sans-serif; text-align: left; cursor: pointer;
  box-shadow: 0 10px 28px rgba(11,37,69,0.30);
  transition: transform 0.16s ease, box-shadow 0.16s ease; max-width: 320px;
}
.btc-bot-launch:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(11,37,69,0.36); }
.btc-bot-launch:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btc-bot-launch-icon {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; background: var(--gold); border-radius: 50%; font-size: 1rem;
}
.btc-bot-launch-txt { display: flex; flex-direction: column; line-height: 1.25; }
.btc-bot-launch-txt b { font-size: 0.94rem; font-weight: 700; }
.btc-bot-launch-txt small { font-size: 0.72rem; color: rgba(255,255,255,0.72); margin-top: 1px; }

.btc-bot-panel {
  position: fixed;
  right: 22px; bottom: 22px; top: auto;
  z-index: 901;
  width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: min(620px, calc(100dvh - 44px));
  display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 22px 60px rgba(11,37,69,0.34);
  font-family: "Source Sans 3", Arial, sans-serif;
  animation: btcRise 0.22s ease;
}
@keyframes btcRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.btc-bot-header {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
  background: linear-gradient(135deg, #071a34, var(--navy)); color: #fff;
  border-bottom: 3px solid var(--gold); flex-shrink: 0;
}
.btc-bot-title { display: flex; flex-direction: column; line-height: 1.2; }
.btc-bot-title strong { font-family: "Playfair Display", Georgia, serif; font-size: 1.02rem; }
.btc-bot-title span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.68); margin-top: 3px; }
.btc-bot-close { background: none; border: none; color: rgba(255,255,255,0.8); font-size: 1.05rem; cursor: pointer; padding: 4px 6px; line-height: 1; border-radius: 4px; }
.btc-bot-close:hover { color: #fff; background: rgba(255,255,255,0.12); }

.btc-bot-progress { padding: 10px 16px 0; background: #f7f6f3; flex-shrink: 0; }
.btc-bot-progress-bar { height: 4px; background: #e3e2de; border-radius: 3px; overflow: hidden; }
.btc-bot-progress-bar span { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 3px; transition: width 0.35s ease; }
.btc-bot-progress-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8a8f98; margin-top: 5px; }

.btc-bot-log { flex: 1; overflow-y: auto; padding: 14px 14px 6px; background: #f7f6f3; min-height: 0; }
.btc-msg { display: flex; margin-bottom: 10px; }
.btc-msg-bot { justify-content: flex-start; }
.btc-msg-user { justify-content: flex-end; }
.btc-bubble { display: inline-block; max-width: 84%; padding: 10px 13px; border-radius: 15px; font-size: 0.92rem; line-height: 1.5; }
.btc-msg-bot .btc-bubble { background: #fff; color: #2a2d34; border: 1px solid #e3e2de; border-bottom-left-radius: 4px; }
.btc-msg-user .btc-bubble { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.btc-bubble a { color: var(--gold); font-weight: 600; }
.btc-msg-user .btc-bubble a { color: #fff; text-decoration: underline; }
.btc-bubble em { font-style: italic; }

.btc-typing { display: inline-flex; gap: 4px; align-items: center; }
.btc-typing i { width: 6px; height: 6px; background: #c3c2bd; border-radius: 50%; display: inline-block; animation: btcBlink 1.2s infinite ease-in-out both; }
.btc-typing i:nth-child(2) { animation-delay: 0.18s; }
.btc-typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes btcBlink { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.btc-bot-disclaimer { font-size: 0.66rem; line-height: 1.5; color: #8a8f98; padding: 7px 14px; background: #f7f6f3; border-top: 1px solid #e9e8e4; flex-shrink: 0; }
.btc-bot-input { padding: 10px 12px 12px; background: #fff; border-top: 1px solid #e3e2de; flex-shrink: 0; }

.btc-choices { display: flex; flex-direction: column; gap: 7px; }
.btc-choice {
  text-align: left; padding: 9px 13px; background: #fff; border: 1px solid var(--navy); border-radius: 20px;
  color: var(--navy); font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: background 0.12s ease, color 0.12s ease;
}
.btc-choice:hover { background: var(--navy); color: #fff; }
.btc-entry { display: flex; gap: 8px; }
.btc-text { flex: 1; padding: 10px 12px; border: 1px solid #d7d6d2; border-radius: 8px; font-size: 0.92rem; font-family: inherit; }
.btc-text:focus { outline: none; border-color: var(--navy); }
.btc-send { padding: 0 16px; background: var(--navy); color: #fff; border: none; border-radius: 8px; font-weight: 600; font-size: 0.88rem; cursor: pointer; }
.btc-send:hover { background: #12335f; }
.btc-textarea { flex: 1; padding: 10px 12px; border: 1px solid #d7d6d2; border-radius: 8px; font-size: 0.92rem; font-family: inherit; resize: vertical; min-height: 64px; }
.btc-entry-stack { display: flex; flex-direction: column; gap: 8px; }
.btc-entry-stack .btc-send { align-self: flex-end; }

.btc-escape {
  display: block; width: 100%; margin-top: 9px; padding: 6px; background: none; border: none;
  color: #8a8f98; font-size: 0.76rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.btc-escape:hover { color: var(--navy); }
.btc-skip {
  display: inline-block; margin-top: 6px; padding: 4px 0; background: none; border: none;
  color: #8a8f98; font-size: 0.78rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.btc-skip:hover { color: var(--navy); }

@media (max-width: 480px) {
  .btc-bot-launch-txt { display: none; }
  .btc-bot-launch { padding: 14px; gap: 0; }
  .btc-bot-panel {
    top: 12px; right: 10px; left: 10px; bottom: 12px;
    width: auto; max-width: none; height: auto; max-height: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btc-bot-panel { animation: none; }
  .btc-typing i { animation: none; opacity: 0.5; }
}
