/* =========================================================
   Dr. Raquel de Mello Gomes site styles
   Modern, clean, clinical. Teal + warm neutral palette.
   ========================================================= */

:root {
  --teal-900: #0f3d3e;
  --teal-700: #16686a;
  --teal-600: #1c8385;
  --teal-500: #2aa3a5;
  --teal-100: #d9eeee;
  --teal-50:  #eef7f7;

  --ink:      #16252b;
  --ink-soft: #41545c;
  --muted:    #6b7c84;
  --line:     #e3e9ea;
  --bg:       #ffffff;
  --bg-soft:  #f6f9f9;
  --bg-warm:  #faf7f2;
  --gold:     #c89b54;

  --maxw: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 45, .06), 0 2px 8px rgba(16, 40, 45, .05);
  --shadow-md: 0 10px 30px rgba(16, 40, 45, .10);
  --shadow-lg: 0 24px 60px rgba(16, 40, 45, .14);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; line-height: 1.15; color: var(--teal-900); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }

a { color: var(--teal-700); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--teal-500); }

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--teal-700); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(16,40,45,.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--teal-900); }
.brand:hover { color: var(--teal-900); }
.brand-mark { color: var(--teal-600); display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-serif); font-size: 1.12rem; font-weight: 600; }
.brand-sub { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.primary-nav { display: flex; align-items: center; gap: 8px; }
.primary-nav a {
  color: var(--ink-soft); font-weight: 500; font-size: .98rem;
  padding: 8px 14px; border-radius: 999px; transition: background .15s ease, color .15s ease;
}
.primary-nav a:hover { background: var(--teal-50); color: var(--teal-700); }
.primary-nav a.is-active { color: var(--teal-700); background: var(--teal-50); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .96rem; padding: 13px 24px; border-radius: 999px;
  cursor: pointer; border: 1px solid transparent; transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--teal-700); border-color: var(--teal-100); }
.btn-ghost:hover { background: var(--teal-50); color: var(--teal-700); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--teal-50), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding: 84px 0 88px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal-700); font-weight: 600; margin-bottom: 20px;
}
.hero-eyebrow::before { content: ""; width: 28px; height: 1.5px; background: var(--gold); display: inline-block; }
.hero .hero-title { margin: 0 0 18px; font-size: clamp(2rem, 4vw, 3rem); }
.hero .hero-title .accent { color: var(--teal-600); }
.hero-lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 38ch; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; max-width: 320px; margin-left: auto;
  background: linear-gradient(160deg, var(--teal-100), var(--teal-50));
  box-shadow: var(--shadow-lg);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait .portrait-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--teal-700); text-align: center; padding: 24px;
}
.hero-portrait .portrait-fallback svg { width: 64px; height: 64px; opacity: .55; }
.hero-portrait .portrait-fallback span { font-size: .82rem; color: var(--teal-700); opacity: .8; }
.hero-badge {
  position: absolute; left: -18px; bottom: 28px; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 14px 18px; display: flex; align-items: center; gap: 12px;
}
.hero-badge .num { font-family: var(--font-serif); font-size: 1.7rem; color: var(--teal-700); font-weight: 600; line-height: 1; }
.hero-badge .lbl { font-size: .78rem; color: var(--muted); line-height: 1.25; max-width: 14ch; }

