/* ── Reset & base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Palette ─────────────────────────────────────────────────────────── */
  --c-primary:        #059669;
  --c-primary-dark:   #047857;
  --c-primary-pale:   #ECFDF5;
  --c-urgent:         #B91C1C;
  --c-urgent-light:   #FEF2F2;
  --c-success:        #3A6B4A;
  --c-success-light:  #EBF4EE;
  --c-premium:        #5B3F8A;
  --c-premium-pale:   #F1EEF8;
  --c-bg:             #F8FAFC;
  --c-surface:        #FFFFFF;
  --c-surface-warm:   #F1F5F9;
  --c-border:         #E2E8F0;
  --c-border-strong:  #94A3B8;
  --c-text:           #0F172A;
  --c-muted:          #64748B;
  --c-muted-light:    #94A3B8;

  /* ── Typography ─────────────────────────────────────────────────────── */
  --font-serif: 'Inter', system-ui, -apple-system, sans-serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* ── Geometry ────────────────────────────────────────────────────────── */
  --radius:    0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 6px rgba(15,23,42,.04);
  --shadow:    0 3px 12px rgba(15,23,42,.09), 0 1px 4px rgba(15,23,42,.06);
  --shadow-md: 0 8px 28px rgba(15,23,42,.12), 0 2px 8px rgba(15,23,42,.07);
  --max-w:     1080px;
  --ease:      cubic-bezier(.4,0,.2,1);
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main { flex: 1; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.375rem; margin-bottom: 1rem; }
h3 { font-size: 1.0625rem; font-weight: 600; }
p  { margin-bottom: 0.5rem; }
a  { color: var(--c-primary); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { text-decoration: underline; }
ul { list-style: none; }
strong { font-weight: 600; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* ════════════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════════════ */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 0 1.5rem;
  height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 2rem;
}
.logo {
  font-family: var(--font-serif);
  font-size: 1.3125rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.025em;
  display: flex;
  align-items: baseline;
  text-decoration: none;
  flex-shrink: 0;
}
.logo span { font-style: italic; color: var(--c-primary); font-weight: 400; }
.logo:hover { text-decoration: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}
.nav-group {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.nav-group-services {
  flex: 1;
  padding-left: 1rem;
  gap: 0;
}
.nav-group-right { gap: 0.25rem; }
.site-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-muted);
  letter-spacing: 0.005em;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
  white-space: nowrap;
}
.site-nav a:hover { color: var(--c-text); background: var(--c-bg); text-decoration: none; }
.nav-my-cases {
  background: var(--c-primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 0.375rem 0.875rem !important;
  border-radius: 999px !important;
  margin-left: 0.25rem;
}
.nav-my-cases:hover { background: var(--c-primary-dark) !important; color: #fff !important; }
.admin-link { font-size: 0.75rem !important; color: var(--c-muted-light) !important; }

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  background: transparent;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  top: 3.75rem;
  left: 0;
  right: 0;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  z-index: 99;
  transform: translateY(-110%);
  transition: transform 0.28s var(--ease);
}
.mobile-nav-inner {
  padding: 1.25rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav a {
  display: block;
  padding: 0.75rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-text);
  border-radius: var(--radius);
  transition: background 0.12s;
}
.mobile-nav a:hover { background: var(--c-bg); text-decoration: none; }
.mobile-nav-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted-light);
  padding: 0.875rem 0.875rem 0.375rem;
  margin-top: 0.5rem;
}
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  top: 3.75rem;
  background: rgba(15,23,42,.35);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.mobile-nav-backdrop.open { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }

