/* ==========================================================================
   SOPORTE MALLORCA — Estética Mediterránea / Mallorca
   Piedra de marès (#f8f4ec), azul cala mediterráneo (#0b5d7a),
   terracota mallorquina (#c85a32) y azul noche costero (#102a36).
   ========================================================================== */

@font-face {
  font-family: 'Public Sans';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/PublicSans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/PublicSans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/PublicSans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/PublicSans-700.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/IBMPlexSans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/IBMPlexSans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/IBMPlexSans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/IBMPlexMono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/IBMPlexMono-500.woff2') format('woff2');
}

:root {
  --font-display: 'Public Sans', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --font-sans: 'IBM Plex Sans', 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  /* Piedra de marès, cal cálida y arena balear (alto contraste para lectura cómoda) */
  --bg: #faf6ef;
  --bg-alt: #f2eadc;
  --surface: #ffffff;
  --ink: #111c22;
  --ink-2: #2f404a;
  --muted: #52636d;
  --line: #e4d8c4;
  --line-strong: #cbb99d;

  /* Azul cala mediterráneo + terracota mallorquina */
  --sea: #0b5d7a;
  --sea-hover: #084860;
  --sea-soft: #e2f0f4;
  --terracotta: #c85a32;
  --terracotta-hover: #ad4925;
  --terracotta-soft: #f9eae2;
  --olive: #2f5a4c;

  /* Noche mediterránea profunda */
  --night: #102a36;
  --night-2: #183b4b;

  --ok: #226b4a;
  --ok-bg: #e3f2ea;
  --warn: #9a5d07;
  --warn-bg: #faecd5;
  --err: #b83326;
  --err-bg: #fbe8e6;

  --shadow-warm: 0 12px 30px rgba(48, 36, 18, 0.06);
  --shadow-warm-lg: 0 22px 54px rgba(24, 38, 46, 0.14);

  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1140px;

  color-scheme: light;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  overflow-x: clip;
  overscroll-behavior-y: none;
  scrollbar-width: thin;
  scrollbar-color: var(--sea) var(--bg-alt);
}

/* Scrollbar personalizada Soporte Mallorca (Marès + Azul Cala + Terracota) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-alt);
}
::-webkit-scrollbar-thumb {
  background: var(--sea);
  border: 2px solid var(--bg-alt);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--terracotta);
}
::-webkit-scrollbar-thumb:active {
  background: var(--night);
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

main {
  flex: 1;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}

p {
  margin: 0 0 1rem;
}
p:last-child {
  margin-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  background: var(--night);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transform: translateY(-200%);
  transition: transform 0.15s ease;
}
.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.small {
  font-size: 0.84rem;
  color: var(--muted);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.drawer-head,
.drawer-foot {
  display: none;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(16, 42, 54, 0.46);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.nav-backdrop.open {
  opacity: 1;
}

html.menu-open,
body.menu-open {
  overflow: hidden;
  height: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.brand-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.brand-sub {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

#navigation {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 15px;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 6px 0;
  position: relative;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-links a.nav-admin-link {
  color: var(--terracotta);
  font-weight: 600;
}
.nav-links a:hover {
  color: var(--sea);
}
.nav-links a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--terracotta);
}
.nav-divider {
  display: block;
  flex-shrink: 0;
  width: 1px;
  height: 18px;
  background: var(--line-strong);
}

.auth-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 9px;
  background: var(--night);
  color: #fffdf9;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.auth-button:hover {
  background: var(--sea);
}
.auth-button.is-signed-in {
  background: transparent;
  color: var(--terracotta);
  border-color: var(--terracotta);
  font-weight: 600;
}
.auth-button.is-signed-in:hover {
  background: var(--terracotta);
  color: #ffffff;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---------- Buttons & Links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 45px;
  padding: 10px 22px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s;
}
.button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--sea);
  color: #fffdf9;
}
.button.primary:hover {
  background: var(--sea-hover);
}

.button.warm {
  background: var(--terracotta);
  color: #fffdf9;
}
.button.warm:hover {
  background: var(--terracotta-hover);
}

.button.dark {
  background: var(--night);
  color: #fffdf9;
}
.button.dark:hover {
  background: var(--sea);
}

.button.secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.button.secondary:hover {
  border-color: var(--sea);
  color: var(--sea);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 1.5px solid var(--line-strong);
  transition: color 0.15s, border-color 0.15s;
}
.text-link:hover {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
  text-decoration: none;
}

.tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--ink-2);
  background: var(--bg-alt);
  padding: 4px 11px;
  border-radius: 999px;
}

/* Subtle Mallorcan terracotta + sea wave divider */
.med-divider {
  display: block;
  width: 64px;
  height: 10px;
  color: var(--terracotta);
  margin: 0 0 18px;
}

/* ---------- Sections ---------- */
.section {
  padding: 76px 0;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 38px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

/* Título de apoyo: para secciones secundarias dentro de una página
   (un bloque de módulos, de preguntas frecuentes, un catálogo auxiliar),
   no para el titular principal de la sección. */
h2.h-sub {
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  margin: 0 0 10px;
}
.section-head p {
  color: var(--ink-2);
  max-width: 560px;
  margin: 8px 0 0;
}

/* ==========================================================================
   HOME — PORTADA MEDITERRÁNEA
   ========================================================================== */
.hero {
  position: relative;
  padding: 74px 0 70px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 65% 70% at 88% 12%, rgba(200, 90, 50, 0.08), transparent 65%),
    radial-gradient(ellipse 55% 65% at 10% 90%, rgba(11, 93, 122, 0.08), transparent 65%),
    var(--bg);
  overflow: hidden;
}

.hero-island-bg {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 460px;
  height: auto;
  color: var(--sea);
  opacity: 0.085;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 54px;
  align-items: center;
}
.hero-grid--single {
  grid-template-columns: minmax(0, 740px);
}

