/* ==========================================================================
   ASESORÍA LABORAL MAS / COMES — SISTEMA VISUAL v3 ("CLARIDAD JURÍDICA")
   Luminous, contemporary, dynamic architectural consultancy design
   ========================================================================== */

:root {
  --bg-canvas: #F7F8FA;
  --bg-surface: #FFFFFF;
  --bg-subtle: #EEF1F5;
  --bg-dark: #0F1419;

  --ink-primary: #0F1419;
  --ink-secondary: #344054;
  --ink-muted: #4B5565;
  --ink-on-dark: #F9FAFB;
  --ink-on-dark-muted: #CBD5E1;

  --brand: #981B1E;
  --brand-hover: #7C1417;
  --brand-bright: #B91C1C;
  --brand-soft: rgba(152, 27, 30, 0.08);
  --brand-border: rgba(152, 27, 30, 0.22);

  --status-open: #059669;
  --status-open-bg: rgba(5, 150, 105, 0.1);

  --line: #E4E7EC;
  --line-strong: #D0D5DD;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-xs: 0 1px 2px rgba(15, 20, 25, 0.04);
  --shadow-sm: 0 4px 12px -2px rgba(15, 20, 25, 0.06), 0 1px 3px rgba(15, 20, 25, 0.04);
  --shadow-md: 0 16px 36px -8px rgba(15, 20, 25, 0.1), 0 4px 12px -2px rgba(15, 20, 25, 0.05);
  --shadow-brand: 0 8px 20px -4px rgba(15, 20, 25, 0.22);

  --font-display: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-sans: 'Onest', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark Mode Tokens */
html.dark {
  --bg-canvas: #0B0E14;
  --bg-surface: #121721;
  --bg-subtle: #1A2230;
  --bg-dark: #07090D;

  --ink-primary: #F0F4F8;
  --ink-secondary: #94A3B8;
  --ink-muted: #64748B;
  --ink-on-dark: #F9FAFB;
  --ink-on-dark-muted: #94A3B8;

  --brand: #E03135;
  --brand-hover: #F8494D;
  --brand-bright: #F87171;
  --brand-soft: rgba(224, 49, 53, 0.15);
  --brand-border: rgba(224, 49, 53, 0.3);

  --line: #1E293B;
  --line-strong: #334155;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 12px -2px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 16px 36px -8px rgba(0, 0, 0, 0.6), 0 4px 12px -2px rgba(0, 0, 0, 0.4);
  --shadow-brand: 0 8px 24px -4px rgba(224, 49, 53, 0.35);
}

html.dark .site-header {
  background-color: rgba(11, 14, 20, 0.88);
}

html.dark .site-header.scrolled {
  background-color: rgba(18, 23, 33, 0.95);
}

html.dark .brand-link img {
  filter: brightness(1.2);
}

html.dark .input-control {
  background: var(--bg-subtle);
  color: var(--ink-primary);
  border-color: var(--line-strong);
}

html.dark .input-control:focus {
  background: var(--bg-surface);
  border-color: var(--brand);
}

html.dark .hero-architectural::before {
  background: radial-gradient(ellipse 70% 60% at 82% 12%, rgba(224, 49, 53, 0.08), transparent 65%);
}

html.dark .theme-toggle-btn svg.icon-moon {
  display: none;
}
html.dark .theme-toggle-btn svg.icon-sun {
  display: block;
}
.theme-toggle-btn svg.icon-sun {
  display: none;
}
.theme-toggle-btn svg.icon-moon {
  display: block;
}

/* Reset & Browser Surfaces */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink-primary);
  background-color: var(--bg-canvas);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background-color: var(--brand);
  color: #FFFFFF;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 2px solid var(--bg-canvas);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ink-muted);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Typography */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink-primary);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 4.4vw, 3.85rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
  color: var(--ink-secondary);
}

.lead {
  font-size: clamp(1.0625rem, 1.35vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-secondary);
  max-width: 60ch;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: clamp(4rem, 7vw, 6.5rem);
  position: relative;
}

.section-tight {
  padding-block: clamp(2.75rem, 5vw, 4.25rem);
}