/* ════════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--c-text);
  padding: 3.5rem 1.5rem 2rem;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-top {
  display: flex;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap;
}
.footer-brand { flex-shrink: 0; }
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: rgba(248,250,252,.9);
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}
.footer-logo span { font-style: italic; color: var(--c-primary); font-weight: 400; }
.footer-tagline {
  font-size: 0.8125rem;
  color: rgba(248,250,252,.38);
  max-width: 200px;
  line-height: 1.6;
  margin: 0;
}
.footer-links {
  display: flex;
  gap: 3rem;
  flex: 1;
  flex-wrap: wrap;
}
.footer-col { display: flex; flex-direction: column; gap: 0.625rem; }
.footer-col-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248,250,252,.3);
  margin-bottom: 0.125rem;
}
.footer-col a {
  font-size: 0.8125rem;
  color: rgba(248,250,252,.5);
  text-decoration: none;
  transition: color 0.15s;
  line-height: 1.4;
}
.footer-col a:hover { color: rgba(248,250,252,.8); text-decoration: none; }
.footer-bottom { padding-top: 2rem; }
.footer-disclaimer {
  font-size: 0.75rem;
  color: rgba(248,250,252,.28);
  line-height: 1.6;
  max-width: 640px;
  margin: 0;
}

/* ════════════════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.6875rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
              color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.1s var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn:hover  { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
  box-shadow: 0 1px 4px rgba(5,150,105,.3), 0 3px 10px rgba(5,150,105,.15);
}
.btn-primary:hover:not(:disabled) {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  color: #fff;
  box-shadow: 0 3px 12px rgba(5,150,105,.4);
}
.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn-outline:hover:not(:disabled) {
  background: var(--c-primary);
  color: #fff;
}
.btn-urgent {
  background: var(--c-urgent);
  color: #fff;
  border-color: var(--c-urgent);
  box-shadow: 0 1px 4px rgba(185,28,28,.3);
}
.btn-urgent:hover { background: #991B1B; border-color: #991B1B; color: #fff; }
.btn-premium {
  background: var(--c-premium);
  color: #fff;
  border-color: var(--c-premium);
  box-shadow: 0 1px 4px rgba(91,63,138,.3);
}
.btn-premium:hover:not(:disabled) { background: #4A3272; border-color: #4A3272; color: #fff; }
.btn-ghost {
  background: rgba(255,255,255,.1);
  color: rgba(248,250,252,.85);
  border-color: rgba(255,255,255,.18);
}
.btn-ghost:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn-lg   { padding: 1rem 2.25rem; font-size: 1.0625rem; }
.btn-sm   { padding: .4375rem 1rem; font-size: .8125rem; }
.btn-xs   { padding: .3125rem .75rem; font-size: .75rem; }
.btn-full { width: 100%; border-radius: var(--radius-lg); }

/* ════════════════════════════════════════════════════════════════════════
   BADGES
   ════════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-block;
  padding: .2em .7em;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--c-surface-warm);
  color: var(--c-muted);
  border: 1px solid var(--c-border);
  font-family: var(--font-sans);
}
.badge-urgent  { background: #FEE2E2; color: var(--c-urgent);  border-color: #FECACA; }
.badge-medium  { background: #FEF3C7; color: #92400E;          border-color: #FDE68A; }
.badge-normal  { background: var(--c-success-light); color: var(--c-success); border-color: #BBF7D0; }
.badge-coming  { background: var(--c-premium-pale);  color: var(--c-premium); border-color: #DDD6FE; }
.badge-status  { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }

/* ════════════════════════════════════════════════════════════════════════
   ALERTS
   ════════════════════════════════════════════════════════════════════════ */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  font-size: .9375rem;
  border-left: 3px solid;
}
.alert-urgent { background: #FEF2F2; border-color: var(--c-urgent); color: #7F1D1D; }
.alert-info   { background: #EFF6FF; border-color: #3B82F6; color: #1E3A8A; }

/* ════════════════════════════════════════════════════════════════════════
   PROGRESS BAR
   ════════════════════════════════════════════════════════════════════════ */
.progress-bar-wrap {
  background: var(--c-border);
  border-radius: 999px;
  height: 3px;
  overflow: hidden;
  margin: .5rem 0;
}
.progress-bar {
  height: 100%;
  background: var(--c-primary);
  border-radius: 999px;
  transition: width .5s var(--ease);
}
.progress-bar-wrap.chat-progress { margin: 0; border-radius: 0; }

/* ════════════════════════════════════════════════════════════════════════
   FLASH MESSAGES
   ════════════════════════════════════════════════════════════════════════ */
.flash {
  padding: .875rem 1.5rem;
  margin: .5rem 1.5rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  border-left: 3px solid;
}
.flash-error   { background: #FEF2F2; color: var(--c-urgent);  border-color: var(--c-urgent); }
.flash-success { background: var(--c-success-light); color: var(--c-success); border-color: var(--c-success); }
.flash-info    { background: #EFF6FF; color: #1D4ED8; border-color: #3B82F6; }

/* ════════════════════════════════════════════════════════════════════════
   HERO — Editorial Light
   ════════════════════════════════════════════════════════════════════════ */
.hero {
  background: var(--c-bg);
  padding: 5.5rem 1.5rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Azulejo-inspired tile pattern — right side atmospheric */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='%23059669' stroke-width='0.75' opacity='0.1'/%3E%3Cpath d='M30 12L48 30L30 48L12 30Z' fill='none' stroke='%23059669' stroke-width='0.5' opacity='0.06'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
  opacity: 0.6;
}
/* Warm ochre vignette glow */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, var(--c-bg) 20%, transparent 80%),
    radial-gradient(ellipse 40% 50% at 80% 20%, rgba(5,150,105,.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: heroFadeUp .7s var(--ease) both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Decorative rule above h1 */
.hero-inner::before {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--c-primary);
  border-radius: 2px;
  margin: 0 auto 1.5rem;
}
.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  color: var(--c-text);
  margin-bottom: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: italic;
  color: var(--c-primary);
  font-weight: 400;
}
.hero .subheadline {
  font-size: 1.0625rem;
  color: var(--c-muted);
  margin-bottom: 2.5rem;
  line-height: 1.75;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}
.hero-note {
  margin-top: 1rem;
  font-size: .8125rem;
  color: var(--c-muted-light);
  letter-spacing: .02em;
}

/* ════════════════════════════════════════════════════════════════════════
   TRUST BAR
   ════════════════════════════════════════════════════════════════════════ */
.trust-bar {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 0.875rem 1.5rem;
}
.trust-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.trust-score { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.trust-score-text { display: flex; flex-direction: column; line-height: 1.2; }
.trust-score-num {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--c-primary);
  font-weight: 700;
  line-height: 1;
}
.trust-score-label {
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-muted-light);
  margin-top: 0.1rem;
}
.trust-divider { width: 1px; height: 1.5rem; background: var(--c-border); flex-shrink: 0; }
.trust-chips {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  list-style: none;
  justify-content: center;
}
.trust-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--c-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════════
   HOW IT WORKS
   ════════════════════════════════════════════════════════════════════════ */
.how-it-works {
  padding: 5.5rem 1.5rem;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}
.how-it-works h2 {
  text-align: center;
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  margin-bottom: 3.5rem;
  font-weight: 700;
}
.steps { display: flex; flex-direction: column; gap: 1.25rem; }
.step {
  padding: 2rem 2.25rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  background: var(--c-bg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
  position: relative;
  overflow: hidden;
}
.step::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--c-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.step:hover {
  border-color: rgba(5,150,105,.25);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.step:hover::after { transform: scaleX(1); }
.step-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 4.5rem;
  color: var(--c-primary);
  opacity: .14;
  line-height: 1;
  margin-bottom: .375rem;
  display: block;
  font-weight: 700;
}
.step h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  letter-spacing: 0;
}
.step p { font-size: .9375rem; color: var(--c-muted); margin: 0; line-height: 1.65; }
.step-icon { margin-bottom: 0.5rem; }
.step-icon img { display: block; }

/* ════════════════════════════════════════════════════════════════════════
   URGENCY BANNER
   ════════════════════════════════════════════════════════════════════════ */
.urgency-banner {
  padding: 3.5rem 1.5rem;
  background: linear-gradient(135deg, #FEF2F2 0%, #FFF7ED 100%);
  border-bottom: 1px solid #FECACA;
}
.urgency-card { max-width: 600px; margin: 0 auto; text-align: center; }
.urgency-card .badge { margin-bottom: 1rem; }
.urgency-card p { font-size: 1rem; margin-bottom: 1.75rem; color: #7F1D1D; line-height: 1.7; }

/* ════════════════════════════════════════════════════════════════════════
   PREMIUM TEASER (landing)
   ════════════════════════════════════════════════════════════════════════ */
.premium-teaser {
  padding: 5rem 1.5rem;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
}
.premium-teaser h2 { text-align: center; font-size: 1.75rem; margin-bottom: 3rem; }
.premium-grid { display: flex; flex-direction: column; gap: 1rem; max-width: 680px; margin: 0 auto; }
.free-tier, .premium-tier {
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  background: var(--c-surface);
}
.premium-tier { border-color: var(--c-premium); background: var(--c-premium-pale); }
.free-tier h3, .premium-tier h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--c-border);
}
.premium-tier h3 { border-bottom-color: rgba(91,63,138,.2); }
.free-tier ul li, .premium-tier ul li {
  padding: .5rem 0;
  font-size: .9375rem;
  border-bottom: 1px solid rgba(228,217,205,.5);
  display: flex;
  align-items: center;
  gap: .625rem;
  color: var(--c-text);
}
.free-tier ul li:last-child, .premium-tier ul li:last-child { border-bottom: none; }
.free-tier ul li::before    { content: "✓"; color: var(--c-success); font-weight: 700; font-size: .875rem; flex-shrink: 0; }
.premium-tier ul li::before { content: "✓"; color: var(--c-premium); font-weight: 700; font-size: .875rem; flex-shrink: 0; }
.free-tier .btn, .premium-tier .btn { margin-top: 1.5rem; width: 100%; }
.price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--c-premium);
  margin-bottom: 1.25rem;
}
.price span { font-size: .875rem; font-weight: 400; color: var(--c-muted); }
.guidance-note { text-align: center; font-size: .8rem; color: var(--c-muted-light); margin-top: 2rem; }

