:root {
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: 'Space Mono', 'JetBrains Mono', ui-monospace, monospace;
  --ease: 110ms linear;
}

[data-theme='dark'] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0a0a0a;
  --card: #161616;
  --line: #2c2c2c;
  --line-strong: #4a4a4a;
  --fg: #ffffff;
  --muted: #a6a6a6;
  --accent: #b0b0b0;
  --on-accent: #000000;
  --dots: rgba(255, 255, 255, 0.09);
  --dot-off: #2a2a2a;
}

/* Este gris pasa AA como texto y como fondo, también sobre --surface. */
[data-theme='light'] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f5f5f7;
  --card: #ffffff;
  --line: #d9d9de;
  --line-strong: #8e8e94;
  --fg: #0a0a0a;
  --muted: #55555b;
  --accent: #6b6b6b;
  --on-accent: #ffffff;
  --dots: rgba(0, 0, 0, 0.1);
  --dot-off: #dcdce0;
}

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

html { scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 18px 18px;
  color: var(--fg);
  font: 400 0.9375rem/1.7 var(--mono);
  overflow-x: hidden;
}

h1, h2, h3, p, ul, dl, dd, pre { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
small { font-size: 0.8125rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(100% - 2rem, 1040px); margin-inline: auto; }
.accent { color: var(--accent); }

.skip {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 100;
  padding: 0.5rem 0.875rem; background: var(--accent); color: var(--on-accent);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px dashed var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 1rem; min-height: 3.5rem; }
.brand { font: 700 1.125rem var(--display); text-decoration: none; }
.topbar nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.nav { display: flex; justify-content: flex-end; gap: 0.25rem; width: max-content; margin-left: auto; }
.nav a {
  display: block; padding: 0.625rem 0.5rem; font-size: 0.8125rem; color: var(--muted);
  text-decoration: none; transition: color var(--ease);
}
.nav a:hover { color: var(--accent); }
.nav a.active { color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); }

.theme-toggle {
  flex: none; width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); cursor: pointer;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); box-shadow: 0 0 12px -3px var(--accent); }
.theme-glyph {
  width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--fg);
  background: linear-gradient(90deg, var(--fg) 50%, transparent 50%);
}

/* Flores: el lienzo va detrás del contenido, así lo que cae nunca tapa un texto. */
.flowers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .footer { position: relative; z-index: 1; }
.flower-sep { height: clamp(19rem, 40vw, 30rem); touch-action: pan-y; }
/* El Arduino tiene piezas chicas: necesita más caracteres para que se lean. */
.flower-sep[data-flower='arduino'] { height: clamp(25rem, 56vw, 44rem); }

