/* ==========================================================================
   GitHub Access Console — estilos
   ========================================================================== */

:root {
  --bg: #05070b;
  --panel: rgba(15, 19, 27, 0.72);
  --panel-strong: rgba(18, 23, 32, 0.9);
  --ink: #e6edf3;
  --muted: #8b949e;
  --faint: #5b6572;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --green: #3fb950;
  --green-deep: #238636;
  --teal: #39d2c0;
  --blue: #58a6ff;
  --amber: #e3b341;
  --red: #f85149;
  --violet: #bc8cff;
  --radius: 20px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding: 0 clamp(18px, 4vw, 52px) 40px;
}

/* ---------- fondo ------------------------------------------------------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 139, 253, 0.10), transparent 70%),
    linear-gradient(180deg, #05070b 0%, #060810 55%, #04060a 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.42;
  will-change: transform;
}
.blob-a {
  width: 46vw; height: 46vw; min-width: 380px; min-height: 380px;
  left: -10vw; top: -12vw;
  background: radial-gradient(circle, rgba(57, 210, 192, 0.55), transparent 62%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.blob-b {
  width: 42vw; height: 42vw; min-width: 340px; min-height: 340px;
  right: -12vw; top: 8vh;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.42), transparent 62%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
.blob-c {
  width: 38vw; height: 38vw; min-width: 300px; min-height: 300px;
  left: 32vw; bottom: -18vw;
  background: radial-gradient(circle, rgba(188, 140, 255, 0.28), transparent 64%);
  animation: drift-c 38s ease-in-out infinite alternate;
}

@keyframes drift-a { to { transform: translate3d(6vw, 4vh, 0) scale(1.15); } }
@keyframes drift-b { to { transform: translate3d(-5vw, -3vh, 0) scale(1.1); } }
@keyframes drift-c { to { transform: translate3d(4vw, -5vh, 0) scale(1.08); } }

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- barra de progreso ------------------------------------------ */
.progress-rail {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
  z-index: 50;
}
.progress-rail span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal), var(--blue) 55%, var(--green));
  box-shadow: 0 0 14px rgba(57, 210, 192, 0.7);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- topbar ------------------------------------------------------ */
.topbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 13px;
  color: var(--teal);
  background: linear-gradient(150deg, rgba(57, 210, 192, 0.16), rgba(88, 166, 255, 0.08));
  border: 1px solid rgba(57, 210, 192, 0.28);
  box-shadow: 0 0 30px -8px rgba(57, 210, 192, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 15px; letter-spacing: -0.01em; }
.brand-text small { color: var(--faint); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; }

.topbar-right { display: flex; align-items: center; gap: 14px; }
.clock {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.06em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: all 0.3s ease;
  white-space: nowrap;
}
.chip .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}
.chip[data-state="ok"] {
  color: #7ee787;
  border-color: rgba(63, 185, 80, 0.4);
  background: rgba(63, 185, 80, 0.1);
}
.chip[data-state="ok"] .dot { animation: ping 2s ease-out infinite; }
.chip[data-state="warn"] {
  color: #e3b341;
  border-color: rgba(227, 179, 65, 0.38);
  background: rgba(227, 179, 65, 0.09);
}
.chip[data-state="error"] {
  color: #ff8b84;
  border-color: rgba(248, 81, 73, 0.4);
  background: rgba(248, 81, 73, 0.1);
}
.chip[data-state="snapshot"] {
  color: #79c0ff;
  border-color: rgba(88, 166, 255, 0.35);
  background: rgba(88, 166, 255, 0.08);
}
.chip[data-state="snapshot"] .dot { background: #58a6ff; }

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(63, 185, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0); }
}

/* ---------- hero -------------------------------------------------------- */
main { max-width: 1280px; margin: 0 auto; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  padding: clamp(30px, 6vh, 70px) 0 clamp(28px, 5vh, 48px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--teal);
  text-transform: uppercase;
}
.eyebrow-line {
  width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal));
}

h1 {
  margin: 0;
  font-size: clamp(38px, 5.1vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 700;
}
h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #7ee787 0%, #39d2c0 40%, #58a6ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(57, 210, 192, 0.22));
}

