:root [hidden],
[hidden] {
  display: none !important;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748B;
  --border: #e2e8f0;
  --primary: #0074D9;
  --primary-dark: #005BB5;
  --accent: #FF851B;
  --accent-dark: #E67615;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

.layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 20px 96px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.hero .eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 600;
  margin: 0 0 12px;
}

.hero h1 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 16px;
}

.hero .lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 18px;
}

.hero .benefits {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 10px;
  max-width: 640px;
}

.hero .benefits li {
  padding-left: 28px;
  position: relative;
  color: var(--text-muted);
}

.hero .benefits li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.26), rgba(34, 197, 94, 0.16));
  color: var(--success);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 32px 0 36px;
  border: 1px solid rgba(22, 163, 74, 0.36);
  box-shadow: 0 18px 40px rgba(22, 163, 74, 0.22);
}

.privacy-badge svg {
  color: inherit;
  flex-shrink: 0;
}

.privacy-badge--sub {
  margin: 24px 0 0;
  font-size: 0.95rem;
  padding: 14px 18px;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.24);
  box-shadow: none;
  width: 100%;
}

.privacy-badge--inline {
  margin: 18px 0 0;
  font-size: 0.95rem;
  box-shadow: 0 16px 36px rgba(22, 163, 74, 0.2);
  align-self: flex-start;
  max-width: 540px;
}

.form-section {
  display: flex;
  justify-content: center;
}

.form-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  max-width: 600px;
  width: 100%;
  border: 1px solid var(--border);
}

.form-card h2 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.75rem;
}

.form-subtitle {
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 24px;
}

.lm-form .field {
  margin-bottom: 18px;
}

.lm-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.lm-form input[type="text"],
.lm-form input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.lm-form select,
.template-card select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fff url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%238f9bb3' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center/12px;
  appearance: none;
  font-size: 0.95rem;
  color: var(--text);
}

.template-card select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.lm-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.checkbox input {
  margin-top: 4px;
}

.lm-form button[type="submit"] {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.lm-form button[type="submit"]:hover {
  box-shadow: 0 18px 32px rgba(29, 78, 216, 0.22);
  transform: translateY(-1px);
}

.lm-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 18px;
}

.lm-feedback {
  min-height: 24px;
  margin-top: 12px;
}

.lm-feedback.error {
  color: var(--danger);
}

.template-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.template-card input[type="text"],
.template-card input[type="number"] {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 10px 12px;
}

.template-card input[type="text"]:focus,
.template-card input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.template-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.headline-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.template-headline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.headline-top h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 2rem;
}

.headline-sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  max-width: 780px;
}

.template-tabs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  align-self: flex-start;
}

.tab-button {
  min-width: 170px;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s ease;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.tab-button.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(29, 78, 216, 0.1);
  box-shadow: 0 12px 32px rgba(29, 78, 216, 0.18);
}

.template-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.template-actions .action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.template-actions .secondary-actions {
  width: 100%;
  display: flex;
}

.template-actions .secondary-actions .ghost-button {
  flex: 1 1 auto;
}

.template-actions .primary-actions {
  align-items: stretch;
}

.template-actions .primary-actions .ghost-button {
  flex: 1 1 200px;
}

.ghost-button.file-trigger {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 200px;
}

.template-status {
  width: 100%;
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.template-status.ok {
  color: var(--success);
}

.template-status.error {
  color: var(--danger);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease;
  text-decoration: none;
}

.ghost-button:hover {
  border-color: var(--primary);
  background: rgba(29, 78, 216, 0.08);
}

.ghost-button.secondary {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  color: var(--text-muted);
}

.ghost-button.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ghost-button.file-trigger {
  position: relative;
  overflow: visible;
}

.ghost-button.file-trigger input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-trigger-label {
  font-weight: 600;
}

.file-trigger-note {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: var(--primary-dark);
  background: rgba(29, 78, 216, 0.12);
  border: 1px dashed rgba(29, 78, 216, 0.38);
  border-radius: var(--radius-sm);
  line-height: 1.4;
  transition: background 0.2s ease, color 0.2s ease;
  font-weight: 600;
}

.storage-note {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.storage-note strong {
  color: var(--primary-dark);
}

.scenario-switcher {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 0;
}

.scenario-switcher__label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.ghost-pill {
  border: 1px solid rgba(29, 78, 216, 0.35);
  background: rgba(29, 78, 216, 0.12);
  color: var(--primary-dark);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
}

.ghost-pill:hover,
.ghost-pill:focus {
  background: rgba(29, 78, 216, 0.2);
  border-color: var(--primary);
  color: var(--primary);
}

.ghost-pill:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.25);
}

