/* Extracted from analiza.html by scripts/extract-inline-styles.cjs (Phase D.5, 2026-05-29). */
/* Verbatim relocation — cascade preserved. Lets the CSP drop 'unsafe-inline' from style-src. */
:root {
  --bg: #0c0b09;
  --surface: #161513;
  --surface2: #201e1b;
  --surface3: #2a2724;
  --amber: #c9a84c;
  --amber-light: #f2efe8;
  --gold: #c9a84c;
  --gold-glow: rgba(201,168,76,0.15);
  --text: #f2efe8;
  --text-dim: #8a8478;
  --text-muted: #5a5449;
  --green: #7ac07a;
  --green-dim: rgba(122,192,122,0.1);
  --yellow: #d4b26a;
  --yellow-dim: rgba(212,178,106,0.1);
  --red: #d4726a;
  --red-dim: rgba(212,114,106,0.1);
  --cyan: #6ac4c9;
  --cyan-dim: rgba(106,196,201,0.1);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ═══ LAYOUT ═══ */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}
.nav-brand {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--amber);
  text-decoration: none;
  letter-spacing: 0.02em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-brand span { font-size: 1.3em; }
.nav-link {
  font-size: 0.88rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-link:hover { color: var(--amber); }

/* ═══ LANDING ═══ */
#landing {
  text-align: center;
  padding: 16px 0 24px;
  animation: fadeUp 0.6s ease;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--gold-glow);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  font-weight: 500;
}

h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: var(--amber-light);
}
h1 em {
  font-style: italic;
  color: var(--amber);
  font-weight: 400;
}

.lede {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.55;
}

/* ═══ DROPZONE ═══ */
.dropzone {
  display: block; /* <label> defaults to inline; some browsers render the dashed border narrow when block children are inside */
  background: var(--surface);
  border: 2px dashed var(--surface3);
  border-radius: var(--radius);
  padding: 44px 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--amber);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(201,168,76,0.04) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.4), 0 0 0 1px var(--gold-glow);
}
.dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-size: 1.8rem;
}
.dropzone-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.dropzone-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.dropzone-hint strong { color: var(--amber); font-weight: 500; }
#file-input { display: none; }

.disclaimer {
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.disclaimer span { opacity: 0.8; }

.trust-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 48px;
}
.trust-item {
  text-align: center;
  padding: 16px 10px;
}
.trust-icon {
  font-size: 1.3rem;
  margin-bottom: 6px;
  display: block;
}
.trust-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ═══ PROCESSING ═══ */
#processing {
  text-align: center;
  padding: 64px 20px;
  display: none;
  animation: fadeUp 0.4s ease;
}
#processing.active { display: block; }

.spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  border: 3px solid var(--surface3);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.processing-msg {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--amber-light);
  margin-bottom: 6px;
  min-height: 1.8rem;
  transition: opacity 0.3s;
}
.processing-sub {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* ═══ RESULTS ═══ */
#results { display: none; }
#results.active { display: block; }

.panel {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.5s ease;
}
.panel.visible {
  opacity: 1;
  transform: translateY(0);
}
.panel-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 600;
}

/* ═══ PANEL 1: Resumen ═══ */
.resumen-direccion {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--amber-light);
  margin-bottom: 4px;
  line-height: 1.25;
}
.resumen-sub {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.spec {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--surface3);
}
.spec-value {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--amber-light);
  line-height: 1;
  margin-bottom: 4px;
}
.spec-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ═══ PANEL 2: Veredicto ═══ */
#panel-veredicto { padding: 0; overflow: hidden; }
.veredicto-header {
  padding: 28px 24px 20px;
  text-align: center;
  border-bottom: 1px solid var(--surface2);
  position: relative;
}
.veredicto-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.veredicto-badge.green {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(122,192,122,0.3);
}
.veredicto-badge.yellow {
  background: var(--yellow-dim);
  color: var(--yellow);
  border: 1px solid rgba(212,178,106,0.3);
}
.veredicto-badge.red {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(212,114,106,0.3);
}
.veredicto-badge.cyan {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid rgba(106,196,201,0.3);
}

.veredicto-diff {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.8rem, 10vw, 4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.veredicto-diff.green { color: var(--green); }
.veredicto-diff.yellow { color: var(--yellow); }
.veredicto-diff.red { color: var(--red); }
.veredicto-diff.cyan { color: var(--cyan); }

.veredicto-frase {
  font-size: 0.95rem;
  color: var(--text-dim);
  max-width: 460px;
  margin: 10px auto 0;
  line-height: 1.55;
}

.veredicto-table {
  padding: 20px 24px 24px;
  display: grid;
  gap: 10px;
}
.vrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed var(--surface2);
}
.vrow:last-child { border-bottom: none; }
.vrow-label {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.vrow-value {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.vrow-value.hero {
  font-size: 1.5rem;
  color: var(--amber);
}
.fuente {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
}
.fuente strong { color: var(--amber); font-weight: 500; }

/* ═══ PANEL 3: Mapa ═══ */
#map {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  background: var(--surface2);
}
.leaflet-container {
  font-family: 'Instrument Sans', sans-serif !important;
  background: #1a1815;
}
/* Dark theme for Leaflet tiles */
.leaflet-tile-pane {
  filter: brightness(0.6) contrast(1.1) hue-rotate(15deg) saturate(0.75) invert(0.9);
}
.leaflet-control-attribution,
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text-dim) !important;
  border-color: var(--surface3) !important;
}
.leaflet-control-attribution a { color: var(--amber) !important; }
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--surface2) !important;
  color: var(--text) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.leaflet-popup-content {
  font-size: 0.85rem;
  margin: 12px 14px;
}
.leaflet-popup-content strong { color: var(--amber); }

