/**
 * Fijate Tools - Decodificador de símbolos de medicamentos y caducidad tras apertura
 * Estándar canónico, soporte tema oscuro / claro, 100 % responsivo.
 */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Tokens corporativos tema oscuro por defecto */
  --bg-primary: #0b0f17;
  --bg-card: #131b2e;
  --bg-card-header: #19243d;
  --bg-surface: #131b26;
  --bg-surface-elevated: #1a2433;
  --bg-input: #0f172a;
  --bg-subtle: #1e293b;
  --bg-hover: #273549;

  --border-color: #1e293b;
  --border-subtle: #243247;
  --border-focus: #38bdf8;

  --primary-color: #38bdf8;
  --primary-light: rgba(56, 189, 248, 0.14);
  --accent-emerald: #22c55e;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.45);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-header: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-input: #f1f5f9;
  --bg-subtle: #e2e8f0;
  --bg-hover: #e2e8f0;

  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-focus: #0284c7;

  --primary-color: #0284c7;
  --primary-light: rgba(2, 132, 199, 0.12);
  --accent-emerald: #16a34a;
  --accent-amber: #d97706;
  --accent-red: #dc2626;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-subtle: #64748b;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 24px rgba(15, 23, 42, 0.1);
}

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

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-main);
  margin: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.hero-title,
.section-title {
  font-family: var(--font-heading);
}

.mono,
code {
  font-family: var(--font-mono);
}

/* Contención y layout principal */
.tool-layout {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Hero introductorio */
.med-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.hero-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.hero-badge-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: rgba(34, 197, 94, 0.14);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.hero-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

.hero-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.kpi-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
}

.kpi-label {
  font-size: 0.82rem;
  color: var(--text-subtle);
}

/* Pestañas principales */
.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tab-btn {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  min-height: 44px;
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.tab-btn:hover {
  background: var(--bg-card-header);
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.panel-lead {
  margin: 0 0 1.2rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Rejilla de símbolos de farmacia */
.symbols-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.symbol-card-btn {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.35rem;
  min-height: 102px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  color: var(--text-main);
  transition: transform 0.16s ease, border-color 0.18s ease;
}

.symbol-card-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  background: var(--bg-card-header);
}

.symbol-card-btn.active {
  border-color: var(--primary-color);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22);
}

.symbol-short-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  color: var(--text-main);
}

.med-svg {
  display: block;
  flex-shrink: 0;
}