.surface-white {
  background-color: var(--bg-surface);
  border-block: 1px solid var(--line);
}

.surface-dark {
  background-color: var(--bg-dark);
  color: var(--ink-on-dark);
}

.surface-dark h2,
.surface-dark h3,
.surface-dark h4 {
  color: var(--ink-on-dark);
}

.surface-dark p {
  color: var(--ink-on-dark-muted);
}

/* Top Utility Bar */
.utility-bar {
  display: none;
  background-color: var(--bg-dark);
  color: var(--ink-on-dark-muted);
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
  .utility-bar {
    display: block;
  }
}

.utility-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
}

.utility-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.utility-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.15s ease;
}

a.utility-item:hover {
  color: #FFFFFF;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(247, 248, 250, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.25s var(--ease-expo), box-shadow 0.25s var(--ease-expo);
}

.site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 0.75rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  min-width: 0;
}

.brand-link img {
  height: 31px;
  width: auto;
  object-fit: contain;
}

@media (min-width: 640px) {
  .nav-inner {
    height: 74px;
    gap: 1.5rem;
  }
  .brand-link img {
    height: 40px;
  }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-secondary);
  border-radius: var(--radius-pill);
  transition: color 0.18s ease, background-color 0.18s ease;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    color: var(--ink-primary);
    background-color: rgba(15, 20, 25, 0.05);
  }
}

.nav-link.active {
  color: var(--brand);
  background-color: var(--brand-soft);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-phone-btn {
  padding: 0.52rem 0.85rem;
  font-size: 0.8125rem;
}

@media (min-width: 640px) {
  .nav-actions {
    gap: 0.75rem;
  }
  .nav-phone-btn {
    padding: 0.62rem 1.1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 380px) {
  .nav-phone-label {
    display: none;
  }
  .nav-phone-btn {
    width: 40px;
    height: 40px;
    padding: 0;
  }
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-surface);
  color: var(--ink-primary);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
  flex-shrink: 0;
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  .theme-toggle-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
  }
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-surface);
  color: var(--ink-primary);
  cursor: pointer;
  touch-action: manipulation;
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.45rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease-expo), box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.62rem 1.1rem;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: var(--brand);
  color: #FFFFFF;
  box-shadow: var(--shadow-brand);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background-color: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(15, 20, 25, 0.28);
  }
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover {
    border-color: var(--ink-primary);
    background-color: var(--bg-canvas);
    transform: translateY(-1px);
  }
}

.btn-ghost-dark {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.18);
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost-dark:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.32);
  }
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-secondary);
  box-shadow: var(--shadow-xs);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-open);
  position: relative;
}

.status-dot.open::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background-color: var(--status-open);
  opacity: 0.35;
  animation: pulseDot 2.2s ease-out infinite;
}

.status-dot.closed {
  background-color: var(--ink-muted);
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.5; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* Clean Architectural Hero Surface */
.hero-architectural {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 6vw, 5.25rem);
  background-color: var(--bg-canvas);
}

.hero-architectural::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 82% 12%, rgba(152, 27, 30, 0.05), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.12fr 0.88fr;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.metric-val {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  color: var(--ink-primary);
  letter-spacing: -0.02em;
}

.metric-lbl {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-top: 0.2rem;
}

/* Interactive Triage Panel (Hero Right) */
.triage-panel {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.triage-header {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-canvas);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.triage-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0.35rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  margin: 1.15rem 1.35rem 0;
}

.triage-tab {
  border: 0;
  background: transparent;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: background-color 0.2s var(--ease-expo), color 0.2s ease, box-shadow 0.2s ease;
}

.triage-tab[aria-selected="true"] {
  background: var(--bg-surface);
  color: var(--brand);
  box-shadow: var(--shadow-xs);
}

.triage-body {
  padding: 1.35rem;
}

.triage-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.35rem;
  display: grid;
  gap: 0.65rem;
}

.triage-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9375rem;
  color: var(--ink-secondary);
}

.triage-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-top: 2px;
}

.triage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

/* Bento Service Cards */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.15rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  transition: transform 0.28s var(--ease-expo), box-shadow 0.28s var(--ease-expo), border-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-border);
  }
  .service-card:hover .service-arrow {
    transform: translateX(4px);
    color: var(--brand);
  }
}