.hero h1 {
  font-size: clamp(2.45rem, 4.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.08;
  margin-bottom: 22px;
}

.hero-lead {
  font-size: 1.07rem;
  color: var(--ink-2);
  max-width: 525px;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Hero Visual Showcase */
.hero-showcase {
  display: grid;
  gap: 16px;
}

.hero-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm);
  text-align: left;
  width: 100%;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.hero-card:hover {
  border-color: var(--sea);
  transform: translateY(-2px);
}

.hero-thumb {
  width: 112px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.hero-thumb.is-equus {
  background: #d8eee2;
  padding: 8px;
}
.hero-thumb.is-equus img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.hero-thumb.is-rasloock {
  background: #140f29;
}
.hero-thumb.is-rasloock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-thumb.is-barranco {
  background: #f5efe2;
  padding: 5px;
}
.hero-thumb.is-barranco img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.hero-thumb.is-equocare {
  background: #13504e;
  padding: 10px;
}
.hero-thumb.is-equocare img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hero-thumb.is-cover {
  background: #0d1620;
}
.hero-thumb.is-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-thumb.is-galicia {
  background: #031022;
  padding: 6px;
}
.hero-thumb.is-galicia img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hero-thumb.is-system {
  background: var(--night);
  color: #fffdf9;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  text-align: center;
}
.hero-thumb.is-system b {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: #fffdf9;
}
.hero-thumb.is-system small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #f0a888;
  text-transform: uppercase;
}

.hero-showcase-list {
  display: grid;
  gap: 14px;
}
.hero-showcase-list.is-fading .hero-card {
  opacity: 0;
  transform: translateY(6px);
}
.hero-card {
  opacity: 1;
  transition: opacity 0.28s ease, transform 0.28s ease, border-color 0.2s, box-shadow 0.2s;
}

.hero-showcase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 0;
}
.hero-showcase-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.hero-showcase-link {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  margin-top: 14px;
}
.hero-showcase-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-showcase-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-showcase-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: width 0.22s ease, background 0.22s ease;
}
.hero-showcase-dot.active {
  width: 22px;
  background: var(--terracotta);
}
.hero-showcase-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.hero-showcase-btn:hover {
  border-color: var(--sea);
  color: var(--sea);
  background: var(--sea-soft);
}

.hero-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--ink);
  margin-bottom: 3px;
}
.hero-card span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Home Projects Grid */
.home-projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.work-card:hover {
  border-color: var(--sea);
  transform: translateY(-3px);
}

.work-media {
  height: 215px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
  overflow: hidden;
}
.work-media.is-equus {
  background: #d8eee2;
  padding: 20px;
}
.work-media.is-equus img {
  width: 158px;
  height: 158px;
  object-fit: contain;
  border-radius: 50%;
}
.work-media.is-rasloock {
  background: #140f29;
}
.work-media.is-rasloock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.work-media.is-barranco {
  background: #f5efe2;
  padding: 16px;
  text-align: center;
}
.work-media.is-barranco img {
  max-width: 195px;
  max-height: 185px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.work-media.is-equocare {
  background: #13504e;
  padding: 28px;
}
.work-media.is-equocare img {
  max-width: 240px;
  max-height: 120px;
  object-fit: contain;
}

.logo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 26px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}
.logo-placeholder strong {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--night);
}
.logo-placeholder span {
  font-size: 0.78rem;
  color: var(--muted);
}

.work-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.work-kind {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--terracotta);
}
.work-body h3 {
  font-size: 1.24rem;
}
.work-body p {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin: 0 0 10px;
}
.work-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* Home Services List */
.service-list {
  border-top: 1px solid var(--line);
}
.service-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.45fr) auto;
  gap: 28px;
  align-items: center;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.18s;
}
.service-row:hover {
  padding-left: 8px;
}
.service-row-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.service-row h3 {
  font-size: 1.2rem;
}
.service-row p {
  font-size: 0.93rem;
  color: var(--ink-2);
  margin: 0;
}
.service-row span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sea);
  white-space: nowrap;
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--sea-soft);
  color: var(--sea);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.service-icon svg {
  width: 20px;
  height: 20px;
}
.service-block .service-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
}
.service-block .service-icon svg {
  width: 23px;
  height: 23px;
}


/* Trajectory & Profile Section (LinkedIn Card) */
.trajectory-profile-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 28px 30px;
  box-shadow: var(--shadow-warm);
  display: grid;
  gap: 16px;
}
.trajectory-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.trajectory-avatar {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--night);
  border: 2px solid var(--line-strong);
  padding: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.trajectory-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.trajectory-id {
  flex: 1 1 260px;
  min-width: 0;
}
.trajectory-id h3 {
  font-size: 1.35rem;
  margin-bottom: 2px;
}
.trajectory-id p {
  font-size: 0.88rem;
  color: var(--sea);
  font-weight: 600;
  margin: 0;
}
.trajectory-bio {
  font-size: 1rem;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.6;
  max-width: 820px;
}
.trajectory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.trajectory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.trajectory-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 28px;
  align-items: start;
}
.trajectory-column {
  display: grid;
  gap: 14px;
}
.trajectory-column:last-child {
  position: sticky;
  top: 96px;
}
.trajectory-column-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 2px;
}
.trajectory-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--sea);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-warm);
  display: grid;
  gap: 8px;
}
.trajectory-item.is-accent {
  border-left-color: var(--terracotta);
}
.trajectory-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.trajectory-item-head strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  flex: 1 1 220px;
}
.trajectory-item-head span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--terracotta);
  background: rgba(200, 90, 50, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.trajectory-item p,
.trajectory-list {
  font-size: 0.89rem;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.6;
}
.trajectory-item .trajectory-org {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--sea);
}
.trajectory-list {
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

/* CONÓCENOS · CARPETA DE LOGROS (GOOGLE DRIVE SHOWCASE) */
.drive-showcase-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--shadow-warm);
  display: grid;
  gap: 26px;
}
.drive-showcase-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.drive-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--sea-soft);
  color: var(--sea);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.logros-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.logros-stat {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.logros-stat span {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.logros-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--night);
  margin-top: 3px;
}
.logros-stat small {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-2);
  margin-top: 2px;
}

.logros-academies-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.academy-tile {
  text-align: left;
  padding: 18px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--academy-accent, var(--sea));
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.academy-tile:hover {
  transform: translateY(-2px);
  background: var(--surface);
  box-shadow: var(--shadow-warm);
}
.academy-tile.active {
  background: var(--surface);
  border-color: var(--academy-accent, var(--sea));
  box-shadow: 0 10px 26px rgba(16, 42, 54, 0.12);
}
.academy-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.academy-count {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  white-space: nowrap;
}
.academy-tag {
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--terracotta);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.academy-tile h3 {
  font-size: 0.98rem;
  line-height: 1.25;
}
.academy-tile p {
  font-size: 0.8rem;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.45;
}

.logros-explorer {
  padding: 22px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
}
.logros-explorer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.logros-explorer-toolbar input {
  max-width: 380px;
  margin: 0;
  background: var(--surface);
}
.logros-groups-list {
  display: grid;
  gap: 12px;
}
.logro-group-details {
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.logro-group-details summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.14s;
}
.logro-group-details summary::-webkit-details-marker {
  display: none;
}
.logro-group-details summary:hover {
  background: var(--bg);
}
.logro-group-summary-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.logro-group-summary-meta .group-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--sea-soft);
  color: var(--sea);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.logro-items-grid {
  padding: 6px 18px 18px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 9px;
}
.logro-item-chip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--ink);
  line-height: 1.4;
}
.logro-item-chip::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

@media (max-width: 1020px) {
  .logros-academies-grid,
  .logros-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .drive-showcase-card {
    padding: 20px 16px;
  }
  .logros-academies-grid,
  .logros-summary-strip,
  .logro-items-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .trajectory-columns {
    grid-template-columns: 1fr;
  }
  .trajectory-column:last-child {
    position: static;
  }
}
@media (max-width: 600px) {
  .trajectory-profile-card {
    padding: 22px 18px;
  }
  .trajectory-item {
    padding: 18px 16px;
  }
}

