:root,
[data-theme="dark"] {
  color-scheme: dark;
  --font: "Roboto", system-ui, sans-serif;
  --mono: "Roboto Mono", ui-monospace, monospace;
  --primary: #7986cb;
  --on-primary: #1a237e;
  --accent: #7c4dff;
  --surface: #0f1118;
  --on-surface: #e8eaf6;
  --muted: #9fa8da;
  --card: #181b26;
  --border: #2a2f42;
  --warn: #ffb74d;
  --ok: #81c784;
  --diagram-bg: #12151f;
}

[data-theme="light"] {
  color-scheme: light;
  --primary: #3949ab;
  --on-primary: #fff;
  --accent: #5e35b1;
  --surface: #f5f6fc;
  --on-surface: #1a237e;
  --muted: #5c6bc0;
  --card: #fff;
  --border: #c5cae9;
  --warn: #e65100;
  --ok: #2e7d32;
  --diagram-bg: #eef1fb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--on-surface);
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--on-surface);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: transparent;
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-sm { padding: 0.35rem 0.6rem; font-size: 0.8rem; }

.main {
  display: grid;
  grid-template-columns: 1fr min(min(100%, 720px), 58vw);
  gap: 0;
  min-height: 0;
}

@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; }
}

.canvas {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
}

.canvas-head {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.crumb {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  font: inherit;
}

.crumb:hover, .crumb.active {
  color: var(--on-surface);
  background: color-mix(in srgb, var(--primary) 15%, transparent);
}

.crumb-sep { color: var(--muted); opacity: 0.6; }

.flow-title-input {
  border: 1px solid transparent;
  background: transparent;
  color: var(--on-surface);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  min-width: 12rem;
}

.flow-title-input:hover,
.flow-title-input:focus {
  border-color: var(--border);
  background: var(--surface);
  outline: none;
}

.diagram-wrap {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  background: var(--diagram-bg);
}

#diagram-host {
  min-height: 280px;
  display: grid;
  place-items: center;
}

.diagram-svg svg { max-width: 100%; height: auto; }

.diagram-loading,
.diagram-error {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 2rem;
}

.diagram-error { color: var(--warn); }

.mermaid-src-wrap {
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
}

.mermaid-src-wrap label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#mermaid-source {
  width: 100%;
  min-height: 5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  background: var(--card);
  color: var(--on-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem;
  resize: vertical;
}

.sidebar {
  background: var(--card);
  padding: 1rem;
  overflow-y: auto;
}

.sidebar h2 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.panel-empty {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.panel-empty ul {
  margin: 0.75rem 0 0 1.1rem;
}

.field {
  margin-bottom: 0.85rem;
}

.field label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--on-surface);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
}

.field textarea { min-height: 6rem; resize: vertical; }

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0.5rem 0 0.75rem;
  padding: 0.6rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1rem;
}

.legend {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.legend h3 {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.legend-swatch {
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  border: 2px solid;
}

.legend-swatch.step { background: #e3f2fd; border-color: #1565c0; }
.legend-swatch.subflow { background: #fff8e1; border-color: #f9a825; }
.legend-swatch.info { background: #e8f5e9; border-color: #2e7d32; }

.theme-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--on-surface);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

[hidden] { display: none !important; }

.spec-summary {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.spec-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.spec-tab {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.spec-tab.active {
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--on-surface);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
}

.spec-section { margin-bottom: 0.85rem; }

.spec-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.spec-section-head h3 {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.canvas-head-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.version-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.ver-label { color: var(--muted); display: flex; align-items: center; gap: 0.35rem; }

.ver-select {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--on-surface);
  border-radius: 8px;
  padding: 0.25rem 0.45rem;
  font: inherit;
  font-size: 0.8rem;
}

.version-hint {
  color: var(--muted);
  font-size: 0.75rem;
  max-width: 14rem;
  line-height: 1.3;
}

.version-diff {
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.65rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  color: var(--on-surface);
}

.map-row {
  display: grid;
  grid-template-columns: 1.1fr 4.2rem auto 2.2rem 2.2rem 0.9fr 0.9fr auto auto;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
  align-items: center;
}

.map-row-dim { opacity: 0.4; }

.ver-badge {
  font-size: 0.62rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.ver-nuevo { background: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok); }
.ver-eliminado { background: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--warn); }
.ver-cambió { background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); }

.ver-range { font-size: 0.65rem; color: var(--muted); }

#version-notes-list {
  max-height: 14rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.ver-note-field label { font-size: 0.7rem; }

.ver-note-input { min-height: 2.2rem; font-size: 0.78rem; }

.map-row input,
.map-row select {
  font-size: 0.75rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--on-surface);
  min-width: 0;
}

.map-req {
  font-size: 0.68rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.15rem;
  white-space: nowrap;
}

.map-del {
  padding: 0.2rem 0.45rem;
  min-width: 1.6rem;
  line-height: 1;
}

.http-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.4rem;
}

.field textarea.code {
  font-family: var(--mono);
  font-size: 0.72rem;
  min-height: 5.5rem;
}

@media (max-width: 700px) {
  .map-row {
    grid-template-columns: 1fr 1fr;
  }
  .map-row .map-del { grid-column: 2; justify-self: end; }
}

/* —— n8n-style canvas: nodos/edges en n8n-ui.css —— */

/* legacy vertical grid (fallback) */
.flow-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: min-content;
  margin: 0 auto;
}