/* Inspector del símbolo */
.symbol-inspector {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.inspector-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.inspector-title-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.inspector-symbol-box {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inspector-code-title {
  margin: 0 0 0.2rem;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-main);
}

.inspector-meta-line {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-subtle);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-pill.safe {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.status-pill.info {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.status-pill.warn {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-pill.critical {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

[data-theme="light"] .status-pill.safe {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

[data-theme="light"] .status-pill.info {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

[data-theme="light"] .status-pill.warn {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}

[data-theme="light"] .status-pill.critical {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.inspector-summary {
  margin: 0 0 0.7rem;
  color: var(--text-main);
  font-size: 0.96rem;
}

.inspector-meaning {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border-left: 3px solid var(--primary-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.inspector-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.detail-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.95rem;
}

.detail-box.box-do {
  border-color: rgba(34, 197, 94, 0.35);
}

.detail-box.box-warn {
  border-color: rgba(245, 158, 11, 0.35);
}

.detail-box.box-dont {
  border-color: rgba(239, 68, 68, 0.35);
}

.detail-box h4 {
  margin: 0 0 0.5rem;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text-main);
}

.detail-box ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.87rem;
}

.detail-box li {
  margin-bottom: 0.32rem;
}

.cross-links-bar {
  margin-top: 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  font-size: 0.88rem;
  color: var(--text-main);
}

.cross-links-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.cross-tool-link {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
}

.cross-tool-link:hover {
  text-decoration: underline;
}

/* Esquema visual del cupón precinto */
.coupon-mockup {
  background: var(--bg-input);
  border: 1.5px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.coupon-card-visual {
  max-width: 440px;
  margin: 0 auto;
  background: #ffffff;
  color: #0f172a;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-sm);
}

.coupon-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 0.35rem;
  margin-bottom: 0.5rem;
}

.coupon-mid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 800;
}

.coupon-barcode-bars {
  height: 28px;
  margin-top: 0.55rem;
  background: repeating-linear-gradient(
    90deg,
    #0f172a 0px,
    #0f172a 2px,
    transparent 2px,
    transparent 5px,
    #0f172a 5px,
    #0f172a 6px,
    transparent 6px,
    transparent 9px
  );
  opacity: 0.85;
}

.coupon-zones-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.coupon-zone-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.coupon-zone-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary-color);
  margin-bottom: 0.35rem;
}

.coupon-zone-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.93rem;
  color: var(--text-main);
}

.coupon-zone-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Calculador de caducidad tras apertura */
.format-selector-label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.format-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 52px;
  padding: 0.65rem 0.85rem;
  text-align: left;
  background: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.format-btn:hover {
  border-color: var(--primary-color);
  background: var(--bg-card-header);
}

.format-btn.active {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.format-btn-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.format-btn-sub {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--primary-color);
  font-weight: 600;
}

.open-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  padding: 0.9rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.date-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 190px;
}

.date-input-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.date-field {
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.94rem;
}

.date-field:focus {
  outline: none;
  border-color: var(--primary-color);
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip-btn {
  appearance: none;
  -webkit-appearance: none;
  min-height: 38px;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.chip-btn:hover,
.chip-btn.active {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.calc-verdict-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
}

.calc-verdict-box.ok {
  border-left: 4px solid var(--accent-emerald);
}

.calc-verdict-box.soon {
  border-left: 4px solid var(--accent-amber);
}

.calc-verdict-box.expired {
  border-left: 4px solid var(--accent-red);
}

.calc-verdict-box.neutral {
  border-left: 4px solid var(--primary-color);
}

.calc-verdict-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.calc-verdict-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.calc-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.calc-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
}

.calc-metric-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-bottom: 0.15rem;
}

.calc-metric-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Buscador de conservación */
.search-bar-box {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.input-field {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  min-height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  padding: 0.6rem 0.9rem;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-secondary {
  min-height: 44px;
  padding: 0.6rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.conservation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.conservation-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.conservation-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.conservation-name {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
}

.photo-badge {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

[data-theme="light"] .photo-badge {
  background: #fef3c7;
  color: #b45309;
}

.conservation-temp {
  font-family: var(--font-mono);
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--primary-color);
}

.conservation-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Test rápido */
.quiz-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.quiz-progress {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-bottom: 0.6rem;
}

.quiz-question {
  margin: 0 0 1rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-option-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 46px;
  text-align: left;
  padding: 0.75rem 1rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.93rem;
  cursor: pointer;
  transition: border-color 0.16s ease;
}

.quiz-option-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  background-color: var(--bg-card-header);
}

.quiz-option-btn:disabled {
  background-color: var(--bg-card);
  color: var(--text-muted);
  opacity: 0.84;
  cursor: default;
}

.quiz-option-btn.correct,
.quiz-option-btn.correct:disabled {
  border-color: var(--accent-emerald);
  background-color: rgba(34, 197, 94, 0.16);
  color: var(--text-main);
  opacity: 1;
}

.quiz-option-btn.wrong,
.quiz-option-btn.wrong:disabled {
  border-color: var(--accent-red);
  background-color: rgba(239, 68, 68, 0.16);
  color: var(--text-main);
  opacity: 1;
}

[data-theme="light"] .quiz-option-btn:disabled {
  background-color: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
  opacity: 1;
}

[data-theme="light"] .quiz-option-btn.correct,
[data-theme="light"] .quiz-option-btn.correct:disabled {
  background-color: #dcfce7;
  color: #14532d;
  border-color: #16a34a;
  opacity: 1;
}

[data-theme="light"] .quiz-option-btn.wrong,
[data-theme="light"] .quiz-option-btn.wrong:disabled {
  background-color: #fee2e2;
  color: #7f1d1d;
  border-color: #dc2626;
  opacity: 1;
}

.quiz-feedback {
  margin-top: 1rem;
  padding: 0.95rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.91rem;
  color: var(--text-muted);
}

.btn-primary {
  min-height: 44px;
  padding: 0.65rem 1.2rem;
  background: var(--primary-color);
  color: #0b0f17;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.85rem;
}

[data-theme="light"] .btn-primary {
  color: #ffffff;
}

/* Guía informativa y FAQ */
.seo-guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.seo-guide-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: var(--text-main);
}

.seo-guide-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin: 0 0 0.85rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  overflow: hidden;
}

.faq-item summary {
  padding: 0.9rem 1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--primary-color);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-answer {
  padding: 0 1rem 0.95rem;
  color: var(--text-muted);
  font-size: 0.91rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

/* Responsive móvil y tablet */
@media (max-width: 960px) {
  .symbols-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .inspector-details-grid,
  .coupon-zones-grid,
  .format-grid,
  .conservation-grid,
  .calc-metrics-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tool-layout {
    margin: 1rem auto 2rem;
    padding: 0 0.75rem;
  }

  .med-hero,
  .card-main,
  .seo-guide-card {
    padding: 1rem;
  }

  .hero-kpis {
    grid-template-columns: 1fr;
  }

  .symbols-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tool-tabs {
    flex-direction: column;
  }

  .tab-btn {
    width: 100%;
    justify-content: flex-start;
  }

  .search-bar-box,
  .open-date-row {
    flex-direction: column;
    align-items: stretch;
  }

  .date-input-group,
  .date-field,
  .input-field,
  .btn-secondary,
  .btn-primary {
    width: 100%;
  }
}