.ghost-button.danger {
  border-color: rgba(220, 38, 38, 0.4);
  color: var(--danger);
}

.ghost-button.danger:hover {
  background: rgba(220, 38, 38, 0.12);
}

.template-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card h3,
.card h4 {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
}

.card .helper {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.icon-hint {
  border: none;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-muted);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.85rem;
  line-height: 1;
  cursor: help;
  margin-left: 16px;
  margin-top: -2px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.icon-hint:focus,
.icon-hint:hover {
  outline: none;
  background: rgba(29, 78, 216, 0.15);
  color: var(--primary-dark);
}

.tooltip-bubble {
  position: fixed;
  z-index: 9999;
  max-width: min(260px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  left: -9999px;
  top: -9999px;
}

.tooltip-bubble[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-bubble.is-flipped[data-visible="true"] {
  transform: translateY(4px);
}

.site-footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 32px 20px 48px;
}

.site-footer strong {
  color: var(--text);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  padding: 10px 8px;
  text-align: left;
}

.data-table thead th {
  color: var(--text-muted);
  font-weight: 600;
}

.data-table tfoot th,
.data-table tfoot td {
  font-weight: 700;
}

.data-table input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}

.data-table input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  text-align: right;
}

.data-table input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.15);
}

.col-amount {
  width: 34%;
}

.col-actions {
  width: 40px;
  text-align: center;
}

.remove-row {
  border: none;
  background: transparent;
  color: var(--danger);
  font-weight: 700;
  cursor: pointer;
}

.link-button {
  align-self: flex-start;
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.link-button:hover {
  text-decoration: underline;
}

.summary {
  background: #0f172a;
  color: #e2e8f0;
  border: none;
}

.summary .metrics {
  display: grid;
  gap: 14px;
}

.summary dt {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 240, 0.7);
  margin-bottom: 4px;
}