.service-card-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.service-icon-wrap {
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.triage-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.tag-chip {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--bg-canvas);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
}

.service-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink-primary);
}

.service-arrow {
  transition: transform 0.22s var(--ease-expo), color 0.2s ease;
}

/* Interactive Process Rail */
.process-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .process-layout {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 3.5rem;
  }
}

.process-steps {
  display: grid;
  gap: 0.75rem;
}

.process-step-btn {
  text-align: left;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.process-step-btn[aria-selected="true"] {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
  background: var(--bg-surface);
}

.process-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-subtle);
  flex-shrink: 0;
}

.process-step-btn[aria-selected="true"] .process-num {
  background: var(--brand);
  color: #FFFFFF;
}

.process-detail-card {
  background: var(--bg-dark);
  color: var(--ink-on-dark);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 96px;
}

.process-detail-card h3 {
  color: #FFFFFF;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  margin-top: 0.75rem;
}

.process-detail-card p {
  color: var(--ink-on-dark-muted);
  margin-top: 0.85rem;
  font-size: 1.02rem;
}

.process-deliverables {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 0.7rem;
}

.process-deliverable {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9375rem;
  color: #E4E7EC;
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.team-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s var(--ease-expo), box-shadow 0.25s var(--ease-expo);
}

@media (hover: hover) and (pointer: fine) {
  .team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }
  .team-card:hover .team-photo img {
    transform: scale(1.03);
  }
}

.team-photo {
  aspect-ratio: 1 / 1;
  background: var(--bg-subtle);
  overflow: hidden;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.45s var(--ease-expo);
}

.team-info {
  padding: 1.1rem 1.15rem;
}

.team-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink-primary);
}

.team-role {
  font-size: 0.85rem;
  color: var(--brand);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* Simulator / Calculator */
.sim-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .sim-grid {
    grid-template-columns: 1.08fr 0.92fr;
  }
}

.sim-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-sm);
}

.field-group {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink-primary);
}

.input-control {
  width: 100%;
  padding: 0.72rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-canvas);
  color: var(--ink-primary);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.input-control:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-surface);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(15, 20, 25, 0.25);
}

.radio-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-pill label {
  display: block;
  text-align: center;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  background: var(--bg-canvas);
  transition: all 0.18s ease;
}

.radio-pill input:checked + label {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

.sim-result-box {
  background: var(--bg-dark);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-md);
}

.sim-total {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin-top: 0.35rem;
}

.sim-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  display: flex;
  margin-block: 1.25rem;
}

.sim-bar-indem {
  background: var(--brand-bright);
  transition: width 0.35s var(--ease-expo);
}

.sim-bar-vac {
  background: #38BDF8;
  transition: width 0.35s var(--ease-expo);
}

.sim-breakdown {
  display: grid;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sim-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
}

/* Accordion / FAQ / Service Details */
.accordion-list {
  display: grid;
  gap: 0.75rem;
}

.accordion-item {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  padding: 1.15rem 1.35rem;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink-primary);
  cursor: pointer;
}

.accordion-chevron {
  transition: transform 0.25s var(--ease-expo);
  flex-shrink: 0;
}

.accordion-trigger[aria-expanded="true"] .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-panel {
  padding: 0 1.35rem 1.25rem;
  color: var(--ink-secondary);
  font-size: 0.95rem;
}

.accordion-panel[hidden] {
  display: none;
}

/* Grants Strip & Footer */
.grants-strip {
  background: var(--bg-surface);
  border-top: 1px solid var(--line);
  padding-block: 2rem;
}

.grants-flex {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

@media (min-width: 1024px) {
  .grants-flex {
    flex-direction: row;
    align-items: center;
  }
}

.grants-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.grants-logos img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.site-footer {
  margin-top: auto;
  background: var(--bg-dark);
  color: var(--ink-on-dark-muted);
  padding-top: 3.75rem;
  padding-bottom: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  }
}

.footer-title {
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.mobile-drawer.open {
  display: block;
}

.mobile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 25, 0.55);
  backdrop-filter: blur(4px);
}

