/* ==========================================================================
   SICEJ · Hoja de estilos principal
   Identidad: verdes profundos (bosque, esmeralda, jade, salvia) + filete lima,
   texturas de guilloché, grano de papel y greca andina escalonada.
   ========================================================================== */

/* ------------------------------------------------------------- tokens */
:root {
  --r-950: #072115; --r-900: #0c3523; --r-800: #114f33; --r-700: #176341; --r-600: #1d7449;
  --r-500: #258556; --r-400: #61c586; --r-300: #9acfa8; --r-200: #c7e6cf; --r-100: #e5f5e7; --r-50: #f4fbf5;
  --vermilion: #2f9a63; --garnet: #2a704d; --rose: #66a37c; --wine: #12452e;
  --gold: #96b75d; --gold-2: #c8df9f; --gold-3: #deeec1;

  --paper: #f2f9f3; --paper-2: #e7f0e8; --surface: #ffffff; --ink: #192520; --muted: #586860; --line: #d7e3d9;
  --focus: #1a5cff; --ok: #1f7a4d; --warn: #b36b00;

  --radius: 16px; --radius-sm: 10px;
  --shadow-1: 0 1px 2px rgba(12, 53, 35, .08), 0 8px 24px -12px rgba(12, 53, 35, .28);
  --shadow-2: 0 24px 60px -24px rgba(12, 53, 35, .55);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --fs: 1; --a-filter: none;

  /* texturas (SVG incrustado) */
  --tex-rosette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' fill='none' stroke='%23fff' stroke-opacity='.09'%3E%3Ccircle cx='0' cy='0' r='14'/%3E%3Ccircle cx='0' cy='0' r='28'/%3E%3Ccircle cx='0' cy='0' r='42'/%3E%3Ccircle cx='88' cy='0' r='14'/%3E%3Ccircle cx='88' cy='0' r='28'/%3E%3Ccircle cx='88' cy='0' r='42'/%3E%3Ccircle cx='0' cy='88' r='14'/%3E%3Ccircle cx='0' cy='88' r='28'/%3E%3Ccircle cx='0' cy='88' r='42'/%3E%3Ccircle cx='88' cy='88' r='14'/%3E%3Ccircle cx='88' cy='88' r='28'/%3E%3Ccircle cx='88' cy='88' r='42'/%3E%3Ccircle cx='44' cy='44' r='14'/%3E%3Ccircle cx='44' cy='44' r='28'/%3E%3Ccircle cx='44' cy='44' r='42'/%3E%3C/svg%3E");
  --tex-rosette-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' fill='none' stroke='%231a7049' stroke-opacity='.07'%3E%3Ccircle cx='0' cy='0' r='14'/%3E%3Ccircle cx='0' cy='0' r='28'/%3E%3Ccircle cx='0' cy='0' r='42'/%3E%3Ccircle cx='88' cy='0' r='14'/%3E%3Ccircle cx='88' cy='0' r='28'/%3E%3Ccircle cx='88' cy='0' r='42'/%3E%3Ccircle cx='0' cy='88' r='14'/%3E%3Ccircle cx='0' cy='88' r='28'/%3E%3Ccircle cx='0' cy='88' r='42'/%3E%3Ccircle cx='88' cy='88' r='14'/%3E%3Ccircle cx='88' cy='88' r='28'/%3E%3Ccircle cx='88' cy='88' r='42'/%3E%3Ccircle cx='44' cy='44' r='14'/%3E%3Ccircle cx='44' cy='44' r='28'/%3E%3Ccircle cx='44' cy='44' r='42'/%3E%3C/svg%3E");
  --tex-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --tex-grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .05 0 0 0 0 .22 0 0 0 0 .12 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --tex-greca: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='16' viewBox='0 0 48 16'%3E%3Cpolyline points='0,14 8,14 8,8 16,8 16,2 24,2 24,8 32,8 32,14 48,14' fill='none' stroke='%2396b75d' stroke-width='2' stroke-linejoin='miter'/%3E%3C/svg%3E");
  --tex-hatch: repeating-linear-gradient(135deg, rgba(26, 112, 73, .028) 0 1px, transparent 1px 8px);
}

