/*
  Hoja de estilo de las notas técnicas.

  Deliberadamente independiente de omnipug.css: una nota es un documento, no
  una ventana del escritorio, y cargar toda la hoja del OS traería el wallpaper,
  el dock y el chrome para nada. Se repiten aquí solo los tokens que la nota usa.

  La paleta y los tres fondos oscuros son los mismos que los del escritorio —
  cassette futurism, con docs/PALETTE.md como origen para las dos hojas — así
  que un cambio allí toca este bloque también.

  La nota se lee en dos sitios: aquí, como página propia, y dentro de la
  ventana `archivo`, que la pinta con `.reader__sheet`. Las dos vistas del
  mismo texto tienen que verse igual, así que las superficies son oscuras
  también aquí.
*/

:root {
  color-scheme: dark;

  --hull-graphite: #2E3136;
  --oxidized-olive: #4A5248;
  --aged-steel: #6E6558;
  --signal-amber: #C97A3D;
  --warm-fluorescent: #E3D8BF;
  --terminal-green: #7FAE9B;
  --rust-red: #8B4438;

  --desktop-dark: #202228;
  --window-dark: #25282D;
  --console-dark: #161B19;

  --graphite-deep: #1B1D20;
  --graphite-raised: #3A3E44;

  --screen: var(--desktop-dark);
  --surface-sunken: var(--window-dark);
  --surface: var(--hull-graphite);
  --surface-raised: var(--graphite-raised);
  --console: var(--console-dark);

  /* 9.23 / 7.82 / 5.48 sobre --surface. Ver la nota en omnipug.css. */
  --ink: var(--warm-fluorescent);
  --ink-soft: #D7C7A3;
  --ink-dim: #AFA79B;

  --accent: var(--signal-amber);
  --accent-lit: #DE9A5F;
  --alert: var(--rust-red);
  --alert-lit: #D39C93;
  --phosphor: var(--terminal-green);

  --edge: var(--aged-steel);
  --edge-soft: #575046;
  --relief-light: rgba(227, 216, 191, .09);
  --relief-dark: rgba(14, 15, 18, .55);

  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 12px;
  --space-6: 16px;
  --space-7: 24px;
  --space-8: 32px;

  --stroke-hairline: 1px;
  --stroke-active: 2px;
  --divider-subtle: var(--stroke-hairline) solid var(--edge-soft);
  --divider-strong: var(--stroke-hairline) solid var(--edge);

  --motion-fast: 100ms;
  --motion-standard: 140ms;
  --motion-slow: 180ms;
  --ease-mechanical: cubic-bezier(.2, 0, 0, 1);

  --focus-width: var(--stroke-active);
  --focus-offset: 2px;
  --focus-color: var(--accent);

  --font-brand: "Oxanium", system-ui, sans-serif;
  --font-ui: "IBM Plex Sans", system-ui, sans-serif;
  --font-content: "IBM Plex Sans", Arial, sans-serif;
  --font-terminal: "IBM Plex Mono", "Courier New", ui-monospace, monospace;

  --text-meta: .75rem;
  --text-ui: .8125rem;
  --text-body: 1rem;
  --text-title: 1.125rem;
  --leading-tight: 1.15;
  --leading-ui: 1.3;
  --leading-body: 1.55;
  --tracking-title: .06em;
  --tracking-meta: .08em;
}

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

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: var(--focus-offset);
}

.os-type-title {
  font-family: var(--font-brand);
  font-size: var(--text-title);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
}

.os-type-ui {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  font-weight: 500;
  line-height: var(--leading-ui);
}

.os-type-body {
  font-family: var(--font-content);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.os-type-meta {
  font-family: var(--font-terminal);
  font-size: var(--text-meta);
  line-height: var(--leading-ui);
  letter-spacing: var(--tracking-meta);
  text-transform: uppercase;
}

body {
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--edge) var(--surface-sunken);
  padding: 0 16px 64px;
  background: var(--screen);
  color: var(--ink-soft);
  font-family: var(--font-content);
  font-size: 17px;
  line-height: 1.62;
}

/* Barra de marca. Es la única navegación fija: enlaza a la portada. */
.note-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 0;
  color: var(--ink-dim);
  font-family: var(--font-ui);
  font-size: 13px;
}

/*
  La barra va sobre el fondo del sistema, donde el subrayado ámbar que llevan
  los enlaces del cuerpo sería lo más ruidoso de la página. La navegación no
  es el acento.
*/
.note-bar a {
  color: inherit;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
}

.note-bar__brand {
  color: var(--ink);
  font-family: var(--font-brand);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
}

.note-sheet {
  max-width: 760px;
  margin: 0 auto;
  padding: 38px 42px 44px;
  border: 1px solid var(--edge-soft);
  background: var(--surface);
  box-shadow: inset 1px 1px 0 var(--relief-light);
}

.note-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--ink-dim);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* La misma marca que abre un rótulo en el escritorio. */
.note-eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 2px;
  background: var(--accent);
}

h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--font-brand);
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.12;
}

.note-meta {
  margin: 0 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--edge-soft);
  color: var(--ink-dim);
  font-family: var(--font-ui);
  font-size: 13px;
}

h2 {
  margin: 34px 0 12px;
  color: var(--ink);
  font-family: var(--font-brand);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
}

/* Subsección dentro de un bloque del post. Baja de familia a propósito: la
   fuente de marca marca las tres secciones fijas, la de UI marca los pasos. */
h3 {
  margin: 26px 0 10px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

p { margin: 0 0 16px; }

ul { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }

strong { color: var(--ink); font-weight: 600; }

/* El ámbar da 3.94 sobre esta superficie: sirve de línea, no de palabra. El
   acento va en el subrayado y el texto conserva la tinta que lo rodea. */
a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-lit);
  text-decoration-color: var(--accent-lit);
}

code {
  padding: 1px 5px;
  border: 1px solid var(--edge-soft);
  background: var(--surface-sunken);
  color: var(--phosphor);
  font-family: var(--font-terminal);
  font-size: 1.02em;
}

pre {
  margin: 0 0 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--edge) var(--console);
  padding: 15px 17px;
  overflow-x: auto;
  border: 1px solid var(--edge-soft);
  background: var(--console);
  color: var(--phosphor);
  font-family: var(--font-terminal);
  font-size: 15px;
  line-height: 1.5;
}

pre code { padding: 0; border: 0; background: none; color: inherit; font-size: 1em; }

/* Nota al margen: el aviso honesto que acompaña a una decisión. */
.note-aside {
  margin: 0 0 20px;
  padding: 13px 17px;
  border-left: 2px solid var(--accent);
  background: var(--surface-sunken);
  font-size: 16px;
}

.note-aside p:last-child { margin-bottom: 0; }

.note-foot {
  max-width: 760px;
  margin: 24px auto 0;
  padding: 20px 22px;
  border: 1px solid var(--edge-soft);
  background: var(--surface-sunken);
}

.note-foot h2 { margin-top: 0; font-size: 18px; }
.note-foot ul { margin-bottom: 0; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .note-sheet { padding: 24px 18px 30px; }
  .note-foot { padding: 16px 18px; }
}

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