/* Closing Night-Sea Mediterranean Card */
.contact-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 92% 100%, rgba(200, 90, 50, 0.24), transparent 65%),
    var(--night);
  color: #f4efe6;
  border-radius: 18px;
  padding: 50px 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 44px;
  align-items: center;
  box-shadow: var(--shadow-warm-lg);
}
.contact-band .kicker {
  color: #f0a888;
}
.contact-band h2 {
  color: #fffdf9;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
}
.contact-band h2 em {
  color: #8fd3e6;
}
.contact-band p {
  color: #cddbe0;
  font-size: 0.98rem;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.contact-band .button.primary {
  background: var(--terracotta);
  color: #fffdf9;
}
.contact-band .button.primary:hover {
  background: var(--terracotta-hover);
}
.contact-band .button.secondary {
  background: transparent;
  border-color: rgba(244, 239, 230, 0.3);
  color: #fffdf9;
}
.contact-band .button.secondary:hover {
  border-color: #fffdf9;
  color: #fffdf9;
}

/* Cierre sencillo para páginas internas — sin repetir la tarjeta oscura de Inicio */
.closing-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.closing-line p {
  margin: 0;
  max-width: 560px;
}
.closing-line strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.closing-line .contact-actions {
  margin-top: 0;
  flex-shrink: 0;
}

/* ==========================================================================
   SUBPAGE HEADERS
   ========================================================================== */
.page-header {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.page-header h1 {
  font-size: clamp(2.05rem, 3.8vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  max-width: 780px;
}
.page-header p {
  font-size: 1.03rem;
  color: var(--ink-2);
  max-width: 640px;
  margin: 0;
}

/* Páginas de cuenta (no venden nada): cabecera más ligera, menos protagonismo */
.page-header--compact {
  padding: 34px 0 30px;
}
.page-header--compact h1 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  margin-bottom: 6px;
}
.page-header--compact p {
  font-size: 0.92rem;
}
.page-header--compact .kicker {
  margin-bottom: 4px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.page-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.page-nav-links a {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.page-nav-links a:hover {
  border-color: var(--sea);
  color: var(--sea);
  background: var(--sea-soft);
}

/* ==========================================================================
   SERVICIOS PAGE
   ========================================================================== */
.service-blocks {
  display: grid;
  gap: 24px;
}

.service-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm);
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: start;
}
.service-block h2 {
  font-size: 1.55rem;
  margin-bottom: 10px;
}
.service-block p {
  color: var(--ink-2);
}
.service-points {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.service-points li {
  font-size: 0.92rem;
  color: var(--ink);
  display: flex;
  gap: 10px;
}
.service-points li::before {
  content: '—';
  color: var(--terracotta);
  font-weight: 600;
}
.service-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* ==========================================================================
   PRECIOS PAGE
   ========================================================================== */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.price-card-featured {
  border-color: var(--sea);
  box-shadow: 0 0 0 1px var(--sea), var(--shadow-warm);
}

.price-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.price-type {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  margin: 0;
}
.price-pill {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.price-amount {
  font-family: var(--font-display);
  font-size: 3.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--night);
  margin: 4px 0 0;
}
.price-amount span {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 3px;
}
.price-ref {
  font-size: 0.8rem;
  color: var(--muted);
}
.price-card h3 {
  font-size: 1.15rem;
}
.price-detail {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin: 0;
}
.price-features {
  list-style: none;
  margin: 4px 0 auto;
  padding: 14px 0 6px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.price-features li {
  position: relative;
  padding-left: 20px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.price-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--sea);
  font-weight: 700;
}
.price-card .button {
  width: 100%;
  margin-top: 6px;
}

.pricing-footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 22px;
  font-size: 0.86rem;
  color: var(--muted);
}

/* Discord Rates */
.bot-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr);
  gap: 44px;
  align-items: start;
}
.bot-rate-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm);
  overflow: hidden;
}
.bot-rate {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 20px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.bot-rate:last-child {
  border-bottom: 0;
}
.bot-rate h3 {
  font-size: 1.02rem;
  margin-bottom: 3px;
}
.bot-rate p {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0;
}
.bot-rate > strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--night);
  white-space: nowrap;
}
.bot-rate > strong span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Catalog Configurator */
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 24px;
  align-items: start;
}
.calc-board {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm);
  padding: 26px;
}
.calc-group-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
}
.calc-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.calc-options:last-child {
  margin-bottom: 0;
}
.calc-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.calc-choice:hover {
  border-color: var(--line-strong);
}
.calc-choice[aria-pressed="true"] {
  border-color: var(--sea);
  background: var(--sea-soft);
}
.calc-choice strong {
  display: block;
  font-size: 0.88rem;
  color: var(--ink);
}
.calc-choice small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}
.calc-choice .price-val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sea);
  white-space: nowrap;
}

.calc-summary {
  background: var(--night);
  color: #f4efe6;
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-warm-lg);
  position: sticky;
  top: 94px;
}
.calc-summary .kicker {
  color: #f0a888;
}
.calc-total {
  font-family: var(--font-display);
  font-size: 2.9rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #fffdf9;
  margin: 4px 0 16px;
}
.calc-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 14px 0;
  border-top: 1px solid rgba(244, 239, 230, 0.16);
  border-bottom: 1px solid rgba(244, 239, 230, 0.16);
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  color: #e4eef2;
}
.calc-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.calc-summary .small {
  color: #b7cad2;
}
.calc-summary .button.primary {
  background: var(--terracotta);
}
.calc-summary .button.primary:hover {
  background: var(--terracotta-hover);
}

/* Custom Pricing */
.custom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.custom-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm);
  padding: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  transition: border-color 0.15s, transform 0.15s;
}
.custom-card:hover {
  border-color: var(--sea);
  transform: translateY(-2px);
}
.custom-card h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.custom-card p {
  font-size: 0.88rem;
  color: var(--ink-2);
  margin: 0;
}

/* FAQ */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr);
  gap: 44px;
  align-items: start;
}
.faq-list {
  border-top: 1px solid var(--line);
}
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list summary {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  padding: 18px 32px 18px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--terracotta);
}
.faq-list details[open] summary::after {
  content: '−';
}
.faq-list details p {
  font-size: 0.92rem;
  color: var(--ink-2);
  padding: 0 20px 18px 0;
  margin: 0;
}