/* ════════════════════════════════════════════════════════════════════════
   CHAT / INTAKE
   ════════════════════════════════════════════════════════════════════════ */
.chat-layout { max-width: 680px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.chat-header { text-align: center; margin-bottom: 2rem; }
.chat-header h1 { font-size: 1.75rem; }
.chat-header p  { color: var(--c-muted); font-size: .9375rem; margin: .5rem 0 0; }
.chat-container {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.chat-messages {
  padding: 1.5rem;
  min-height: 380px;
  max-height: 55vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}
.message {
  display: flex;
  animation: msgIn .25s var(--ease) both;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.message.user      { justify-content: flex-end; }
.message.assistant { justify-content: flex-start; }
.bubble {
  max-width: 80%;
  padding: .9375rem 1.125rem;
  border-radius: var(--radius-xl);
  font-size: .9375rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.message.user .bubble {
  background: var(--c-primary);
  color: #fff;
  border-bottom-right-radius: .25rem;
}
.message.assistant .bubble {
  background: var(--c-surface-warm);
  color: var(--c-text);
  border-bottom-left-radius: .25rem;
  border: 1px solid var(--c-border);
}
.message.system .bubble {
  background: #FEFCE8;
  color: #713F12;
  font-size: .875rem;
  border: 1px solid #FEF08A;
  max-width: 95%;
}
.chat-input-form {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 1rem;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
}
.chat-input {
  flex: 1;
  padding: .6875rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: 999px;
  font-size: .9375rem;
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.chat-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,.12);
}
.chat-input:disabled { opacity: .45; }
.chat-tool-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  padding: 0;
  border: 1.5px solid var(--c-border);
  border-radius: 50%;
  background: transparent;
  color: var(--c-muted);
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.chat-tool-btn:hover {
  color: var(--c-text);
  border-color: var(--c-primary);
  background: rgba(5,150,105,.06);
}
.chat-tool-btn svg { display: block; pointer-events: none; }
#mute-btn { display: none !important; }
.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .75rem 1.5rem 0;
  animation: msgIn .2s var(--ease) both;
}
.quick-btn {
  padding: .4375rem .9375rem;
  border: 1.5px solid var(--c-primary);
  border-radius: 999px;
  background: transparent;
  color: var(--c-primary);
  font-size: .875rem;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
}
.quick-btn:hover { background: var(--c-primary); color: #fff; }
.typing-bubble {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .75rem 1rem !important;
  min-width: 3rem;
}
.typing-bubble span {
  display: block;
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--c-muted);
  animation: typingDot 1.2s infinite ease-in-out both;
}
.typing-bubble span:nth-child(1) { animation-delay: 0s; }
.typing-bubble span:nth-child(2) { animation-delay: .18s; }
.typing-bubble span:nth-child(3) { animation-delay: .36s; }
@keyframes typingDot {
  0%, 80%, 100% { transform: scale(.8); opacity: .4; }
  40%           { transform: scale(1.1); opacity: 1; }
}
.chat-disclaimer {
  text-align: center;
  font-size: .75rem;
  color: var(--c-muted-light);
  margin-top: 1rem;
}

/* ════════════════════════════════════════════════════════════════════════
   CASE PAGE
   ════════════════════════════════════════════════════════════════════════ */
.case-layout { padding: 2.25rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }
.case-header {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  padding-bottom: 1.375rem;
  border-bottom: 1px solid var(--c-border);
}
.case-header h1 { margin-bottom: 0; font-size: 1.75rem; }
.case-badges { display: flex; gap: .375rem; flex-wrap: wrap; align-items: center; margin-top: .25rem; }
.case-grid { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1.5rem; }
.case-info-panel, .checklist-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.case-info-panel h2, .checklist-panel h2 {
  font-family: var(--font-sans);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-muted-light);
  margin-bottom: 1.25rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--c-border);
}
.case-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.case-fields dt {
  color: var(--c-muted-light);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding-top: .875rem;
  border-top: 1px solid rgba(228,217,205,.4);
}
.case-fields dd {
  padding-top: .875rem;
  font-size: .9375rem;
  border-top: 1px solid rgba(228,217,205,.4);
}
.case-fields dt:first-of-type,
.case-fields dd:first-of-type + dd { border-top: none; }
.checklist-meta { font-size: .8125rem; color: var(--c-muted); margin-bottom: 1rem; }
.checklist { display: flex; flex-direction: column; gap: .375rem; }
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .5rem .75rem;
  border-radius: var(--radius);
  font-size: .875rem;
  border: 1px solid transparent;
  transition: background .12s;
}
.checklist-have    { background: var(--c-success-light); border-color: #BBF7D0; }
.checklist-missing { background: #FEF2F2; border-color: #FECACA; }
.checklist-unknown { background: var(--c-bg); border-color: var(--c-border); }
.check-label-wrap {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  flex: 1;
  cursor: pointer;
}
.check-box { position: absolute; opacity: 0; width: 0; height: 0; }
.check-custom {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  border: 1.5px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-bg);
  margin-top: .15rem;
  transition: background .12s, border-color .12s;
  position: relative;
}
.check-box:checked + .check-custom { background: var(--c-primary); border-color: var(--c-primary); }
.check-box:checked + .check-custom::after {
  content: "";
  position: absolute;
  left: .25rem;
  top: .0625rem;
  width: .35rem;
  height: .6rem;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.check-label-wrap:hover .check-custom { border-color: var(--c-primary); }
.check-label { line-height: 1.55; flex: 1; }
.required-tag {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  color: var(--c-muted);
  background: var(--c-border);
  border-radius: 3px;
  padding: .1em .4em;
  margin-left: .375rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: middle;
}
.help-btn {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--c-border);
  background: transparent;
  color: var(--c-muted);
  font-size: .65rem;
  font-weight: 700;
  font-family: var(--font-sans);
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-top: .2rem;
  overflow: hidden;
  transition: background .12s, color .12s, border-color .12s;
}
.help-btn:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.appt-gate-note { font-size: .875rem; color: var(--c-muted); margin-bottom: 1rem; }
.appointment-section {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.appointment-section h2 {
  font-family: var(--font-serif) !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: -.02em !important;
  color: var(--c-text) !important;
  padding: 0 !important;
  border: none !important;
  margin-bottom: .625rem !important;
}
.appointment-section p { color: var(--c-muted); font-size: .9375rem; margin-bottom: 1.25rem; }
.appointment-note { font-size: .75rem; margin-top: .75rem; color: var(--c-muted-light); }
.premium-cta-box {
  background: var(--c-premium-pale);
  border: 1.5px solid #DDD6FE;
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.premium-cta-box h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.premium-cta-box p { font-size: .875rem; color: var(--c-muted); margin-bottom: 1rem; }
.price-inline { font-size: .875rem; color: var(--c-premium); font-weight: 600; margin-bottom: 1rem; }
.progress-section { margin-bottom: 1.5rem; }
.progress-section p { font-size: .875rem; color: var(--c-muted); margin-bottom: .375rem; }

/* Conversation (collapsible) */
.conversation-section {
  margin-top: 2rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  background: var(--c-surface);
  overflow: hidden;
}
.conversation-toggle {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-muted-light);
  list-style: none;
  user-select: none;
}
.conversation-toggle::-webkit-details-marker { display: none; }
.conversation-toggle::after {
  content: "▸";
  margin-left: auto;
  transition: transform .2s var(--ease);
  font-size: .85rem;
}
details[open] .conversation-toggle::after { transform: rotate(90deg); }
.conversation-toggle:hover { color: var(--c-text); }
.conversation-count { color: var(--c-muted-light); font-weight: 400; }
.conversation-section .conversation-log {
  padding: 0 1.5rem 1.25rem;
  border-top: 1px solid var(--c-border);
}
.conversation-log { display: flex; flex-direction: column; gap: .5rem; }
.log-msg {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  border: 1px solid transparent;
}
.log-assistant { background: var(--c-surface-warm); border-color: var(--c-border); }
.log-user      { background: #EFF6FF; border-color: #BFDBFE; }
.log-role {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-muted-light);
  display: block;
  margin-bottom: .25rem;
}
.log-msg p { margin: 0; white-space: pre-wrap; line-height: 1.6; }

/* Help modal */
.help-modal {
  border: none;
  border-radius: var(--radius-xl);
  padding: 0;
  max-width: min(540px, 92vw);
  width: 100%;
  box-shadow: 0 24px 64px rgba(15,23,42,.24);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}
.help-modal::backdrop {
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(3px);
}
.help-modal-inner { padding: 1.875rem; position: relative; }
.help-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--c-muted);
  font-size: 1rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
}
.help-modal-close:hover { background: var(--c-border); color: var(--c-text); }
#help-modal-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: .875rem;
  padding-right: 2rem;
  line-height: 1.35;
}
#help-modal-text {
  font-size: .9375rem;
  line-height: 1.72;
  color: var(--c-muted);
  margin-bottom: 1.25rem;
}
#help-modal-link { margin-top: .25rem; }