/* ---------- Section scaffolding ---------- */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-600); font-weight: 600; margin-bottom: 12px;
}
.section-title { margin: 0 0 14px; }
.section-intro { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

.bg-soft { background: var(--bg-soft); }
.bg-warm { background: var(--bg-warm); }
.bg-teal { background: linear-gradient(160deg, var(--teal-900), var(--teal-700)); color: #fff; }
.bg-teal h2, .bg-teal h3 { color: #fff; }
.bg-teal .section-eyebrow { color: var(--teal-100); }
.bg-teal .section-intro { color: rgba(255,255,255,.85); }

/* ---------- Expertise cards ---------- */
.expertise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.expertise-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.expertise-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal-100); }
.expertise-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--teal-50); color: var(--teal-600);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.expertise-icon svg { width: 28px; height: 28px; }
.expertise-card h3 { font-size: 1.18rem; margin: 0 0 8px; }
.expertise-card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Featured cases ---------- */
.cases-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.case-item {
  display: flex; gap: 16px; align-items: flex-start; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-sm); padding: 22px;
}
.case-num {
  flex: 0 0 auto; font-family: var(--font-serif); font-size: 1.05rem; color: var(--teal-900);
  background: var(--teal-100); width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.case-item h3 { font-size: 1.08rem; margin: 2px 0 4px; }
.case-item p { margin: 0; font-size: .92rem; color: rgba(255,255,255,.8); }

/* ---------- Blog cards ---------- */
.posts-section .section-head { display: flex; align-items: flex-end; justify-content: space-between; max-width: none; gap: 24px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; color: inherit;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal-100); color: inherit; }
.card-thumb { aspect-ratio: 16 / 10; background: linear-gradient(150deg, var(--teal-100), var(--teal-50)); position: relative; display: flex; align-items: center; justify-content: center; }
.card-thumb svg { width: 48px; height: 48px; color: var(--teal-500); opacity: .7; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-date { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.card-title { font-size: 1.18rem; margin: 0 0 10px; line-height: 1.25; }
.card-excerpt { font-size: .94rem; color: var(--ink-soft); margin: 0 0 18px; flex: 1; }
.card-link { font-weight: 600; font-size: .92rem; color: var(--teal-700); }

/* ---------- Bio page ---------- */
.bio-hero { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; padding-top: 64px; }
.bio-portrait { width: 210px; aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; background: linear-gradient(160deg, var(--teal-100), var(--teal-50)); box-shadow: var(--shadow-lg); display:flex; align-items:center; justify-content:center; }
.bio-portrait img { width: 100%; height: 100%; object-fit: cover; }
.bio-portrait .portrait-fallback { color: var(--teal-700); display:flex; flex-direction:column; align-items:center; gap:10px; opacity:.6; }
.bio-portrait .portrait-fallback svg { width: 56px; height: 56px; }

.prose { color: var(--ink-soft); }
.prose p { margin: 0 0 18px; }
.prose h2 { margin: 40px 0 16px; }
.prose h3 { margin: 28px 0 10px; color: var(--teal-700); }
.prose ul { padding-left: 1.2em; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }

.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 8px 0 0; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; box-shadow: var(--shadow-sm); }
.fact .fact-num { font-family: var(--font-serif); font-size: 2rem; color: var(--teal-700); line-height: 1; }
.fact .fact-lbl { color: var(--muted); font-size: .9rem; margin-top: 6px; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 26px 30px; border-left: 2px solid var(--teal-100); }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--teal-500); box-shadow: 0 0 0 4px var(--teal-50); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline .t-title { font-weight: 600; color: var(--ink); }
.timeline .t-sub { color: var(--muted); font-size: .92rem; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--teal-50); color: var(--teal-700); border-radius: 999px; padding: 7px 16px; font-size: .9rem; font-weight: 500; }

.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

.cv-list { columns: 2; column-gap: 40px; font-size: .92rem; color: var(--ink-soft); }
.cv-list li { margin-bottom: 10px; break-inside: avoid; }

/* ---------- Blog index ---------- */
.blog-head { padding: 72px 0 24px; }
.featured-post {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 0; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); margin-bottom: 40px;
}
.featured-post .fp-media { background: linear-gradient(150deg, var(--teal-100), var(--teal-50)); min-height: 300px; display:flex; align-items:center; justify-content:center; }
.featured-post .fp-media svg { width: 64px; height: 64px; color: var(--teal-500); opacity:.65; }
.featured-post .fp-media img { width:100%; height:100%; object-fit:cover; }
.featured-post .fp-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.featured-flag { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 12px; }
.featured-post h2 { margin: 0 0 14px; }
.featured-post p { color: var(--ink-soft); margin: 0 0 22px; }