/* La pantalla del Macintosh: el mismo gris en claro y oscuro, como un protector de pantalla. */
.mac-saver { touch-action: pan-y; position: relative; height: clamp(19rem, 40vw, 30rem); margin-block: 2rem; overflow: hidden; contain: paint; border-block: 1px solid var(--line); background: radial-gradient(120% 120% at 50% 40%, #92929a, #6f6f76); }
.mac-saver canvas { position: absolute; left: 50%; top: 50%; width: 2400px; height: 1380px; max-width: none; transform: translate(-50%, -50%) perspective(1000px) rotateX(44deg) rotateZ(21deg); will-change: transform; }

/* Entrada de cada bloque al hacer scroll */
.reveal .rv { opacity: 0; transform: translateY(20px); transition: opacity 340ms ease, transform 340ms cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 45ms); }
.reveal .rv.in { opacity: 1; transform: none; }
.reveal .sec-head.rv .ascii-rule { clip-path: inset(0 100% 0 0); }
.reveal .sec-head.rv.in .ascii-rule { clip-path: inset(0); transition: clip-path 600ms steps(24) 120ms; }

/* Vidrio acanalado (js/glass.js). El degradado es lo que se ve si no hay WebGL. */
.glass {
  display: block; width: 100%; border: 1px solid var(--line-strong);
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 34px), linear-gradient(160deg, #8c8c8c 0%, #d8d8d8 38%, #000 62%);
}
.glass-wrap { position: relative; touch-action: pan-y; }
.glass-hero { height: clamp(8rem, 17vw, 14rem); }
.hero .glass-wrap { margin-top: 2.5rem; }
.glass-foot { height: clamp(6rem, 11vw, 9rem); }
.footer .glass-wrap { margin-bottom: 1.5rem; }
.glass-art { height: clamp(18rem, 34vw, 26rem); }

/* Descifrado al entrar en pantalla (js/decode.js) */
.decode-wait { visibility: hidden; }
.decoding { position: relative; }
.decode-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

/* Portada */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2.5rem, 6vw, 4.5rem); }
.hero-name {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  font-family: var(--display);
}
.dotmatrix { display: block; width: min(100%, 620px); aspect-ratio: 31 / 11; touch-action: pan-y; }
.hero-tag, .hero-sub, .hero .btn { text-transform: uppercase; }
.hero-tag { margin-top: 1.5rem; font-size: clamp(1rem, 2.6vw, 1.375rem); font-weight: 500; line-height: 1.45; }
.prompt { color: var(--accent); }
.caret {
  display: inline-block; width: 0.6em; height: 1.05em; margin-left: 0.3em;
  background: var(--accent); vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { margin-top: 0.75rem; max-width: 60ch; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 1.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: 0.5rem 1.125rem; border: 1px solid var(--line-strong); background: var(--bg);
  font-size: 0.875rem; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease), color var(--ease);
}
.btn:hover { border-color: var(--accent); box-shadow: 0 0 14px -3px var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-primary:hover { color: var(--on-accent); }

.is-placeholder {
  border: 1px dashed var(--accent); color: var(--accent); background: transparent; cursor: not-allowed;
}

/* Secciones */
.section { padding-block: clamp(2rem, 4.5vw, 3.5rem); }
.sec-head { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1.75rem; }
.sec-num { color: var(--accent); font-size: 0.8125rem; font-weight: 700; }
.sec-head h2 { flex: none; max-width: 80%; font: 700 clamp(1.5rem, 4vw, 2.25rem)/1.2 var(--display); letter-spacing: -0.02em; }
.ascii-rule { flex: 1; min-width: 0; height: 1em; overflow: hidden; color: var(--line-strong); font-size: 0.75rem; white-space: nowrap; }
.ascii-rule::before { content: '+-----------------------------------------------------------------------------------------------------------------------------------------------------+'; }

.prose { display: grid; gap: 1rem; max-width: 65ch; }
.lead { max-width: 62ch; font-size: 1rem; }
.note { color: var(--muted); font-size: 0.8125rem; line-height: 1.6; }
.kicker { color: var(--accent); font-size: 0.8125rem; font-weight: 500; margin-bottom: 0.625rem; }
.sub-h { margin: 3rem 0 0.75rem; font: 700 1.125rem var(--display); }
.sub-h::before { content: '## '; color: var(--accent); }

.panel { background: var(--surface); border: 1px solid var(--line); padding: 1.25rem; }

.about { display: grid; gap: 1.5rem; }
.kv { display: grid; gap: 1rem; align-self: start; }
.kv dt { color: var(--accent); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.kv dd small { display: block; margin-top: 0.25rem; color: var(--muted); }

/* ClearGrade */
.core {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border-block: 1px solid var(--line);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.core-intro { display: grid; gap: 1.5rem; }
.core-intro .btn { margin-top: 1.25rem; }
.core-intro .stats { margin-top: 1.5rem; }
.core-shot { margin: 0; justify-self: center; width: min(100%, 22rem); }
.core-shot img { width: 100%; height: auto; }
[data-theme='dark'] .only-light, [data-theme='light'] .only-dark { display: none; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); align-self: start; }
.stats li { background: var(--card); padding: 0.875rem; }
.stats strong { display: block; font: 700 1.0625rem/1.3 var(--display); overflow-wrap: anywhere; }
.stats span { color: var(--muted); font-size: 0.75rem; }

.arch { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.arch li { display: grid; gap: 0.125rem; padding: 0.875rem 1rem; background: var(--card); }
.arch b { color: var(--accent); font-size: 0.8125rem; font-weight: 700; }
.arch span { font-size: 0.875rem; color: var(--muted); }

.cards { display: grid; gap: 0.875rem; }
.card {
  display: flex; flex-direction: column; gap: 0.5rem; padding: 1.125rem;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.card:hover, .setup-card:hover { border-color: var(--accent); box-shadow: 0 0 16px -6px var(--accent); }
.card h4 { margin: 0; font: 700 1rem var(--display); }
.card-status { color: var(--accent); font-size: 0.75rem; }
.card p { color: var(--muted); font-size: 0.875rem; flex: 1; }
.card a { font-size: 0.8125rem; text-underline-offset: 3px; }
.card a:hover { color: var(--accent); }

/* Agencia */
.agency-intro { display: grid; gap: 1.5rem; margin-bottom: 1.75rem; }
.agency-intro .btn { margin-top: 1.25rem; }
.agency-note { margin-top: 0.75rem; max-width: 56ch; }
.agency-demo { margin: 0; padding: 1rem; }
.nfc-plate { display: block; width: 100%; aspect-ratio: 48 / 20; touch-action: pan-y; cursor: pointer; }
.agency-demo figcaption { margin-top: 0.75rem; border-top: 1px dashed var(--line); padding-top: 0.625rem; }

/* Setup */
.setup-grid { display: grid; gap: 0.875rem; }
.setup-card { background: var(--surface); border: 1px solid var(--line); transition: border-color var(--ease), box-shadow var(--ease); }
.setup-card h3 { padding: 0.75rem 1rem; border-bottom: 1px dashed var(--line); font: 700 0.9375rem var(--display); }
.setup-card h3::before { content: '> '; color: var(--accent); }
.setup-card dl { padding: 0.625rem 1rem 0.875rem; }
.setup-card dl div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.75rem; padding-block: 0.3rem; }
.setup-card dt { color: var(--muted); font-size: 0.8125rem; }
.setup-card dd { font-size: 0.875rem; overflow-wrap: anywhere; }

/* Stack */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li {
  padding: 0.375rem 0.75rem; border: 1px solid var(--line-strong); background: var(--bg);
  font-size: 0.8125rem; transition: border-color var(--ease), color var(--ease);
}
.chips li::before { content: '['; color: var(--accent); margin-right: 0.25em; }
.chips li::after { content: ']'; color: var(--accent); margin-left: 0.25em; }
.chips li:hover { border-color: var(--accent); }

/* Blog */
.terminal { border: 1px solid var(--line-strong); background: var(--surface); }
.terminal-bar { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.75rem; }
.post { border-bottom: 1px dashed var(--line); scroll-margin-top: 5rem; }
.post:last-child { border-bottom: 0; }
.post summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.125rem 0.75rem;
  padding: 0.875rem 1rem; cursor: pointer; list-style: none; transition: background-color var(--ease);
}
.post summary::-webkit-details-marker { display: none; }
.post summary::before { content: '[+]'; grid-row: span 2; color: var(--accent); font-weight: 700; }
.post[open] summary::before { content: '[-]'; }
.post summary:hover { background: var(--card); }
.post-meta { color: var(--muted); font-size: 0.75rem; }
.post-meta .badge { margin-left: 0.5rem; padding: 0 0.375rem; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.post-title { grid-column: 2; font: 700 1rem/1.4 var(--display); }
.post-body { display: grid; gap: 0.75rem; max-width: 70ch; padding: 0 1rem 1.25rem 3.25rem; color: var(--muted); font-size: 0.875rem; }
.post.featured { box-shadow: inset 3px 0 0 var(--accent); }
.post.featured .post-body { color: var(--fg); }

/* Bloques del blog */
.post[hidden] { display: none; }
.post-filters { display: flex; flex-wrap: wrap; gap: 0.375rem; padding: 0.625rem 1rem; border-bottom: 1px dashed var(--line); }
.post-filters button { min-height: 2.25rem; padding: 0 0.625rem; background: transparent; border: 1px solid var(--line); font-size: 0.75rem; cursor: pointer; }
.post-filters button[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.post-h { margin: 0.5rem 0 0; color: var(--fg); font: 700 0.9375rem var(--display); }
.post-body blockquote { margin: 0.25rem 0; padding-left: 0.875rem; border-left: 2px solid var(--accent); color: var(--fg); font: 700 1.5rem var(--display); }
.post-list { display: grid; gap: 0.25rem; padding-left: 1.25rem; list-style: square; }
.post-code { overflow-x: auto; padding: 0.75rem; background: var(--bg); border: 1px solid var(--line); color: var(--fg); font: 400 0.8125rem/1.5 var(--mono); }
.post-figure { margin: 0.25rem 0; min-width: 0; }
.post-figure img { width: 100%; height: auto; border: 1px solid var(--line); }
.post-figure figcaption { margin-top: 0.375rem; color: var(--muted); font-size: 0.75rem; }
.post-model { display: block; width: 100%; height: clamp(16rem, 42vw, 24rem); background: var(--bg); border: 1px solid var(--line); cursor: grab; touch-action: pan-y; }
.post-model:active { cursor: grabbing; }
.post-embed { display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); }
.post-embed-audio { aspect-ratio: auto; height: 152px; }
.post-share { justify-self: start; min-height: 2.25rem; padding: 0 0.625rem; background: transparent; border: 1px solid var(--line-strong); font-size: 0.75rem; cursor: pointer; transition: border-color var(--ease), color var(--ease); }
.post-share:hover { border-color: var(--accent); color: var(--accent); }

/* Recomendaciones */
.recs { display: grid; gap: 0.875rem; }
.rec-box { background: var(--surface); border: 1px solid var(--line); transition: border-color var(--ease), box-shadow var(--ease); }
.rec-box:hover { border-color: var(--accent); box-shadow: 0 0 16px -6px var(--accent); }
.rec-box h3 { padding: 0.75rem 1rem; border-bottom: 1px dashed var(--line); font: 700 0.9375rem var(--display); }
.rec-box h3::before { content: '> '; color: var(--accent); }
.rec { display: grid; gap: 0.125rem; padding: 0.75rem 1rem; }
.rec + .rec { border-top: 1px dotted var(--line); }
.rec-with-cover { grid-template-columns: 4.5rem minmax(0, 1fr); column-gap: 0.875rem; align-items: start; }
.rec-info { display: grid; gap: 0.125rem; min-width: 0; }
.rec-cover { display: grid; place-items: center; width: 4.5rem; aspect-ratio: 2 / 3; overflow: hidden; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-weight: 700; }
.rec-cover[data-group='songs'] { aspect-ratio: 1; }
.rec-cover img { width: 100%; height: 100%; object-fit: cover; }
.rec-head { display: flex; align-items: center; gap: 0.625rem; }
.rec-head strong { font-size: 0.9375rem; }
.rec-by { color: var(--muted); font-size: 0.75rem; }
.rec p { color: var(--muted); font-size: 0.8125rem; line-height: 1.55; }
.rec a { justify-self: start; margin-top: 0.25rem; font-size: 0.8125rem; text-underline-offset: 3px; }
.rec a:hover { color: var(--accent); }
.rec-empty { justify-self: start; padding: 0.25rem 0.5rem; font-size: 0.8125rem; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 0.875rem; }
.eq i { width: 3px; height: 100%; background: var(--accent); transform-origin: bottom; animation: eq 900ms steps(5) infinite alternate; }
.eq i:nth-child(2) { animation-delay: -300ms; animation-duration: 700ms; }
.eq i:nth-child(3) { animation-delay: -600ms; animation-duration: 1100ms; }
.eq i:nth-child(4) { animation-delay: -150ms; animation-duration: 800ms; }
@keyframes eq { from { transform: scaleY(0.2); } to { transform: scaleY(1); } }

/* Contacto */
.contact { display: grid; gap: 1.5rem; }
.contact-list { display: grid; gap: 0.5rem; margin-top: 1.25rem; }
.contact-list li { display: grid; grid-template-columns: 5rem minmax(0, 1fr); align-items: center; gap: 0.75rem; }
.contact-list span { color: var(--muted); font-size: 0.8125rem; }
.contact-list a, .contact-list .is-placeholder { justify-self: start; overflow-wrap: anywhere; }
.contact-list .is-placeholder { padding: 0 0.375rem; font-size: 0.8125rem; }
.form { display: grid; gap: 0.5rem; }
.form label { font-size: 0.8125rem; color: var(--muted); }
.form input, .form textarea {
  width: 100%; padding: 0.625rem 0.75rem; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 0;
  font-size: 1rem; transition: border-color var(--ease), box-shadow var(--ease);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.form textarea { resize: vertical; margin-bottom: 0.5rem; }
.form .note.error { color: var(--accent); }

.footer { padding: 1.5rem 0 6rem; color: var(--muted); font-size: 0.8125rem; }
.footer pre { overflow: hidden; color: var(--line-strong); font: inherit; margin-bottom: 0.5rem; }

/* Orbe */
.orb { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.orb-btn {
  position: relative; width: 3rem; height: 3rem; padding: 0; border-radius: 50%; cursor: pointer;
  background-color: var(--bg); background-image: radial-gradient(var(--line-strong) 1px, transparent 1.2px); background-size: 5px 5px;
  border: 1px solid var(--line-strong);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.orb-btn:hover, .orb-btn[aria-expanded='true'] { border-color: var(--accent); box-shadow: 0 0 18px -4px var(--accent); }
.orb-pupil {
  position: absolute; top: 50%; left: 50%; width: 0.75rem; height: 0.75rem; margin: -0.375rem;
  border-radius: 50%; background: var(--accent); will-change: transform;
}
.orb-panel {
  width: min(19rem, calc(100vw - 2rem)); background: var(--bg); border: 1px solid var(--line-strong);
  box-shadow: 0 16px 40px -18px #000; font-size: 0.75rem;
}
.orb-panel[hidden] { display: none; }
.orb-head { padding: 0.375rem 0.75rem; border-bottom: 1px dashed var(--line); color: var(--accent); font-weight: 700; }
.orb-panel dl { padding: 0.5rem 0.75rem; }
.orb-panel dl div { display: flex; justify-content: space-between; gap: 1rem; line-height: 1.75; }
.orb-panel dt { color: var(--muted); }
.orb-panel dd { font-variant-numeric: tabular-nums; text-align: right; }

@media (min-width: 720px) {
  html { font-size: 87.5%; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recs { display: block; columns: 2; column-gap: 0.875rem; }
  .recs > * { break-inside: avoid; margin-bottom: 0.875rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arch li { grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; }
}
@media (min-width: 960px) {
  .about { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; }
  .core-intro { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
  .agency-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 3rem; align-items: center; }
  .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 3rem; }
}
@media (max-width: 719px) {
  .topbar-in { flex-wrap: wrap; gap: 0 0.5rem; padding-top: 0.25rem; }
  .brand { flex: 1; }
  .topbar nav { order: 3; flex: 0 0 100%; }
  .nav { margin-left: 0; }
  .nav a { padding-inline: 0.5rem; }
  .nav li:first-child a { padding-left: 0; }
  html { scroll-padding-top: 7rem; }
  .post-body { padding-left: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Modo portal */
.portal-layer { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }
.portal { position: absolute; width: 68px; height: 136px; margin: -68px 0 0 -34px; border-radius: 50%; animation: portal-open 0.28s ease-out; }
.portal.blue { background: radial-gradient(closest-side, #0a1a33 55%, #3aa0ff 82%, transparent); box-shadow: 0 0 22px 4px #3aa0ff88; }
.portal.orange { background: radial-gradient(closest-side, #331a06 55%, #ff8a2a 82%, transparent); box-shadow: 0 0 22px 4px #ff8a2a88; }
@keyframes portal-open { from { transform: scale(0.1); opacity: 0; } }
.portal-bolt { position: fixed; z-index: 61; font: 700 16px/1 'JetBrains Mono', monospace; pointer-events: none; }
.portal-bolt.blue { color: #3aa0ff; text-shadow: 0 0 8px #3aa0ff; }
.portal-bolt.orange { color: #ff8a2a; text-shadow: 0 0 8px #ff8a2a; }
.portal-ghost { position: fixed; z-index: 62; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; pointer-events: none; border: 2px solid #fff; }
.portal-ghost.blue { box-shadow: 0 0 10px 3px #3aa0ff; }
.portal-ghost.orange { box-shadow: 0 0 10px 3px #ff8a2a; }
.portal-hint { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 63; padding: 0.4rem 0.8rem; border: 1px solid var(--border, #444); background: var(--bg, #000); font-size: 0.75rem; pointer-events: none; }
.portal-mode body, .portal-mode { cursor: crosshair; }

.portal-mode :is(h1, h2, h3, h4, p, li, a, button, img, figure, dt, dd, pre, label, article, summary, .rec) { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.portal-moved { position: relative; z-index: 50; }
.portal-held { z-index: 55; cursor: grabbing !important; filter: drop-shadow(0 0 10px #3aa0ff88); }

/* Propuesta PC Builds Honduras (/propuesta/PCBH/) */
.pcbh-path { color: var(--muted); font-size: 0.8125rem; margin-bottom: 1.5rem; }
.pcbh-path a { color: var(--accent); text-decoration: none; }
.pcbh-path a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pcbh-path span { margin-inline: 0.25rem; color: var(--line-strong); }
.pcbh-path b { color: var(--fg); }
.pcbh-title { display: flex; align-items: center; gap: 1rem; }
.pcbh-title img { width: clamp(2.5rem, 6vw, 3.5rem); height: auto; }
.pcbh-title h1 { font: 700 clamp(1.75rem, 5.2vw, 3rem)/1.1 var(--display); letter-spacing: -0.02em; }
.pcbh-meta { display: grid; gap: 0.375rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px dashed var(--line); font-size: 0.8125rem; }
.pcbh-meta div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0.75rem; }
.pcbh-meta dt { color: var(--accent); }
.pcbh-meta dd { color: var(--muted); }

.pcbh-board { display: block; margin-top: 1.25rem; padding: 0.5rem; transition: border-color var(--ease), box-shadow var(--ease); }
.pcbh-board:hover { border-color: var(--accent); box-shadow: 0 0 16px -6px var(--accent); }
.pcbh-board img { width: 100%; height: auto; }

.pcbh-tabs { padding: 0 0 1rem; border: 0; }
.pcbh-ba { display: grid; gap: 1rem; }
.compare-frame { position: relative; }
.compare {
  height: clamp(22rem, 62vh, 40rem); overflow-y: auto; overflow-x: hidden;
  background: #fff; cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  scrollbar-width: thin;
}
.compare-inner { position: relative; }
.compare img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.compare.is-phone img { width: min(100%, 390px); margin-inline: auto; }
.compare-before { position: absolute; inset: 0; background: #fff; }
.compare.is-phone .compare-before { background: transparent; }
.compare-tag {
  position: absolute; top: 0.75rem; z-index: 5; padding: 0.125rem 0.5rem; pointer-events: none;
  background: #000; color: #fff; font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.compare-tag-l { left: 0.75rem; }
.compare-tag-r { right: 1.25rem; }
.compare-handle { position: absolute; top: 0; bottom: 0; z-index: 4; width: 0; border-left: 2px solid #000; outline: none; }
.compare-handle span {
  position: sticky; top: calc(clamp(22rem, 62vh, 40rem) / 2 - 1rem); display: grid; place-items: center; width: 3rem; height: 2rem; margin-left: -1.55rem;
  background: #000; color: #fff; font-size: 0.75rem; font-weight: 700; transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.compare:hover .compare-handle span, .compare-handle:focus-visible span { transform: scale(1.12); }
.compare-handle:focus-visible span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcbh-changes { display: grid; gap: 0.875rem; align-content: start; }
.pcbh-changes h3 { font: 700 1.125rem var(--display); }
.pcbh-changes h3::before { content: '> '; color: var(--accent); }
.pcbh-changes .post-list { color: var(--muted); font-size: 0.875rem; gap: 0.5rem; }
.pcbh-changes .btn { justify-self: start; }

.pcbh-checks { display: grid; gap: 0.375rem; color: var(--muted); font-size: 0.8125rem; flex: 1; }
.pcbh-checks li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); }
.pcbh-checks li::before { content: '[x]'; color: var(--accent); font-weight: 700; font-size: 0.75rem; }
.pcbh-finding { margin-top: 0.875rem; font-size: 0.875rem; color: var(--muted); }
.pcbh-finding b { color: var(--fg); }

.pcbh-trust { margin-top: 1.25rem; }
.pcbh-trust dd { color: var(--muted); font-size: 0.875rem; }

.pcbh-plans { margin-top: 1.25rem; }
.pcbh-price { font: 700 clamp(1.75rem, 3.6vw, 2.25rem)/1.1 var(--display); margin-block: 0.25rem 0.5rem; padding-bottom: 0.75rem; border-bottom: 1px dashed var(--line); }
.pcbh-featured { border-color: var(--fg); box-shadow: inset 0 3px 0 var(--fg); }
.pcbh-featured .card-status::after { content: ' ★'; }
.pcbh-extras { grid-template-columns: minmax(0, 1fr); }
.pcbh-hosting { max-width: 75ch; font-size: 0.875rem; }
.pcbh-next-note { margin-top: 0.5rem; }

@media (min-width: 720px) { .pcbh-extras { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .pcbh-ba { grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; } }
@media (max-width: 719px) { .pcbh-meta div { grid-template-columns: 6.5rem minmax(0, 1fr); } }
.pcbh-seal { margin: 0; padding: 1rem 1.25rem; border: 3px double var(--fg); background: var(--surface); display: grid; gap: 0.75rem; align-self: start; }
.pcbh-seal figcaption { color: var(--accent); font-weight: 700; font-size: 0.8125rem; }
.pcbh-seal dl { display: grid; gap: 0.25rem; }
.pcbh-seal dl div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.75rem; font-size: 0.875rem; }
.pcbh-seal dt { color: var(--muted); }
.pcbh-seal code { font: 700 0.8125rem var(--mono); letter-spacing: 0.04em; overflow-wrap: anywhere; }
.pcbh-seal .note { border-top: 1px dashed var(--line); padding-top: 0.625rem; }
.pcbh-next-note + .actions { margin-top: 1.25rem; }

.pcbh-plans { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .pcbh-plans { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.pcbh-phases-note { margin-bottom: 0.75rem; }
.pcbh-phases { margin: 0; padding: 0; list-style: none; border-top: 1px dashed var(--line); }
.pcbh-phases li { display: grid; gap: 0.25rem 1.5rem; padding: 0.875rem 0; border-bottom: 1px dashed var(--line); font-size: 0.875rem; }
.pcbh-phases b { color: var(--accent); font-weight: 700; }
.pcbh-phases span { color: var(--muted); }
@media (min-width: 720px) { .pcbh-phases li { grid-template-columns: 10rem minmax(0, 1fr) 16rem; } .pcbh-phases strong { text-align: right; } }
.pcbh-short { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.pcbh-short .actions { margin-top: 1.5rem; }