/* Case save note */
.case-save-note {
  margin-top: 1.5rem;
  padding: .875rem 1rem;
  background: var(--c-surface-warm);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: .8125rem;
  color: var(--c-muted);
}
.case-save-note code {
  font-family: var(--font-mono);
  font-size: .75rem;
  word-break: break-all;
  background: var(--c-border);
  padding: .15em .4em;
  border-radius: 3px;
}

/* Gestoría referral card */
.referral-card {
  margin-top: 2rem;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--c-primary);
  background: linear-gradient(135deg, #fff8f5 0%, #fff 100%);
  overflow: hidden;
}
.referral-card-inner { padding: 1.75rem 1.875rem; }
.referral-badge {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--c-primary);
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 99px;
  padding: .2rem .6rem;
  margin-bottom: .75rem;
}
.referral-card h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 0 .625rem;
}
.referral-card p { font-size: .9375rem; color: var(--c-muted); margin: 0 0 1.125rem; line-height: 1.6; }
.referral-note { font-size: .8125rem; color: var(--c-muted); margin: .625rem 0 0 !important; }

/* Cost breakdown */
.cost-breakdown-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
}
.cost-breakdown-section h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}
.cost-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .875rem; }
.cost-card {
  background: var(--c-surface-warm);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.125rem;
}
.cost-card-total { border-color: var(--c-primary); }
.cost-card-title {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-muted);
  margin-bottom: .625rem;
}
.cost-rows { display: flex; flex-direction: column; gap: .25rem; }
.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  font-size: .875rem;
  line-height: 1.5;
}
.cost-row-note {
  font-size: .75rem;
  color: var(--c-muted);
  margin-top: -.1rem;
}
.cost-row-note span:first-child { font-style: italic; }
.cost-amount { font-weight: 600; white-space: nowrap; font-size: .8125rem; }
.cost-total { color: var(--c-primary); font-size: .9375rem; }