/* ==========================================================================
   PROYECTOS PAGE
   ========================================================================== */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.project-filters button {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.project-filters button:hover {
  border-color: var(--sea);
  color: var(--sea);
}
.project-filters button[aria-pressed="true"] {
  background: var(--night);
  border-color: var(--night);
  color: #fffdf9;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 1020px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

.project {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, border-color 0.18s;
}
.project:hover {
  transform: translateY(-3px);
  border-color: var(--sea);
}

.project-media {
  height: 145px;
  min-height: 145px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
  overflow: hidden;
}
.project-media.is-equus {
  background: #d8eee2;
  padding: 20px;
}
.project-media.is-equus img {
  width: 128px;
  height: 128px;
  object-fit: contain;
  border-radius: 50%;
}
.project-media.is-rasloock {
  background: #140f29;
}
.project-media.is-rasloock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-media.is-barranco {
  background: #f5efe2;
  padding: 16px;
}
.project-media.is-barranco img {
  max-width: 190px;
  max-height: 140px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.project-media.is-equocare {
  background: #13504e;
  padding: 24px;
}
.project-media.is-equocare img {
  max-width: 210px;
  max-height: 110px;
  object-fit: contain;
}
.project-media.is-galicia,
.work-media.is-galicia {
  background: #031022;
  padding: 16px;
}
.project-media.is-galicia img,
.work-media.is-galicia img {
  width: 100%;
  height: 100%;
  max-width: 195px;
  max-height: 195px;
  object-fit: contain;
}
.project-media.is-cover img,
.work-media.is-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-media.is-system,
.work-media.is-system {
  background: var(--night);
  color: #f4efe6;
  padding: 28px;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.project-media.is-system strong,
.work-media.is-system strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: #fffdf9;
}
.project-media.is-system span,
.work-media.is-system span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #f0a888;
}

.project-meta {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.project-kind {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--terracotta);
}
.project-meta h3 {
  font-size: 1.24rem;
}
.project-meta p {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin: 0;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.project-meta-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   SOPORTE PAGE
   ========================================================================== */
.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.42fr);
  gap: 32px;
  align-items: start;
}

.support-sidebar {
  display: grid;
  gap: 18px;
}

.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm);
  padding: 24px;
}
.sidebar-box h2,
.sidebar-box h3 {
  font-size: 1.06rem;
  margin-bottom: 8px;
}
.sidebar-box p {
  font-size: 0.88rem;
  color: var(--ink-2);
}

.template-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.template-chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.template-chip:hover {
  border-color: var(--sea);
  color: var(--sea);
  background: var(--sea-soft);
}

.channel-links {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.channel-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s;
}
.channel-link:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.channel-link:hover {
  color: var(--sea);
}

.request-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm);
  padding: 30px 32px 34px;
}

.panel-tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.panel-tabs button {
  padding: 0 0 12px;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.panel-tabs button:hover {
  color: var(--ink);
}
.panel-tabs button.active {
  color: var(--sea);
  border-bottom-color: var(--terracotta);
}

label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 18px;
}

input, textarea {
  display: block;
}
input, select, textarea {
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--sea);
}
select {
  height: 45px;
}
textarea {
  resize: vertical;
  min-height: 120px;
}
input::placeholder, textarea::placeholder {
  color: var(--muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.label-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.char-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}
.char-hint.is-valid {
  color: var(--ok);
}

.form-note {
  font-size: 0.86rem;
  color: var(--ink-2);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  margin-bottom: 20px;
}

/* ==========================================================================
   CLEAN SEPARATED PAGES: SOPORTE TOPBAR, MI PERFIL, INSIGNIAS & ADMIN
   ========================================================================== */
.support-shell {
  display: grid;
  gap: 22px;
}

.support-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-warm);
}
.support-topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.support-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.support-new-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.72fr);
  gap: 28px;
  align-items: start;
}

.support-aside-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  gap: 16px;
}
.support-aside-card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}
.support-aside-card p {
  font-size: 0.86rem;
  color: var(--ink-2);
  margin: 0;
}

/* MI PERFIL PAGE */
.profile-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
}
.profile-card-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-warm);
  display: grid;
  gap: 22px;
}
.profile-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.profile-stat-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}
.profile-stat-box span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-stat-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--ink);
  margin-top: 2px;
}

.voucher-card {
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-warm);
  display: grid;
  gap: 14px;
}
.voucher-card.is-unlocked {
  background:
    radial-gradient(ellipse 80% 90% at 100% 0%, rgba(28, 140, 94, 0.14), transparent 65%),
    var(--surface);
  border-color: rgba(28, 140, 94, 0.42);
}

.readonly-role-box {
  padding: 22px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-warm);
  display: grid;
  gap: 10px;
}

/* PREMIOS E INSIGNIAS PAGE */
.rewards-progress-card {
  padding: 28px 30px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 60% 90% at 95% 100%, rgba(200, 90, 50, 0.22), transparent 65%),
    var(--night);
  color: #f4efe6;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 28px;
  align-items: center;
  box-shadow: var(--shadow-warm-lg);
  margin-bottom: 28px;
}
.rewards-progress-card h2 {
  color: #fffdf9;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 6px;
}
.rewards-progress-card p {
  color: #c5d6dd;
  font-size: 0.92rem;
  margin: 0;
}
.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.16);
  overflow: hidden;
  margin: 14px 0 8px;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #56b9d8, #f0a888);
  transition: width 0.35s ease;
}
.rewards-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.rewards-metric-tile {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.08);
  border: 1px solid rgba(255, 253, 249, 0.14);
}
.rewards-metric-tile span {
  display: block;
  font-size: 0.74rem;
  color: #b7ccd5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rewards-metric-tile strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: #fffdf9;
  margin-top: 2px;
}

.tier-explainer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.tier-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-warm);
  display: grid;
  gap: 8px;
}
.tier-card h3 {
  font-size: 1.02rem;
}
.tier-card p {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin: 0;
}

/* ADMINISTRACIÓN PAGE */
.admin-gate {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 32px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-warm-lg);
  display: grid;
  gap: 14px;
  justify-items: center;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.admin-kpi {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-warm);
}
.admin-kpi span {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.admin-kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--night);
  margin-top: 4px;
}
.admin-kpi small {
  font-size: 0.78rem;
  color: var(--ink-2);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.admin-toolbar-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}
.admin-toolbar-filters input {
  max-width: 300px;
  margin: 0;
}
.admin-toolbar-filters select {
  max-width: 190px;
  margin: 0;
  height: 45px;
}

.admin-users-list {
  display: grid;
  gap: 14px;
}
.admin-user-card {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-warm);
  display: grid;
  gap: 14px;
}
.admin-user-card.is-suspended {
  border-color: rgba(185, 28, 28, 0.35);
  background: #fdf6f5;
}
.admin-user-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-user-id {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-user-id strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
}
.admin-user-id small {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.admin-user-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 150px auto;
  gap: 12px;
  align-items: end;
}
.admin-user-controls label {
  margin: 0;
  font-size: 0.78rem;
}
.admin-user-controls select,
.admin-user-controls input {
  height: 40px;
  padding: 6px 10px;
  font-size: 0.85rem;
}
.admin-user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-user-actions .button {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.82rem;
}

.admin-badge-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.admin-badge-chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-2);
}
.admin-badge-chip.active {
  background: var(--sea);
  border-color: var(--sea);
  color: #fffdf9;
}