.summary dd {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.zone-message {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(226, 232, 240, 0.12);
  font-size: 0.95rem;
  line-height: 1.5;
}

.refresh-tip {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.9rem;
  line-height: 1.4;
}

.tripwire-cta {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(226, 232, 240, 0.18);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tripwire-cta h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #f8fafc;
}

.tripwire-cta p {
  margin: 0;
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.92rem;
}

.tripwire-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tripwire-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.tripwire-button:hover,
.tripwire-button:focus {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(29, 78, 216, 0.35);
  outline: none;
}

.tripwire-link {
  display: inline-flex;
  align-items: center;
  color: rgba(226, 232, 240, 0.85);
  font-weight: 600;
  text-decoration: underline;
}

.tripwire-link:hover,
.tripwire-link:focus {
  color: #fff;
  outline: none;
}

.zone-verde .summary {
  background: linear-gradient(140deg, #0f172a 10%, #065f46 45%, #22c55e 100%);
}

.zone-roja .summary {
  background: linear-gradient(140deg, #450a0a 5%, #7f1d1d 45%, #ef4444 100%);
}

.zone-negra .summary {
  background: linear-gradient(140deg, #020617 5%, #0b1120 35%, #111827 100%);
}

.cia-plan {
  background: var(--surface-alt);
}

.cia-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.cia-step {
  padding: 20px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border 0.2s ease;
}

.cia-step ul {
  padding-left: 18px;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cia-step.highlight {
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(29, 78, 216, 0.12);
  transform: translateY(-4px);
}

.template-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cia-footer {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.reference-links {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.reference-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(29, 78, 216, 0.25);
  background: rgba(29, 78, 216, 0.08);
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
}

.reference-link::before {
  content: "↗";
  font-size: 0.85rem;
}

.reference-link:hover,
.reference-link:focus {
  background: rgba(29, 78, 216, 0.16);
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
}

.glossary {
  margin-top: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
  padding: 24px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.glossary h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.glossary dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 0;
}

.glossary dt {
  font-weight: 600;
  margin-bottom: 4px;
}

.glossary dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.how-it-works {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.how-intro h2 {
  margin: 0 0 8px;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 1.8rem;
}

.how-intro p {
  margin: 0;
  color: var(--text-muted);
  max-width: 720px;
}

.how-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.how-grid article {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.how-grid h3 {
  margin: 0;
  font-size: 1.05rem;
}

.how-grid p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.how-footer {
  font-size: 0.95rem;
  color: var(--text-muted);
  background: rgba(29, 78, 216, 0.08);
  padding: 16px;
  border-radius: var(--radius-md);
}

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

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}

@media (max-width: 768px) {
  .layout {
    padding: 32px 16px 64px;
    gap: 40px;
  }

  .form-card {
    padding: 28px 20px;
  }

  .template-card {
    padding: 28px 20px;
  }

  .template-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .template-actions {
    width: 100%;
  }

  .template-actions .primary-actions {
    width: 100%;
  }

  .template-actions .action-group {
    width: 100%;
    justify-content: stretch;
  }

  .template-actions .primary-actions .ghost-button,
  .template-actions .primary-actions .ghost-button.danger {
    flex: 1 1 45%;
  }

  .privacy-badge {
    margin-top: 16px;
    width: 100%;
  }

  .headline-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .how-it-works {
    padding: 28px 20px;
  }
}

.tagline {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-top: 18px;
}

.board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.board-actions .ghost-button {
  white-space: nowrap;
}

.export-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.storage-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.quick-start {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
  padding: 20px 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.quick-start h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.quick-start ol {
  margin: 0;
  padding-left: 22px;
  color: var(--text-muted);
}

.quick-start li {
  margin-bottom: 6px;
}

.quick-start strong {
  color: var(--text);
}

.quick-tip {
  margin: 12px 0 0;
  font-size: 0.95rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.panel-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.range-field {
  margin-bottom: 18px;
}

.range-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.range-wrapper output {
  font-weight: 700;
  font-size: 1.25rem;
  min-width: 120px;
  text-align: right;
  color: var(--primary-dark);
}

.range-wrapper input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
}

.profile-badge {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(29, 78, 216, 0.08);
  border: 1px solid rgba(29, 78, 216, 0.18);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-badge[data-level="conservador"] {
  background: rgba(234, 179, 8, 0.2);
  border-color: rgba(234, 179, 8, 0.3);
  color: #854d0e;
}

.profile-badge[data-level="agresivo"] {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.25);
  color: #991b1b;
}

.cia-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.checklist-item {
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  background: var(--surface-alt);
}

.checklist-item small {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.checklist-item[data-status="ok"] {
  border-left-color: var(--success);
}

.checklist-item[data-status="warn"] {
  border-left-color: #f97316;
}

.checklist-item[data-status="todo"] {
  border-left-color: var(--danger);
}

.context-pill {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary-dark);
  font-weight: 500;
}

.intelligence-grid,
.automation-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.table-wrapper {
  overflow-x: auto;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.allocation-summary {
  font-weight: 600;
  color: var(--text-muted);
}

.allocation-status[data-state="ok"] {
  color: var(--success);
}

.allocation-status[data-state="warn"] {
  color: #f97316;
}

.intel-warnings {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.intel-warnings li {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 0.95rem;
}

.intel-warnings li[data-status="warn"] {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.08);
  color: #9a3412;
}

.intel-warnings li[data-status="info"] {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary-dark);
}

.intel-warnings li[data-status="ok"] {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
  color: #0f766e;
}

.intelligence-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.allocation-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.allocation-control output {
  min-width: 52px;
  font-weight: 600;
  text-align: right;
}

.needs-attention {
  transition: background 0.2s ease;
  background: rgba(244, 63, 94, 0.05);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.checkbox-grid label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.snippet-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.snippet {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  padding: 16px;
}

.snippet header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.snippet pre {
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  border: 1px dashed var(--border);
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.prompt-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.prompt-card textarea {
  resize: vertical;
  min-height: 140px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  white-space: pre-wrap;
}

.automation-grid .card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.intelligence-cta .link-button {
  flex: 1 1 auto;
}

.intelligence-cta .ghost-button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.tab-panels>section[hidden] {
  display: none !important;
}

.allocation-control input[type="range"] {
  flex: 1;
}

.panel-grid .card h3 {
  margin-top: 0;
}

.panel-grid .card:last-child {
  margin-bottom: 0;
}

.card .section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.card .section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cia-footer a {
  color: var(--primary-dark);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .board-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .range-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .allocation-control {
    flex-direction: column;
    align-items: flex-start;
  }
}