.pin-main {
  width: 30px; height: 30px;
  background: var(--amber);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 3px 10px rgba(201,168,76,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0c0b09;
  font-size: 14px;
  font-weight: 700;
}
.pin-main span { transform: rotate(45deg); }
.pin-comp {
  width: 22px; height: 22px;
  background: var(--cyan);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.map-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-dim);
}
.map-legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.map-legend-dot.main { background: var(--amber); }
.map-legend-dot.comp { background: var(--cyan); }

.map-range {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.map-range-cell {
  background: var(--surface2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.map-range-cell strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  color: var(--amber-light);
  margin-top: 2px;
}
.map-range-cell .tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ═══ PANEL 4: Salud ═══ */
.salud-table {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.salud-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface3);
}
.salud-indicator {
  font-size: 0.9rem;
  color: var(--text);
}
.salud-value {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--amber-light);
  text-align: right;
}
.salud-status {
  font-size: 1rem;
  width: 28px;
  text-align: center;
}
@media (max-width: 400px) {
  .salud-row { grid-template-columns: 1fr auto; }
  .salud-value { grid-column: 2; }
  .salud-status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    font-size: 1.1rem;
  }
  .salud-indicator { grid-column: 1; grid-row: 1 / 3; align-self: center; }
}

/* ═══ CTA ═══ */
#cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}
@media (max-width: 480px) {
  #cta-row { grid-template-columns: 1fr; }
}
.cta-btn {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cta-btn.primary {
  background: var(--amber);
  color: #0c0b09;
}
.cta-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.3);
}
.cta-btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--surface3);
}
.cta-btn.secondary:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ═══ ERROR ═══ */
#error {
  display: none;
  text-align: center;
  padding: 48px 20px;
  animation: fadeUp 0.4s ease;
}
#error.active { display: block; }
.error-icon {
  font-size: 2.6rem;
  margin-bottom: 16px;
}
.error-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  color: var(--red);
  margin-bottom: 10px;
}
.error-msg {
  font-size: 0.95rem;
  color: var(--text-dim);
  max-width: 440px;
  margin: 0 auto 24px;
  line-height: 1.55;
}

/* ═══ TOAST ═══ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface2);
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .container { padding: 20px 16px 60px; }
  .panel { padding: 20px 18px; }
  .veredicto-header { padding: 24px 18px 18px; }
  .veredicto-table { padding: 18px; }
  .map-range { grid-template-columns: 1fr; }
}

/* ═══ PHASE 3 STORY 3.1 — VERDICT CARD + HOOK CARDS (2026-05-28) ═══ */
/* Mock-data verdict UI per PERSUASIVE-DESIGN-PRINCIPLES.md §6 + §9 + §13. */
/* TODO(Phase D): swap mock verdict for functions/ai-avaluo-verdict/ Edge Fn. */
.verdict-card {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  animation: fadeUp 0.4s ease;
}
.verdict-card[data-fallback="honest"] {
  border-color: rgba(106,196,201,0.3);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(106,196,201,0.04) 100%);
}
.verdict-headline { margin-bottom: 14px; }
.verdict-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--amber-light);
}
.verdict-subline {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.55;
}
.verdict-range { margin: 14px 0 12px; }
.verdict-range-svg { width: 100%; height: 32px; }
.verdict-range-track { fill: var(--surface3); }
.verdict-range-band { fill: rgba(201,168,76,0.25); }
.verdict-range-median { stroke: var(--text-dim); stroke-width: 0.6; }
.verdict-range-marker { fill: var(--amber); }
.verdict-range-marker-bajo,
.verdict-range-marker-justo { fill: var(--green); }
.verdict-range-marker-alto { fill: var(--yellow); }
.verdict-range-marker-muy_alto { fill: var(--red); }
.verdict-credibility {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--surface2);
  font-size: 0.82rem;
  color: var(--text-dim);
}
.verdict-credibility-facts { margin-bottom: 4px; }
.verdict-credibility-band { color: var(--text-muted); }
.verdict-method-link,
.verdict-feedback-link {
  display: inline-block;
  margin-top: 10px;
  margin-right: 14px;
  color: var(--amber);
  font-size: 0.85rem;
  text-decoration: none;
}
.verdict-method-link:hover,
.verdict-feedback-link:hover { text-decoration: underline; }

.hook-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.hook-card {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hook-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hook-card-icon { font-size: 1.2rem; }
.hook-card-gift {
  font-family: 'Fraunces', serif;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--amber-light);
  margin: 0;
  line-height: 1.3;
}
.hook-card-ask {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
  cursor: pointer;
}
.hook-card-ask-checkbox {
  margin-top: 2px;
  accent-color: var(--amber);
}
.hook-card-cta {
  background: var(--amber);
  color: #0c0b09;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hook-card-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201,168,76,0.25);
}

/* Phase D.5 (2026-05-31): footer + narrow-CTA classes replacing inline style= attrs. */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  margin-top: 48px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}
.footer-links-row { margin-bottom: 8px; }
.site-footer a.footer-link { color: #c9a84c; text-decoration: underline; text-underline-offset: 2px; }
.site-footer a.footer-link-plain { color: #c9a84c; }
.cta-btn.cta-btn-narrow { max-width: 280px; margin: 0 auto; }