.web-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.web-breakdown-card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
}
.web-breakdown-card strong {
  font-family: var(--font-display);
  font-size: 1rem;
}

.local-preview-banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  border: 1px solid rgba(180, 83, 9, 0.25);
  color: var(--warn);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

@media (max-width: 980px) {
  .support-new-grid,
  .profile-page-grid,
  .rewards-progress-card,
  .tier-explainer-grid {
    grid-template-columns: 1fr;
  }
  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-user-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .profile-stats-strip,
  .admin-kpi-grid,
  .admin-user-controls {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CENTRALIZED HUB, ROLES, PROFILE (10% BIRTHDAY DISCOUNT) & BADGES
   ========================================================================== */
.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.role-pill[data-role="cliente"] {
  background: var(--sea-soft);
  color: var(--sea);
}
.role-pill[data-role="soporte"] {
  background: rgba(28, 140, 94, 0.14);
  color: #16704b;
}
.role-pill[data-role="administrador"] {
  background: rgba(200, 90, 50, 0.16);
  color: var(--terracotta);
}

.discount-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(28, 140, 94, 0.11);
  border: 1px solid rgba(28, 140, 94, 0.28);
  color: #135c3d;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.discount-banner strong {
  color: #0e482f;
}

.hub-origins {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.hub-origin-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}

.profile-workspace {
  display: grid;
  gap: 24px;
}

.profile-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 22px;
  padding: 24px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
}

.profile-identity {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.profile-avatar-lg {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: var(--night);
  color: #fffdf9;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--terracotta);
}
.profile-identity-meta h3 {
  font-size: 1.28rem;
  margin: 4px 0 2px;
}
.profile-identity-meta p {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin: 0 0 10px;
}

.profile-discount-card {
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.profile-discount-card.is-unlocked {
  border-color: rgba(28, 140, 94, 0.45);
  background: rgba(28, 140, 94, 0.06);
}
.profile-discount-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.profile-discount-code {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--night);
  color: #fffdf9;
  font-family: monospace;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.profile-grid-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.profile-box {
  padding: 22px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.profile-box h3 {
  font-size: 1.08rem;
  margin-bottom: 6px;
}
.profile-box > p {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin-bottom: 16px;
}

.badges-section {
  padding: 24px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.badges-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.badges-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.badge-filter-btn {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.badge-filter-btn.active {
  background: var(--sea);
  color: #fffdf9;
  border-color: var(--sea);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.insignia-card {
  position: relative;
  padding: 26px 18px 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.insignia-card.is-unlocked {
  box-shadow: var(--shadow-warm);
}
.insignia-card.is-unlocked:hover {
  transform: translateY(-2px);
}
.insignia-card.is-locked {
  background: transparent;
  border-style: dashed;
}
.insignia-card h4 {
  font-size: 0.98rem;
  margin: 8px 0 0;
  line-height: 1.3;
}
.insignia-card.is-locked h4 {
  color: var(--ink-2);
}
.insignia-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.insignia-status {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.insignia-card.is-unlocked .insignia-status {
  color: var(--ok);
}
.insignia-card.is-unlocked .insignia-status::before {
  content: '\2713\00a0';
}

/* Medalla: anillo exterior + disco interior, color por nivel en --medal */
.badge-medal {
  --medal: var(--sea);
  --size: 76px;
  position: relative;
  flex-shrink: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  color: color-mix(in srgb, var(--medal) 55%, var(--muted));
  background: color-mix(in srgb, var(--medal) 7%, var(--surface));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--medal) 28%, var(--line));
}
.badge-medal > svg {
  width: calc(var(--size) * 0.46);
  height: calc(var(--size) * 0.46);
}
.badge-medal.is-on {
  color: #fffdf9;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.28), transparent 55%),
    var(--medal);
  box-shadow:
    inset 0 0 0 3px rgba(255, 253, 249, 0.9),
    0 0 0 2px var(--medal),
    0 8px 18px -8px var(--medal);
}
.badge-medal-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--size) * 0.36);
  line-height: 1;
}
.badge-medal-unit {
  font-size: calc(var(--size) * 0.13);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}
.badge-medal-lock {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.badge-medal-lock svg {
  width: 14px;
  height: 14px;
}
.badge-medal--sm {
  --size: 40px;
}
.badge-medal--sm .badge-medal-lock {
  display: none;
}
.badge-medal--sm.is-on {
  box-shadow: inset 0 0 0 2px rgba(255, 253, 249, 0.9), 0 0 0 1.5px var(--medal);
}

@media (max-width: 600px) {
  .badges-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .insignia-card {
    padding: 18px 10px 14px;
  }
  .insignia-card .badge-medal--md {
    --size: 60px;
  }
  .insignia-card .badge-medal-lock {
    width: 20px;
    height: 20px;
    right: -6px;
    bottom: -6px;
  }
  .insignia-card .badge-medal-lock svg {
    width: 11px;
    height: 11px;
  }
  .insignia-card h4 {
    font-size: 0.88rem;
  }
  .insignia-card p {
    font-size: 0.76rem;
  }
}

.insignia-reward {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.3;
}
.insignia-card.is-unlocked .insignia-reward {
  background: var(--ok-bg);
  border-color: #b7dec9;
  color: #165938;
}

/* Asistente IA (Academia) en soporte.html */
.ai-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ai-chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding: 18px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.ai-msg {
  max-width: 82%;
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.ai-msg strong {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  color: var(--muted);
}
.ai-msg p {
  margin: 0;
}
.ai-msg--bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
}
.ai-msg--user {
  align-self: flex-end;
  background: var(--night);
  color: #fffdf9;
}
.ai-msg--user strong {
  color: #9ec5d4;
}
.ai-compose {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ai-compose input {
  flex: 1;
  margin: 0;
}
@media (max-width: 640px) {
  .ai-msg {
    max-width: 94%;
  }
  .ai-compose {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Grid de 4 planes (Academia en precios.html) */
.price-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1120px) {
  .price-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .price-grid--4 {
    grid-template-columns: 1fr;
  }
}

/* Biblioteca de manuales (academia.html) */
.manual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 980px) {
  .manual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .manual-grid {
    grid-template-columns: 1fr;
  }
}
.manual-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.16s, transform 0.16s;
}
.manual-card.is-unlocked:hover {
  border-color: var(--sea);
  transform: translateY(-2px);
}
.manual-card.is-locked {
  opacity: 0.88;
}
.manual-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.manual-cat {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sea);
}
.manual-card h3 {
  font-size: 1.02rem;
  margin: 0;
}
.manual-card p {
  margin: 0;
  flex: 1;
}
.manual-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   TARJETA EDITORIAL PORTADA + PILARES + LISTA DE 5 ACREDITACIONES (SIN COLORES TRANSLÚCIDOS)
   ========================================================================== */
.editorial-note-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 26px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-warm);
}
.editorial-note-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.editorial-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.editorial-facts strong {
  color: var(--ink);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 860px) {
  .pillars-grid {
    grid-template-columns: 1fr;
  }
}
.pillar-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.16s;
}
.pillar-card:hover {
  border-color: var(--sea);
}
.pillar-tag {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--terracotta);
}
.pillar-card h3 {
  font-size: 1.18rem;
  margin: 0;
  color: var(--ink);
}
.pillar-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.94rem;
  flex: 1;
}
.pillar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sea);
}
.projects-compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 960px) {
  .projects-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .projects-compact-grid {
    grid-template-columns: 1fr;
  }
}