/* ════════════════════════════════════════════════════════════════════════
   BLOG
   ════════════════════════════════════════════════════════════════════════ */
.blog-layout { padding: 3.5rem 1.5rem; }
.blog-header { max-width: 640px; margin-bottom: 3rem; }
.blog-header h1 { font-weight: 700; font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: .625rem; }
.blog-header p  { color: var(--c-muted); font-size: 1.0625rem; line-height: 1.6; margin: 0; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.blog-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.625rem;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.blog-card:hover {
  border-color: rgba(5,150,105,.3);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}
.blog-card-process {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 99px;
  margin-bottom: .875rem;
  width: fit-content;
  font-family: var(--font-sans);
}
.blog-process-tie_renewal    { background: #FEF3C7; color: #92400E; }
.blog-process-autonomo       { background: #DBEAFE; color: #1E40AF; }
.blog-process-nie                { background: #F3E8FF; color: #6B21A8; }
.blog-process-digital_nomad      { background: #D1FAE5; color: #065F46; }
.blog-process-empadronamiento    { background: #FEF9C3; color: #854D0E; }
.blog-process-non_lucrative      { background: #E0F2FE; color: #075985; }
.blog-card-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.35;
  margin-bottom: .5rem;
}
.blog-card-desc {
  font-size: .875rem;
  color: var(--c-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}
.blog-card-meta { display: flex; gap: .75rem; font-size: .75rem; color: var(--c-muted); }

/* Article page */
.article-layout { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--c-muted);
  margin-bottom: 2.25rem;
}
.article-breadcrumb a { color: var(--c-primary); text-decoration: none; }
.article-breadcrumb a:hover { text-decoration: underline; }
.article-header { margin-bottom: 2.75rem; }
.article-header h1 {
  font-weight: 700;
  font-size: clamp(1.625rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: .625rem 0 1rem;
  letter-spacing: -0.025em;
}
.article-meta { display: flex; gap: .625rem; font-size: .8125rem; color: var(--c-muted); }

/* Prose */
.prose { line-height: 1.8; font-size: 1rem; }
.prose h2 {
  font-weight: 700;
  font-size: 1.5rem;
  margin: 2.25rem 0 .875rem;
  letter-spacing: -0.02em;
}
.prose h3 { font-size: 1.0625rem; font-weight: 700; margin: 1.75rem 0 .625rem; }
.prose p  { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin: 0 0 1.1rem; }
.prose li { margin-bottom: .4rem; }
.prose a  { color: var(--c-primary); }
.prose a:hover { text-decoration: none; }
.prose strong { font-weight: 600; }
.prose table {
  width: 100%; border-collapse: collapse; font-size: .875rem;
  margin: 1.5rem 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--c-border);
}
.prose th {
  background: var(--c-surface-warm); padding: .625rem .875rem;
  text-align: left; font-size: .6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted);
  border-bottom: 1px solid var(--c-border); font-family: var(--font-sans);
}
.prose td { padding: .625rem .875rem; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.prose tr:last-child td { border-bottom: none; }
.prose hr { border: none; border-top: 1px solid var(--c-border); margin: 2.25rem 0; }
.prose blockquote {
  border-left: 3px solid var(--c-primary); margin: 1.5rem 0;
  padding: .625rem 1.125rem; background: var(--c-surface-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* Article CTA box */
.article-cta {
  margin: 3rem 0 2rem;
  border-radius: var(--radius-xl);
  background: var(--c-surface-warm);
  border: 1px solid var(--c-border);
  overflow: hidden;
}
.article-cta-inner { padding: 2.25rem; }
.article-cta-inner p:first-child { font-size: .8125rem; color: var(--c-muted); margin-bottom: .375rem; }
.article-cta-inner h2 {
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0 0 .875rem;
}
.article-cta-inner p { font-size: .9375rem; color: var(--c-muted); margin-bottom: 1.25rem; line-height: 1.65; }
.article-nav { margin-top: 1.5rem; }

/* ════════════════════════════════════════════════════════════════════════
   MY CASES
   ════════════════════════════════════════════════════════════════════════ */
.my-case-card {
  display: block;
  text-decoration: none;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.my-case-card:hover {
  border-color: rgba(5,150,105,.3);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  text-decoration: none;
}
.my-case-top { display: flex; align-items: center; gap: .625rem; margin-bottom: .375rem; }
.my-case-process { font-weight: 700; font-size: .9375rem; }
.my-case-meta { display: flex; gap: .875rem; font-size: .8125rem; color: var(--c-muted); }

/* ════════════════════════════════════════════════════════════════════════
   CHAT FAB + DRAWER
   ════════════════════════════════════════════════════════════════════════ */
.chat-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 200;
  width: 3.375rem;
  height: 3.375rem;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(5,150,105,.4), 0 2px 8px rgba(0,0,0,.15);
  transition: background .15s, transform .15s, opacity .2s;
}
.chat-fab:hover { background: var(--c-primary-dark); transform: scale(1.07); }
.chat-fab.hidden { opacity: 0; pointer-events: none; }
.chat-drawer {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 300;
  width: min(420px, 100vw);
  height: min(600px, 88vh);
  background: var(--c-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: -4px 0 40px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  transform: translateY(105%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.chat-drawer.open { transform: translateY(0); }
.chat-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9375rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
  font-size: .9375rem;
  font-weight: 700;
}
.chat-drawer-close {
  background: transparent;
  border: none;
  font-size: 1rem;
  color: var(--c-muted);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}
.chat-drawer-close:hover { background: var(--c-border); }
.chat-drawer-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.chat-drawer-form {
  display: flex;
  gap: .5rem;
  padding: .875rem 1rem;
  border-top: 1px solid var(--c-border);
}
.chat-drawer-form .chat-input { flex: 1; }
.chat-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(15,23,42,.35);
  backdrop-filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.chat-drawer-backdrop.visible { opacity: 1; pointer-events: auto; }

/* ════════════════════════════════════════════════════════════════════════
   ADMIN
   ════════════════════════════════════════════════════════════════════════ */
.admin-layout { padding: 2rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }
.admin-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--c-border);
}
.admin-header h1 { font-size: 1.5rem; }
.admin-logout { margin-left: auto; }
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  background: var(--c-surface);
}
.admin-table th {
  text-align: left;
  padding: .875rem 1rem;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  font-family: var(--font-sans);
  font-size: .625rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-muted-light);
  font-weight: 700;
  white-space: nowrap;
}
.admin-table td {
  padding: .875rem 1rem;
  border-bottom: 1px solid rgba(228,217,205,.5);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--c-bg); }
.case-id-cell { font-family: var(--font-mono); font-size: .8rem; color: var(--c-muted); }
.date-cell { color: var(--c-muted); white-space: nowrap; font-size: .8125rem; }
.empty-state {
  color: var(--c-muted);
  padding: 3.5rem 0;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.125rem;
}

/* ════════════════════════════════════════════════════════════════════════
   AUTH / LOGIN
   ════════════════════════════════════════════════════════════════════════ */
.auth-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 2rem 1.5rem;
}
.auth-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 2.75rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}
.auth-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 1.625rem;
  display: block;
  letter-spacing: -0.025em;
}
.auth-logo span { font-style: italic; color: var(--c-primary); font-weight: 400; }
.auth-card h1 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--c-border);
}
.auth-form { display: flex; flex-direction: column; gap: 1.125rem; margin-top: .25rem; }
.field-group { display: flex; flex-direction: column; gap: .4rem; }
.field-group label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: .01em;
}
.field-group input {
  padding: .6875rem .875rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field-group input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,.12);
}
.btn-full { width: 100%; border-radius: var(--radius-lg); }