/* ---------- Post page ---------- */
.post { padding: 56px 0 0; }
.breadcrumb { margin-bottom: 28px; font-size: .92rem; }
.post-header { margin-bottom: 36px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag { background: var(--teal-50); color: var(--teal-700); font-size: .78rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; letter-spacing: .02em; }
.post-header h1 { margin: 0 0 18px; }
.post-hero { margin: 0 0 36px; }
.post-hero img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.post-meta { color: var(--muted); font-size: .94rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.post-meta .dot { opacity: .5; }
.post-meta .author { color: var(--ink-soft); font-weight: 500; }

.post-body { font-size: 1.07rem; color: var(--ink-soft); }
.post-body > *:first-child { margin-top: 0; }
.post-body h1 { font-size: 1.7rem; margin: 40px 0 14px; color: var(--teal-900); }
.post-body h2 { font-size: 1.45rem; margin: 38px 0 14px; }
.post-body h3 { font-size: 1.18rem; margin: 28px 0 10px; color: var(--teal-700); }
.post-body p { margin: 0 0 20px; }
.post-body ul, .post-body ol { padding-left: 1.3em; margin: 0 0 20px; }
.post-body li { margin-bottom: 8px; }
.post-body strong { color: var(--ink); }
.post-body a { text-decoration: underline; text-underline-offset: 3px; }
.post-body blockquote {
  margin: 24px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--teal-500);
  color: var(--ink); font-style: italic;
}
.post-body img { border-radius: var(--radius-sm); margin: 24px 0; box-shadow: var(--shadow-sm); }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.post-body code { background: var(--teal-50); padding: 2px 6px; border-radius: 6px; font-size: .9em; }

.post-footer { margin: 48px 0 8px; padding-top: 32px; border-top: 1px solid var(--line); }
.post-share { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--bg-soft); border-radius: var(--radius); padding: 26px 30px; }
.post-share .share-q { margin: 0; font-family: var(--font-serif); font-size: 1.2rem; color: var(--teal-900); }

.related { padding: 64px 0 88px; background: var(--bg-soft); margin-top: 64px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { margin: 0 0 14px; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 52ch; margin: 0 auto 28px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: var(--ink); }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; font: inherit;
  background: var(--bg-soft); transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-50); background: #fff; }