.mobile-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 360px);
  background: var(--bg-surface);
  padding: 1.25rem 1.35rem max(1.5rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: -12px 0 32px rgba(15, 20, 25, 0.2);
  overflow-y: auto;
}

/* Mobile Responsive Polish */
@media (max-width: 639px) {
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .hero-metrics {
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.35rem;
  }
  .metric-val {
    font-size: 1.18rem;
  }
  .metric-lbl {
    font-size: 0.75rem;
    line-height: 1.35;
  }
  .triage-header {
    padding: 0.95rem 1.05rem;
  }
  .triage-tabs {
    margin: 0.95rem 1.05rem 0;
  }
  .triage-tab {
    padding: 0.48rem 0.35rem;
    font-size: 0.79rem;
  }
  .triage-body {
    padding: 1.05rem;
  }
  .triage-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .triage-footer .btn {
    width: 100%;
  }
  .process-detail-card {
    position: static;
  }
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
  .team-info {
    padding: 0.85rem;
  }
  .team-name {
    font-size: 0.92rem;
  }
  .team-role {
    font-size: 0.78rem;
  }
  .google-summary-pill {
    width: 100%;
  }
}

.mobile-nav-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.mobile-nav-link {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink-primary);
}

.mobile-nav-link.active {
  background: var(--brand-soft);
  color: var(--brand);
}

/* Motion & Scroll Reveal */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-stagger > * {
  animation: riseIn 0.65s var(--ease-expo) backwards;
}
.hero-stagger > *:nth-child(1) { animation-delay: 0.03s; }
.hero-stagger > *:nth-child(2) { animation-delay: 0.09s; }
.hero-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.hero-stagger > *:nth-child(4) { animation-delay: 0.21s; }
.hero-stagger > *:nth-child(5) { animation-delay: 0.27s; }

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-expo), transform 0.6s var(--ease-expo);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-stagger > *,
  [data-reveal],
  .status-dot.open::after {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Utility Helpers */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.section-head {
  max-width: 68ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head p {
  margin-top: 0.75rem;
}
.split-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 900px) {
  .split-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}
.card-plain {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.toast-msg {
  margin-top: 1rem;
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--status-open-bg);
  color: #065F46;
  border: 1px solid rgba(5, 150, 105, 0.25);
  font-weight: 500;
}

/* Google Reviews Section */
.reviews-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.google-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.review-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.review-filter-btn {
  border: 1px solid var(--line-strong);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.review-filter-btn[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #FFFFFF;
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.review-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: transform 0.24s var(--ease-expo), box-shadow 0.24s var(--ease-expo);
}

.review-card[hidden] {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .review-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
  }
}

.review-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.review-stars {
  display: inline-flex;
  gap: 2px;
  color: #D97706;
}

.review-quote {
  margin-top: 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--ink-secondary);
}

.review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* ==========================================================================
   ASISTENTE LABORAL VIRTUAL IA (WIDGET FLOTANTE & DRAWER)
   ========================================================================== */

.al-launcher {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 940;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.78rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--brand);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: var(--shadow-brand);
  touch-action: manipulation;
  transition: transform 0.22s var(--ease-expo), background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.al-launcher.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .al-launcher:hover {
    background: var(--brand-hover);
    transform: translateY(-2px);
  }
}

.al-launcher:focus-visible,
.al-icon-btn:focus-visible,
.al-profile-pill:focus-visible,
.al-prompt-chip:focus-visible,
.al-attach-btn:focus-visible,
.al-send-btn:focus-visible,
.al-action-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.al-launcher-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.al-launcher-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.16rem 0.44rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

@media (max-width: 480px) {
  .al-launcher {
    padding: 0.72rem 1rem;
    font-size: 0.875rem;
  }
}

.al-panel {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 960;
  width: min(420px, calc(100vw - 32px));
  height: min(650px, calc(100dvh - 36px));
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: alPanelIn 0.24s var(--ease-expo);
}

.al-panel[hidden] {
  display: none;
}

.al-panel.is-expanded {
  width: min(560px, calc(100vw - 32px));
  height: min(760px, calc(100dvh - 36px));
}

@keyframes alPanelIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 639px) {
  .al-panel {
    inset: 0;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border: none;
  }
  .al-desktop-only {
    display: none !important;
  }
}