/* Lista plana editorial de 5 Learning Paths por página (sin cajas ni bordes laterales) */
.cred-list {
  border-top: 1px solid var(--line-strong);
}
.cred-path {
  border-bottom: 1px solid var(--line);
}
.cred-path-head {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 15px 6px;
  transition: background 0.14s;
}
.cred-path-head::-webkit-details-marker {
  display: none;
}
.cred-path-head:hover {
  background: var(--bg-alt);
}
.cred-path[open] .cred-path-head {
  background: transparent;
}
@media (max-width: 640px) {
  .cred-path-head {
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
  }
  .cred-entity {
    grid-column: 1 / -1;
  }
}
.cred-entity {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cred-path-title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.cred-path-count {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--sea);
  white-space: nowrap;
}
.cred-courses-list {
  margin: 0;
  padding: 2px 12px 16px 166px;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--ink-2);
}
@media (max-width: 640px) {
  .cred-courses-list {
    padding: 4px 8px 14px 22px;
  }
}
.cred-courses-list li::marker {
  color: var(--terracotta);
}

/* Experiencia desplegable con resumen (conocenos.html) */
.exp-accordion {
  padding: 0;
}
.exp-summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
}
.exp-summary::-webkit-details-marker {
  display: none;
}
.exp-preview {
  margin: 8px 0 6px !important;
  color: var(--ink-2);
}
.exp-toggle-label {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sea);
}
.exp-accordion[open] .exp-toggle-label {
  display: none;
}
.exp-full {
  padding: 0 20px 18px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 14px;
}
.logros-toolbar-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cred-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.cred-pager .button {
  min-height: 38px;
  padding: 7px 16px;
  font-size: 0.84rem;
}

/* ==========================================================================
   PORTAL DE SOPORTE SOBRIO (soporte.html + barra de sesión plana)
   ========================================================================== */
.jsm-session-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 0 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.jsm-form-card {
  padding: 24px 0 0;
}
.jsm-queue-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.jsm-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.jsm-queue-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.jsm-queue-tools input,
.jsm-queue-tools select {
  margin: 0;
  height: 36px;
  padding: 4px 12px;
  font-size: 0.84rem;
  width: auto;
}
.jsm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.jsm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.jsm-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.jsm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.jsm-table tbody tr:last-child td {
  border-bottom: 0;
}
.jsm-table tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}
.jsm-table tbody tr:hover {
  background: var(--bg);
}
.jsm-ticket-key {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sea);
  white-space: nowrap;
}
.jsm-ticket-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
}
.jsm-ticket-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Ritmo vertical más compacto y coherente en todas las páginas */
.section {
  padding: clamp(42px, 5vw, 64px) 0;
}
.page-header {
  padding: clamp(38px, 4.5vw, 56px) 0 clamp(26px, 3vw, 38px);
}
.hero {
  padding: clamp(48px, 6vw, 76px) 0 clamp(44px, 5vw, 68px);
}

/* ==========================================================================
   BOTÓN FLOTANTE GLOBAL DE ASISTENTE IA (TODA LA WEB + OCULTAR/MOSTRAR)
   ========================================================================== */
.ai-fab-shell {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.ai-fab-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ai-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--night);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(16, 42, 54, 0.28);
  transition: background 0.16s, transform 0.16s;
}
.ai-fab-btn:hover {
  background: var(--sea);
  transform: translateY(-2px);
}
.ai-fab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5eead4;
}
.ai-fab-hide {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-warm);
}
.ai-fab-hide:hover {
  border-color: var(--sea);
  color: var(--sea);
}
.ai-fab-restore {
  position: fixed;
  right: 0;
  bottom: 26px;
  z-index: 950;
  padding: 8px 12px 8px 14px;
  border-radius: 999px 0 0 999px;
  background: var(--night);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(16, 42, 54, 0.24);
}
.ai-fab-restore:hover {
  background: var(--sea);
}
.ai-drawer {
  width: min(390px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-warm-lg);
  overflow: hidden;
}
.ai-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--night);
  color: #ffffff;
}
.ai-drawer-head strong {
  font-size: 0.94rem;
}
.ai-drawer-head small {
  display: block;
  font-size: 0.74rem;
  color: #b7d7e2;
}
.ai-drawer-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ai-drawer-close:hover {
  background: rgba(255, 255, 255, 0.14);
}
.ai-drawer-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.ai-drawer .ai-chat-log {
  max-height: 260px;
  padding: 12px;
}

/* Leyenda compacta de roles (insignias.html) */
.tier-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin: 0 0 18px;
  font-size: 0.84rem;
  color: var(--ink-2);
}
.tier-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tier-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot);
}

/* MI PERFIL · cabecera de cuenta + dos columnas */
.account-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px 32px;
  padding: 26px 28px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-warm);
}
.account-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.account-identity-text {
  min-width: 0;
}
.account-identity-text h2 {
  font-size: 1.4rem;
  margin: 0 0 2px;
}
.account-identity-text > p {
  font-size: 0.86rem;
  color: var(--ink-2);
  margin: 0;
  overflow-wrap: anywhere;
}
.account-role-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 10px;
}
.account-role-line .small {
  margin: 0;
  color: var(--muted);
}
.account-stats {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0 0 0 28px;
  border-left: 1px solid var(--line);
}
.account-stats dt {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.account-stats dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}
.account-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}
.account-side {
  display: grid;
  gap: 24px;
}
.account-card {
  padding: 24px 26px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-warm);
  display: grid;
  gap: 16px;
}
.account-card-head h3 {
  font-size: 1.1rem;
  margin: 0;
}
.account-card-head .small {
  margin: 4px 0 0;
}
.account-card-head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.account-card-head--row .text-link {
  font-size: 0.84rem;
}
.account-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
#profile-save-status:empty {
  display: none;
}
.medal-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.medal-shelf .badge-medal--sm {
  --size: 44px;
}
.medal-shelf-note {
  flex-basis: 100%;
  margin: 4px 0 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .account-header {
    grid-template-columns: 1fr;
  }
  .account-stats {
    padding: 18px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .account-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .account-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .account-header,
  .account-card {
    padding: 20px 18px;
  }
  .account-identity {
    align-items: flex-start;
  }
  .account-stats {
    justify-content: space-between;
    gap: 12px;
  }
}

/* Insignias en la ficha de Mi perfil */
.profile-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.profile-badge-row:last-child {
  border-bottom: 0;
}
.profile-badge-row strong {
  display: block;
  font-size: 0.88rem;
}
.profile-badge-row small {
  color: var(--muted);
  font-size: 0.75rem;
}

@media (max-width: 860px) {
  .profile-hero-card,
  .profile-grid-forms {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   WHATSAPP-STYLE SUPPORT MESSENGER (SOPORTE MALLORCA AESTHETIC)
   ========================================================================== */
.wa-workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 620px;
  max-height: 78vh;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-warm-lg);
}

.wa-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
  min-height: 0;
}