.lede {
  margin: 22px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:focus-visible { outline: 2px solid rgba(88, 166, 255, 0.8); outline-offset: 2px; }

.btn-primary {
  color: #04140d;
  background: linear-gradient(135deg, #3fb950 0%, #2fbf9a 60%, #39d2c0 100%);
  box-shadow: 0 8px 26px -10px rgba(57, 210, 192, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 32px -10px rgba(57, 210, 192, 0.9); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: default; }

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.22); }
.btn-sm { padding: 8px 13px; font-size: 12.5px; border-radius: 9px; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.meta-row div { min-width: 0; flex: 0 0 auto; }
.meta-row dt {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}
.meta-row dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: #c9d5e0;
  max-width: 42ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- visual del hero -------------------------------------------- */
.hero-visual {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  isolation: isolate;
}
.halo {
  position: absolute;
  inset: 12% 6%;
  background: radial-gradient(circle at 50% 50%, rgba(57, 210, 192, 0.16), transparent 62%);
  filter: blur(20px);
  z-index: -1;
}

.node {
  position: relative;
  z-index: 2;
  width: 148px;
  padding: 20px 16px;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(165deg, rgba(24, 30, 40, 0.92), rgba(11, 15, 22, 0.86));
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}
.node-device { transform: translateY(-22px); }
.node-github { transform: translateY(22px); }

.node-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin: 0 auto 10px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
}
.node-icon svg { width: 24px; height: 24px; }
.node-device .node-icon { color: var(--teal); border-color: rgba(57, 210, 192, 0.3); box-shadow: 0 0 24px -8px rgba(57, 210, 192, 0.6); }
.node-github .node-icon { color: #e6edf3; }
.node-label { display: block; font-size: 13px; font-weight: 650; letter-spacing: -0.01em; }
.node-sub { display: block; font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 2px; }

.link {
  position: absolute;
  left: 100px; right: 100px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: 76px;
  z-index: 1;
  overflow: visible;
}
.link-base {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.5;
  stroke-dasharray: 3 7;
}
.link-flow {
  fill: none;
  stroke: url(#linkGrad);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 18 60;
  filter: drop-shadow(0 0 6px rgba(57, 210, 192, 0.7));
  animation: flow 2.8s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: -78; } }

.lock {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: radial-gradient(circle at 35% 30%, #14242a, #080d12);
  border: 1px solid rgba(57, 210, 192, 0.35);
  box-shadow: 0 0 40px -6px rgba(57, 210, 192, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.lock svg { width: 23px; height: 23px; }
.lock-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(57, 210, 192, 0.35);
  animation: lock-pulse 2.8s ease-out infinite;
}
@keyframes lock-pulse {
  0% { transform: scale(0.85); opacity: 0.8; }
  80%, 100% { transform: scale(1.35); opacity: 0; }
}

/* ---------- banner ------------------------------------------------------ */
.banner {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(227, 179, 65, 0.35);
  background: rgba(227, 179, 65, 0.08);
  color: #f0d48a;
  font-size: 13px;
}
.banner code { font-family: var(--mono); font-size: 12px; }

/* ---------- grid y tarjetas -------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(165deg, rgba(23, 29, 39, 0.78), rgba(9, 12, 18, 0.82));
  backdrop-filter: blur(20px) saturate(130%);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  padding: 22px 24px;
  overflow: hidden;
}

.steps-card { grid-column: span 7; }
.key-card { grid-column: span 5; }
.terminal-card { grid-column: span 12; padding: 0; }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.card-kicker {
  margin: 0 0 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.card-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--teal);
  background: rgba(57, 210, 192, 0.1);
  border: 1px solid rgba(57, 210, 192, 0.25);
  vertical-align: 2px;
}

.counter {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.counter[data-complete="true"] {
  color: #7ee787;
  border-color: rgba(63, 185, 80, 0.35);
  background: rgba(63, 185, 80, 0.08);
}

/* ---------- pasos ------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; }

.step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 16px;
  padding: 4px 0 20px;
  position: relative;
}
.step:last-child { padding-bottom: 0; }

.step-rail { position: relative; display: flex; justify-content: center; }
.step-rail::after {
  content: "";
  position: absolute;
  top: 34px;
  bottom: -20px;
  width: 1px;
  background: var(--line-strong);
  transition: background 0.5s ease;
}
.step:last-child .step-rail::after { display: none; }

.step-dot {
  position: relative;
  z-index: 1;
  width: 31px; height: 31px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
  background: #0b0f16;
  border: 1px solid var(--line-strong);
  transition: all 0.35s ease;
}

.step-body { min-width: 0; padding-top: 3px; }
.step-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.step-top h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 620;
  letter-spacing: -0.012em;
  color: var(--muted);
  transition: color 0.3s ease;
}
.step-tag {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
.step-body p {
  margin: 5px 0 8px;
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--faint);
  max-width: 52ch;
}
.step-detail {
  display: inline-block;
  max-width: 100%;
  font-family: var(--mono);
  font-size: 10.8px;
  color: var(--faint);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
  transition: all 0.3s ease;
}

.step[data-state="done"] .step-dot {
  color: #04140d;
  background: linear-gradient(140deg, #56d364, #2ea043);
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(63, 185, 80, 0.12), 0 0 18px -2px rgba(63, 185, 80, 0.55);
}
.step[data-state="done"] .step-rail::after { background: linear-gradient(180deg, rgba(63, 185, 80, 0.65), rgba(63, 185, 80, 0.18)); }
.step[data-state="done"] .step-top h3 { color: var(--ink); }
.step[data-state="done"] .step-detail { color: #8fd99a; border-color: rgba(63, 185, 80, 0.22); background: rgba(63, 185, 80, 0.06); }

.step[data-state="active"] .step-dot {
  color: var(--teal);
  border-color: rgba(57, 210, 192, 0.55);
  background: rgba(57, 210, 192, 0.08);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
.step[data-state="active"] .step-top h3 { color: var(--ink); }
.step[data-state="active"] .step-detail { color: #a9e8df; border-color: rgba(57, 210, 192, 0.25); background: rgba(57, 210, 192, 0.06); }

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(57, 210, 192, 0.28); }
  50% { box-shadow: 0 0 0 6px rgba(57, 210, 192, 0); }
}

.next-action {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid rgba(88, 166, 255, 0.16);
  background: linear-gradient(90deg, rgba(88, 166, 255, 0.08), rgba(57, 210, 192, 0.04));
  font-size: 12.5px;
  color: #a9c7e8;
}
.next-action p { margin: 0; }
.next-action strong { color: #cfe6ff; font-weight: 620; }
.next-icon { color: var(--blue); font-family: var(--mono); }

/* ---------- clave ------------------------------------------------------- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 550;
  cursor: pointer;
  transition: all 0.2s ease;
}
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover:not(:disabled) { color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.icon-btn:disabled { opacity: 0.4; cursor: default; }
.icon-btn:focus-visible { outline: 2px solid rgba(88, 166, 255, 0.8); outline-offset: 2px; }

.key-box {
  position: relative;
  min-height: 104px;
  display: flex;
  align-items: center;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(57, 210, 192, 0.16);
  background:
    linear-gradient(180deg, rgba(3, 8, 12, 0.9), rgba(3, 7, 11, 0.75));
  overflow: hidden;
}
.key-box[data-empty="false"] { border-color: rgba(57, 210, 192, 0.28); box-shadow: inset 0 0 30px -18px rgba(57, 210, 192, 0.6); }
.key-empty {
  font-size: 12.5px;
  color: var(--faint);
  font-style: italic;
  line-height: 1.6;
}
.key-value {
  display: none;
  width: 100%;
  font-family: var(--mono);
  font-size: 11.4px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  color: #b7e6df;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.key-box[data-empty="false"] .key-value { display: block; }
.key-box[data-empty="false"] .key-empty { display: none; }

.key-shine {
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  left: -50%;
  background: linear-gradient(100deg, transparent, rgba(57, 210, 192, 0.09), transparent);
  transform: skewX(-16deg);
  pointer-events: none;
}
.key-box[data-empty="false"]:hover .key-shine { animation: shine 1.1s ease; }
@keyframes shine { to { left: 130%; } }

.fingerprint {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}
.fp-label {
  flex: none;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.fingerprint code {
  font-family: var(--mono);
  font-size: 10.3px;
  color: var(--muted);
  text-align: right;
  overflow-wrap: anywhere;
}

.key-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.key-note { font-size: 10.5px; color: var(--faint); line-height: 1.4; }

.safety {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(227, 179, 65, 0.14);
  background: rgba(227, 179, 65, 0.045);
  color: #b9a06a;
  font-size: 11.2px;
  line-height: 1.55;
}
.safety svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: #d3ab48; }
.safety p { margin: 0; }
.safety code { font-family: var(--mono); font-size: 10.4px; color: #d8c08a; }

/* ---------- terminal ---------------------------------------------------- */
.terminal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}
.traffic { display: flex; gap: 6px; }
.traffic i { width: 10px; height: 10px; border-radius: 50%; background: #3a4048; }
.traffic i:nth-child(1) { background: #ff5f57; opacity: 0.85; }
.traffic i:nth-child(2) { background: #febc2e; opacity: 0.85; }
.traffic i:nth-child(3) { background: #28c840; opacity: 0.85; }
.terminal-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.05em;
}
.live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7ee787;
}
.live[data-mode="archive"] { color: var(--faint); }
.live[data-mode="archive"] i { animation: none; background: var(--faint); }

.terminal {
  height: 268px;
  overflow-y: auto;
  padding: 12px 16px 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  background: linear-gradient(180deg, rgba(3, 6, 10, 0.55), rgba(3, 6, 10, 0.25));
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.terminal::-webkit-scrollbar { width: 9px; }
.terminal::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 9px; border: 3px solid transparent; background-clip: content-box; }
.terminal::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: content-box; }

.terminal-empty {
  color: var(--faint);
  font-style: italic;
  padding: 10px 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.terminal-empty::after {
  content: "";
  width: 7px; height: 14px;
  background: var(--teal);
  opacity: 0.7;
  animation: caret 1.1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.log-line {
  display: grid;
  grid-template-columns: 58px 66px minmax(0, 1fr);
  gap: 10px;
  padding: 3px 0 3px 8px;
  border-left: 2px solid transparent;
  animation: log-in 0.35s ease both;
}
.log-line:hover { background: rgba(255, 255, 255, 0.025); }
@keyframes log-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.log-time { color: #4d5764; }
.log-actor {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7d8896;
  padding-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-line[data-actor="agente"] .log-actor { color: var(--violet); }
.log-line[data-actor="tú"] .log-actor { color: var(--green); }
.log-msg { color: #aab6c2; overflow-wrap: anywhere; }
.log-line[data-level="ok"] { border-left-color: rgba(63, 185, 80, 0.55); }
.log-line[data-level="ok"] .log-msg { color: #9fe0a8; }
.log-line[data-level="warn"] { border-left-color: rgba(227, 179, 65, 0.55); }
.log-line[data-level="warn"] .log-msg { color: #e8cf8f; }
.log-line[data-level="error"] { border-left-color: rgba(248, 81, 73, 0.55); }
.log-line[data-level="error"] .log-msg { color: #ffa49e; }
.log-line[data-level="agent"] { border-left-color: rgba(188, 140, 255, 0.5); }

.terminal-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.legend { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 6px; height: 6px; border-radius: 2px; }
.lg-info { background: #6e7b8a; }
.lg-ok { background: var(--green); }
.lg-warn { background: var(--amber); }
.lg-error { background: var(--red); }
.terminal-count { margin-left: auto; font-family: var(--mono); letter-spacing: 0.04em; }

/* ---------- pie y toast ------------------------------------------------- */
.page-foot {
  max-width: 1280px;
  margin: 26px auto 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #4b545f;
  flex-wrap: wrap;
}
.foot-dot { width: 3px; height: 3px; border-radius: 50%; background: #3a424c; }
.page-foot code { font-family: var(--mono); }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 44px));
  padding: 11px 16px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(20, 26, 35, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9);
  font-size: 12.5px;
  color: var(--ink);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.show { opacity: 1; transform: none; }
.toast[data-kind="ok"] { border-color: rgba(63, 185, 80, 0.4); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(63, 185, 80, 0.12); }
.toast[data-kind="warn"] { border-color: rgba(227, 179, 65, 0.42); }
.toast[data-kind="error"] { border-color: rgba(248, 81, 73, 0.45); }

/* ---------- responsive -------------------------------------------------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; margin: 6px auto 0; width: 100%; min-height: 250px; }
  .steps-card, .key-card { grid-column: span 12; }
}

@media (max-width: 720px) {
  body { padding-inline: 16px; }
  .topbar { padding-top: 18px; }
  .brand-text small { display: none; }
  .clock { display: none; }
  .hero { padding-top: 26px; }
  .meta-row { gap: 18px; }
  .meta-row dd { max-width: 20ch; }
  .hero-visual { min-height: 210px; }
  .node { width: 120px; padding: 15px 10px; }
  .node-icon { width: 38px; height: 38px; border-radius: 11px; }
  .node-icon svg { width: 20px; height: 20px; }
  .node-device { transform: translateY(-16px); }
  .node-github { transform: translateY(16px); }
  .link { left: 78px; right: 78px; }
  .lock { width: 46px; height: 46px; }
  .lock svg { width: 19px; height: 19px; }
  .card { padding: 18px 16px; }
  .terminal-card { padding: 0; }
  .step { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
  .step-dot { width: 27px; height: 27px; font-size: 11px; }
  .step-rail::after { top: 30px; }
  .log-line { grid-template-columns: 50px minmax(0, 1fr); }
  .log-actor { display: none; }
  .log-time { font-size: 10px; }
  .terminal { height: 240px; }
  .terminal-foot .legend:nth-of-type(4) { display: none; }
  .fingerprint { flex-direction: column; gap: 3px; }
  .fingerprint code { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