.al-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.05rem;
  background: var(--bg-dark);
  color: var(--ink-on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.al-header-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.al-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.al-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.al-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.al-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--ink-on-dark-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.al-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.al-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.al-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-on-dark-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .al-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
  }
}

.al-profile-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
  padding: 0.5rem 0.7rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.al-profile-pill {
  padding: 0.4rem 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.al-profile-pill[aria-selected="true"] {
  background: var(--bg-surface);
  color: var(--brand);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.al-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--bg-canvas);
}

.al-msg {
  display: flex;
  gap: 0.55rem;
  max-width: 100%;
}

.al-msg-user {
  justify-content: flex-end;
}

.al-msg-assistant {
  align-items: flex-start;
}

.al-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.al-msg-avatar svg {
  width: 15px;
  height: 15px;
}

.al-bubble {
  max-width: 85%;
  padding: 0.72rem 0.92rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.52;
}

.al-bubble p {
  margin: 0;
}

.al-bubble p + p,
.al-bubble p + ul,
.al-bubble ul + p {
  margin-top: 0.55rem;
}

.al-bubble-user {
  background: var(--brand);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.al-bubble-assistant {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-xs);
}

.al-msg-list {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.3rem;
}

.al-msg-file {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
}

.al-msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.al-onboarding-grid {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.al-onboarding-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.62rem 0.78rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-canvas);
  color: var(--ink-primary);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.al-onboarding-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand);
}

.al-onboarding-desc {
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--ink-secondary);
}

@media (hover: hover) and (pointer: fine) {
  .al-onboarding-card:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    transform: translateY(-1px);
  }
}

.al-onboarding-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.al-action-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  color: var(--ink-primary);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.al-action-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #FFFFFF;
}

@media (hover: hover) and (pointer: fine) {
  .al-action-btn:hover {
    border-color: var(--brand);
  }
  .al-action-primary:hover {
    background: var(--brand-hover);
  }
}

.al-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.8rem 1rem;
}

.al-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-muted);
  animation: alBounce 1.1s infinite ease-in-out;
}

.al-typing span:nth-child(2) { animation-delay: 0.16s; }
.al-typing span:nth-child(3) { animation-delay: 0.32s; }

@keyframes alBounce {
  0%, 80%, 100% { transform: scale(0.75); opacity: 0.45; }
  40% { transform: scale(1); opacity: 1; }
}

.al-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  padding: 0.65rem 0.9rem;
  background: var(--bg-canvas);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.al-quick-prompts[hidden] {
  display: none;
}

.al-prompt-chip {
  padding: 0.38rem 0.68rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--brand-border);
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
  transition: background-color 0.15s ease, color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .al-prompt-chip:hover {
    background: var(--brand);
    color: #FFFFFF;
  }
}

.al-composer {
  padding: 0.7rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
  background: var(--bg-surface);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.al-attachment-preview {
  margin-bottom: 0.5rem;
}

.al-attachment-preview[hidden] {
  display: none;
}

.al-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-primary);
}

.al-attach-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.al-attach-chip button {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
}

.al-input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg-canvas);
  transition: border-color 0.15s ease;
}

.al-input-row:focus-within {
  border-color: var(--brand);
  background: var(--bg-surface);
}

.al-attach-btn,
.al-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.al-attach-btn {
  background: transparent;
  color: var(--ink-secondary);
}

.al-send-btn {
  background: var(--brand);
  color: #FFFFFF;
}

.al-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.al-textarea {
  flex: 1 1 auto;
  border: none;
  background: transparent;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.45;
  padding: 0.4rem 0.25rem;
  resize: none;
  max-height: 112px;
  outline: none;
}

.al-textarea::placeholder {
  color: var(--ink-muted);
}

.al-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0 0.15rem;
}

.al-disclaimer {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-muted);
  text-align: left;
  line-height: 1.3;
}

.al-char-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.al-char-count.is-warning {
  color: #D97706;
}

.al-char-count.is-limit {
  color: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
  .al-panel,
  .al-launcher,
  .al-typing span {
    animation: none !important;
    transition: none !important;
  }
}