.grid-connector {
  display: flex;
  justify-content: center;
  height: 28px;
  width: 100%;
}

.grid-line {
  width: 2px;
  height: 100%;
  background: color-mix(in srgb, var(--muted) 50%, transparent);
  border-radius: 1px;
}

.grid-node {
  position: relative;
  display: flex;
  align-items: center;
  width: min(280px, 90vw);
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--node-step);
  color: var(--on-surface);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.grid-node:hover {
  border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
  transform: translateY(-1px);
}

.grid-node.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}

.grid-node.is-dim { opacity: 0.45; }

.grid-node-terminal { background: var(--node-terminal); border-radius: 999px; }
.grid-node-subflow { background: var(--node-subflow); border-color: #f9a825; }
.grid-node-info { background: var(--node-info); border-color: #2e7d32; }

.grid-node-port {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--card);
}

.grid-node-port-in {
  background: var(--port-in);
  margin-left: -5px;
}

.grid-node-port-out {
  background: var(--port-out);
  margin-right: -5px;
}

.grid-node-body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  min-width: 0;
}

.grid-node-icon {
  font-size: 1.25rem;
  color: var(--muted);
  flex-shrink: 0;
}

.grid-node-text {
  flex: 1;
  min-width: 0;
}

.grid-node-text strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.25;
}

.grid-node-text small {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.3;
}

.grid-node-io {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-end;
}

.io-pill {
  font-size: 0.62rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.io-in { background: color-mix(in srgb, var(--port-in) 25%, transparent); color: var(--port-in); }
.io-out { background: color-mix(in srgb, var(--port-out) 25%, transparent); color: var(--port-out); }

.mermaid-src-wrap summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.5rem 1rem;
  user-select: none;
}

.mermaid-src-wrap[open] summary { border-bottom: 1px solid var(--border); }

.n8n-panel { padding: 0.75rem; }

.n8n-panel-head {
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.n8n-panel-head h2 {
  font-size: 0.95rem;
  font-weight: 600;
}

.n8n-io-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .main { grid-template-columns: 1fr; }
  .n8n-io-layout { grid-template-columns: 1fr; }
}

.n8n-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem;
  min-height: 8rem;
}

.n8n-col-input { border-top: 3px solid var(--port-in); }
.n8n-col-control { border-top: 3px solid var(--primary); }
.n8n-col-output { border-top: 3px solid var(--port-out); }

.n8n-col-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.55rem;
  font-weight: 600;
}

.n8n-col-title .material-symbols-outlined { font-size: 1rem; }