.wa-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--night);
  color: #f4efe6;
}

.wa-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wa-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sea);
  color: #fffdf9;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  flex-shrink: 0;
  border: 2px solid rgba(255, 253, 249, 0.2);
  overflow: hidden;
}
.wa-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wa-avatar.is-terracotta {
  background: var(--terracotta);
}

.wa-profile-meta {
  min-width: 0;
}
.wa-profile-meta strong {
  display: block;
  font-size: 0.9rem;
  color: #fffdf9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-profile-meta small {
  display: block;
  font-size: 0.74rem;
  color: #a9c6d2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-new-chat-btn {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.14);
  color: #fffdf9;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
}
.wa-new-chat-btn:hover {
  background: var(--terracotta);
}

.wa-search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  padding: 10px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.wa-search-bar input {
  grid-column: 1 / -1;
}
.wa-search-bar input,
.wa-search-bar select {
  margin: 0;
  height: 36px;
  padding: 6px 11px;
  font-size: 0.82rem;
  border-radius: 999px;
  background: var(--surface);
}
.wa-search-bar select {
  padding-right: 26px;
}

.wa-chat-list {
  flex: 1;
  overflow-y: auto;
  background: var(--surface);
}

.wa-chat-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background 0.14s;
}
.wa-chat-item:hover {
  background: var(--bg);
}
.wa-chat-item.active {
  background: var(--sea-soft);
  border-left: 3px solid var(--sea);
}

.wa-chat-item-body {
  min-width: 0;
}
.wa-chat-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.wa-chat-item-top strong {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-chat-item-top time {
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
}
.wa-chat-item-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wa-chat-item-sub span {
  font-size: 0.8rem;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    radial-gradient(circle at 20px 20px, rgba(11, 93, 122, 0.055) 1.5px, transparent 1.5px),
    radial-gradient(circle at 60px 60px, rgba(200, 90, 50, 0.05) 1.5px, transparent 1.5px),
    #efe7d8;
  background-size: 80px 80px;
}

.wa-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.wa-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.wa-back-btn {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 1rem;
  place-items: center;
}
.wa-chat-header-text {
  min-width: 0;
}
.wa-chat-header-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-chat-header-text small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.77rem;
  color: var(--ink-2);
}
.wa-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1c8c5e;
  display: inline-block;
}

.wa-admin-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wa-admin-inline select {
  margin: 0;
  height: 34px;
  padding: 4px 28px 4px 10px;
  font-size: 0.8rem;
  border-radius: 999px;
}
.wa-admin-inline button {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 999px;
}

.wa-messages-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wa-date-pill {
  align-self: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.88);
  border: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: 0 1px 3px rgba(16, 42, 54, 0.06);
  margin: 4px 0;
}

.wa-system-pill {
  align-self: center;
  padding: 5px 14px;
  border-radius: 10px;
  background: rgba(200, 90, 50, 0.13);
  border: 1px solid rgba(200, 90, 50, 0.28);
  color: #7c3116;
  font-size: 0.77rem;
  font-weight: 600;
  text-align: center;
  max-width: 88%;
}

.wa-bubble {
  position: relative;
  max-width: min(76%, 500px);
  padding: 9px 13px 7px;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(16, 42, 54, 0.1);
  font-size: 0.92rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.wa-bubble.incoming {
  align-self: flex-start;
  background: #fffdf9;
  color: var(--ink);
  border: 1px solid var(--line);
  border-top-left-radius: 3px;
}
.wa-bubble.outgoing {
  align-self: flex-end;
  background: var(--sea);
  color: #fffdf9;
  border-top-right-radius: 3px;
}
.wa-bubble-sender {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--terracotta);
}
.wa-bubble.outgoing .wa-bubble-sender {
  color: #b7e5f5;
}
.wa-bubble-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wa-bubble-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.69rem;
  opacity: 0.78;
  align-self: flex-end;
  margin-top: 1px;
}
.wa-checks {
  font-size: 0.76rem;
  letter-spacing: -2px;
  color: #9be7ff;
}

.wa-compose {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.wa-compose input,
.wa-compose textarea {
  flex: 1;
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 0.92rem;
  height: 44px;
  resize: none;
}
.wa-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sea);
  color: #fffdf9;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(11, 93, 122, 0.25);
  transition: background 0.15s, transform 0.15s;
}
.wa-send-btn:hover:not(:disabled) {
  background: var(--terracotta);
  transform: scale(1.04);
}
.wa-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.wa-send-btn svg {
  width: 19px;
  height: 19px;
}

.wa-empty-chat {
  margin: auto;
  text-align: center;
  max-width: 360px;
  padding: 28px 22px;
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-warm);
}
.wa-empty-chat h3 {
  font-size: 1.12rem;
  margin-bottom: 6px;
}
.wa-empty-chat p {
  font-size: 0.88rem;
  color: var(--ink-2);
  margin-bottom: 14px;
}

/* FLOATING WHATSAPP-STYLE LAUNCHER WIDGET */
.wa-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  border-radius: 999px;
  background: var(--sea);
  color: #fffdf9;
  border: 1px solid rgba(255, 253, 249, 0.22);
  box-shadow: 0 12px 30px rgba(16, 42, 54, 0.26);
  font-weight: 600;
  font-size: 0.88rem;
  transition: transform 0.18s, background 0.18s;
}
.wa-fab:hover {
  background: var(--night);
  transform: translateY(-2px);
}
.wa-fab svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.wa-fab-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #42e39c;
  box-shadow: 0 0 0 3px rgba(66, 227, 156, 0.25);
}

.wa-float-window {
  position: fixed;
  right: 22px;
  bottom: 82px;
  width: min(380px, calc(100vw - 28px));
  height: min(530px, calc(100dvh - 120px));
  z-index: 96;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(16, 42, 54, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wa-float-window[hidden] {
  display: none !important;
}
.wa-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  background: var(--night);
  color: #fffdf9;
}
.wa-float-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.12);
  color: #fffdf9;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}
.wa-float-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(circle at 18px 18px, rgba(11, 93, 122, 0.055) 1.5px, transparent 1.5px),
    #efe7d8;
  background-size: 64px 64px;
}
.wa-float-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.wa-float-chip {
  padding: 6px 11px;
  border-radius: 999px;
  background: #fffdf9;
  border: 1px solid var(--line-strong);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sea);
  transition: background 0.14s, border-color 0.14s;
}
.wa-float-chip:hover {
  background: var(--sea);
  color: #fffdf9;
  border-color: var(--sea);
}