.field textarea { min-height: 130px; resize: vertical; }
.contact-aside .contact-item { display: flex; gap: 14px; margin-bottom: 24px; }
.contact-aside .ci-icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: var(--teal-50); color: var(--teal-600); display: flex; align-items: center; justify-content: center; }
.contact-aside .ci-icon svg { width: 22px; height: 22px; }
.contact-aside h3 { font-size: 1.05rem; margin: 0 0 4px; }
.contact-aside p, .contact-aside a { margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-900); color: rgba(255,255,255,.82); margin-top: 0; padding: 56px 0 28px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-name { font-family: var(--font-serif); font-size: 1.25rem; color: #fff; margin: 0 0 4px; }
.footer-tag { margin: 0; font-size: .92rem; color: rgba(255,255,255,.6); }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-social a { color: rgba(255,255,255,.82); }
.footer-links a:hover, .footer-social a:hover { color: #fff; }
.footer-social .social-row { display: flex; gap: 18px; margin-top: 12px; }
.footer-bottom { padding-top: 22px; }
.footer-bottom p { margin: 0; font-size: .85rem; color: rgba(255,255,255,.55); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 56px 0 64px; }
  .hero-portrait { max-width: 380px; }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-list { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .bio-hero { grid-template-columns: 1fr; }
  .bio-portrait { max-width: 340px; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post .fp-media { min-height: 200px; }
  .contact-grid { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; gap: 28px; }
  .cv-list { columns: 1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .primary-nav {
    position: absolute; top: 74px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px; box-shadow: var(--shadow-md);
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 14px 16px; border-radius: 10px; }
  .nav-toggle { display: flex; }
  .expertise-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .posts-section .section-head { flex-direction: column; align-items: flex-start; }
  .section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Bio inline figure ---------- */
.bio-figure { margin: 32px auto 0; max-width: 460px; text-align: center; }
.bio-figure img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.bio-figure figcaption { margin-top: 12px; font-size: .88rem; color: var(--muted); line-height: 1.5; }

/* ---------- Bio mini gallery ---------- */
.bio-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; align-items: start; }
.bio-gallery figure { margin: 0; }
.bio-gallery img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.bio-gallery figc
/* ---------- Bio "Training & practice" gallery ---------- */
.photo-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 580px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.photo-gallery figure { margin: 0; }
.photo-gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 28%; border-radius: var(--radius-sm); }
.photo-gallery figcaption { margin-top: 8px; font-size: .72rem; color: var(--muted); line-height: 1.4; }
@media (max-width: 480px) { .photo-gallery { gap: 9px; padding: 12px; } .photo-gallery figcaption { font-size: .66rem; } }

/* ---------- Home "Ask the assistant" chat ---------- */
.ask { background: radial-gradient(1000px 420px at 80% -20%, var(--teal-50), transparent 60%), linear-gradient(180deg, #ffffff, var(--bg-soft)); }
.ask-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.ask-head h1, .ask-head h2 { margin: 10px 0 14px; }
.ask-lead { color: var(--ink-soft); font-size: 1.08rem; max-width: 62ch; margin: 0 auto; }
.chat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 18px; text-align: left; margin-top: 28px; }
.chat-log { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 6px 4px 10px; }
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.bubble { max-width: 84%; padding: 11px 15px; border-radius: 14px; font-size: .96rem; line-height: 1.55; }
.msg.bot .bubble { background: var(--teal-50); color: var(--ink); border-bottom-left-radius: 4px; }
.msg.user .bubble { background: var(--teal-700); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot .bubble a { color: var(--teal-700); text-decoration: underline; }
.msg.user .bubble a { color: #fff; text-decoration: underline; }
.bubble.typing { display: inline-flex; gap: 5px; align-items: center; }
.bubble.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-500); animation: blink 1s infinite; }
.bubble.typing span:nth-child(2) { animation-delay: .2s; }
.bubble.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .3; } 40% { opacity: 1; } }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chat-suggest .chip { cursor: pointer; border: 1px solid var(--teal-100); background: var(--teal-50); color: var(--teal-700); font: inherit; font-weight: 500; font-size: .86rem; padding: 7px 14px; border-radius: 999px; transition: background .12s; }
.chat-suggest .chip:hover { background: var(--teal-100); }
.chat-input { display: flex; gap: 10px; }
.chat-input input { flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: var(--bg-soft); transition: border-color .15s, box-shadow .15s; }
.chat-input input:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-50); background: #fff; }
.chat-disclaimer { margin: 12px 4px 0; font-size: .76rem; color: var(--muted); }
@media (max-width: 560px) { .chat-input .btn { padding: 12px 18px; } .bubble { max-width: 90%; } }

/* --- community CTAs --- */
.hero-signin{margin:14px 0 0;font-size:.9rem;color:var(--muted)}
.hero-signin a{color:var(--teal-600,#1f7a72);font-weight:600}
.ask-cta{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:18px}
.ask-cta-note{font-size:.85rem;color:var(--muted)}
.ask-cta-note a{color:var(--teal-600,#1f7a72);font-weight:600}

/* --- header community CTA --- */
.header-right { display: flex; align-items: center; gap: 18px; }
.header-cta { display: flex; align-items: center; gap: 14px; }
.header-join { padding: 9px 16px; font-size: .9rem; }
.header-signin { font-size: .92rem; font-weight: 600; color: var(--teal-700); white-space: nowrap; }
.header-signin:hover { color: var(--teal-900); }
.nav-cta-mobile { display: none; }
@media (max-width: 680px) {
  .header-cta { display: none; }
  .nav-cta-mobile { display: block; border-top: 1px solid var(--line); margin-top: 4px; }
  .nav-cta-mobile[data-community="join"] { color: var(--teal-700); font-weight: 700; }
}

/* --- language switcher --- */
.lang-switch { display:inline-flex; align-items:center; gap:6px; font-size:.82rem; font-weight:600; color:var(--muted); }
.lang-switch a { color:var(--muted); padding:2px 2px; }
.lang-switch a.is-active { color:var(--teal-700); text-decoration:underline; }
.lang-switch a:hover { color:var(--teal-700); }
@media (max-width: 680px) { .header-cta .lang-switch { display:inline-flex; } }

/* --- tools dropdown + tabs --- */
.primary-nav .nav-item { position: relative; display: inline-flex; align-items: center; }
.subnav { position: absolute; top: calc(100% + 4px); left: 0; background:#fff; border:1px solid var(--line);
  border-radius:10px; box-shadow:var(--shadow-md); padding:6px; min-width:190px; flex-direction:column; gap:2px; display:none; z-index:60; }
.nav-item:hover .subnav, .nav-item:focus-within .subnav { display:flex; }
.subnav a { padding:9px 12px; border-radius:8px; white-space:nowrap; font-size:.92rem; }
.tool-tabs { display:flex; gap:8px; margin-top:18px; flex-wrap:wrap; }
.tool-tab { padding:8px 16px; border-radius:999px; border:1px solid var(--line); font-weight:600; font-size:.9rem; color:var(--ink-soft); }
.tool-tab:hover { border-color:var(--teal-100); color:var(--teal-700); }
.tool-tab.is-current { background:var(--teal-600,#1f7a72); color:#fff; border-color:transparent; }
@media (max-width: 680px) {
  .primary-nav .nav-item { display:block; }
  .subnav { position:static; display:flex; box-shadow:none; border:0; padding:0 0 0 10px; min-width:0; }
  .subnav a { padding:12px 16px; }
}