.n8n-col .spec-section-head h4 {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.n8n-versions-fold {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.n8n-versions-fold summary {
  cursor: pointer;
  color: var(--muted);
  padding: 0.35rem 0;
}

.n8n-info-only {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem;
  margin-bottom: 0.65rem;
}

.version-count {
  font-size: 0.72rem;
  color: var(--muted);
}

/* —— Dashboard —— */

.dashboard-view {
  padding: 2rem clamp(1rem, 4vw, 3rem);
  max-width: 1100px;
  margin: 0 auto;
}

.dash-hero h1 { font-size: 1.75rem; margin-bottom: 0.35rem; }
.dash-hero p { color: var(--muted); margin-bottom: 1.5rem; }

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.dash-list h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-card-head {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.dash-card-icon { color: var(--primary); font-size: 1.5rem; }
.dash-card h3 { font-size: 1rem; }
.dash-card-meta { font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }

.dash-card-actions {
  display: flex;
  gap: 0.4rem;
}

.dash-help {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.dash-help h3 { font-size: 0.9rem; margin-bottom: 0.5rem; }
.dash-help ul { padding-left: 1.2rem; font-size: 0.85rem; color: var(--muted); }
.dash-help li { margin-bottom: 0.35rem; }

.dash-empty { color: var(--muted); font-size: 0.9rem; }

.brand-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
}

.brand-btn:hover .brand-mark { filter: brightness(1.1); }
.topbar-link { margin-left: auto; }

.editor-view { min-height: 0; }
.editor-view .main { min-height: calc(100vh - 56px); }

/* —— Panel lateral mejorado —— */

.panel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.panel-toolbar h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.panel-type-badge {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

.panel-type-badge.step { background: color-mix(in srgb, var(--primary) 20%, transparent); color: var(--primary); }
.panel-type-badge.subflow { background: color-mix(in srgb, #f9a825 25%, transparent); color: #f9a825; }
.panel-type-badge.info { background: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok); }

.btn-danger {
  background: color-mix(in srgb, var(--warn) 15%, transparent);
  border-color: color-mix(in srgb, var(--warn) 40%, transparent);
  color: var(--warn);
  flex-shrink: 0;
}

.btn-danger:hover { background: color-mix(in srgb, var(--warn) 25%, transparent); }

.btn-danger-ghost {
  color: var(--warn);
  border-color: transparent;
}

.btn-danger-ghost:hover {
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}

.panel-empty h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.panel-empty ul { padding-left: 1.1rem; font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0; }
.panel-empty li { margin-bottom: 0.3rem; }

.hint-key {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.hint-key kbd {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.subflow-banner {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  background: color-mix(in srgb, #f9a825 12%, transparent);
  border-radius: 8px;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
}

.link-btn {
  border: none;
  background: none;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  padding: 0;
}

/* —— Nodo documentación —— */

.info-structures h3,
.info-body-preview h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.struct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-bottom: 1rem;
}

.struct-table th,
.struct-table td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.struct-table th {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  font-weight: 600;
}

.struct-table code {
  font-family: var(--mono);
  font-size: 0.85em;
}

.info-body-text {
  white-space: pre-wrap;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.panel-edit-fold {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.panel-edit-fold summary {
  cursor: pointer;
  color: var(--muted);
  padding: 0.35rem 0;
}

.info-node-preview {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed color-mix(in srgb, var(--ok) 40%, transparent);
}

.info-node-preview strong {
  display: block;
  font-size: 0.72rem;
  color: var(--ok);
}

.info-node-preview small {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.info-struct-count {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.6rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ok) 20%, transparent);
  color: var(--ok);
}

.panel-info-view,
.panel-step-view {
  padding: 0.75rem;
}

/* —— Landing —— */

.landing-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

@media (max-width: 800px) {
  .landing-hero { grid-template-columns: 1fr; }
}

.landing-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.landing-accent { color: var(--accent); }

.landing-lead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 36rem;
}

.landing-cta { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.btn-lg { padding: 0.65rem 1.1rem; font-size: 0.95rem; }

/* landing mock nodes: see n8n-ui.css */

.tpl-section { margin-bottom: 2.5rem; }
.tpl-section h2, .dash-list h2 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.section-sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 1rem; }

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.tpl-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
}

.tpl-icon { font-size: 2rem; color: var(--primary); margin-bottom: 0.5rem; }
.tpl-card h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.tpl-card p { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.75rem; line-height: 1.45; }

.landing-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.landing-footer p { margin-bottom: 0.35rem; }

/* —— Requisitos —— */

.n8n-col-req { border-top: 3px solid #ff9800; }
.col-hint { font-size: 0.72rem; color: var(--muted); margin: -0.25rem 0 0.5rem; line-height: 1.35; }

.req-row {
  grid-template-columns: 1fr 6rem 2.5rem 1fr auto;
}

.io-req { background: color-mix(in srgb, #ff9800 25%, transparent); color: #ff9800; }

.n8n-advanced-fold { margin-top: 0.5rem; font-size: 0.8rem; }
.n8n-advanced-fold summary { cursor: pointer; color: var(--muted); padding: 0.35rem 0; }

/* —— Checklist dialog —— */

.checklist-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(920px, 96vw);
  width: 100%;
  background: var(--card);
  color: var(--on-surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.checklist-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }

.chk-dialog-inner { padding: 1.25rem 1.5rem; position: relative; max-height: 85vh; overflow-y: auto; }

.chk-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

.chk-head h2 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.chk-head p { color: var(--muted); font-size: 0.85rem; margin-bottom: 1rem; }

.chk-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.25rem;
}

@media (max-width: 700px) {
  .chk-grid { grid-template-columns: 1fr; }
}

.chk-shopping, .chk-by-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
}

.chk-shopping h3, .chk-by-step h3, .chk-step h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.chk-unique { list-style: none; }
.chk-unique li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}

.chk-item {
  display: flex;
  gap: 0.45rem;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  list-style: none;
}

.chk-icon { color: #ff9800; font-size: 1.1rem; }
.chk-opt { font-size: 0.65rem; color: var(--muted); margin-left: 0.25rem; }
.chk-empty { color: var(--muted); font-size: 0.85rem; }
.chk-step { margin-bottom: 0.85rem; }
.chk-step ul { padding-left: 0; }