@media (max-width: 860px) {
  .wa-workspace {
    grid-template-columns: 1fr;
    height: 76vh;
  }
  .wa-workspace.is-chat-open .wa-sidebar {
    display: none;
  }
  .wa-workspace:not(.is-chat-open) .wa-main {
    display: none;
  }
  .wa-back-btn {
    display: inline-grid;
  }
  .wa-fab span.wa-fab-label {
    display: none;
  }
  .wa-fab {
    padding: 13px;
  }
}

.tickets-toolbar {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 12px;
  margin-bottom: 18px;
}
.tickets-toolbar input,
.tickets-toolbar select {
  margin-top: 0;
}

.empty-state {
  text-align: center;
  padding: 36px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
}
.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 0.9rem;
  color: var(--ink-2);
  max-width: 380px;
  margin: 0 auto 18px;
}

.ticket-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  margin-bottom: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.ticket-row:hover {
  background: var(--surface);
  border-color: var(--sea);
}
.ticket-row strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}
.ticket-row small {
  grid-column: 1;
  font-size: 0.78rem;
  color: var(--muted);
}

.badge {
  grid-column: 2;
  grid-row: 1 / 3;
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  background: var(--ok-bg);
  color: var(--ok);
}
.badge[data-status="pendiente"] {
  background: var(--warn-bg);
  color: var(--warn);
}
.badge[data-status="cerrado"],
.badge[data-status="resuelto"],
.badge[data-status="cancelado"] {
  background: var(--bg-alt);
  color: var(--muted);
}
.badge[data-status="reabierto"] {
  background: var(--sea-soft);
  color: var(--sea);
}

[role="status"] {
  font-size: 0.88rem;
  margin-top: 12px;
  border-radius: var(--radius-sm);
}
[role="status"]:empty {
  display: none;
}
.error {
  color: var(--err);
  background: var(--err-bg);
  padding: 10px 14px;
}
.success {
  color: var(--ok);
  background: var(--ok-bg);
  padding: 10px 14px;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
dialog {
  width: min(560px, calc(100% - 28px));
  max-height: 86vh;
  overflow: auto;
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-warm-lg);
}
dialog::backdrop {
  background: rgba(16, 42, 54, 0.56);
}
dialog h2 {
  font-size: 1.55rem;
  margin: 4px 0 12px;
  padding-right: 36px;
}
dialog > p {
  font-size: 0.94rem;
  color: var(--ink-2);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.dialog-close:hover {
  background: var(--bg-alt);
  border-color: var(--line-strong);
}

.login-options {
  display: grid;
  gap: 14px;
  margin: 20px 0 16px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.auth-tab {
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-2);
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.auth-tab.active {
  background: var(--surface);
  color: var(--sea);
  box-shadow: 0 2px 6px rgba(16, 42, 54, 0.08);
}
.auth-email-form {
  display: grid;
  gap: 12px;
}
.auth-email-form label {
  display: grid;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.auth-email-form input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.93rem;
}
.auth-email-form input:focus {
  outline: 2px solid var(--sea);
  outline-offset: 1px;
  border-color: var(--sea);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-providers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .auth-providers {
    grid-template-columns: 1fr;
  }
}

.project-highlights {
  list-style: none;
  margin: 14px 0 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.project-highlights li {
  font-size: 0.9rem;
  color: var(--ink);
  display: flex;
  gap: 10px;
}
.project-highlights li::before {
  content: '—';
  color: var(--terracotta);
}

.environment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 22px;
}
.environment-list span {
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-2);
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preserve-lines {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}

.messages {
  margin: 20px 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 10px;
  max-height: 290px;
  overflow-y: auto;
}
.message {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.message.own {
  border-left: 3px solid var(--sea);
  background: var(--sea-soft);
}
.message small {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}
.message > span {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 5px;
  font-size: 0.92rem;
}

.plan-item {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.plan-item:last-child {
  border-bottom: 0;
}
.plan-item h3 {
  font-size: 1.08rem;
  margin-bottom: 5px;
}
.plan-item p {
  font-size: 0.88rem;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.plan-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: auto;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-origin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer-origin svg {
  width: 20px;
  height: 20px;
  color: var(--terracotta);
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--ink-2);
}
.footer-links a:hover {
  color: var(--sea);
}

.motion-toggle {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.motion-toggle:hover {
  color: var(--ink);
}

.noscript-note {
  margin: 16px auto;
  width: min(var(--wrap), calc(100% - 48px));
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.88rem;
}

/* Motion */
@view-transition {
  navigation: auto;
}
.motion-off {
  scroll-behavior: auto !important;
}
.motion-off *, .motion-off *::before, .motion-off *::after {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid,
  .contact-band,
  .service-block,
  .bot-layout,
  .calc-layout,
  .faq-layout,
  .support-layout,
  .project {
    grid-template-columns: 1fr;
  }
  .home-projects,
  .price-grid,
  .custom-grid {
    grid-template-columns: 1fr;
  }
  .project-media {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .service-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .calc-summary {
    position: static;
  }
}

@media (max-width: 1080px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .menu-toggle {
    display: inline-flex;
  }
  #navigation {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 84vw);
    height: 100dvh;
    z-index: 120;
    background: var(--surface);
    border-left: 1px solid var(--line-strong);
    padding: 20px 22px 26px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    box-shadow: -18px 0 48px rgba(16, 42, 54, 0.16);
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.28s;
  }
  #navigation.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }
  .drawer-title {
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ink);
  }
  .drawer-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg);
    font-size: 1.25rem;
    display: grid;
    place-items: center;
    color: var(--ink);
  }
  .drawer-close:hover {
    border-color: var(--sea);
    color: var(--sea);
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .nav-divider {
    width: auto;
    height: 1px;
    margin: 6px 10px;
  }
  .nav-links a {
    padding: 12px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.98rem;
  }
  .nav-links a[aria-current="page"] {
    background: var(--sea-soft);
    color: var(--sea);
  }
  .nav-links a[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 8px;
    bottom: 8px;
    width: 3px;
    height: auto;
    border-radius: 3px;
  }
  .auth-button {
    justify-content: center;
    min-height: 44px;
  }
  .drawer-foot {
    display: flex;
    gap: 16px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--ink-2);
  }
  .drawer-foot a:hover {
    color: var(--sea);
  }
  .hero {
    padding: 46px 0 50px;
  }
  .section {
    padding: 54px 0;
  }
  .contact-band,
  .service-block,
  .request-panel {
    padding: 26px 20px;
  }
  .calc-options,
  .form-row,
  .tickets-toolbar {
    grid-template-columns: 1fr;
  }
  .bot-rate {
    grid-template-columns: 1fr auto;
  }
  .bot-rate .text-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .hero-card {
    grid-template-columns: 84px 1fr;
  }
  .hero-thumb {
    width: 84px;
    height: 70px;
  }
  dialog {
    padding: 24px 18px;
  }
}