/* ════════════════════════════════════════════════════════════════════════
   UPGRADE / PRICING
   ════════════════════════════════════════════════════════════════════════ */
.upgrade-layout { padding-bottom: 4rem; }
.upgrade-hero {
  background: var(--c-text);
  color: var(--c-bg);
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.upgrade-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 80% at 80% 50%, rgba(91,63,138,.28) 0%, transparent 60%);
  pointer-events: none;
}
.upgrade-hero h1 { color: var(--c-bg); font-size: 2.5rem; margin-bottom: .875rem; position: relative; }
.upgrade-hero .subheadline {
  color: rgba(248,250,252,.6);
  font-size: 1.0625rem;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  line-height: 1.7;
}
.pricing-grid { display: flex; flex-direction: column; gap: 1.5rem; padding: 2.5rem 0; max-width: 640px; margin: 0 auto; }
.pricing-card {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.pricing-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pricing-featured { border-color: var(--c-premium); background: var(--c-premium-pale); }
.popular-badge {
  position: absolute;
  top: -.875rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-premium);
  color: #fff;
  padding: .25em 1.125em;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}
.pricing-card h3 { font-size: 1.375rem; font-weight: 700; margin-bottom: 1rem; }
.big-price {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: .25rem;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.big-price span { font-size: 1rem; font-weight: 400; color: var(--c-muted); letter-spacing: 0; }
.saving-note { font-size: .8125rem; color: var(--c-success); font-weight: 600; margin-bottom: 1.25rem; }
.feature-list { margin: 1.25rem 0 1.5rem; display: flex; flex-direction: column; }
.feature-list li {
  font-size: .9375rem;
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem 0;
  border-bottom: 1px solid rgba(228,217,205,.4);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before { content: "✓"; color: var(--c-success); font-weight: 700; font-size: .875rem; flex-shrink: 0; }
.coming-soon-note { font-size: .8rem; color: var(--c-muted); margin-top: .75rem; text-align: center; }
.upgrade-disclaimer {
  text-align: center;
  font-size: .8125rem;
  color: var(--c-muted);
  padding: 1.5rem 0 2rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ════════════════════════════════════════════════════════════════════════
   ERROR PAGES
   ════════════════════════════════════════════════════════════════════════ */
.error-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 2rem 1.5rem;
}
.error-card { text-align: center; max-width: 420px; }
.error-code {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 6.5rem;
  color: var(--c-border-strong);
  line-height: 1;
  margin-bottom: .375rem;
  display: block;
  font-weight: 700;
}
.error-card h1 { margin-bottom: .875rem; font-size: 1.5rem; }
.error-card p  { color: var(--c-muted); margin-bottom: 2rem; }

/* ════════════════════════════════════════════════════════════════════════
   LANDING — WHAT YOU GET
   ════════════════════════════════════════════════════════════════════════ */
.what-you-get {
  padding: 5.5rem 1.5rem;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}
.what-you-get h2 {
  text-align: center;
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  margin-bottom: 3.5rem;
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 800px;
  margin: 0 auto 3rem;
}
.feature-card {
  padding: 1.875rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  background: var(--c-bg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.feature-card:hover {
  border-color: rgba(5,150,105,.25);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.feature-icon {
  margin-bottom: 1rem;
  display: block;
  width: 48px;
  height: 48px;
}
.feature-icon img { display: block; }
.feature-card h3 {
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 700;
  margin-bottom: .5rem;
  letter-spacing: 0;
}
.feature-card p { font-size: .875rem; color: var(--c-muted); margin: 0; line-height: 1.65; }
.cta-row { text-align: center; }
.cta-note { font-size: .8125rem; color: var(--c-muted-light); margin-top: 1rem; }

/* ════════════════════════════════════════════════════════════════════════
   OFFICIAL GOVERNMENT SOURCES SECTION
   ════════════════════════════════════════════════════════════════════════ */
.gov-links-section {
  padding: 5rem 1.5rem;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
}
.gov-links-header { text-align: center; max-width: 600px; margin: 0 auto 2.75rem; }
.official-badge {
  display: inline-block;
  padding: 0.25em 0.875em;
  background: var(--c-success-light);
  color: var(--c-success);
  border: 1px solid #BBF7D0;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-family: var(--font-sans);
}
.gov-links-header h2 {
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  margin-bottom: 0.875rem;
}
.gov-links-header p  { font-size: 0.9375rem; color: var(--c-muted); line-height: 1.65; margin: 0; }
.gov-links-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}
.gov-link-card {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  padding: 1.25rem 1.5rem;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: var(--c-text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.15s var(--ease);
}
.gov-link-card:hover {
  border-color: var(--c-success);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  text-decoration: none;
}
.gov-link-shield {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-success-light);
  border-radius: var(--radius-lg);
}
.gov-link-body { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.gov-link-name { font-size: 0.9375rem; font-weight: 700; color: var(--c-text); line-height: 1.35; }
.gov-link-desc { font-size: 0.8125rem; color: var(--c-muted); }
.gov-link-url  {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--c-muted-light);
  letter-spacing: 0.01em;
  margin-top: 0.1rem;
}
.gov-link-arrow {
  font-size: 1.125rem;
  color: var(--c-success);
  flex-shrink: 0;
  transition: transform 0.15s var(--ease);
}
.gov-link-card:hover .gov-link-arrow { transform: translate(2px, -2px); }

/* ════════════════════════════════════════════════════════════════════════
   FAQ SECTION
   ════════════════════════════════════════════════════════════════════════ */
.faq-section {
  padding: 5.5rem 1.5rem;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}
.faq-section h2 {
  text-align: center;
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  margin-bottom: 2.75rem;
}
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item {
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.faq-item[open] { border-color: var(--c-primary); box-shadow: var(--shadow-sm); }
.faq-q {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.0625rem 1.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--c-bg);
  color: var(--c-text);
  user-select: none;
  transition: background 0.15s var(--ease);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::marker { display: none; }
.faq-q::after {
  content: '\25B8';
  font-size: 0.75rem;
  color: var(--c-muted-light);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease), color 0.15s var(--ease);
}
.faq-item[open] .faq-q { background: var(--c-primary-pale); border-bottom: 1px solid var(--c-border); }
.faq-item[open] .faq-q::after { transform: rotate(90deg); color: var(--c-primary); }
.faq-a { padding: 1.125rem 1.375rem; background: var(--c-surface); }
.faq-a p { font-size: 0.9375rem; color: var(--c-muted); line-height: 1.75; margin: 0; }
.faq-a em { color: var(--c-text); font-style: italic; }

/* ════════════════════════════════════════════════════════════════════════
   BOTTOM CTA
   ════════════════════════════════════════════════════════════════════════ */
.bottom-cta {
  padding: 5.5rem 1.5rem;
  background: var(--c-text);
  position: relative;
  overflow: hidden;
}
.bottom-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='%23059669' stroke-width='0.75' opacity='0.12'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
}
.bottom-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(15,23,42,.6) 0%, transparent 70%);
  pointer-events: none;
}
.bottom-cta-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.bottom-cta-inner h2 {
  color: var(--c-bg);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}
.bottom-cta-inner p { color: rgba(248,250,252,.5); font-size: 1rem; margin-bottom: 2.25rem; }

/* ════════════════════════════════════════════════════════════════════════
   BOOK ON BEHALF
   ════════════════════════════════════════════════════════════════════════ */
.book-on-behalf-box {
  background: var(--c-text);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--c-bg);
  position: relative;
  overflow: hidden;
}
.book-on-behalf-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 90% 20%, rgba(5,150,105,.2) 0%, transparent 60%);
  pointer-events: none;
}
.bob-content { position: relative; z-index: 1; max-width: 560px; }
.book-on-behalf-box h2 {
  font-family: var(--font-serif) !important;
  font-size: 1.375rem !important;
  color: var(--c-bg) !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: -.02em !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: .875rem !important;
}
.book-on-behalf-box p {
  color: rgba(248,250,252,.65);
  font-size: .9375rem;
  margin-bottom: .875rem;
  line-height: 1.65;
}
.bob-form { display: flex; gap: .625rem; margin-top: 1.25rem; flex-wrap: wrap; }
.bob-form .chat-input {
  flex: 1;
  min-width: 200px;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
  color: var(--c-bg);
}
.bob-form .chat-input::placeholder { color: rgba(248,250,252,.4); }
.bob-form .chat-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,.25);
  background: rgba(255,255,255,.12);
}
.bob-note { font-size: .8125rem; color: rgba(248,250,252,.5); margin-top: .625rem; }
.bob-confirmed {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(58,107,74,.25);
  border: 1px solid rgba(58,107,74,.4);
  border-radius: var(--radius-lg);
}
.bob-confirmed-icon { font-size: 1.25rem; color: #6EE7B7; flex-shrink: 0; margin-top: .1rem; }
.bob-confirmed strong { color: var(--c-bg); display: block; margin-bottom: .25rem; }
.bob-confirmed p { color: rgba(248,250,252,.65); font-size: .875rem; margin: 0; }

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET & UP
   ════════════════════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  h1 { font-size: 2.5rem; }
  .steps { flex-direction: row; }
  .step  { flex: 1; }
  .premium-grid { flex-direction: row; }
  .free-tier, .premium-tier { flex: 1; }
  .case-grid { flex-direction: row; }
  .case-info-panel { flex: 1; }
  .checklist-panel { flex: 1.25; }
  .pricing-grid { flex-direction: row; }
  .pricing-card { flex: 1; }
  .gov-links-grid  { flex-direction: row; }
  .gov-link-card   { flex: 1; }
  .trust-chips     { flex-wrap: nowrap; }
}

@media (max-width: 639px) {
  .trust-divider { display: none; }
  .trust-bar-inner { gap: 0.75rem; }
  .features-grid { grid-template-columns: 1fr; }

  /* Chat input — swap Send text for arrow icon to save space */
  .send-icon { display: none; }
  .chat-input-form { gap: .375rem; padding: .75rem .75rem; }
}

@media (max-width: 420px) {
  .send-label { display: none; }
  .send-icon { display: block; }
  #send-btn { width: 2.375rem; height: 2.375rem; padding: 0; border-radius: 50%; flex-shrink: 0; }
}

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE NAV
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .site-nav { display: none; }
  .nav-hamburger { display: flex; }
}

@media (min-width: 1101px) {
  .mobile-nav { display: none !important; }
  .mobile-nav-backdrop { display: none !important; }
  .nav-hamburger { display: none !important; }
}