/* -------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  font-size: calc(100% * var(--fs, 1)); -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-behavior: smooth; filter: var(--a-filter, none); scroll-padding-top: 4rem;
}
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; font-family: var(--font-body); font-size: 1rem; line-height: 1.55;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; overscroll-behavior-y: none;
  background-image: var(--tex-grain-dark), var(--tex-rosette-dark); background-size: 160px, 88px;
}
body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: radial-gradient(900px 500px at 85% -10%, rgba(98, 198, 135, .12), transparent 60%), radial-gradient(700px 400px at -10% 30%, rgba(150, 183, 93, .1), transparent 60%); }
html.modal-open body { overflow: hidden; }
img, svg, canvas { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.005em; }
p { margin: 0 0 .7em; }
a { color: var(--r-600); text-underline-offset: .18em; }
button { font: inherit; color: inherit; cursor: pointer; }
abbr[title] { text-decoration: none; }
kbd { font-family: var(--font-mono); font-size: .78em; padding: .1em .45em; border-radius: 6px; background: var(--paper-2); border: 1px solid var(--line); border-bottom-width: 2px; }
.mono { font-family: var(--font-mono); letter-spacing: .02em; }
.small { font-size: .85rem; color: var(--muted); }
.muted { color: var(--muted); }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.live-sr, .skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.skip:focus { position: fixed; top: 10px; left: 10px; z-index: 5000; padding: .7rem 1rem; background: var(--r-800); color: #fff; border-radius: 10px; font-weight: 700; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.splash :focus-visible, .topbar :focus-visible, .navbar :focus-visible, .footer :focus-visible, .lock :focus-visible, .case-hero :focus-visible, .drawer__head :focus-visible, .pdf__head :focus-visible { outline-color: #c3ea80; }
[tabindex="-1"]:focus { outline: none; }
::selection { background: var(--r-500); color: #fff; }

.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }

.eyebrow { font-family: var(--font-body); font-size: .74rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--r-600); margin: 0 0 .5rem; display: flex; align-items: center; gap: .6rem; }
.eyebrow::before { content: ''; width: 1.6rem; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }
.eyebrow--light { color: var(--gold-2); }

/* ------------------------------------------------------------ botones */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 46px; padding: .6rem 1.15rem;
  border: 0; border-radius: 12px; font-weight: 700; font-size: .95rem; letter-spacing: .01em; text-decoration: none; cursor: pointer; overflow: hidden; isolation: isolate;
  transition: transform .18s ease, box-shadow .25s ease, filter .2s ease, background .2s; -webkit-tap-highlight-color: transparent;
}
.btn::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s ease; }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { color: #fff; background: linear-gradient(180deg, var(--r-500), var(--r-700)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 20px -10px rgba(26, 112, 73, .75); }
.btn--primary:hover { transform: translateY(-1px); filter: brightness(1.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 26px -10px rgba(26, 112, 73, .8); }
.btn--gold { color: var(--r-950); background: linear-gradient(180deg, #d6ebb3, #96b75d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 14px 30px -10px rgba(0, 0, 0, .55), 0 0 0 1px rgba(229, 246, 199, .5); }
.btn--gold:hover { transform: translateY(-2px); filter: saturate(1.1) brightness(1.04); }
.btn--ghost { color: var(--r-700); background: transparent; border: 1.5px solid var(--r-200); }
.btn--ghost:hover { background: var(--r-50); border-color: var(--r-400); }
.btn--soft { color: var(--r-800); background: var(--r-100); }
.btn--soft:hover { background: var(--r-200); }
.btn--ai { color: #fff; background: linear-gradient(120deg, #12452e, #1d7449 55%, #2f9a63); box-shadow: 0 10px 20px -12px rgba(26, 112, 73, .9); }
.btn--ai:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn--lg { min-height: 52px; padding-inline: 1.6rem; font-size: 1.02rem; }
.btn--xl { min-height: 60px; padding-inline: 2.2rem; font-size: 1.1rem; border-radius: 16px; }
.btn--sm { min-height: 38px; padding: .35rem .85rem; font-size: .84rem; border-radius: 10px; }
.btn--block { width: 100%; justify-content: flex-start; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy > span::after { content: ''; display: inline-block; width: .9em; height: .9em; margin-left: .6rem; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -.1em; }

.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--r-700); transition: .2s; -webkit-tap-highlight-color: transparent; }
.icon-btn:hover { background: var(--r-50); border-color: var(--r-300); }
.icon-btn--primary { background: linear-gradient(180deg, var(--r-500), var(--r-700)); color: #fff; border-color: transparent; }
.icon-btn--primary:hover { filter: brightness(1.1); background: linear-gradient(180deg, var(--r-500), var(--r-700)); }
.icon-btn--sm { width: 34px; height: 34px; border-radius: 9px; }
.icon-btn.is-rec { background: var(--r-500); color: #fff; animation: pulse 1.2s infinite; }

.chip, .chip-btn { display: inline-flex; align-items: center; gap: .4rem; border: 1.5px solid var(--r-200); background: var(--r-50); color: var(--r-800); font-size: .82rem; font-weight: 600; padding: .4rem .8rem; border-radius: 999px; transition: .2s; }
.chip:hover, .chip-btn:hover { background: var(--r-100); border-color: var(--r-400); transform: translateY(-1px); }
.chip-btn { padding: .3rem .7rem; font-size: .78rem; }
.badge { font-family: var(--font-body); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .22rem .6rem; border-radius: 999px; background: var(--paper-2); color: var(--muted); border: 1px solid var(--line); margin-left: auto; }
.badge--on { background: linear-gradient(120deg, var(--r-700), var(--vermilion)); color: #fff; border-color: transparent; }
.pill { display: inline-block; padding: .15rem .7rem; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.pill--st { background: linear-gradient(120deg, var(--r-700), var(--r-500)); color: #fff; }
.tag { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: .28rem .65rem; border-radius: 6px; flex: none; }
.tag--res { background: var(--r-100); color: var(--r-700); }
.tag--esc { background: #ecf7d8; color: #7a5410; }
.role { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; padding: .22rem .6rem; border-radius: 6px; }
.role--a { background: var(--r-100); color: var(--r-700); }
.role--b { background: #172b22; color: #dff4e2; }
.count { margin-left: auto; min-width: 2rem; height: 2rem; padding: 0 .6rem; display: inline-grid; place-items: center; border-radius: 999px; background: var(--r-100); color: var(--r-700); font-weight: 800; font-size: .85rem; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--gold-2); animation: spin .8s linear infinite; }
.typing { display: inline-flex; gap: 4px; vertical-align: middle; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--r-500); animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 1.3rem; position: relative; background-image: var(--tex-hatch); }
.card--tex { background: linear-gradient(160deg, #fff, #f6fcf7); background-image: var(--tex-rosette-dark), linear-gradient(160deg, #fff, #f6fcf7); }
.card--soft { background: linear-gradient(160deg, var(--r-50), #fff); }

.greca {
  height: 16px;
  background: var(--tex-greca) repeat-x 0 center / 48px 16px;
  opacity: .85;
  animation: greca-flow 8s linear infinite;
}
@keyframes greca-flow {
  from { background-position: 0 center; }
  to { background-position: 48px center; }
}
.greca--gold { opacity: 1; }

.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty--big { padding: 3rem 1rem; }
.empty__ico { width: 72px; height: 72px; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 50%; background: var(--r-100); color: var(--r-600); font-size: 1.8rem; }
.empty h2 { color: var(--r-800); margin-bottom: .4rem; }

/* ------------------------------------------------------------ formularios */
.field { position: relative; }
.field label, .field .label { display: block; font-weight: 700; font-size: .86rem; color: var(--r-800); margin-bottom: .38rem; }
.req { color: var(--r-500); font-weight: 800; }
input[type=text], input[type=search], input[type=number], select, textarea {
  width: 100%; min-height: 48px; padding: .65rem .9rem; border: 1.5px solid #c8d5cb; border-radius: 12px; background: #fff; color: var(--ink);
  font: inherit; font-size: max(16px, 1rem); transition: border-color .2s, box-shadow .2s, background .2s; appearance: none; -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: #93a198; }
input:hover, select:hover, textarea:hover { border-color: var(--r-300); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--r-500); box-shadow: 0 0 0 4px rgba(191, 31, 59, .16); }
.select { position: relative; }
.select select { padding-right: 2.6rem; cursor: pointer; text-overflow: ellipsis; }
.select::after { content: ''; position: absolute; right: 1rem; top: 50%; width: .55rem; height: .55rem; border-right: 2px solid var(--r-600); border-bottom: 2px solid var(--r-600); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select--sm select { min-height: 40px; padding-block: .4rem; font-size: .9rem; }
.field__hint { font-size: .8rem; color: #37c9a2; margin: .4rem 0 0; line-height: 1.4; }
.field__err { color: #b3202f; font-size: .82rem; font-weight: 700; margin: .35rem 0 0; }
.field__err:empty { display: none; }
.field__err::before { content: '⚠ '; }
.has-err > input, .has-err > .select select, .has-err .seg__in { border-color: #b3202f; background: #fff6f5; }
.has-err > input:focus, .has-err > .select select:focus { box-shadow: 0 0 0 4px rgba(191, 31, 59, .22); }
.has-err { animation: shake .35s; }
textarea { resize: none; min-height: 48px; line-height: 1.4; }

/* ------------------------------------------------------------ toasts */
.toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 3000; display: grid; gap: .5rem; width: min(92vw, 460px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-radius: 12px; background: var(--r-950); color: #fff; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-2); border-left: 4px solid var(--gold); opacity: 0; transform: translateY(12px) scale(.98); transition: .35s cubic-bezier(.2, .9, .3, 1.2); }
.toast.in { opacity: 1; transform: none; }
.toast--ok { border-left-color: #5fd08f; } .toast--warn { border-left-color: #ffb347; }

/* ============================================================ SPLASH */
.splash { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto auto; color: #f4fbf5; isolation: isolate; }
.splash > *:not(.splash__bg) { position: relative; z-index: 2; }
.splash__bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: radial-gradient(1100px 700px at 50% 38%, #1d7449 0%, #15623f 38%, #0c3523 68%, #051910 100%); }
.rosette { position: absolute; left: 50%; top: 42%; width: max(120vmax, 900px); height: max(120vmax, 900px); translate: -50% -50%; fill: none; stroke: var(--gold); stroke-width: .35; stroke-opacity: .32; }
.rosette--a { animation: spin 220s linear infinite; }
.rosette--b { width: max(80vmax, 600px); height: max(80vmax, 600px); stroke: #c7e6cf; stroke-opacity: .22; animation: spin 150s linear infinite reverse; }
.splash__vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 35%, rgba(4, 18, 12, .72) 100%); }
.splash__grain { position: absolute; inset: 0; background-image: var(--tex-grain); background-size: 160px; opacity: .22; mix-blend-mode: soft-light; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 14s ease-in-out infinite; }
.orb--1 { width: 340px; height: 340px; left: -80px; top: 12%; background: #2f9a63; }
.orb--2 { width: 420px; height: 420px; right: -120px; top: 40%; background: #1a7049; animation-delay: -5s; }
.orb--3 { width: 260px; height: 260px; left: 38%; bottom: -80px; background: #96b75d; opacity: .28; animation-delay: -9s; }

.splash__top { display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); }
.splash__mini { font-family: var(--font-display); font-weight: 800; letter-spacing: .3em; font-size: .95rem; color: var(--gold-2); }
.splash__mini span { color: rgba(244, 251, 245, .6); font-weight: 500; letter-spacing: .12em; }
.splash__center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem 1.2rem 1rem; gap: .2rem; }
.seal { position: relative; width: clamp(96px, 16vw, 132px); aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 1rem; animation: sealIn 1.2s cubic-bezier(.2, .9, .2, 1) both; }
.seal::before { content: ''; position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(circle, rgba(200, 223, 159, .35), transparent 65%); animation: pulseGlow 4s ease-in-out infinite; }
.seal__ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed rgba(200, 223, 159, .8); animation: spin 40s linear infinite; }
.seal__emblem { width: 72%; height: 72%; color: var(--gold-2); filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .5)); }
.splash__title { display: flex; flex-direction: column; align-items: center; gap: .35rem; margin: .2rem 0 1rem; }
.splash__acr { font-size: clamp(3.4rem, 12vw, 7rem); font-weight: 800; letter-spacing: .06em; line-height: .95; background: linear-gradient(180deg, #fff 10%, #deeec1 45%, #96b75d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 12px 40px rgba(0, 0, 0, .35); filter: drop-shadow(0 4px 0 rgba(12, 53, 35, .6)); }
.splash__sub { font-family: var(--font-display); font-weight: 500; font-style: italic; font-size: clamp(1.05rem, 2.8vw, 1.7rem); color: #ebf8ed; letter-spacing: .02em; }
.splash__lede { max-width: 640px; font-size: clamp(.98rem, 2vw, 1.12rem); color: rgba(244, 251, 245, .86); margin-bottom: 1.6rem; }
.splash__chips { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; padding: 0; margin: 1.4rem 0 0; }
.splash__chips li { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .85rem; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); font-size: .82rem; backdrop-filter: blur(6px); }
.splash__chips .i { color: var(--gold-2); }
#enter-btn .i { transition: transform .3s; } #enter-btn:hover .i { transform: translateX(5px); }
#enter-btn { animation: breathe 3.2s ease-in-out infinite; }

.splash .communique--splash { width: min(880px, calc(100% - 32px)); margin: 0 auto 1.4rem; background: rgba(7, 33, 21, .55); border: 1px solid rgba(200, 223, 159, .45); color: #ecf9ee; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .7); }
.communique--splash p { margin: 0; font-size: .92rem; }
.communique--splash u { text-decoration-color: var(--gold-2); text-underline-offset: 3px; }
.splash__foot { text-align: center; padding: 0 1rem max(14px, env(safe-area-inset-bottom)); font-size: .78rem; color: rgba(244, 251, 245, .6); }
.splash__foot p { margin: .6rem 0 0; }

.reveal { opacity: 0; transform: translateY(18px); animation: reveal .9s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) forwards; }

/* ============================================================ APP: CABECERA */
.topbar { position: relative; color: #fff; background: linear-gradient(105deg, #082719 0%, #125235 38%, #1a7049 72%, #1d7449 100%); isolation: isolate; box-shadow: 0 10px 30px -14px rgba(12, 53, 35, .8); }
.topbar__tex { position: absolute; inset: 0; z-index: -1; background-image: var(--tex-rosette), var(--tex-grain); background-size: 88px, 160px; mix-blend-mode: soft-light; opacity: .9; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--gold), var(--gold-3), var(--gold), transparent); }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; width: min(1180px, 100%); margin-inline: auto; padding: .85rem max(16px, env(safe-area-inset-right)) .85rem max(16px, env(safe-area-inset-left)); padding-top: max(.85rem, env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: .85rem; color: #fff; text-decoration: none; min-width: 0; }
.brand__seal { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--gold-2); background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .22), rgba(0, 0, 0, .25)); border: 1px solid rgba(200, 223, 159, .6); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .18); transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.brand__seal svg { width: 74%; height: 74%; }
.brand:hover .brand__seal { transform: rotate(360deg); }
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__txt small { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
.brand__txt strong { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; letter-spacing: .1em; }
.brand__txt em { font-size: .78rem; font-style: normal; color: #def4e1; letter-spacing: .04em; }
.topbar__tools { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.clock { display: flex; gap: 1rem; font-size: .72rem; padding: .35rem .8rem; border-radius: 10px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .12); }
.clock span { display: flex; flex-direction: column; line-height: 1.15; }
.clock i { font-style: normal; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-2); font-size: .6rem; }
.clock b { font-family: var(--font-mono); font-weight: 700; font-size: .85rem; }

.timer { display: flex; align-items: center; gap: .55rem; padding: .3rem .85rem .3rem .35rem; border-radius: 999px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(200, 223, 159, .45); transition: .3s; }
.timer__ring { width: 40px; height: 40px; rotate: -90deg; }
.timer__track { fill: none; stroke: rgba(255, 255, 255, .15); stroke-width: 3.2; }
.timer__bar { fill: none; stroke: var(--gold-2); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .3s linear, stroke .3s; }
.timer__txt { display: flex; flex-direction: column; line-height: 1.1; }
.timer__txt i { font-style: normal; font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: #def4e1; }
.timer__txt b { font-family: var(--font-mono); font-size: 1.15rem; letter-spacing: .06em; }
.timer.warn { border-color: #ffb347; } .timer.warn .timer__bar { stroke: #ffb347; }
.timer.crit { border-color: #85d69a; background: rgba(20, 110, 70, .6); animation: pulse 1s infinite; } .timer.crit .timer__bar { stroke: #85d69a; }

.navbar { background: rgba(4, 18, 12, .38); border-top: 1px solid rgba(255, 255, 255, .08); }
.navbar__in { display: flex; gap: .2rem; width: min(1180px, 100%); margin-inline: auto; padding: 0 max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)); overflow-x: auto; scrollbar-width: none; }
.navbar__in::-webkit-scrollbar { display: none; }
.navbar a, .navbar button { position: relative; display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1rem; color: #e9f8eb; background: none; border: 0; text-decoration: none; font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; min-height: 48px; }
.navbar a::after, .navbar button::after { content: ''; position: absolute; left: 1rem; right: 1rem; bottom: 6px; height: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-3)); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.navbar a:hover::after, .navbar button:hover::after, .navbar a:focus-visible::after, .navbar button:focus-visible::after { transform: scaleX(1); }
.navbar a:hover, .navbar button:hover { color: #fff; }
.navbar__exit { margin-left: auto; color: var(--gold-2) !important; }

.ribbon { position: relative; overflow: hidden; background: linear-gradient(90deg, #082719, #125235, #082719); color: var(--gold-3); font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; border-bottom: 1px solid rgba(150, 183, 93, .5); }
.ribbon__track { display: flex; width: max-content; animation: marquee 48s linear infinite; padding: .38rem 0; }
.ribbon__track span { padding-inline: 3rem; white-space: nowrap; position: relative; }
.ribbon__track span::after { content: '◆'; position: absolute; right: -.4rem; color: var(--r-400); }

/* ============================================================ VISTAS */
.view { padding-block: 1.2rem 5rem; animation: viewIn .5s cubic-bezier(.2, .8, .2, 1); }
.communique { position: relative; border: 1px solid #bcd6c3; border-left: 6px solid var(--r-600); border-radius: 14px; padding: 1.05rem 1.25rem 1rem; margin: .4rem 0 1.4rem; background: linear-gradient(180deg, #f6fcf7, #ecf8ee); color: var(--r-800); overflow: hidden; box-shadow: var(--shadow-1); }
.communique::after { content: 'ACADÉMICO'; position: absolute; right: -1.2rem; top: 1.2rem; transform: rotate(14deg); font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; letter-spacing: .1em; color: rgba(40, 136, 88, .06); pointer-events: none; }
.communique__tag { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .28em; font-size: .78rem; padding: .28rem .9rem; border-radius: 999px; color: #fff; background: linear-gradient(100deg, var(--r-700), var(--r-500)); margin-bottom: .6rem; box-shadow: 0 6px 14px -8px rgba(26, 112, 73, .8); }
.communique p { margin: 0 0 .5rem; font-size: .93rem; }
.communique p:last-child { margin: 0; }
.communique--splash .communique__tag { background: linear-gradient(100deg, #96b75d, #c8e29a); color: var(--r-950); }
.communique--splash { border-left-color: var(--gold); }
.communique--splash::after { color: rgba(200, 223, 159, .05); }

.page-title { margin: 1.4rem 0 1.4rem; }
.page-title h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 800; color: var(--r-800); }
.page-title__sub { color: var(--muted); margin: .5rem 0 0; max-width: 720px; }

.search-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.search-card { padding: 0; overflow: hidden; border-radius: 20px; box-shadow: var(--shadow-2); }
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 6px 6px 0; background: linear-gradient(100deg, var(--r-900), var(--r-700)); isolation: isolate; }
.tabs::after { content: ''; position: absolute; inset: 0; z-index: -2; background-image: var(--tex-rosette); background-size: 88px; opacity: .8; }
.tabs__btn { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 54px; padding: .5rem .8rem; border: 0; background: none; color: #e1f5e4; font-weight: 700; font-size: .92rem; transition: color .3s; text-align: center; }
.tabs__btn[aria-selected="true"] { color: var(--r-800); }
.tabs__btn:not([aria-selected="true"]):hover { color: #fff; }
.tabs__ind { position: absolute; z-index: 0; left: 6px; top: 6px; bottom: 0; width: calc(50% - 6px); background: var(--surface); border-radius: 14px 14px 0 0; transition: transform .45s cubic-bezier(.3, 1.2, .4, 1); box-shadow: 0 -6px 14px -8px rgba(0, 0, 0, .5); }
.tabs[data-active="1"] .tabs__ind { transform: translateX(100%); }
.tabs[data-active="1"] .tabs__ind { width: calc(50% - 6px); }

.sform { padding: 1.5rem; }
.sform__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.05rem 1.2rem; }
.field--full { grid-column: 1 / -1; }
.sform > .field--full { margin-bottom: 1.1rem; }
.sform__actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.3rem; }
.sform__note { margin: 1rem 0 0; padding-top: .9rem; border-top: 1px dashed var(--line); font-size: .8rem; color: var(--muted); font-style: italic; }
.sform.is-anim { animation: viewIn .4s; }

.seg-wrap { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .35rem .3rem; padding: 1rem .9rem .8rem; border-radius: 14px; background: linear-gradient(180deg, var(--r-50), #fff); border: 1.5px dashed var(--r-200); }
.seg { display: flex; flex-direction: column; align-items: center; transition: transform .25s; }
.seg.on { transform: translateY(-3px); }
.seg .seg__in { width: calc(var(--len) * 1.05ch + 2rem); min-width: 3rem; padding-inline: .3rem; text-align: center; font-family: var(--font-mono); font-weight: 700; font-size: 1.2rem; letter-spacing: .08em; border-radius: 10px; }
.seg__lbl { margin-top: .4rem; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.seg.on .seg__lbl { color: var(--r-500); }
.seg__hint { font-size: .62rem; color: #86978c; }
.seg__dash { align-self: flex-start; margin-top: .55rem; color: var(--gold); font-weight: 800; font-size: 1.3rem; }
.seg-preview { margin-top: .9rem; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .9rem; padding: .75rem 1rem; border-radius: 12px; color: #e1f5e4; background: linear-gradient(95deg, var(--r-900), var(--r-700)); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.seg-preview output { font-family: var(--font-mono); font-size: 1.1rem; letter-spacing: .1em; color: var(--gold-3); overflow-wrap: anywhere; text-transform: none; }

.captcha { margin-top: 1.3rem; padding: 1rem; border-radius: 14px; border: 1.5px dashed #b6cdbc; background: repeating-linear-gradient(135deg, #f9fdfa 0 10px, #fff 10px 20px); }
.captcha__lbl { font-weight: 700; font-size: .88rem; color: var(--r-800); margin-bottom: .6rem; }
.captcha__row { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.captcha__img { position: relative; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--r-300); line-height: 0; box-shadow: var(--shadow-1); }
.captcha__img canvas { display: block; }
.captcha__scan { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%); transform: translateX(-120%); animation: scan 3.6s ease-in-out infinite; pointer-events: none; }
.captcha__btns { display: flex; gap: .4rem; }
.captcha__in { flex: 1 1 130px; max-width: 200px; text-transform: uppercase; letter-spacing: .3em; font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem !important; text-align: center; }
.captcha.has-err .captcha__in { border-color: #b3202f; background: #fff6f5; }

.side { display: grid; gap: 1.2rem; }
.side h2 { font-size: 1.1rem; color: var(--r-800); display: flex; align-items: center; gap: .55rem; margin-bottom: .6rem; }
.side h2 .i { color: var(--r-500); }
.how__list { list-style: none; counter-reset: s; display: grid; gap: .35rem; padding: 0; margin: .8rem 0; }
.how__list li { counter-increment: s; display: flex; align-items: center; gap: .6rem; font-size: .88rem; padding: .35rem .6rem; border-radius: 9px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); }
.how__list li::before { content: counter(s); width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--r-500), var(--r-700)); color: #fff; font-size: .72rem; font-weight: 800; }
.how__list span { margin-left: auto; color: var(--muted); font-size: .75rem; }
.how__ex { margin: 0; padding: .6rem .8rem; text-align: center; border-radius: 10px; background: var(--r-900); color: var(--gold-3); font-family: var(--font-mono); font-weight: 700; font-size: .9rem; letter-spacing: .06em; overflow-wrap: anywhere; }
.tips p { font-size: .9rem; color: var(--muted); }

/* ---------- migas y acciones */
.case-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin: .6rem 0 1rem; }
.crumbs { display: flex; align-items: center; gap: .55rem; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.crumbs a, .crumbs__btn { color: var(--r-600); font-weight: 700; text-decoration: none; background: none; border: 0; padding: 0; }
.crumbs a:hover, .crumbs__btn:hover { text-decoration: underline; }
.case-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- resultados */
.res-card { padding: 0; overflow: hidden; border-radius: 20px; box-shadow: var(--shadow-2); }
.res-card__head { display: flex; gap: .8rem 1.6rem; flex-wrap: wrap; padding: 1rem 1.3rem; background: linear-gradient(100deg, var(--r-900), var(--r-700)); color: #e1f5e4; font-size: .85rem; }
.stat b { display: inline-grid; place-items: center; min-width: 1.8rem; height: 1.8rem; padding: 0 .4rem; margin-right: .4rem; border-radius: 8px; background: var(--gold-2); color: var(--r-900); font-weight: 800; }
.res-list { list-style: none; margin: 0; padding: 1rem; display: grid; gap: .8rem; }
.res { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: .25s; position: relative; overflow: hidden; }
.res::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--r-500), var(--r-700)); }
.res:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--r-300); }
.res__n { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--r-100); color: var(--r-700); font-weight: 800; }
.res__code { font-weight: 700; font-size: 1.1rem; color: var(--r-700); margin: 0; overflow-wrap: anywhere; }
.res__org { margin: .1rem 0 .3rem; font-weight: 600; }
.res__parts { margin: 0; display: flex; flex-wrap: wrap; gap: .2rem 1rem; font-size: .82rem; color: var(--muted); }
.res-card__foot { margin: 0; padding: .8rem 1.3rem 1.1rem; font-size: .8rem; color: var(--muted); text-align: right; }

/* ============================================================ EXPEDIENTE */
.case-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 22px; padding: 1.7rem 1.6rem 1.4rem; color: #fff; background: linear-gradient(120deg, #082719, #176341 50%, #1d7449); box-shadow: var(--shadow-2); }
.case-hero__tex { position: absolute; inset: 0; z-index: -1; background-image: var(--tex-rosette), var(--tex-grain); background-size: 88px, 160px; mix-blend-mode: soft-light; }
.case-hero::before { content: ''; position: absolute; z-index: -1; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(200, 223, 159, .35), transparent 65%); }
.case-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--gold), var(--gold-3), var(--gold)); }
.case-hero__main { max-width: 78%; }
/* Entrada escalonada y detalles de movimiento de la cabecera del expediente. */
.case-hero { animation: case-arrive .8s cubic-bezier(.2, .75, .3, 1) both; }
.case-hero::before { animation: case-aura 12s ease-in-out infinite alternate; pointer-events: none; }
.case-hero::after { background-size: 200% 100%; animation: case-gold-flow 7s linear infinite; pointer-events: none; }
.case-hero .eyebrow { animation: case-rise .65s .1s both; }
.case-hero .eyebrow::before { transform-origin: left; animation: case-line .8s .25s both; }
.case-hero .case-code { background: linear-gradient(110deg, #effadd 20%, #fff 40%, #c8df9f 50%, #fff 60%, #effadd 80%); background-size: 240% 100%; background-clip: text; -webkit-background-clip: text; animation: case-rise .8s .2s both, case-code-light 9s 1s ease-in-out infinite; }
.case-hero .case-hero__org { animation: case-rise .7s .35s both; }
.case-hero .chips li { position: relative; overflow: hidden; animation: case-rise .6s .45s both; transition: translate .25s ease, background .25s ease, box-shadow .25s ease; }
.case-hero .chips li:nth-child(2) { animation-delay: .58s; }
.case-hero .chips li:nth-child(3) { animation-delay: .71s; }
.case-hero .chips li::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 25%, rgba(229, 246, 199, .2) 50%, transparent 75%); transform: translateX(-130%); transition: transform .7s ease; pointer-events: none; }
.case-hero .chips li:hover { translate: 0 -3px; background: rgba(255, 255, 255, .18); box-shadow: 0 6px 16px rgba(7, 33, 21, .2); }
.case-hero .chips li:hover::after { transform: translateX(130%); }
.case-hero .chips .i { transition: transform .3s ease; }
.case-hero .chips li:hover .i { transform: rotate(-12deg) scale(1.12); }
.case-hero .stamp { animation: case-stamp .85s .55s cubic-bezier(.2, 1.25, .4, 1) both; transition: rotate .35s ease, background .35s ease, box-shadow .35s ease; }
.case-hero .stamp:hover { rotate: -3deg; background: rgba(200, 223, 159, .12); box-shadow: 0 0 22px rgba(200, 223, 159, .15); }
.case-hero .stamp span { display: inline-block; animation: case-seal-glow 5s 1.5s ease-in-out infinite; }
.case-hero .stp li { --step-delay: .65s; animation: case-rise .6s var(--step-delay) both; }
.case-hero .stp li:nth-child(2) { --step-delay: .8s; }
.case-hero .stp li:nth-child(3) { --step-delay: .95s; }
.case-hero .stp li:nth-child(4) { --step-delay: 1.1s; }
.case-hero .stp li:nth-child(5) { --step-delay: 1.25s; }
.case-hero .stp li:nth-child(6) { --step-delay: 1.4s; }
.case-hero .stp li::before { transform-origin: left; animation: case-line .65s var(--step-delay) both; }
.case-hero .stp li.done::before, .case-hero .stp li.now::before { background-size: 200% 100%; animation: case-line .65s var(--step-delay) both, case-gold-flow 5s 2s linear infinite; }
.case-hero .stp__dot { transition: transform .25s ease, box-shadow .25s ease; }
.case-hero .stp li:hover .stp__dot { transform: scale(1.2); box-shadow: 0 0 0 5px rgba(200, 223, 159, .18), 0 0 18px rgba(200, 223, 159, .4); }
@keyframes case-arrive { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes case-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes case-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes case-aura { from { transform: translate(0, 0) scale(1); opacity: .65; } to { transform: translate(-70px, 45px) scale(1.2); opacity: 1; } }
@keyframes case-gold-flow { from { background-position: 200% 0; } to { background-position: 0 0; } }
@keyframes case-code-light { 0%, 20% { background-position: 100% 50%; } 65%, 100% { background-position: 0 50%; } }
@keyframes case-stamp { from { opacity: 0; transform: scale(1.45) rotate(8deg); } 65% { opacity: 1; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
@keyframes case-seal-glow { 0%, 100% { text-shadow: 0 0 0 transparent; } 50% { text-shadow: 0 0 12px rgba(200, 223, 159, .45); } }
.case-code { font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.25rem, 4.4vw, 2.5rem); letter-spacing: .03em; overflow-wrap: anywhere; background: linear-gradient(180deg, #fff, var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.case-hero__org { margin: .3rem 0 .9rem; color: #def4e1; font-weight: 500; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 0 1.3rem; }
.chips li { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); font-size: .82rem; }
.chips .i { color: var(--gold-2); }
.stamp { position: absolute; top: 1.3rem; right: 1.4rem; rotate: -8deg; padding: .45rem 1.1rem; border: 3px double var(--gold-2); border-radius: 8px; color: var(--gold-2); font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .16em; font-size: .95rem; background: rgba(7, 33, 21, .25); animation: stampIn .8s .3s cubic-bezier(.2, 1.6, .4, 1) both; }
.stp { list-style: none; display: flex; padding: 0; margin: 0; counter-reset: st; }
.stp li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: .45rem; font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .55); font-weight: 700; text-align: center; }
.stp li::before { content: ''; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px; background: rgba(255, 255, 255, .2); z-index: 0; }
.stp li:first-child::before { display: none; }
.stp li.done::before, .stp li.now::before { background: linear-gradient(90deg, var(--gold), var(--gold-3)); }
.stp__dot { position: relative; z-index: 1; width: 21px; height: 21px; border-radius: 50%; background: var(--r-800); border: 3px solid rgba(255, 255, 255, .3); }
.stp li.done { color: var(--gold-3); } .stp li.done .stp__dot { background: var(--gold); border-color: var(--gold-3); }
.stp li.now { color: #fff; } .stp li.now .stp__dot { background: #fff; border-color: var(--gold-2); box-shadow: 0 0 0 5px rgba(200, 223, 159, .35); animation: pulseDot 2s infinite; }

.case-nav { position: sticky; top: 8px; z-index: 40; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; padding: .35rem; margin: 1.1rem auto 1.2rem; width: fit-content; max-width: 100%; border-radius: 999px; background: rgba(249, 253, 250, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.case-nav::-webkit-scrollbar { display: none; }
.case-nav a { padding: .5rem 1rem; border-radius: 999px; text-decoration: none; color: var(--r-800); font-weight: 700; font-size: .84rem; white-space: nowrap; transition: .25s; }
.case-nav a:hover { background: var(--r-100); }
.case-nav a.on { background: linear-gradient(180deg, var(--r-500), var(--r-700)); color: #fff; }
.case-body { display: grid; gap: 1.3rem; }

.sec__h { display: flex; align-items: center; gap: .75rem; padding-bottom: .9rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.sec__h h2 { font-size: 1.3rem; color: var(--r-800); }
.sec__ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--r-500), var(--r-800)); box-shadow: 0 8px 16px -10px rgba(26, 112, 73, .9); }
.sec__ico--ai { background: linear-gradient(145deg, var(--vermilion), var(--r-800)); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem 1rem; margin: 0; }
.kv__i { padding: .6rem .85rem; border-radius: 10px; background: linear-gradient(90deg, var(--r-50), transparent); border-left: 3px solid var(--r-300); }
.kv__i--wide { grid-column: 1 / -1; }
.kv dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--r-600); }
.kv dd { margin: .1rem 0 0; font-weight: 600; overflow-wrap: anywhere; }

.ai-card { overflow: hidden; background: linear-gradient(135deg, #082719, #125235 55%, #1a7049); color: #fff; border-color: transparent; }
.ai-card__bg { position: absolute; inset: 0; background-image: var(--tex-rosette), var(--tex-grain); background-size: 88px, 160px; mix-blend-mode: soft-light; pointer-events: none; }
.ai-card::before { content: ''; position: absolute; width: 360px; height: 360px; right: -100px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(74, 199, 120, .55), transparent 65%); animation: float 9s ease-in-out infinite; }
.ai-card > * { position: relative; }
.ai-card .sec__h { border-color: rgba(255, 255, 255, .18); } .ai-card .sec__h h2 { color: #fff; }
.ai-card__lede { color: #e1f5e4; max-width: 640px; }
.ai-card__out { margin: 1rem 0; padding: 1rem 1.2rem; border-radius: 14px; background: rgba(255, 255, 255, .96); color: var(--ink); box-shadow: var(--shadow-2); }
.ai-card__out p:last-child { margin: 0; }
.ai-card__act { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.ai-card .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .4); } .ai-card .btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.ai-card .btn--primary { background: linear-gradient(180deg, #d6ebb3, #96b75d); color: var(--r-950); }

.tblwrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; padding: .8rem 1rem; background: linear-gradient(100deg, var(--r-800), var(--r-600)); color: #fff; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.tbl td { padding: .8rem 1rem; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:nth-child(even) { background: var(--r-50); }
.tbl tbody tr { transition: background .2s; } .tbl tbody tr:hover { background: var(--r-100); }
.ph { width: 56px; height: 56px; padding: 0; border: 2px solid #fff; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px var(--r-300), var(--shadow-1); background: var(--r-100); transition: transform .3s, box-shadow .3s; }
.ph:hover { transform: scale(1.12) rotate(-3deg); box-shadow: 0 0 0 3px var(--r-500), var(--shadow-1); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

.seg-tools { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.2rem; }
.seg-tools__q { position: relative; flex: 1 1 240px; }
.seg-tools__q .i { position: absolute; left: .9rem; top: 50%; translate: 0 -50%; color: var(--r-500); pointer-events: none; }
.seg-tools__q input { padding-left: 2.6rem; min-height: 42px; }
.seg-tools .select { flex: 0 1 230px; }

.timeline { display: grid; gap: 1.1rem; }
.act { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: .8rem; animation: viewIn .45s both; }
.act__rail { position: relative; display: flex; justify-content: center; }
.act__rail::before { content: ''; position: absolute; top: 46px; bottom: -20px; width: 2px; background: repeating-linear-gradient(var(--r-300) 0 6px, transparent 6px 11px); }
.act:last-child .act__rail::before { display: none; }
.act__n { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: radial-gradient(circle at 30% 25%, var(--r-400), var(--r-700)); box-shadow: 0 0 0 5px var(--r-100), 0 8px 16px -8px rgba(26, 112, 73, .8); position: relative; z-index: 1; }
.act__card { border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; background: #fff; box-shadow: var(--shadow-1); transition: box-shadow .3s, transform .3s, border-color .3s; min-width: 0; }
.act__card:hover { box-shadow: var(--shadow-2); border-color: var(--r-300); transform: translateY(-2px); }
.act__head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; margin-bottom: .8rem; }
.act__title { font-size: 1.08rem; color: var(--r-800); overflow-wrap: anywhere; }
.act__head small { color: var(--muted); font-weight: 600; }
.act__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem .9rem; margin: 0 0 .9rem; padding: .8rem; border-radius: 12px; background: var(--paper-2); }
.act__grid dt { font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--r-600); }
.act__grid dd { margin: 0; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.act__txt { margin: 0 0 .5rem; font-size: .93rem; }
.act__txt b { color: var(--r-700); }
.act__actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; }

.ai-inline { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid var(--r-200); background: linear-gradient(135deg, #f7fcf7, #ebf8ed); position: relative; overflow: hidden; animation: viewIn .4s; }
.ai-inline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--vermilion), var(--r-700)); }
.ai-inline__h { display: flex; align-items: center; gap: .5rem; color: var(--r-700); margin-bottom: .5rem; }
.ai-inline__b p { margin: 0 0 .5rem; font-size: .92rem; } .ai-inline__b ul, .ai-inline__b ol { margin: 0 0 .5rem; padding-left: 1.2rem; font-size: .92rem; }
.ai-inline__b h4 { font-size: 1rem; color: var(--r-700); margin: .4rem 0; }
.ai-inline__t { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.ai-inline__load { display: flex; align-items: center; gap: .6rem; color: var(--r-700); font-weight: 600; font-size: .9rem; }

.notifs { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px dashed var(--r-200); display: grid; gap: .7rem; }
.notifs h4 { font-family: var(--font-body); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--r-600); display: flex; align-items: center; gap: .45rem; }
.notif { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--line); border-left: 4px solid var(--r-500); border-radius: 12px; background: #fafdfa; }
.notif__id { grid-column: 1 / -1; color: var(--r-600); font-weight: 800; font-size: .88rem; letter-spacing: .02em; display: flex; align-items: center; gap: .45rem; }
.notif__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .4rem 1rem; margin: 0; }
.notif__grid dt { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.notif__grid dd { margin: 0; font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }

.pager { display: flex; gap: .35rem; justify-content: center; flex-wrap: wrap; margin-top: 1.3rem; }
.pager button { min-width: 42px; height: 42px; padding: 0 .6rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; color: var(--r-700); transition: .2s; }
.pager button:hover:not(:disabled) { background: var(--r-50); border-color: var(--r-300); }
.pager button.on { background: linear-gradient(180deg, var(--r-500), var(--r-700)); color: #fff; border-color: transparent; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================ PIE */
.footer { color: #e1f5e4; background: linear-gradient(180deg, #0c3523, #051910); position: relative; isolation: isolate; }
.footer::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: var(--tex-rosette), var(--tex-grain); background-size: 88px, 160px; mix-blend-mode: soft-light; opacity: .8; }
.footer__in { width: min(1180px, 100%); margin-inline: auto; padding: 1.6rem max(16px, env(safe-area-inset-right)) 2rem max(16px, env(safe-area-inset-left)); display: grid; gap: .6rem; }
.footer__brand { display: flex; align-items: center; gap: .9rem; }
.footer__emb { width: 52px; height: 52px; color: var(--gold-2); }
.footer__brand strong { font-family: var(--font-display); letter-spacing: .2em; color: #fff; }
.footer__brand p { margin: 0; font-size: .85rem; }
.footer__legal { margin: 0; font-size: .78rem; color: rgba(225, 245, 228, .75); max-width: 820px; }

/* ============================================================ MODALES */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.modal__backdrop { position: absolute; inset: 0; background: rgba(7, 33, 21, .66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .25s; }
.modal__panel { position: relative; width: min(100%, 640px); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-2); overflow: hidden; animation: pop .35s cubic-bezier(.2, 1.1, .3, 1); }
.modal__panel--md { width: min(100%, 700px); } .modal__panel--sm { width: min(100%, 440px); }
.modal__panel::before { content: ''; height: 5px; flex: none; background: linear-gradient(90deg, var(--r-800), var(--r-500), var(--gold), var(--r-500), var(--r-800)); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--r-50), #fff); }
.modal__head h2 { font-size: 1.15rem; color: var(--r-700); letter-spacing: .01em; overflow-wrap: anywhere; }
.modal__body { padding: 1.2rem 1.3rem; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal__foot { display: flex; justify-content: flex-end; padding: .9rem 1.3rem; border-top: 1px solid var(--line); background: var(--paper-2); }

.faq details { border: 1px solid var(--line); border-radius: 12px; margin-bottom: .6rem; background: #fff; overflow: hidden; }
.faq summary { cursor: pointer; padding: .9rem 2.6rem .9rem 1rem; font-weight: 700; color: var(--r-800); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 1rem; top: 50%; translate: 0 -50%; font-size: 1.4rem; color: var(--r-500); transition: .3s; }
.faq details[open] summary { background: var(--r-50); } .faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0; padding: .2rem 1rem 1rem; color: var(--muted); }
.guide { display: grid; gap: .9rem; }
.guide__step { display: flex; gap: 1rem; padding: 1rem; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(90deg, var(--r-50), #fff); }
.guide__n { flex: none; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; background: linear-gradient(145deg, var(--r-500), var(--r-800)); box-shadow: 0 0 0 4px var(--r-100); }
.guide h3 { font-size: 1.05rem; color: var(--r-800); margin-bottom: .2rem; } .guide p { margin: 0; color: var(--muted); font-size: .92rem; }

.nd__top { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem 1.2rem; margin: 0 0 1rem; }
.nd__top dt, .nd__foot b { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--r-600); font-weight: 800; }
.nd__top dd { margin: .1rem 0 0; font-weight: 600; }
.nd__h { margin: 1.1rem 0 .5rem; padding: .55rem .9rem; border-radius: 10px 10px 0 0; background: linear-gradient(100deg, var(--r-800), var(--r-600)); color: #fff; font-family: var(--font-body); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.nd__h:first-of-type { margin-top: .4rem; }
.nd__box { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; margin-top: -.5rem; }
.nd__row { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem .9rem; font-size: .9rem; }
.nd__row + .nd__row { border-top: 1px solid var(--line); }
.nd__row > span:last-child { font-weight: 600; text-align: right; }
.days { display: inline-block; margin-left: .7rem; padding: .08rem .55rem; border-radius: 999px; background: var(--r-100); color: var(--r-700); font-size: .74rem; font-weight: 700; }
.nd__foot { margin-top: 1rem; } .nd__foot p { margin: 0 0 .3rem; }
/* Notificaciones: detalle sin visor, con trazabilidad y entrada progresiva. */
.nd__success { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.2rem; padding: 1rem; border: 1px solid #bde1ce; border-radius: 16px; background: linear-gradient(115deg, #eaf8f0, #f8fffb); color: #176341; animation: notif-appear .4s both; }
.nd__success > .i { width: 32px; height: 32px; flex: none; padding: 7px; border-radius: 50%; background: #247c55; color: white; box-shadow: 0 0 0 5px #d8f0e2; }
.nd__success div { flex: 1; }
.nd__success strong, .nd__success small { display: block; }
.nd__success small { font-size: .72rem; margin-top: .2rem; }
.nd__success > span { font-size: .72rem; font-weight: 800; padding: .35rem .65rem; border-radius: 20px; background: #d6efdf; }
.nd__dispatch { margin-top: 1.2rem; padding: 1.1rem; border: 1px solid #cce0d1; border-radius: 16px; background: linear-gradient(130deg, #fbfef7, #f7fcf7); }
.nd__dispatch h3 { display: flex; gap: .5rem; align-items: center; margin: 0 0 .9rem; font-size: .95rem; color: var(--r-800); }
.nd__dispatch dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem 1.3rem; }
.nd__dispatch dt { color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-size: .62rem; font-weight: 800; }
.nd__dispatch dd { margin: .25rem 0 0; font-size: .82rem; font-weight: 600; overflow-wrap: anywhere; }
.nd__dispatch > p { border-top: 1px dashed #c4d8c9; padding-top: .8rem; margin: .9rem 0 0; font-size: .76rem; color: var(--muted); line-height: 1.6; }
.nd__time { display: inline-block; margin-left: .45rem; color: var(--muted); font-size: .68rem; font-weight: 500; }
@media (max-width: 560px) { .nd__success { flex-wrap: wrap; } .nd__success > span { margin-left: 2.8rem; } }
.notif { background: linear-gradient(125deg, #fff, #f6fcf7); box-shadow: 0 4px 16px rgba(18, 82, 53,.045); transition: transform .22s, box-shadow .22s, border-color .22s; animation: notif-appear .38s both; animation-delay: var(--notif-delay, 0ms); }
.notif:hover { transform: translateY(-2px); border-color: var(--r-300); box-shadow: 0 9px 24px rgba(18, 82, 53,.09); }
.notif__id > .i { padding: .35rem; box-sizing: content-box; background: #ebf8ed; border-radius: 10px; }
.notif__btns { display: flex; justify-content: flex-end; }
.nd__header { background: linear-gradient(120deg, #f8fcf8, #fff); }
.nd__header h2 { overflow-wrap: anywhere; }
.nd__eyebrow { display: flex; align-items: center; gap: .4rem; margin: 0 0 .35rem; color: var(--r-600); font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nd__overview { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.1rem; padding: .9rem 1rem; background: #f4fbf5; border: 1px solid var(--line); border-radius: 14px; }
.nd__overview strong { font-size: .82rem; overflow-wrap: anywhere; }
.nd__badge { display: inline-flex; gap: .4rem; align-items: center; padding: .4rem .7rem; border-radius: 30px; background: #e3f2e5; color: var(--r-800); font-weight: 700; font-size: .72rem; }
.nd-panel .nd__top > div { border-left: 3px solid var(--r-500); padding: .3rem .8rem; }
.nd__coverage { margin: 1rem 0; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 14px; }
.nd__coverage > div:first-child { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .78rem; }
.nd__coverage span { color: var(--muted); }
.nd__coverage p { margin: .5rem 0 0; color: var(--muted); font-size: .7rem; }
.nd__track { height: 7px; margin-top: .65rem; border-radius: 20px; overflow: hidden; background: #e6f1e7; }
.nd__track i { display: block; width: var(--coverage); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--r-800), var(--r-500), #99b864); animation: notif-progress .7s ease-out both; }
.nd-panel .nd__row { align-items: center; animation: notif-appear .4s both; animation-delay: var(--notif-delay, 0ms); }
.nd__label { display: flex; align-items: center; gap: .65rem; }
.nd__label i { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #e9f1ea; color: #74897e; }
.nd__row--known .nd__label i { background: #e6f4ec; color: #19784c; }
.nd__label .i { width: 14px; height: 14px; }
.nd__missing { font-style: normal; font-size: .72rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.nd-panel .nd__row > span:last-child { flex: none; }
.nd-panel .nd__foot { padding: .85rem 1rem; border-radius: 12px; background: #f3fbf4; border: 1px solid #cce0d1; }
@keyframes notif-appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes notif-progress { from { width: 0; } to { width: var(--coverage); } }
@media (max-width: 560px) { .nd-panel .nd__row { align-items: flex-start; flex-direction: column; gap: .4rem; } .nd-panel .nd__row > span:last-child { padding-left: 2.3rem; text-align: left; } }
@media (prefers-reduced-motion: reduce) { .notif, .nd-panel .nd__row, .nd__track i { animation: none; transition: none; } .notif:hover { transform: none; } }
.photo { text-align: center; }
.photo img { width: min(100%, 360px); aspect-ratio: 1; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow-2); margin-bottom: .8rem; border: 4px solid #fff; outline: 1px solid var(--line); }

/* ============================================================ DRAWERS */
.fabs { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 64px); z-index: 850; display: flex; flex-direction: column; gap: .6rem; align-items: flex-end; transition: right .35s cubic-bezier(.2, .8, .2, 1); }
.fab { display: inline-flex; align-items: center; gap: .55rem; height: 56px; padding: 0 1.1rem 0 1rem; border: 0; border-radius: 999px; color: #fff; font-weight: 700; font-size: .88rem; box-shadow: 0 14px 30px -10px rgba(7, 33, 21, .8), inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .25s, filter .2s; -webkit-tap-highlight-color: transparent; }
.fab:hover { transform: translateY(-3px); filter: brightness(1.08); }
.fab .i { width: 1.5rem; height: 1.5rem; }
.fab--ai { background: linear-gradient(120deg, #12452e, #1d7449 55%, #2f9a63); }
.fab--a11y { background: linear-gradient(180deg, #2bcaa0, #1b8669); }
.fab--a11y.is-active::after { content: ''; position: absolute; width: 14px; height: 14px; right: 2px; top: 2px; border-radius: 50%; background: #b6e663; border: 2px solid #fff; }
.fab { position: relative; }
.fab .i { transform-box: fill-box; transform-origin: center; }
.fab--ai .i { animation: fab-sparkle 4.5s ease-in-out infinite; }
.fab--a11y .i { transform-origin: 50% 80%; animation: fab-greeting 5.5s ease-in-out infinite; }
.fab--ai:hover .i, .fab--ai:focus-visible .i { animation: fab-sparkle 1.4s ease-in-out infinite; }
.fab--a11y:hover .i, .fab--a11y:focus-visible .i { animation: fab-greeting 1.8s ease-in-out infinite; }
.fab:active { transform: translateY(0) scale(.97); }
@keyframes fab-sparkle {
  0%, 65%, 100% { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 0 transparent); }
  20% { transform: rotate(-16deg) scale(.92); }
  38% { transform: rotate(20deg) scale(1.18); filter: drop-shadow(0 0 5px rgba(227, 245, 195, .65)); }
  52% { transform: rotate(-8deg) scale(1.05); }
}
@keyframes fab-greeting {
  0%, 60%, 100% { transform: translateY(0) rotate(0deg); }
  15% { transform: translateY(-3px) rotate(-10deg); }
  27% { transform: translateY(-3px) rotate(10deg); }
  39% { transform: translateY(-2px) rotate(-7deg); }
  50% { transform: translateY(0) rotate(4deg); }
}
body[data-view="splash"] .fab--ai { display: none; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 900; display: flex; flex-direction: column; background: var(--surface); box-shadow: -24px 0 60px -24px rgba(7, 33, 21, .6); transform: translateX(105%); visibility: hidden; transition: transform .4s cubic-bezier(.2, .8, .2, 1), visibility 0s .4s; border-left: 1px solid var(--line); }
.drawer[data-open] { transform: none; visibility: visible; transition-delay: 0s; }
.drawer__head { display: flex; align-items: center; gap: .8rem; padding: max(.9rem, env(safe-area-inset-top)) 1rem .9rem 1.1rem; color: #fff; background: linear-gradient(105deg, #082719, #1a7049); position: relative; isolation: isolate; }
.drawer__head::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: var(--tex-rosette); background-size: 88px; }
.drawer__head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-3), var(--gold)); }
.drawer__head .icon-btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }
.drawer__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, var(--vermilion), var(--r-600)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.drawer__icon--a { background: linear-gradient(145deg, #3fefc0, #1b8669); }
.drawer__ttl { flex: 1; min-width: 0; } .drawer__ttl h2 { font-size: 1.25rem; } .drawer__ttl small { color: #def4e1; font-size: .76rem; }
.drawer--a11y .drawer__head { background: linear-gradient(105deg, #14563e, #2bcaa0); }
.drawer--a11y .drawer__ttl small { color: #d3fbf1; }

.ai-status { display: flex; align-items: center; gap: .5rem; padding: .55rem 1rem; font-size: .78rem; font-weight: 600; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.ai-status .dot { width: 9px; height: 9px; border-radius: 50%; background: #aaa; flex: none; }
.ai-status.is-on .dot { background: #2fb36d; box-shadow: 0 0 0 4px rgba(47, 179, 109, .2); animation: pulse 2s infinite; }
.ai-status.is-off .dot { background: #e0a030; }
.ai-status.is-off { flex-wrap: wrap; gap: .6rem; background: #f6fcec; }
.ai-offline-badge { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .7rem; margin-bottom: .4rem; border: 1px solid #bad789; border-radius: 11px; color: #704712; background: linear-gradient(120deg, #f6fcec, #e8f7cd); font-size: .78rem; box-shadow: 0 3px 10px rgba(145, 95, 20, .12); animation: offline-appear .35s ease-out; }
.ai-offline-badge .i { animation: offline-float 3s ease-in-out infinite; }
.ai-status .ai-offline-badge { margin: 0; flex: none; }
@keyframes offline-appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes offline-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.ai-level { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: .7rem 1rem 0; padding: 4px; border-radius: 12px; background: var(--r-100); }
.ai-level button { border: 0; background: none; padding: .45rem; border-radius: 9px; font-size: .8rem; font-weight: 700; color: var(--r-700); transition: .2s; }
.ai-level button[aria-checked="true"] { background: #fff; box-shadow: var(--shadow-1); color: var(--r-800); }
.ai-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .8rem; background: var(--tex-hatch), var(--paper); -webkit-overflow-scrolling: touch; }
.msg { display: flex; gap: .55rem; max-width: 92%; animation: viewIn .35s; }
.msg--user { align-self: flex-end; }
.msg--user .msg__b { background: linear-gradient(135deg, var(--r-600), var(--r-800)); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg--bot .msg__b { background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; box-shadow: var(--shadow-1); }
.msg__av { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, var(--vermilion), var(--r-700)); color: #fff; font-size: .9rem; }
.msg__b { padding: .7rem .95rem; font-size: .92rem; overflow-wrap: anywhere; min-width: 0; }
.msg__b p { margin: 0 0 .5rem; } .msg__b p:last-child { margin: 0; } .msg__b ul, .msg__b ol { margin: 0 0 .5rem; padding-left: 1.2rem; } .msg__b h4 { font-size: .98rem; color: var(--r-700); margin: .3rem 0; }
.msg__b code { font-family: var(--font-mono); font-size: .85em; background: var(--r-100); padding: .05em .35em; border-radius: 5px; }
.msg__tools { display: flex; gap: .4rem; margin-top: .6rem; flex-wrap: wrap; }
.ai-chips { display: flex; gap: .4rem; overflow-x: auto; padding: .6rem 1rem; scrollbar-width: none; border-top: 1px solid var(--line); background: #fff; }
.ai-chips::-webkit-scrollbar { display: none; } .ai-chips .chip { white-space: nowrap; flex: none; }
.ai-form { display: flex; gap: .5rem; align-items: flex-end; padding: .6rem 1rem .5rem; background: #fff; }
.ai-form textarea { flex: 1; max-height: 120px; border-radius: 14px; }
.ai-foot { margin: 0; padding: 0 1rem max(.7rem, env(safe-area-inset-bottom)); font-size: .7rem; color: var(--muted); text-align: center; background: #fff; }

/* ---------- accesibilidad (panel) */
.a11y__body { flex: 1; overflow-y: auto; padding: 1rem; display: grid; grid-auto-rows: max-content; gap: .7rem; align-content: start; background: #f7fefc; -webkit-overflow-scrolling: touch; }
.a11y__foot { display: flex; gap: .6rem; padding: .8rem 1rem max(.8rem, env(safe-area-inset-bottom)); border-top: 1px solid #d8f5ed; background: #fff; justify-content: space-between; }
.a11y__foot .btn--primary { background: linear-gradient(180deg, #3fefc0, #1b8669); box-shadow: none; }
.drawer--a11y .btn--soft { background: #e5fdf7; color: #14563e; } .drawer--a11y .btn--ghost { color: #1b8669; border-color: #bdf0e3; }
.a-presets h3 { font-family: var(--font-body); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #1b8669; margin-bottom: .5rem; }
.a-presets__g { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; }
.preset { display: flex; align-items: center; gap: .5rem; padding: .6rem .7rem; border: 1.5px solid #cdf6eb; border-radius: 12px; background: #fff; color: #14563e; font-weight: 700; font-size: .8rem; text-align: left; transition: .2s; }
.preset:hover { background: #ebfdf8; border-color: #3fefc0; transform: translateY(-1px); }
.preset .i { color: #3fefc0; font-size: 1.2rem; }
.a-sec { background: #fff; border: 1px solid #d8f5ed; border-radius: 14px; overflow: hidden; }
.a-sec summary { display: flex; align-items: center; gap: .6rem; padding: .8rem .9rem; cursor: pointer; font-weight: 800; color: #14563e; list-style: none; }
.a-sec summary::-webkit-details-marker { display: none; }
.a-sec__i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #e5fdf7; color: #3fefc0; }
.a-sec__c { margin-left: auto; transition: transform .3s; } .a-sec[open] .a-sec__c { transform: rotate(180deg); }
.a-sec__b { padding: .2rem .9rem 1rem; display: grid; gap: .7rem; }
.a-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.a-row--col { flex-direction: column; align-items: stretch; gap: .45rem; }
.a-row__t { display: flex; flex-direction: column; min-width: 0; } .a-row__t b { font-size: .88rem; } .a-row__t small { color: #5e8278; font-size: .76rem; line-height: 1.3; }
.a-row label { display: flex; justify-content: space-between; font-size: .88rem; }
.a-row output { font-family: var(--font-mono); font-weight: 700; color: #3fefc0; }
.a-row > b { font-size: .88rem; }
.sw { position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; border: 0; background: #bbdbd3; transition: background .25s; padding: 0; }
.sw i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.sw[aria-checked="true"] { background: #2bcaa0; } .sw[aria-checked="true"] i { transform: translateX(22px); }
.a-grp { display: flex; flex-wrap: wrap; gap: .4rem; }
.a-grp button { flex: 1 1 auto; padding: .5rem .7rem; border-radius: 10px; border: 1.5px solid #cdf6eb; background: #fff; font-size: .78rem; font-weight: 700; color: #14563e; transition: .2s; }
.a-grp button[aria-checked="true"] { background: #2bcaa0; color: #fff; border-color: #2bcaa0; }
.a-step { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: center; } .a-step output { min-width: 4.5rem; text-align: center; font-size: 1.2rem; }
.a-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.a-voice { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: 10px; background: #e5fdf7; color: #14563e; font-size: .84rem; font-weight: 600; }
.a-voice__dot { width: 10px; height: 10px; border-radius: 50%; background: #e0384a; animation: pulse 1s infinite; flex: none; }
.a-cmds, .a-keys { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; font-size: .8rem; color: #3f655b; }
.a-cmds li { padding: .3rem .6rem; background: #f1fefa; border-radius: 8px; }
.a-keys li { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; border-bottom: 1px dashed #d8f5ed; } .a-keys li span { margin-left: auto; text-align: right; }

/* ============================================================ VISOR PDF */
.modal--pdf { padding: 0; align-items: stretch; }
.pdf { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; background: #1c2923; color: #fff; animation: pop .3s cubic-bezier(.2, 1.1, .3, 1); overflow: hidden; }
.pdf.is-max { position: fixed; inset: 0; z-index: 2; }
.pdf__head { display: flex; align-items: center; gap: .8rem; padding: max(.6rem, env(safe-area-inset-top)) max(.9rem, env(safe-area-inset-right)) .6rem max(.9rem, env(safe-area-inset-left)); background: linear-gradient(100deg, #082719, #1a7049); position: relative; }
.pdf__head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-3), var(--gold)); }
.pdf__ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .12); color: var(--gold-2); flex: none; }
.pdf__ttl { flex: 1; min-width: 0; } .pdf__ttl h2 { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pdf__ttl small { color: #def4e1; font-size: .74rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf__head .icon-btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }
.pdf__bar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; padding: .45rem max(.9rem, env(safe-area-inset-right)) .45rem max(.9rem, env(safe-area-inset-left)); background: #253930; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.pdf__grp { display: flex; align-items: center; gap: .25rem; } .pdf__grp--end { margin-left: auto; }
.tbtn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 40px; height: 40px; padding: 0 .55rem; border: 0; border-radius: 10px; background: transparent; color: #e9f8eb; font-size: .82rem; font-weight: 700; transition: .2s; -webkit-tap-highlight-color: transparent; }
.tbtn:hover { background: rgba(255, 255, 255, .12); } .tbtn[aria-pressed="true"], .tbtn.on { background: rgba(200, 223, 159, .22); color: var(--gold-3); }
.tbtn--ai { background: linear-gradient(120deg, var(--r-700), var(--vermilion)); color: #fff; } .tbtn--ai:hover { filter: brightness(1.15); background: linear-gradient(120deg, var(--r-700), var(--vermilion)); }
.pdf__page { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: #def4e1; }
.pdf__page input { width: 3.4rem; min-height: 36px; padding: .2rem .3rem; text-align: center; background: #16231d; border: 1px solid rgba(255, 255, 255, .25); color: #fff; font-family: var(--font-mono); border-radius: 8px; font-size: 16px; -moz-appearance: textfield; appearance: textfield; }
.pdf__page input::-webkit-outer-spin-button, .pdf__page input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pdf__zoom { min-width: 3.6rem; text-align: center; font-family: var(--font-mono); font-size: .85rem; color: var(--gold-3); }
.pdf__body { flex: 1; min-height: 0; display: flex; position: relative; }
.pdf__thumbs { width: 148px; flex: none; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .7rem; background: #16231d; border-right: 1px solid rgba(255, 255, 255, .08); }
.th { border: 2px solid transparent; background: none; padding: 4px; border-radius: 8px; color: #def4e1; font-size: .72rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; } .th canvas { width: 100%; height: auto; background: #fff; border-radius: 3px; display: block; }
.th.on { border-color: var(--gold); background: rgba(200, 223, 159, .12); } .th:hover { background: rgba(255, 255, 255, .08); }
.pdf__scroll { position: relative; flex: 1; min-width: 0; overflow: auto; padding: 1rem; background: radial-gradient(circle at 50% 0, #31473d, #1c2923 70%); -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
.pdf__scroll:focus-visible { outline-offset: -4px; }
.pdf__pages { display: flex; flex-direction: column; align-items: center; gap: 14px; width: max-content; min-width: 100%; }
.pg { position: relative; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); flex: none; }
.pg canvas { display: block; }
.pg:not(.ready)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, #fff 30%, #e6efe7 50%, #fff 70%); background-size: 200% 100%; animation: skeleton 1.4s infinite; }
.pg__n { position: absolute; right: .5rem; top: .4rem; z-index: 2; font-size: .65rem; font-weight: 800; padding: .1rem .5rem; border-radius: 999px; background: rgba(12, 53, 35, .7); color: #fff; }
.pdf__loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; background: rgba(22, 35, 29, .92); z-index: 5; text-align: center; padding: 1rem; }
.pdf__ai { width: 340px; flex: none; overflow-y: auto; background: #fff; color: var(--ink); border-left: 1px solid var(--line); }
.pdf__ai header { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; background: linear-gradient(180deg, var(--r-50), #fff); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.pdf__ai h3 { font-size: 1rem; color: var(--r-700); display: flex; align-items: center; gap: .5rem; }
.pdf__ai-out { padding: 1rem; } .pdf__ai-out p { margin: 0 0 .6rem; font-size: .9rem; } .pdf__ai-out ul, .pdf__ai-out ol { padding-left: 1.2rem; font-size: .9rem; } .pdf__ai-out h4 { color: var(--r-700); font-size: .98rem; margin: .5rem 0 .3rem; }

/* ============================================================ BLOQUEO */
.lock { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: 1rem; color: #fff; }
.lock__bg { position: absolute; inset: 0; background: radial-gradient(900px 600px at 50% 40%, #1a7049, #082719 70%, #03110b); }
.lock__bg::before { content: ''; position: absolute; inset: 0; background-image: var(--tex-rosette), var(--tex-grain); background-size: 88px, 160px; mix-blend-mode: soft-light; }
.lock__card { position: relative; width: min(100%, 520px); text-align: center; padding: 2.2rem 1.6rem 2rem; border-radius: 24px; background: rgba(4, 18, 12, .55); border: 1px solid rgba(200, 223, 159, .5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 40px 80px -30px #000; animation: pop .5s cubic-bezier(.2, 1.2, .3, 1); }
.lock__icon { width: 84px; height: 84px; margin: 0 auto 1.1rem; display: grid; place-items: center; border-radius: 50%; font-size: 2.2rem; color: var(--gold-2); border: 2px solid var(--gold); background: radial-gradient(circle, rgba(200, 223, 159, .25), transparent 70%); animation: shake 1.2s .3s; }
.lock h2 { font-size: clamp(1.5rem, 5vw, 2rem); color: #fff; margin-bottom: .6rem; }
.lock p { color: #e1f5e4; margin-bottom: 1.4rem; }
.lock .btn--primary { background: linear-gradient(180deg, #d6ebb3, #96b75d); color: var(--r-950); }

/* ============================================================ SELECTOR DE IDIOMA */
.lm { position: relative; }
.lm__btn { display: inline-flex; align-items: center; gap: .4rem; height: 44px; padding: 0 .75rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .25); color: #fff; font-weight: 700; font-size: .82rem; letter-spacing: .06em; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: .2s; }
.lm__btn:hover { background: rgba(255, 255, 255, .16); border-color: var(--gold-2); }
.lm__chev { width: .9em; height: .9em; transition: transform .25s; }
.lm__btn[aria-expanded="true"] .lm__chev { transform: rotate(180deg); }
.lm__list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 1100; min-width: 210px; list-style: none; margin: 0; padding: 6px; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: var(--shadow-2); border: 1px solid var(--line); animation: pop .25s; }
.lm__opt { display: grid; grid-template-columns: 2rem 1fr auto; gap: .5rem; align-items: center; width: 100%; padding: .6rem .65rem; border: 0; background: none; border-radius: 9px; text-align: left; color: var(--ink); font-size: .9rem; }
.lm__opt b { color: var(--r-600); font-family: var(--font-mono); font-size: .8rem; }
.lm__opt .i { opacity: 0; color: var(--r-500); }
.lm__opt[aria-checked="true"] { background: var(--r-50); font-weight: 700; } .lm__opt[aria-checked="true"] .i { opacity: 1; }
.lm__opt:hover { background: var(--r-100); }

/* Ocultar la interfaz nativa del traductor de Google (la reemplaza la nuestra) */
.goog-te-banner-frame, .goog-te-balloon-frame, #goog-gt-tt, .goog-tooltip, .goog-tooltip:hover, .goog-te-gadget,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-suEOdc, .VIpgJd-yAWNEb-L7lbkb, .VIpgJd-ZVi9od-l4eHX-hSRGPd, #goog-gt-tt-wrapper { display: none !important; visibility: hidden !important; }
body { top: 0 !important; }
.skiptranslate { display: none !important; font-size: 0 !important; }
font[style], font { background: transparent !important; box-shadow: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* ============================================================ MODO PRUEBA */
.testbox { position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 860; display: flex; flex-direction: column-reverse; gap: .5rem; align-items: flex-start; }
.testbox__toggle { display: inline-flex; align-items: center; gap: .45rem; height: 42px; padding: 0 .95rem; border-radius: 999px; border: 1.5px dashed var(--gold); background: rgba(7, 33, 21, .92); color: var(--gold-3); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; box-shadow: var(--shadow-2); }
.testbox__menu { width: min(290px, calc(100vw - 28px)); display: grid; gap: .45rem; padding: .8rem; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-2); animation: pop .25s; }
.testbox__ttl { margin: 0 0 .1rem; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--r-600); }
.testbox__toggle { position: relative; overflow: hidden; isolation: isolate; animation: test-glow 3s ease-in-out infinite; transition: transform .25s ease, border-color .25s ease; }
.testbox__toggle::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 25%, rgba(200, 223, 159, .22) 50%, transparent 75%); transform: translateX(-130%); animation: test-shine 6s ease-in-out infinite; }
.testbox__toggle:hover, .testbox__toggle:focus-visible, .testbox__toggle[aria-expanded="true"] { transform: translateY(-3px); border-color: var(--gold-3); }
.testbox__toggle:hover .i { transform: rotate(-12deg); }
.testbox__toggle .i { transition: transform .25s ease; }
.testbox__hint { position: absolute; bottom: calc(100% + 10px); left: 0; width: min(270px, calc(100vw - 28px)); padding: .7rem .85rem; border: 1px solid var(--gold); border-radius: 12px; background: var(--r-950); color: var(--gold-3); font-size: .78rem; line-height: 1.5; box-shadow: var(--shadow-2); opacity: 0; visibility: hidden; transform: translateY(6px); pointer-events: none; transition: opacity .2s ease, transform .2s ease, visibility .2s; }
.testbox__toggle:hover + .testbox__hint, .testbox__toggle:focus-visible + .testbox__hint { opacity: 1; visibility: visible; transform: translateY(0); }
.testbox__toggle[aria-expanded="true"] + .testbox__hint { opacity: 0; visibility: hidden; }
.testbox__note { margin: 0 0 .3rem; font-size: .78rem; line-height: 1.5; color: var(--muted); }
.testbox__fill { animation: test-glow 3s ease-in-out infinite; }
.testbox__fill-hint { display: flex; align-items: center; gap: .6rem; margin: .1rem 0 .35rem; padding: .65rem .75rem; border: 1px solid #bad789; border-radius: 12px; background: linear-gradient(120deg, #f6fcec, #e8f7cd); color: #704712; font-size: .76rem; line-height: 1.45; animation: offline-appear .4s ease-out; }
.testbox__fill-hint > span { display: inline-flex; justify-content: center; align-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--r-700); font-size: 1.25rem; font-weight: 800; animation: test-point 1.8s ease-in-out infinite; }
@keyframes test-point { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
.testbox__menu .btn { transition: transform .2s ease, background .2s ease; }
.testbox__menu .btn:hover { transform: translateX(3px); }
@keyframes test-glow { 0%, 100% { box-shadow: 0 4px 18px rgba(7, 33, 21, .25), 0 0 0 0 rgba(150, 183, 93, 0); } 50% { box-shadow: 0 6px 24px rgba(7, 33, 21, .35), 0 0 0 5px rgba(150, 183, 93, .13); } }
@keyframes test-shine { 0%, 65% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
body[data-view="splash"] .testbox { bottom: max(14px, env(safe-area-inset-bottom)); }

/* ============================================================ RESPONSIVE */
@media (min-width: 900px) {
  .search-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  html.drawer-open .fabs { right: calc(min(440px, 100vw) + 16px); }
  html.drawer-open #app, html.drawer-open #splash { transition: padding-right .35s; }
}
@media (max-width: 899px) {
  .clock { display: none; }
  .drawer { top: auto; left: 0; right: 0; width: 100%; height: min(88dvh, 760px); border-radius: 22px 22px 0 0; transform: translateY(105%); border-left: 0; box-shadow: 0 -24px 60px -20px rgba(7, 33, 21, .6); }
  .drawer__head { border-radius: 22px 22px 0 0; }
  html.drawer-open .fabs { display: none; }
  .pdf__ai { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; max-height: 62%; border-left: 0; border-top: 3px solid var(--gold); box-shadow: 0 -20px 40px -10px rgba(0, 0, 0, .5); z-index: 6; }
  .pdf__thumbs { position: absolute; left: 0; top: 0; bottom: 0; z-index: 6; width: 132px; }
}
@media (max-width: 760px) {
  .topbar__in { gap: .5rem; } .brand__txt strong { font-size: 1.5rem; } .brand__seal { width: 46px; height: 46px; }
  .brand__txt em { display: none; }
  .topbar__tools { gap: .5rem; margin-left: auto; }
  .timer__txt i { display: none; } .timer { padding-right: .7rem; }
  .sform { padding: 1.1rem; } .sform__grid { grid-template-columns: 1fr; }
  .tabs__btn { font-size: .8rem; flex-direction: column; gap: .15rem; min-height: 56px; } .tabs__btn .i { font-size: 1.1rem; }
  .case-hero { padding: 1.3rem 1.1rem 1.1rem; } .case-hero__main { max-width: 100%; }
  .stamp { position: static; display: inline-block; rotate: -3deg; margin-bottom: 1rem; font-size: .8rem; }
  .stp li { font-size: .52rem; letter-spacing: .04em; }
  .res { grid-template-columns: auto 1fr; } .res .btn { grid-column: 1 / -1; }
  .act { grid-template-columns: 34px minmax(0, 1fr); gap: .5rem; } .act__n { width: 32px; height: 32px; font-size: .85rem; box-shadow: 0 0 0 3px var(--r-100); } .act__rail::before { top: 34px; }
  .act__card { padding: .9rem; } .act__head { flex-direction: column-reverse; gap: .4rem; }
  .notif { grid-template-columns: 1fr; } .notif .btn { justify-self: start; }
  .fab__lbl { display: none; } .fab { width: 56px; padding: 0; justify-content: center; }
  .fabs { bottom: calc(max(14px, env(safe-area-inset-bottom)) + 64px); }
  .testbox__toggle span { display: none; } .testbox__toggle { width: 42px; padding: 0; justify-content: center; }
  .modal { align-items: end; padding: 0; } .modal__panel { width: 100% !important; border-radius: 22px 22px 0 0; max-height: 92dvh; }
  .modal--pdf { align-items: stretch; }
  .pdf__bar { gap: .2rem .4rem; padding-inline: .5rem; } .pdf__grp--end { margin-left: 0; } .tbtn--txt span { display: none; } .tbtn--txt.tbtn--ai span { display: inline; }
  .pdf__scroll { padding: .5rem; }
  .kv { grid-template-columns: 1fr; }
  /* tabla -> tarjetas */
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: .8rem; border-top: 1px solid var(--line); } .tbl td { border: 0; padding: .3rem 0; display: grid; grid-template-columns: 9.5rem 1fr; gap: .6rem; align-items: center; }
  .tbl td::before { content: attr(data-label); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--r-600); }
}
@media (max-width: 420px) {
  .a-presets__g { grid-template-columns: 1fr; }
  .tbl td { grid-template-columns: 1fr; gap: .1rem; }
  .splash__chips li { font-size: .74rem; }
  .btn--xl { width: 100%; }
}
@media (hover: none) { .btn::after { display: none; } .act__card:hover, .res:hover { transform: none; } }
@media (orientation: landscape) and (max-height: 520px) { .splash__center { padding-top: .5rem; } .seal { width: 70px; margin-bottom: .4rem; } .splash__acr { font-size: 3rem; } }

/* ============================================================ ANIMACIONES */
@keyframes spin { to { rotate: 360deg; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 30px -40px; } }
@keyframes reveal { to { opacity: 1; transform: none; } }
@keyframes sealIn { from { opacity: 0; transform: scale(.4) rotate(-120deg); } to { opacity: 1; transform: none; } }
@keyframes pulseGlow { 0%, 100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes breathe { 0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 14px 30px -10px rgba(0, 0, 0, .55), 0 0 0 0 rgba(200, 223, 159, .5); } 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 14px 30px -10px rgba(0, 0, 0, .55), 0 0 0 14px rgba(200, 223, 159, 0); } }
@keyframes marquee { to { transform: translateX(-33.333%); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes scan { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 4px rgba(200, 223, 159, .35); } 50% { box-shadow: 0 0 0 9px rgba(200, 223, 159, 0); } }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-6px); opacity: 1; } }
@keyframes stampIn { from { opacity: 0; transform: scale(2.4); } to { opacity: .95; transform: none; } }
@keyframes skeleton { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .ribbon__track { animation: none; }
}

/* ============================================================ IMPRESIÓN */
@media print {
  body { background: #fff !important; }
  .topbar, .navbar, .ribbon, .fabs, .drawer, .testbox, .toasts, .case-actions, .crumbs, .case-nav, .seg-tools, .pager, .act__actions, .ai-card, .footer .footer__brand, .lock, .modal { display: none !important; }
  .card, .act__card { box-shadow: none !important; break-inside: avoid; }
  .case-hero { color: #000 !important; background: #fff !important; border: 2px solid #1a7049; } .case-code { color: #1a7049 !important; -webkit-text-fill-color: #1a7049; }
  .view { padding: 0; }
}

#pdf-scroll:focus { outline: none; }
#pdf-scroll:focus-visible { outline: 2px solid var(--gold-2); outline-offset: -4px; }

@media (max-width: 760px) {
  .stp li:not(.now) .stp__lbl { display: none; }
  .stp li.now .stp__lbl { font-size: .62rem; white-space: nowrap; }
  .stp li.now { flex: 0 0 auto; }
  .stp li { flex: 1; }
}

/* El menú de idioma debe quedar por encima del resto de la página */
.topbar { z-index: 60; }
.splash > .splash__top { z-index: 20; }
.lm__list { z-index: 1200; }
