/* Mesa editorial: el diseño de las tres fichas que aprobó Fran el 2026-10-23, llevado a toda la app.
   Letra fina y grande, fondo gris claro, tarjetas blancas, un solo acento naranja; verde, ámbar y rojo
   solo para estados. La letra viaja con la app: la página no pide nada afuera. */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/onest-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --canvas: #ececea;
  --paper: #f5f5f3;
  --card: #ffffff;
  --ink: #161616;
  --body: #4b4e4c;
  --muted: #8b8d8c;
  --hair: #e3e3e0;
  --dot: #d3d3cf;
  --accent: #ff5b36;
  --accent-wash: #fff1ea;
  --accent-ink: #c2410c;
  --ok: #2fb36b;
  --ok-wash: #e7f6ee;
  --ok-ink: #1c7a47;
  --mid: #f0ae2e;
  --mid-wash: #fff6e8;
  --mid-ink: #9a6416;
  --bad: #ef5a4f;
  --bad-wash: #fdeceb;
  --bad-ink: #b42318;
  --unk: #a3a6a4;
  --soft-ink: #747975;
  --field-line: #d9ddd7;
  --lift:
    0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 2px 6px rgba(22, 22, 22, 0.04),
    0 24px 48px -24px rgba(22, 22, 22, 0.22);
  --soft:
    0 2px 8px rgba(22, 22, 22, 0.04), 0 18px 40px -28px rgba(22, 22, 22, 0.25);
  --font:
    "Onest", "SF Pro Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 48px;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 400;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
img {
  max-width: 100%;
}
code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--paper);
  padding: 1px 6px;
  border-radius: 6px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
svg.i {
  width: 18px;
  height: 18px;
  flex: none;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.muted {
  color: var(--muted);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Piezas sueltas */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  background: var(--card);
  box-shadow: var(--soft);
  white-space: nowrap;
}
.pill.dark {
  background: var(--ink);
  color: var(--card);
  box-shadow: none;
}
.pill.small {
  padding: 8px 14px;
  font-size: 14px;
}
.pill.full {
  width: 100%;
}
.pill svg.i {
  width: 16px;
  height: 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.3;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--body);
  white-space: nowrap;
}
.chip.new,
.chip.st-desarrollar {
  background: var(--accent-wash);
  color: var(--accent-ink);
}
.chip.known,
.chip.st-grabada,
.chip.good {
  background: var(--ok-wash);
  color: var(--ok-ink);
}
.chip.warn {
  background: var(--mid-wash);
  color: var(--mid-ink);
}
.chip.bad {
  background: var(--bad-wash);
  color: var(--bad-ink);
}
.chip.sug {
  background: #eef0ff;
  color: #4338ca;
}
.chip.st-posponer {
  color: var(--muted);
}
.chip.on-card {
  background: var(--card);
  box-shadow: var(--soft);
}
.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--paper);
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  letter-spacing: 0;
}
.logo img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}
.logo.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo.lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}
.logo.lg img {
  width: 28px;
  height: 28px;
}
.logo.sm {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 12px;
}
.logo.sm img {
  width: 18px;
  height: 18px;
}

/* Barra flotante: se esconde al leer y vuelve al pasar el cursor por arriba (en el celular, al subir) */
.top {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  z-index: 10;
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  justify-items: center;
  gap: 12px;
  padding-inline: 28px;
  pointer-events: none;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
}
.top > * {
  pointer-events: auto;
}
.top .slot {
  width: 46px;
  height: 46px;
}
.top.hide {
  transform: translateY(-220%);
  opacity: 0;
}
.top.hide > * {
  pointer-events: none;
}
.peek {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 9;
}
.round {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--soft);
  border: 0;
  padding: 0;
}
.nav {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--soft);
}
.nav button {
  border: 0;
  background: none;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--muted);
}
.nav button.active {
  background: var(--ink);
  color: var(--card);
}

/* Listas: Novedades, Biblioteca, Ideas */
.page {
  width: 100%;
  max-width: 1336px;
  margin: 0 auto;
  padding: 72px var(--gutter) 40px;
  min-width: 0;
}
.head {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
  padding: 40px 0 60px;
}
.head h1 {
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 300;
}
.head p {
  font-size: clamp(18px, 1.7vw, 22px);
  color: var(--muted);
  font-weight: 300;
  max-width: 40ch;
  line-height: 1.35;
}
.state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.3;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--soft);
}
.state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.group {
  margin-top: 56px;
}
.group:first-of-type {
  margin-top: 0;
}
.group-h {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 4px 22px;
}
.group-h h2 {
  font-size: clamp(28px, 2.8vw, 38px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.035em;
}
.group-h span {
  font-size: 16px;
  color: var(--muted);
}
.empty {
  text-align: center;
  color: var(--muted);
  font-size: 18px;
  padding: 40px 0;
}
.error {
  color: var(--bad-ink);
  text-align: center;
  font-size: 17px;
  padding: 40px 0;
}

/* Novedades */
.ngrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.ncard {
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--lift);
  padding: 22px 24px;
  display: grid;
  gap: 14px;
  align-content: start;
  cursor: pointer;
  min-width: 0;
}
.ncard.hot {
  grid-column: span 2;
  box-shadow:
    0 0 0 1.5px var(--accent),
    var(--lift);
}
.ncard .nsrc {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ncard .nsrc > div {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}
.ncard .nsrc b {
  font-weight: 500;
  font-size: 15.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ncard .nsrc span {
  font-size: 13px;
  color: var(--muted);
}
.ncard .nsrc .chip {
  margin-left: auto;
}
.ncard h3 {
  font-size: 21px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.ncard.hot h3 {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 400;
  letter-spacing: -0.03em;
}
.ncard h3 button {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
  letter-spacing: inherit;
}
.ncard p {
  font-size: 16px;
  line-height: 1.45;
  color: var(--body);
}
.ncard p.alert {
  color: var(--mid-ink);
}
.ncard .nfoot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.ncard .nfoot a {
  margin-left: auto;
}

/* Biblioteca */
.rgrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.rcard {
  border: 0;
  text-align: left;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--soft);
  padding: 10px 10px 16px;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.shot {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.rcard .shot {
  aspect-ratio: 4 / 5;
}
.shot.none {
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--muted);
  font-size: 34px;
  font-weight: 300;
}
.rcard .rbody {
  display: grid;
  gap: 8px;
  padding: 0 6px;
  min-width: 0;
}
.rcard .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rcard h3 {
  font-size: 16.5px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rcard small {
  font-size: 13px;
  color: var(--muted);
}

/* Ideas: las tarjetas son las de Biblioteca (.rcard); el paquete del día, en fila */
.pgrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.pcard {
  border: 0;
  text-align: left;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--lift);
  padding: 10px 10px 16px;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.pcard .shot {
  aspect-ratio: 4 / 5;
}
.pcard .pbody {
  display: grid;
  gap: 6px;
  padding: 0 6px;
}
.pcard .n {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.pcard h3 {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.pcard p {
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Plegados al final de una lista o de una ficha */
.folds {
  display: grid;
  gap: 14px;
  justify-items: center;
  margin-top: 72px;
}
.fold {
  width: min(100%, 760px);
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--soft);
}
.fold.wide {
  width: 100%;
}
.fold > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 17px;
}
.fold > summary::-webkit-details-marker {
  display: none;
}
.fold > summary span {
  color: var(--muted);
}
.fold .fbody {
  padding: 0 24px 22px;
  display: grid;
  gap: 12px;
}
.fold.wide .fbody {
  padding: 4px 18px 20px;
}
.fold ul.links {
  display: grid;
  gap: 10px;
}
.fold ul.links li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 15.5px;
}
.fold ul.links li span {
  color: var(--muted);
  white-space: nowrap;
}
.fold ul.links li a {
  text-decoration: underline;
  text-decoration-color: var(--hair);
  text-underline-offset: 3px;
}
.catalog-item {
  background: var(--paper);
  border-radius: 16px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}
.catalog-item a {
  font-weight: 500;
}
.catalog-item p {
  font-size: 15px;
  color: var(--body);
}
.fb-item {
  background: var(--paper);
  border-radius: 16px;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}
.fb-item blockquote {
  font-size: 17px;
}
.fb-item p {
  font-size: 14.5px;
  color: var(--muted);
}
.fb-item .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Pie: versión y tiempos medidos en este dispositivo */
.diag {
  padding: 20px var(--gutter) 40px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* Detalle de una novedad o de una referencia sin ficha nueva */
.lead {
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}
.lead h1 {
  font-size: clamp(46px, 7vw, 100px);
  line-height: 0.96;
  letter-spacing: -0.05em;
  font-weight: 300;
  max-width: 14ch;
}
.lead h1.long {
  font-size: clamp(40px, 5.2vw, 76px);
  max-width: 18ch;
}
.lead > p {
  font-size: clamp(19px, 1.9vw, 24px);
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.35;
  font-weight: 300;
}
.lead .acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.dates {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.media-box {
  margin: 44px auto 0;
  width: min(100%, 520px);
  border-radius: 28px;
  overflow: hidden;
  background: #111;
  box-shadow: var(--lift);
}
.media-box img,
.media-box video {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}
.notice {
  margin: 28px auto 0;
  width: min(100%, 720px);
  background: var(--mid-wash);
  color: var(--mid-ink);
  border-radius: 18px;
  padding: 14px 18px;
  font-size: 15.5px;
  text-align: center;
}
.version {
  background: var(--card);
  border-radius: 26px;
  box-shadow: var(--lift);
  padding: 22px 24px;
  display: grid;
  gap: 10px;
  width: min(100%, 760px);
  margin: 18px auto 0;
}
.version h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.version p {
  font-size: 16px;
  color: var(--body);
}
.version small {
  font-size: 13px;
  color: var(--muted);
}
.version ul {
  display: grid;
  gap: 6px;
}
.version li {
  background: var(--paper);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 15px;
}
.transcript-text {
  white-space: pre-wrap;
  font-size: 15.5px;
  color: var(--body);
}
.form {
  display: grid;
  gap: 10px;
}
.form label {
  font-size: 14px;
  color: var(--muted);
}
.form input,
.form textarea {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid transparent;
  border-radius: 16px;
  padding: 13px 16px;
  width: 100%;
}
.form textarea {
  min-height: 96px;
  resize: vertical;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
}
.form-error {
  color: var(--bad-ink);
  font-size: 14.5px;
  min-height: 1.2em;
}

/* Ingreso */
.login {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}
.login-card {
  position: relative;
  width: min(100%, 460px);
  background: var(--card);
  border-radius: 40px;
  box-shadow: var(--lift);
  padding: 44px 40px 36px;
  display: grid;
  gap: 22px;
  text-align: center;
}
.login-card::before,
.login-card::after {
  content: "";
  position: absolute;
  width: 320px;
  max-width: 80%;
  height: 240px;
  filter: blur(10px);
  z-index: -1;
}
.login-card::before {
  top: -70px;
  right: -60px;
  background: radial-gradient(
    closest-side,
    rgba(255, 168, 120, 0.4),
    transparent
  );
}
.login-card::after {
  bottom: -70px;
  left: -60px;
  background: radial-gradient(
    closest-side,
    rgba(150, 180, 255, 0.4),
    transparent
  );
}
.login-card .state {
  justify-self: center;
}
.login-card h1 {
  font-size: clamp(44px, 9vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 300;
}
.login-card > p {
  font-size: 18px;
  color: var(--muted);
  font-weight: 300;
}
.login-card .form {
  text-align: left;
  margin-top: 8px;
}
.login-card .pill {
  margin-top: 6px;
}

/* Visor de capturas */
.viewer {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
}
.viewer::backdrop {
  background: rgba(10, 10, 10, 0.88);
}
.viewer[open] {
  display: grid;
  place-items: center;
}
.viewer img {
  max-width: 94vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 18px;
}
.viewer button {
  position: fixed;
  top: 18px;
  right: 18px;
}
button.zoom {
  border: 0;
  padding: 0;
  background: none;
  display: block;
  width: 100%;
  cursor: zoom-in;
}

/* ── La ficha: una pantalla por parte ── */
.screen {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding-inline: var(--gutter);
  padding-block: 110px;
  overflow-x: clip;
}
.screen.alt {
  background: var(--paper);
}
.screen.first {
  padding-top: 96px;
}
.inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  min-width: 0;
}
.from {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  color: var(--muted);
  text-align: center;
}
.from img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  box-shadow: var(--soft);
}
.from b {
  color: var(--ink);
  font-weight: 500;
}
.board {
  position: relative;
  isolation: isolate;
  margin-top: 52px;
  border-radius: 40px;
  background: var(--card);
  box-shadow: var(--lift);
  padding: 18px;
}
.board::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -40px;
  width: 360px;
  max-width: 70%;
  height: 260px;
  background: radial-gradient(
    closest-side,
    rgba(255, 168, 120, 0.35),
    transparent
  );
  filter: blur(10px);
  z-index: -1;
}
.board::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 380px;
  max-width: 70%;
  height: 260px;
  background: radial-gradient(
    closest-side,
    rgba(150, 180, 255, 0.35),
    transparent
  );
  filter: blur(10px);
  z-index: -1;
}
.canvas {
  border-radius: 28px;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.1px);
  background-size: 18px 18px;
}
.decide {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--soft);
}
.decide .status {
  border: 0;
  background: none;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--muted);
}
.decide .status.selected {
  background: var(--ink);
  color: var(--card);
}
.decide-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
}
.decide-wrap small {
  font-size: 13px;
  color: var(--muted);
}
.badge-row {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}
.badge-row .chip {
  font-size: 14px;
  padding: 8px 14px;
  background: var(--card);
  box-shadow: var(--soft);
  white-space: normal;
  text-align: center;
  max-width: 100%;
  line-height: 1.45;
  border-radius: 18px;
}
.badge-row .chip img {
  width: 16px;
  height: 16px;
  flex: none;
}

/* El texto del tweet */
.tweet {
  width: min(100%, 620px);
  margin: 44px auto 0;
  background: var(--card);
  border-radius: 30px;
  box-shadow: var(--lift);
  padding: 24px 26px;
  display: grid;
  gap: 14px;
  text-align: left;
}
.tweet-h {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tweet-h .av {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  display: grid;
  place-items: center;
}
.tweet-h .av img {
  width: 20px;
  height: 20px;
  filter: invert(1);
}
.tweet-h b {
  display: block;
  font-weight: 500;
}
.tweet-h small {
  color: var(--muted);
  font-size: 14px;
}
.tweet p {
  font-size: 21px;
  line-height: 1.35;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.tweet small.note {
  color: var(--muted);
  font-size: 14px;
}

/* Títulos de sección */
.sechead {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  margin-bottom: 52px;
}
.sechead h2 {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.045em;
}
.sechead h2 b {
  font-weight: 500;
}
.sechead p {
  font-size: 20px;
  color: var(--muted);
  font-weight: 300;
  max-width: 46ch;
  line-height: 1.4;
}

/* Lo que se conecta, se dibuja: cajas en grilla y conectores dibujados encima */
.flowcanvas {
  position: relative;
  display: block;
  padding: 56px 44px 40px;
}
.fgrid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 64px 72px;
}
.fwires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.fwires path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
}
.fwires circle {
  fill: var(--card);
  stroke: var(--ink);
  stroke-width: 2;
}
.fwires .e-inventado path,
.fwires .e-inventado circle,
.fwires .e-autor path,
.fwires .e-autor circle {
  stroke: var(--bad);
}
.fwires .e-inventado path,
.fwires .e-autor path {
  stroke-dasharray: 6 6;
}
.fwires .e-dudoso path,
.fwires .e-dudoso circle {
  stroke: var(--mid);
}
.fwires .e-agrega path,
.fwires .e-agrega circle {
  stroke: var(--accent);
}
.fwires .e-real path,
.fwires .e-real circle,
.fwires .e-oficial path,
.fwires .e-oficial circle {
  stroke: var(--ok);
}
.fnode {
  position: relative;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--soft);
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}
.fnode .n {
  position: absolute;
  top: -12px;
  left: 14px;
  font-size: 12px;
  font-weight: 500;
  background: var(--ink);
  color: var(--card);
  border-radius: 999px;
  padding: 3px 9px;
}
.fnode h4 {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fnode p {
  font-size: 15px;
  line-height: 1.35;
  background: var(--paper);
  border-radius: 12px;
  padding: 10px 12px;
}
.fnode small {
  font-size: 13px;
  color: var(--muted);
}
.fnode.g-real,
.fnode.g-oficial {
  box-shadow:
    0 0 0 1.5px rgba(47, 179, 107, 0.6),
    var(--soft);
}
.fnode.g-inventado,
.fnode.g-autor {
  box-shadow:
    0 0 0 1.5px rgba(239, 90, 79, 0.65),
    var(--soft);
}
.fnode.g-inventado .n,
.fnode.g-autor .n {
  background: var(--bad);
}
.fnode.g-dudoso {
  box-shadow:
    0 0 0 1.5px rgba(240, 174, 46, 0.75),
    var(--soft);
}
.fnode.g-agrega {
  box-shadow:
    0 0 0 1.5px var(--accent),
    var(--soft);
}
.fnode.g-agrega .n {
  background: var(--accent);
}
.flegend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 26px;
  font-size: 15px;
  color: var(--muted);
}
.flegend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.flegend i {
  width: 22px;
  height: 0;
  border-top: 2px solid var(--ink);
  display: inline-block;
}
.flegend i.g-real,
.flegend i.g-oficial {
  border-color: var(--ok);
}
.flegend i.g-inventado,
.flegend i.g-autor {
  border-top-style: dashed;
  border-color: var(--bad);
}
.flegend i.g-dudoso {
  border-color: var(--mid);
}
.flegend i.g-agrega {
  border-color: var(--accent);
}

/* Herramientas: conocida o nueva, y se recuerda */
.tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.tools.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 900px;
  margin: 0 auto;
}
/* Siete u ocho herramientas: de a cuatro, sin una sola en la última fila. */
.tools.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.tool {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--lift);
  padding: 18px 20px;
  display: grid;
  gap: 10px;
}
.tool-h {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tool-h > div {
  display: grid;
  gap: 4px;
  justify-items: start;
}
.tool-h b {
  display: block;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.tool .use {
  font-size: 15px;
  color: var(--muted);
}
.tool:not(.known) .use.has-what {
  display: none;
}
.tool .rows {
  display: grid;
  gap: 4px;
}
.tool .rows p {
  font-size: 16px;
  line-height: 1.4;
}
.tool .rows p.price {
  font-size: 15px;
  font-weight: 500;
}
.tool .rows p.fine {
  font-size: 14px;
  color: var(--muted);
}
.tool.known .rows {
  display: none;
}
.tool-f {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.tool .toggle {
  justify-self: start;
  border: 0;
  background: none;
  padding: 4px 0;
  font-size: 14px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tool:not(.known) .toggle {
  background: var(--ink);
  color: var(--card);
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
}
.tool .toggle[disabled] {
  opacity: 0.5;
  cursor: progress;
}

/* Paso a paso, con la captura entera */
.steps5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.st {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--lift);
  padding: 10px 10px 16px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.st img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #111;
  border-radius: 16px;
  display: block;
}
.st div {
  padding: 0 6px;
  display: grid;
  gap: 4px;
}
.st small {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.st b {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.st p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.35;
}
.st.warn small {
  color: #b45309;
}

/* ¿Es cierto? */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 72px;
  align-items: center;
}
.truth h2 {
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1;
}
.huge {
  font-size: clamp(120px, 15vw, 210px);
  line-height: 0.85;
  font-weight: 300;
  letter-spacing: -0.07em;
  margin-top: 30px;
  font-variant-numeric: tabular-nums;
}
.huge small {
  font-size: 0.2em;
  letter-spacing: -0.02em;
  color: var(--muted);
  margin-left: 10px;
}
.huge.word {
  font-size: clamp(64px, 8vw, 116px);
  letter-spacing: -0.05em;
  line-height: 0.95;
}
.huge.word.s-cierto {
  color: var(--ok);
}
.huge.word.s-a-medias {
  color: var(--mid);
}
.huge.word.s-falso {
  color: var(--bad);
}
.huge.word.s-no-se-sabe {
  color: var(--unk);
}
.bars {
  display: flex;
  gap: 6px;
  margin-top: 34px;
  max-width: 360px;
}
.bars i {
  flex: 1;
  height: 10px;
  border-radius: 10px;
  background: var(--unk);
}
.bars i.s-cierto {
  background: var(--ok);
}
.bars i.s-a-medias {
  background: var(--mid);
}
.bars i.s-falso {
  background: var(--bad);
}
.truth .gist {
  margin-top: 26px;
  font-size: 22px;
  font-weight: 300;
  max-width: 24ch;
  line-height: 1.35;
}
.list {
  background: var(--card);
  border-radius: 34px;
  box-shadow: var(--lift);
  overflow: hidden;
}
.list-h {
  padding: 24px 30px 18px;
  background: linear-gradient(120deg, #fff4dc, #ffe4d6 55%, #fdf7ee);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: space-between;
  align-items: baseline;
}
.list-h b {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.list-h span {
  font-size: 14px;
  color: #8a5a2c;
}
.row {
  border-top: 1px solid var(--hair);
}
.row:first-of-type {
  border-top: 0;
}
.row summary {
  list-style: none;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  gap: 16px;
  align-items: center;
  padding: 18px 30px;
  cursor: pointer;
}
.row summary::-webkit-details-marker {
  display: none;
}
.row summary p {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.row summary .plus {
  color: var(--muted);
  transition: transform 0.2s;
}
.row[open] summary .plus {
  transform: rotate(45deg);
}
.mark {
  width: 26px;
  height: 26px;
}
.open {
  padding: 0 30px 22px 76px;
  display: grid;
  gap: 10px;
  justify-items: start;
}
.open .ans {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.open p {
  font-size: 15.5px;
  color: var(--body);
}
.open .zoom {
  width: min(100%, 260px);
  border-radius: 16px;
  overflow: hidden;
  background: #111;
}
.open .zoom img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: contain;
}
.src {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.src a {
  font-size: 13.5px;
  padding: 8px 14px;
}
.dcard .src a,
.gcard .src a {
  font-size: 12.5px;
  padding: 6px 12px;
  box-shadow: none;
  background: var(--paper);
}
.tool-f .src {
  margin: 0;
}

/* Para ir más profundo y tarjetas sueltas */
.deep {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.deep.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dcard {
  background: var(--card);
  border-radius: 26px;
  box-shadow: var(--lift);
  padding: 22px 24px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.dcard .dn {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.dcard h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.dcard p {
  font-size: 16px;
  line-height: 1.45;
  color: var(--body);
}
.more {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}
.gcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.gcards.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gcard {
  background: var(--card);
  border-radius: 26px;
  box-shadow: var(--lift);
  padding: 22px 24px;
  display: grid;
  gap: 8px;
  align-content: start;
  text-align: left;
}
.gcard h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.gcard p {
  font-size: 16px;
  line-height: 1.45;
  color: var(--body);
}
button.gcard {
  border: 0;
  font: inherit;
}
.gcard ul {
  display: grid;
  gap: 6px;
}
.gcard li {
  font-size: 15.5px;
  color: var(--body);
  padding: 8px 12px;
  background: var(--paper);
  border-radius: 12px;
}

/* Línea de tiempo */
.tline {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  gap: 18px;
  position: relative;
}
.tline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 13px;
  height: 2px;
  background: var(--hair);
}
.tstep {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 34px;
}
.tstep::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 0 0 2px var(--ink);
}
.tstep.hot::before {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.tstep small {
  font-size: 14px;
  color: var(--muted);
}
.tstep.hot small {
  color: var(--accent);
  font-weight: 500;
}
.tstep b {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.tstep p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.4;
}

/* Grupos: planes y comparaciones */
.groups2 {
  display: grid;
  grid-template-columns: repeat(var(--g, 2), minmax(0, 1fr));
  gap: 18px;
}
.lead + .groups2 {
  margin-top: 36px;
}
.gbox {
  background: var(--card);
  border-radius: 30px;
  box-shadow: var(--lift);
  padding: 26px;
  display: grid;
  gap: 14px;
  align-content: start;
  text-align: left;
}
.gbox.hot {
  box-shadow:
    0 0 0 1.5px var(--accent),
    var(--lift);
}
.gbox h3 {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.gbox h3 svg {
  width: 24px;
  height: 24px;
  flex: none;
}
.gbox ul {
  display: grid;
  gap: 8px;
}
.gbox li {
  display: grid;
  gap: 2px;
  font-size: 17px;
  padding: 12px 14px;
  background: var(--paper);
  border-radius: 14px;
}
.gbox li small {
  font-size: 14px;
  color: var(--muted);
}
.gbox.hot li {
  background: #fff6f1;
}

/* Cómo está hecho */
.made {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
  text-align: center;
  justify-items: center;
}
.made .k {
  font-size: 15px;
  color: var(--muted);
}
.made h2 {
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.05;
  font-weight: 300;
  max-width: 20ch;
  margin: 12px auto 0;
}
.made h2 b {
  font-weight: 500;
}
.film {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(var(--f, 6), minmax(0, 1fr));
  gap: 16px;
}
.film.five {
  max-width: 1040px;
}
.film figure {
  display: grid;
  gap: 10px;
}
.film img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #111;
  border-radius: 22px;
  box-shadow: var(--soft);
  display: block;
}
.film figcaption {
  font-size: 14px;
  color: var(--muted);
}
.film figcaption b {
  font-weight: 500;
  color: var(--ink);
  margin-right: 6px;
}
.how {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  text-align: left;
}
.how b {
  display: block;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.how span {
  font-size: 15.5px;
  color: var(--muted);
}
.facts {
  font-size: 16px;
  color: var(--muted);
  margin-top: 4px;
}
.facts b {
  color: var(--ink);
  font-weight: 500;
}
.chain {
  display: grid;
  gap: 0;
  justify-items: start;
  text-align: left;
}
.chain > div {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--soft);
  padding: 13px 18px;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.chain > div.hot {
  box-shadow:
    0 0 0 1.5px var(--bad),
    var(--soft);
}
.chain > div small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.chain > i {
  width: 2px;
  height: 18px;
  margin-left: 28px;
  background: var(--hair);
}
.made.side {
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  text-align: left;
  justify-items: stretch;
  align-items: center;
  gap: 64px;
}
.made.side h2 {
  margin: 12px 0 28px;
}
.made.side .shotside {
  display: flex;
  justify-content: center;
}
.made.side .shotside img {
  width: auto;
  max-width: 100%;
  max-height: calc(100svh - 200px);
  border-radius: 26px;
  box-shadow: var(--lift);
}

/* Para grabarlo: los pasos unidos entran en una pantalla; el guion, aparte */
.screen.rec {
  padding-block: clamp(56px, 8vh, 96px);
}
.say h2 {
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.say .rule {
  width: 56px;
  height: 3px;
  border-radius: 3px;
  margin: 26px 0 22px;
  background: linear-gradient(90deg, var(--accent), #ffb27a);
}
.say p {
  font-size: 22px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 300;
}
.say .acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}
.say small {
  display: block;
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}
.rsteps {
  display: grid;
  justify-items: center;
}
.rstep {
  width: min(100%, 470px);
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--lift);
  padding: clamp(9px, 1.3vh, 15px) 22px;
  display: grid;
  gap: 2px;
}
.rstep span {
  font-size: 13px;
  color: var(--muted);
}
.rstep p {
  font-size: clamp(16px, 2vh, 19px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.rstep.hot {
  box-shadow:
    0 0 0 1.5px var(--accent),
    var(--lift);
}
.rstep.hot span {
  color: var(--accent);
}
.joint {
  position: relative;
  height: clamp(8px, 1.7vh, 22px);
  width: 2px;
  background: var(--hair);
}
.joint i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--soft);
  display: grid;
  place-items: center;
}
.joint i::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
}
.script {
  width: min(100%, 560px);
  margin: 0 auto;
  background: var(--card);
  border-radius: 30px;
  box-shadow: var(--lift);
  padding: 26px 22px;
  display: grid;
  gap: 16px;
}
.script p {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 300;
}

/* Biblioteca: buscar, filtrar y la caja de herramientas (2026-10-24) */
.lib-top {
  display: grid;
  gap: 14px;
  justify-items: center;
  margin: -30px 0 40px;
}
.seg {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--soft);
}
.seg button {
  border: 0;
  background: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 15px;
  color: var(--body);
}
.seg button.on {
  background: var(--ink);
  color: var(--card);
}
.search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(720px, 100%);
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--soft);
  color: var(--muted);
}
.search:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 17px;
  color: var(--ink);
}
.filters {
  display: grid;
  gap: 12px;
  margin: 0 4px 44px;
}
.frow {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}
.flabel {
  font-size: 14px;
  color: var(--muted);
}
.fchips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.fchip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 15px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(22, 22, 22, 0.06);
  white-space: nowrap;
}
.fchip i {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.fchip.on {
  background: var(--ink);
  color: var(--card);
}
.fchip.on i {
  color: var(--soft-ink);
}
.fchip.more {
  background: none;
  box-shadow: none;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.fsum {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 4px 22px;
}
.fsum b {
  font-size: 19px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.shot .unseen {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px #fff;
}
.rgrid.few {
  grid-template-columns: repeat(auto-fit, minmax(190px, 240px));
  justify-content: center;
}
/* «También lo viste en» es corta: no ocupa una pantalla entera. */
.screen.short {
  min-height: 0;
  padding-block: 96px 24px;
}
.tnote {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  max-width: 62ch;
  margin: -10px auto 34px;
}
.tgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.tcard {
  border: 0;
  text-align: left;
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--soft);
  padding: 18px 20px;
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}
.tcard-h {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.tcard-h > span:last-child {
  display: grid;
  gap: 6px;
  justify-items: start;
  min-width: 0;
}
.tcard b {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.tprice {
  font-size: 15px;
}
.tprice.muted {
  color: var(--muted);
}
.tcard small {
  font-size: 13.5px;
  color: var(--muted);
}

/* Una sola fila abajo del título; buscar y filtrar se abren con un botón */
.lib-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.lib-row .ftoggle {
  padding: 13px 18px;
  font-size: 15px;
}
.ftoggle.on {
  background: var(--ink);
  color: var(--card);
  box-shadow: none;
}
.fcount {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.fcount:empty {
  display: none;
}
.fpanel {
  display: grid;
  gap: 18px;
  justify-items: center;
  width: 100%;
  margin-top: 8px;
}
.fpanel .filters {
  width: 100%;
  margin: 0;
}
.lib-top .stages {
  margin: 8px 0 0;
  max-width: 100%;
}
.stage.on {
  background: var(--ink);
  color: var(--card);
  outline: 0;
}
.stage.on span,
.stage.on.zero b {
  color: #fff;
}
.stage.apart {
  margin-left: 22px;
}

/* El audio corto, arriba de la ficha */
.listen-wrap {
  display: flex;
  justify-content: center;
}
.listen {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 360px;
  border-radius: 999px;
  padding: 8px 10px 8px 8px;
  background: var(--card);
  box-shadow: var(--soft);
  text-align: left;
}
.lplay {
  width: 42px;
  height: 42px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  cursor: pointer;
}
.lplay svg.i {
  width: 18px;
  height: 18px;
}
.listen.on .lplay {
  background: var(--ink);
}
.lbody {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.lhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.lbody b {
  font-size: 15.5px;
  font-weight: 500;
}
/* La barra se agarra: el área que se toca es más alta que la línea que se ve. */
.lbar {
  position: relative;
  display: block;
  height: 18px;
  cursor: pointer;
  touch-action: none;
}
.lbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  border-radius: 4px;
  background: var(--hair);
  transform: translateY(-50%);
}
.lbar i {
  position: absolute;
  left: 0;
  top: 50%;
  display: block;
  height: 4px;
  width: 0;
  border-radius: 4px;
  background: var(--accent);
  transform: translateY(-50%);
}
.lknob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.lbar:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.lspeed {
  flex: none;
  min-width: 46px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 5px 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.ltime {
  font-size: 13.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.badge-row.meta {
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
/* Sin estirarse: el botón conserva su alto aunque el aviso de al lado ocupe dos renglones. */
.badge-row.meta .pill {
  flex: none;
}
.chip.link {
  border: 0;
  cursor: pointer;
}

/* Tu opinión, al pie de cada ficha */
.opinion {
  width: min(720px, 100%);
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
  padding: 28px 28px 22px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--soft);
  margin-bottom: 18px;
}
.opinion h3 {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.opills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.opill {
  border: 1.5px solid var(--hair);
  background: var(--paper);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 15px;
  color: var(--ink);
}
.opill:hover {
  border-color: var(--muted);
}
.opill.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--card);
}
.opform,
.vform {
  display: flex;
  gap: 8px;
  width: min(520px, 100%);
}
.opform input,
.vform input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 15px;
  background: var(--paper);
  color: var(--ink);
}
.vform {
  flex-wrap: wrap;
  justify-content: center;
}
.vform .form-error {
  flex-basis: 100%;
  text-align: center;
}
.video-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.vca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}
.vca small {
  font-size: 14px;
  color: var(--muted);
}
.copybox {
  display: block;
  width: min(560px, 100%);
  min-height: 130px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  background: var(--card);
  color: var(--ink);
}

/* Ideas: el camino de un vistazo */
.stages {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -16px auto 56px;
}
.stage {
  border: 0;
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--soft);
  padding: 16px 22px 14px;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 132px;
}
.stage b {
  font-size: 42px;
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stage span {
  font-size: 14.5px;
  color: var(--body);
}
.stage.zero b {
  color: var(--muted);
}
.stage.st-desarrollar:not(.zero) {
  outline: 2px solid var(--accent);
}
.swire {
  width: 34px;
  height: 2px;
  background: var(--ink);
  flex: none;
}
.chip.st-publicada {
  background: var(--ink);
  color: var(--card);
}

/* El final de la ficha */
.end {
  padding: 70px var(--gutter) 60px;
  display: grid;
  gap: 14px;
  justify-items: center;
}
.end .note {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  max-width: 64ch;
}

@media (max-width: 1200px) {
  .rgrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .tgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1000px) {
  .ngrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pgrid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
  }
  .pgrid .pcard {
    flex: 0 0 42%;
    scroll-snap-align: start;
  }
  .split,
  .made.side {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .tools,
  .tools.two,
  .tools.four {
    grid-template-columns: 1fr;
    max-width: 620px;
    margin: 0 auto;
  }
  .steps5 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .film {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .how {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .deep,
  .deep.three,
  .gcards,
  .gcards.two {
    grid-template-columns: 1fr;
    max-width: 680px;
    margin: 0 auto;
  }
  .tline {
    grid-template-columns: 1fr !important;
  }
  .tline::before {
    left: 7px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
  }
  .tstep {
    padding: 0 0 0 34px;
  }
  .tstep::before {
    top: 4px;
  }
}
@media (max-width: 720px) {
  .decide .status {
    padding: 8px 11px;
    font-size: 14px;
  }
  :root {
    --gutter: 18px;
  }
  .top {
    padding-inline: 14px;
    grid-template-columns: 40px 1fr 40px;
    gap: 8px;
  }
  .top .slot,
  .round {
    width: 40px;
    height: 40px;
  }
  .nav button {
    padding: 8px 12px;
    font-size: 14px;
  }
  .page {
    padding-top: 56px;
  }
  .head {
    padding: 34px 0 40px;
  }
  .group {
    margin-top: 44px;
  }
  .ngrid {
    grid-template-columns: 1fr;
  }
  .ncard.hot {
    grid-column: auto;
  }
  .rgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .rcard {
    padding: 8px 8px 12px;
    border-radius: 20px;
  }
  .rcard .rbody {
    padding: 0 4px;
  }
  .rcard h3 {
    font-size: 15px;
  }
  .pgrid .pcard {
    flex-basis: 64%;
  }
  .screen {
    min-height: 0;
    padding-block: 84px 72px;
  }
  .screen.first {
    padding-top: 76px;
  }
  .canvas.flowcanvas {
    padding: 30px 16px 24px;
  }
  .fgrid {
    gap: 34px;
  }
  .board {
    padding: 10px;
    border-radius: 28px;
    margin-top: 34px;
  }
  .groups2 {
    grid-template-columns: 1fr;
  }
  .steps5,
  .film {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
  }
  .steps5 .st {
    flex: 0 0 62%;
    scroll-snap-align: start;
  }
  .film figure {
    flex: 0 0 44%;
    scroll-snap-align: start;
  }
  .row summary {
    padding: 16px 20px;
    gap: 12px;
  }
  .open {
    padding: 0 20px 20px 20px;
  }
  .tweet p {
    font-size: 19px;
  }
  .login-card {
    padding: 36px 24px 28px;
    border-radius: 32px;
  }
}
@media (max-width: 1000px) {
  .tgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .lib-top {
    margin-top: -12px;
  }
  .search {
    padding: 12px 18px;
  }
  .frow {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  /* En el celu cada fila de pastillas se desliza de costado: no empuja la grilla para abajo. */
  .fchips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .fchips::-webkit-scrollbar {
    display: none;
  }
  .fchip {
    flex: none;
  }
  .tgrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .rgrid.few {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stages {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 4px 4px 8px;
    margin-bottom: 40px;
    scrollbar-width: none;
  }
  .stage {
    min-width: 104px;
    padding: 12px 14px 10px;
    flex: none;
  }
  .stage b {
    font-size: 32px;
  }
  .swire {
    width: 16px;
  }
  .listen-wrap {
    justify-self: stretch;
  }
  .listen {
    min-width: 0;
    width: 100%;
  }
  .opinion {
    padding: 24px 18px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .top,
  .row summary .plus {
    transition: none;
  }
}

/* Portal integrado: conserva los componentes y la tipografía de las fichas. */
#mobile-nav { display: none; }
.nav { max-width: calc(100vw - 140px); gap: 3px; }
.nav button { font-size: 13px; padding: 10px 12px; }
.portal-form, .contextual { display: grid; gap: 18px; }
.portal-field { display: grid; gap: 8px; margin: 16px 0; font-size: 14px; }
.portal-field input, .portal-field textarea, .portal-field select, .page select {
  font: inherit; padding: 13px 15px; border: 1px solid var(--field-line); border-radius: 12px;
  background: var(--card); color: var(--ink); width: 100%; box-sizing: border-box;
}
.portal-field textarea { resize: vertical; min-height: 100px; }
.portal-card { display: block; border: 1px solid var(--hair); border-radius: 20px; padding: 24px; color: inherit; text-decoration: none; background: var(--card); }
.portal-card h3 { margin: 12px 0; }
.portal-card p { font-size: 14px; color: #65716a; }
.portal-note, .portal-version { padding: 24px 0; border-bottom: 1px solid var(--hair); }
.portal-note p { overflow-wrap: anywhere; }
.portal-version { display: grid; gap: 12px; }
.review-video { width: 100%; max-height: 75vh; background: #14221c; border-radius: 20px; }
.review-slide { max-width: 100%; max-height: 75vh; object-fit: contain; }
.publication-thumbnail { width: 120px; height: 150px; object-fit: contain; border-radius: 12px; background: #e5e9e3; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; margin: 18px 0; }
.metric { display: grid; gap: 8px; padding: 18px; background: var(--paper); border-radius: 14px; }
.metric strong { font-size: 25px; letter-spacing: -1px; }
.metric small { font-size: 11px; color: #546057; overflow-wrap: anywhere; }
.portal-evidence { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: var(--paper); padding: 16px; border-radius: 12px; }
.page .acts select { width: auto; max-width: 100%; }
@media (max-width: 900px) {
  .top .nav { display: none; }
  #mobile-nav { display: block; width: min(230px, calc(100vw - 130px)); font: inherit; border: 0; border-radius: 24px; padding: 12px 18px; background: var(--card); color: #213f31; }
  .portal-note, .portal-version { padding: 18px 0; }
}
.results-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.results-table th, .results-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--hair); }

/* Espacio de trabajo: navegación estable y contenido reconocible al entrar. */
body.workspace { --gutter: 28px; --sidebar-width: 218px; font-size: 15px; background: var(--paper); }
.skip-link { position: fixed; top: -80px; left: 240px; padding: 12px; background: var(--ink); color: var(--card); z-index: 100; }
.skip-link:focus { top: 8px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); padding: 28px 16px; background: var(--card); border-right: 1px solid var(--hair); z-index: 25; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 32px; font-weight: 600; font-size: 15px; }
.brand small { display: block; color: var(--soft-ink); font-size: 10px; font-weight: 400; margin-top: 3px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--accent); border-radius: 11px; font-size: 22px; }
.nav-label { color: var(--muted); letter-spacing: .09em; font-size: 9px; font-weight: 600; padding: 0 12px 12px; }
.sidebar .nav { display: flex; flex-direction: column; gap: 5px; padding: 0; border-radius: 0; box-shadow: none; background: transparent; max-width: none; }
.sidebar .nav button { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 9px; font-size: 13px; color: #59615c; font-weight: 500; }
.sidebar .nav button::before { content: ''; width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 3px; opacity: .7; }
.sidebar .nav button:hover { background: var(--paper); }
.sidebar .nav button.active { color: var(--accent-ink); background: var(--accent-wash); }
.sidebar .nav button.active::before { background: var(--accent); border-color: var(--accent); }
.sidebar-note { margin-top: auto; padding: 20px 12px 0; color: var(--muted); font-size: 11px; border-top: 1px solid var(--hair); }
.workspace .top { margin-left: var(--sidebar-width); position: sticky; top: 0; height: 62px; padding: 8px var(--gutter); display: flex; justify-content: space-between; background: rgba(245,245,243,.96); border-bottom: 1px solid var(--hair); pointer-events: auto; transform: none; opacity: 1; }
.workspace .top .slot { display: flex; align-items: center; gap: 12px; width: auto; height: auto; }
#section-name { font-size: 12px; color: var(--soft-ink); }
.workspace .round { height: 34px; width: 34px; border: 1px solid var(--hair); box-shadow: none; }
.workspace .content, .workspace .diag { margin-left: var(--sidebar-width); }
.workspace .page { padding: 28px var(--gutter) 40px; max-width: 1440px; }
.workspace .head { padding: 0 0 24px; gap: 9px; text-align: left; justify-items: start; }
.workspace .head h1 { font-size: clamp(28px, 3vw, 38px); line-height: 1.15; font-weight: 500; letter-spacing: -.04em; }
.workspace .head p { max-width: 76ch; font-size: 14px; line-height: 1.5; color: var(--soft-ink); }
.workspace .head .state { padding: 0; border-radius: 0; background: none; box-shadow: none; font-size: 11px; color: var(--soft-ink); }
.workspace .group { margin-top: 28px; }
.workspace .group-h { margin-bottom: 14px; }
.workspace .group-h h2 { font-size: 21px; }
.workspace .screen { min-height: 0; padding: 32px var(--gutter); overflow-x: clip; }
.workspace .screen.first { padding-top: 28px; }
.workspace .screen.alt { background: transparent; border-top: 1px solid var(--hair); }
.workspace .inner { max-width: 1180px; }
.workspace .lead { gap: 14px; text-align: left; justify-items: start; }
.workspace .lead h1, .workspace .lead h1.long { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.14; max-width: 34ch; letter-spacing: -.04em; font-weight: 500; }
.workspace .lead > p { font-size: 16px; max-width: 74ch; line-height: 1.55; color: #656c67; }
.workspace .lead .acts { justify-content: flex-start; }
.workspace .from { justify-content: flex-start; margin-top: 18px; font-size: 12px; text-align: left; }
.workspace .from img { width: 30px; height: 30px; }
.workspace .sechead { text-align: left; justify-items: start; margin-bottom: 20px; }
.workspace .sechead h2 { font-size: clamp(23px, 2.7vw, 32px); line-height: 1.2; }
.workspace .sechead p { font-size: 14px; line-height: 1.5; }
.workspace .say h2 { font-size: clamp(24px, 2.7vw, 32px); line-height: 1.2; }
.workspace .say .rule { margin: 14px 0; }
.workspace .say p { font-size: 15px; line-height: 1.5; }
.workspace .say .acts { margin-top: 18px; }
.workspace .say small { margin-top: 12px; font-size: 12px; }
.workspace .end { max-width: 1240px; padding: 24px var(--gutter) 32px; }
.workspace .fold { border-radius: 12px; margin-bottom: 10px; box-shadow: none; }
.workspace .fold summary { padding: 17px 20px; font-size: 15px; }
.workspace .fold .fbody { padding: 0 20px 20px; }
.workspace .contextual { border-top: 1px solid var(--hair); }
.workspace .contextual h2 { font-size: 25px; }
.workspace .pill { font-size: 12px; padding: 9px 14px; }
.workspace .diag { font-size: 10px; opacity: .7; text-align: left; padding: 16px var(--gutter); }
.reference-visuals { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 22px; }
.reference-visuals figure { flex: 0 0 auto; min-width: 0; width: min(170px, 30%); }
.reference-visuals figure:only-child { width: 230px; }
.reference-visuals .zoom { width: 100%; height: 180px; border-radius: 12px; overflow: hidden; background: #e9eae6; }
.reference-visuals img { display: block; width: 100%; height: 180px; object-fit: contain; }
.reference-visuals figcaption { font-size: 10px; color: var(--soft-ink); margin-top: 6px; }
.ficha-actions { gap: 8px; }
.route-loading { display: flex; align-items: center; gap: 10px; color: var(--soft-ink); min-height: 180px; }
.loading-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.kanban { display: flex; gap: 16px; overflow-x: auto; align-items: stretch; padding-bottom: 20px; min-height: 380px; }
.kanban-column { flex: 1 0 215px; min-width: 215px; max-width: 320px; padding: 12px; border-radius: 14px; background: #ebece8; }
.kanban-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.kanban-heading h2 { font-size: 13px; letter-spacing: 0; font-weight: 600; }
.kanban-count { background: var(--card); padding: 1px 7px; border-radius: 6px; color: var(--soft-ink); font-size: 11px; }
.kanban-empty { padding: 18px 4px; font-size: 12px; color: #858a85; }
.kanban-card { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--hair); border-radius: 10px; background: var(--card); margin-bottom: 10px; box-shadow: 0 2px 3px #00000004; }
.kanban-card:hover { border-color: #f5ac93; }
.kanban-card h3 { font-size: 14px; letter-spacing: -.02em; font-weight: 500; line-height: 1.45; }
.kanban-card small { color: #788078; font-size: 10px; }
.kanban-card .kanban-cover { width: 100%; height: 112px; object-fit: contain; border-radius: 7px; background: var(--paper); }
.kanban-card .status-chip { justify-self: start; font-size: 10px; padding: 3px 7px; border-radius: 5px; background: var(--accent-wash); color: var(--accent-ink); }
.board-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: start; margin-bottom: 22px; }
.board-toolbar > .fold { flex: 1; min-width: 240px; margin: 0; }
.workspace .portal-card h3 { font-size: 18px; }
.workspace .portal-field { margin: 8px 0; }
.workspace .portal-field textarea { min-height: 80px; }
.results-toolbar { display: flex; flex-wrap: wrap; gap: 18px; align-items: end; margin: 0 0 18px; font-size: 12px; }
.results-toolbar label { display: grid; gap: 6px; }
.results-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.results-filters label { display: grid; gap: 6px; font-size: 12px; min-width: 0; }
.results-filters input, .results-filters select { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--card); }
.metric-source { padding: 10px 0; border-bottom: 1px solid var(--hair); overflow-wrap: anywhere; }
.metric-source p { margin: 5px 0; }
.results-toolbar select, .workspace .acts select { font: inherit; font-size: 13px; border: 1px solid var(--field-line); background: var(--card); border-radius: 8px; padding: 10px 12px; max-width: 100%; }
.account-panel { margin: 26px 0; }
.account-panel > h2, .results-heading h2 { font-size: 20px; font-weight: 500; margin-bottom: 14px; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dashboard-kpi { display: grid; gap: 8px; padding: 20px; background: var(--card); border: 1px solid var(--hair); border-radius: 12px; }
.dashboard-kpi small { font-size: 12px; color: var(--soft-ink); }
.dashboard-kpi strong { font-size: 28px; font-weight: 500; letter-spacing: -.04em; }
.dashboard-kpi span { font-size: 11px; color: var(--soft-ink); line-height: 1.5; }
.dashboard-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.metric-chart { background: var(--card); border: 1px solid var(--hair); border-radius: 12px; padding: 20px; min-width: 0; }
.metric-chart h3 { font-size: 15px; font-weight: 500; }
.metric-chart p, .metric-chart > small { font-size: 11px; color: var(--soft-ink); line-height: 1.5; margin-top: 5px; display: block; }
.metric-chart svg { width: 100%; height: auto; display: block; margin: 12px 0; overflow: visible; }
.metric-chart svg text { font: 16px Onest, sans-serif; fill: var(--soft-ink); }
.chart-grid { stroke: var(--hair); stroke-width: 1; }
.chart-line { stroke: #648675; stroke-width: 2; fill: none; }
.chart-point { fill: #648675; stroke: white; stroke-width: 1; }
.chart-empty { min-height: 100px; display: grid; place-content: center; }
.workspace .metric-chart .fold { margin: 12px 0 0; background: transparent; border: 0; }
.workspace .metric-chart .fold summary { padding: 8px 0; font-size: 11px; }
.workspace .metric-chart .fbody { padding: 8px 0; overflow-x: auto; }
.results-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.results-heading span { font-size: 12px; color: var(--soft-ink); }
.publications-panel { margin-top: 28px; }
.publications-panel > .muted { font-size: 12px; margin-bottom: 16px; }
.publication-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(400px, 1.5fr); align-items: center; gap: 20px; padding: 16px 0; border-top: 1px solid var(--hair); }
.publication-identity { display: flex; gap: 14px; align-items: center; min-width: 0; }
.publication-identity h3 { font-size: 14px; font-weight: 500; line-height: 1.5; letter-spacing: 0; }
.publication-identity small { font-size: 10px; color: var(--soft-ink); }
.publication-identity .publication-thumbnail, .thumbnail-empty { width: 56px; height: 72px; flex: 0 0 56px; object-fit: contain; border-radius: 7px; background: #e7eae4; margin: 0; }
.thumbnail-empty { display: grid; place-items: center; font-size: 9px; color: var(--soft-ink); }
.publication-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.publication-metrics dt { font-size: 11px; color: var(--soft-ink); margin-bottom: 5px; }
.publication-metrics dd { font-size: 14px; font-weight: 500; margin: 0; }
.publication-intro { display: flex; align-items: start; gap: 20px; margin-bottom: 22px; }
.publication-intro .publication-thumbnail { width: 100px; max-height: 160px; object-fit: contain; margin: 0; border-radius: 10px; }
.publication-intro p { font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.workspace .metric-grid { gap: 10px; margin-bottom: 20px; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
.workspace .metric { padding: 14px; border-radius: 10px; }
.workspace .metric strong { font-size: 20px; }
.workspace .metric small { font-size: 10px; overflow-wrap: anywhere; }
.log-list { display: grid; gap: 12px; margin-top: 18px; }
.log-card { background: var(--card); border: 1px solid var(--hair); border-radius: 12px; padding: 20px; }
.log-card h2 { font-size: 16px; font-weight: 500; margin: 8px 0; }
.log-card p { font-size: 13px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.log-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 11px; color: #768078; }
.log-card .fold { margin: 14px 0 0; background: var(--paper); }
.log-card .acts { justify-content: start; margin: 12px 0; }
.log-card .portal-evidence { max-height: 300px; overflow: auto; font-size: 11px; }
@media (max-width: 900px) {
  body.workspace { --sidebar-width: 176px; --gutter: 20px; }
  .sidebar { padding: 24px 10px; }
  .brand { font-size: 12px; padding-inline: 4px; gap: 7px; }
  .brand small { font-size: 8px; }
  .sidebar .nav button { font-size: 12px; padding: 11px; }
  .workspace #mobile-nav { display: none; }
  .publication-row { grid-template-columns: 1fr; gap: 12px; }
  .dashboard-charts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body.workspace { --sidebar-width: 0px; --gutter: 18px; }
  .sidebar { display: none; }
  .workspace .top { height: 60px; padding: 8px 14px; gap: 8px; }
  #section-name { display: none; }
  .workspace #mobile-nav { display: block; width: min(235px, calc(100vw - 115px)); font-size: 14px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--hair); }
  .workspace .page { padding-top: 22px; }
  .workspace .screen { padding-top: 25px; padding-bottom: 25px; }
  .workspace .head h1 { font-size: 29px; }
  .workspace .lead h1, .workspace .lead h1.long { font-size: 30px; }
  .workspace .lead > p { font-size: 15px; }
  .reference-visuals figure { width: 125px; }
  .reference-visuals img, .reference-visuals .zoom { height: 150px; }
  .kanban-column { flex-basis: 78vw; min-width: 250px; max-width: 320px; scroll-snap-align: start; }
  .kanban { scroll-snap-type: x proximity; }
  .board-toolbar > .fold { min-width: 100%; }
  .skip-link { left: 10px; }
  .dashboard-kpis { grid-template-columns: 1fr; gap: 8px; }
  .dashboard-kpi { grid-template-columns: 1fr auto; padding: 14px; align-items: center; }
  .dashboard-kpi span { grid-column: 1 / -1; }
  .dashboard-kpi strong { font-size: 24px; }
  .metric-chart { padding: 14px; }
  .metric-chart svg text { font-size: 22px; }
  .publication-metrics { grid-template-columns: repeat(3, 1fr); row-gap: 12px; }
  .publication-intro .publication-thumbnail { width: 70px; }
  .results-toolbar { gap: 10px; }
}

/* Dashboard tipo centro de control (referencia de Ramiro Cubría que eligió Fran el 08/11):
   cifras compactas arriba, gráficos en paneles, ganadores y lista completa abajo. */
.command-center { --cc-panel: #fff; --cc-line: var(--hair); --cc-ink: var(--ink); --cc-muted: #7c837e; --cc-track: #eef0ec;
  --cc-a: #ff8a5c; --cc-b: #ff5b36; --cc-likes: #ff5b36; --cc-comments: #f0ae2e; --cc-saves: #2fb36b; --cc-shares: #5b7cfa; }
.command-center .head { padding-bottom: 14px; }
.cc-toolbar { align-items: end; gap: 14px; margin-bottom: 12px; }
.cc-formats { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-formats button { font: inherit; font-size: 13px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--cc-line); background: var(--cc-panel); color: var(--cc-ink); cursor: pointer; }
.cc-formats button.active { background: var(--cc-ink); color: var(--cc-panel); border-color: var(--cc-ink); }
.dashboard-kpis.cc-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.cc-kpis .dashboard-kpi { position: relative; overflow: hidden; gap: 4px; padding: 14px 14px 12px; border-radius: 12px; background: var(--cc-panel); border-color: var(--cc-line); min-width: 0; }
.cc-kpis .dashboard-kpi::after { content: ""; position: absolute; right: 14px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--tone, #d3d3cf); }
.cc-kpis .dashboard-kpi small { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--cc-muted); }
.cc-kpis .dashboard-kpi strong { font-size: 24px; color: var(--cc-ink); }
.cc-kpis .dashboard-kpi span { font-size: 11px; color: var(--cc-muted); line-height: 1.35; }
.cc-kpis .tone-hot { --tone: #ff5b36; } .cc-kpis .tone-good { --tone: #2fb36b; } .cc-kpis .tone-violet { --tone: #8b5cf6; } .cc-kpis .tone-warn { --tone: #f0ae2e; }
.cc-row { display: grid; gap: 12px; margin: 12px 0; }
.cc-row-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cc-row-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cc-panel { background: var(--cc-panel); border: 1px solid var(--cc-line); border-radius: 14px; padding: 16px 18px; min-width: 0; color: var(--cc-ink); }
.cc-panel > header, .cc-panel-head { margin-bottom: 10px; }
.cc-panel h3 { font-size: 15px; font-weight: 500; }
.cc-panel header p, .cc-panel-head p { font-size: 12px; color: var(--cc-muted); margin-top: 3px; line-height: 1.45; }
.cc-panel-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.cc-inline { display: grid; gap: 4px; font-size: 12px; color: var(--cc-muted); }
.cc-inline select { font: inherit; font-size: 13px; border: 1px solid var(--cc-line); background: var(--cc-panel); color: var(--cc-ink); border-radius: 8px; padding: 8px 10px; }
.cc-panel-lead { font-size: 13px; margin-bottom: 10px; }
.cc-foot { display: block; margin-top: 10px; font-size: 11px; color: var(--cc-muted); line-height: 1.45; }
.cc-timeline { width: 100%; height: auto; display: block; overflow: visible; }
.cc-timeline text { font: 11px Onest, sans-serif; fill: var(--cc-muted); }
.cc-timeline .chart-grid { stroke: var(--cc-line); }
.cc-stop-a { stop-color: var(--cc-a); } .cc-stop-b { stop-color: var(--cc-b); }
.cc-bar { fill: url(#cc-bar); transition: opacity .15s; } .cc-bar.is-carousel { fill: var(--cc-shares); }
.cc-timeline a:hover .cc-bar { opacity: .7; }
.cc-legend { display: flex; gap: 14px; font-size: 11px; color: var(--cc-muted); margin-top: 4px; }
.cc-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--cc-b); }
.cc-legend .key-carousel::before { background: var(--cc-shares); }
.cc-donut-wrap { display: grid; justify-items: center; gap: 14px; }
.cc-donut { width: 150px; height: 150px; }
.cc-donut-track { fill: none; stroke: var(--cc-track); stroke-width: 22; }
.cc-donut-seg { fill: none; stroke-width: 22; }
.cc-donut-seg.seg-likes { stroke: var(--cc-likes); } .cc-donut-seg.seg-comments { stroke: var(--cc-comments); } .cc-donut-seg.seg-saves { stroke: var(--cc-saves); } .cc-donut-seg.seg-shares { stroke: var(--cc-shares); }
.cc-donut-value { font: 500 24px Onest, sans-serif; fill: var(--cc-ink); } .cc-donut-label { font: 12px Onest, sans-serif; fill: var(--cc-muted); }
.cc-donut-legend { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: 13px; width: 100%; }
.cc-donut-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; }
.cc-donut-legend li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-donut-legend li small { grid-column: 2 / -1; text-align: left; }
.cc-donut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.cc-donut-legend .seg-likes i { background: var(--cc-likes); } .cc-donut-legend .seg-comments i { background: var(--cc-comments); } .cc-donut-legend .seg-saves i { background: var(--cc-saves); } .cc-donut-legend .seg-shares i { background: var(--cc-shares); }
.cc-donut-legend small { color: var(--cc-muted); font-size: 11px; }
.cc-bars { list-style: none; display: grid; gap: 10px; }
.cc-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13px; }
.cc-bars li > a, .cc-bars li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cc-ink); text-decoration: none; }
.cc-bars li > a:hover { text-decoration: underline; }
.cc-bars small { grid-column: 1 / -1; font-size: 11px; color: var(--cc-muted); }
.cc-track { grid-column: 1 / -1; height: 7px; border-radius: 99px; background: var(--cc-track); overflow: hidden; }
.cc-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cc-a), var(--cc-b)); }
.cc-bars.lower-better .cc-fill { background: linear-gradient(90deg, #8fd6ad, var(--cc-saves)); }
:root[data-theme="dark"] .cc-bars.lower-better .cc-fill { background: linear-gradient(90deg, #22d3ee, #34d399); }
.cc-followers .metric-chart { border: 0; padding: 0; background: none; }
.cc-followers .metric-chart figcaption { display: none; }
.cc-followers .metric-chart svg text { font-size: 18px; fill: var(--cc-muted); }
.cc-winners-panel { margin: 12px 0; }
.cc-winners { list-style: none; display: grid; gap: 10px; }
.cc-winners li { display: grid; grid-template-columns: 22px 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--cc-line); }
.cc-winners li:first-child { border-top: 0; }
.cc-rank { font-size: 13px; color: var(--cc-muted); text-align: center; }
.cc-winner-thumb { display: block; width: 54px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--cc-track); }
.cc-winner-thumb img, .cc-winner-thumb .thumbnail-empty { width: 100%; height: 100%; object-fit: cover; display: grid; place-content: center; font-size: 10px; }
.cc-winner-body { display: grid; gap: 4px; min-width: 0; }
.cc-winner-title { font-size: 14px; color: var(--cc-ink); text-decoration: none; font-weight: 500; }
.cc-winner-body small { font-size: 11px; color: var(--cc-muted); }
.cc-traits { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-traits span { font-size: 11px; line-height: 1.35; padding: 4px 8px; border-radius: 8px; background: var(--cc-track); color: var(--cc-ink); max-width: 100%; }
.cc-traits b { font-weight: 500; color: var(--cc-muted); }
.cc-winner-value { font-size: 20px; font-weight: 500; color: var(--cc-ink); }
@media (max-width: 1200px) { .dashboard-kpis.cc-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .cc-row-main, .cc-row-three { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .dashboard-kpis.cc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-kpis .dashboard-kpi strong { font-size: 21px; }
  .cc-donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .cc-donut-legend { width: 100%; }
  .cc-winners li { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .cc-winners .cc-rank { display: none; }
  .cc-winner-thumb { width: 44px; height: 58px; }
  .cc-winner-value { font-size: 16px; }
}

:root[data-theme="dark"] .command-center { --cc-panel: #141823; --cc-line: rgba(255,255,255,.07); --cc-ink: #eef1f7; --cc-muted: #8d93a5; --cc-track: rgba(255,255,255,.07);
  --cc-a: #22d3ee; --cc-b: #a3e635; --cc-likes: #f472b6; --cc-comments: #facc15; --cc-saves: #34d399; --cc-shares: #60a5fa; color: var(--cc-ink); }
:root[data-theme="dark"] .command-center .head h1 { color: #fff; }
:root[data-theme="dark"] .command-center .head p, :root[data-theme="dark"] .command-center .head .state, :root[data-theme="dark"] .command-center .muted, :root[data-theme="dark"] .command-center .results-toolbar { color: var(--cc-muted); }
:root[data-theme="dark"] .command-center .results-toolbar select { background: var(--cc-panel); color: var(--cc-ink); border-color: var(--cc-line); }
:root[data-theme="dark"] .command-center .fold { background: var(--cc-panel); border-color: var(--cc-line); color: var(--cc-ink); }
:root[data-theme="dark"] .command-center .cc-formats button.active { background: linear-gradient(90deg, #22d3ee, #a3e635); color: #0b0d12; border-color: transparent; }
:root[data-theme="dark"] .cc-kpis .dashboard-kpi { box-shadow: 0 0 0 1px rgba(255,255,255,.02) inset; }
:root[data-theme="dark"] .cc-kpis .dashboard-kpi::after { top: auto; right: -20px; bottom: -20px; width: 70px; height: 70px; background: radial-gradient(circle, var(--tone, #3a3f4d) 0%, transparent 70%); opacity: .9; }
:root[data-theme="dark"] .cc-kpis .tone-hot { --tone: #22d3ee; } :root[data-theme="dark"] .cc-kpis .tone-good { --tone: #34d399; } :root[data-theme="dark"] .cc-kpis .tone-violet { --tone: #a78bfa; } :root[data-theme="dark"] .cc-kpis .tone-warn { --tone: #facc15; }
:root[data-theme="dark"] .command-center .publication-row { border-color: var(--cc-line); }
:root[data-theme="dark"] .command-center .publication-row h3, :root[data-theme="dark"] .command-center .publication-metrics dd, :root[data-theme="dark"] .command-center .results-heading h2 { color: var(--cc-ink); }
:root[data-theme="dark"] .command-center .publication-row small, :root[data-theme="dark"] .command-center .publication-metrics dt { color: var(--cc-muted); }
:root[data-theme="dark"] .command-center .chart-grid { stroke: rgba(255,255,255,.08); }
:root[data-theme="dark"] .command-center .chart-line { stroke: #22d3ee; }
:root[data-theme="dark"] .command-center .chart-point { fill: #a3e635; stroke: #141823; }
:root[data-theme="dark"] .command-center .metric-chart small, :root[data-theme="dark"] .command-center .fold summary { color: var(--cc-muted); }

/* Modo oscuro de todo el portal (pedido de Fran el 09/11: claro u oscuro con un botón).
   Las pantallas usan las variables; acá solo cambian sus valores y unos pocos tonos fijos. */
:root[data-theme="dark"] {
  --canvas: #0b0d12; --paper: #0e1117; --card: #161a23; --ink: #eef1f7; --body: #c4c9d4; --muted: #8d93a5; --soft-ink: #9aa0b1;
  --hair: #262b36; --field-line: #333a48; --dot: #3a404d;
  --accent: #ff6a45; --accent-wash: rgba(255, 106, 69, .14); --accent-ink: #ff9a7a;
  --ok-wash: rgba(47, 179, 107, .16); --ok-ink: #5fd99a; --mid-wash: rgba(240, 174, 46, .16); --mid-ink: #f5c56a;
  --bad-wash: rgba(239, 90, 79, .16); --bad-ink: #ff8a80; --unk: #6b7080;
  --lift: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 2px 6px rgba(0, 0, 0, .3), 0 24px 48px -24px rgba(0, 0, 0, .6);
  --soft: 0 2px 8px rgba(0, 0, 0, .25), 0 18px 40px -28px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
/* El menú de secciones del celular tenía un verde fijo que en oscuro casi no se leía. */
:root[data-theme="dark"] #mobile-nav { color: var(--ink); }
:root[data-theme="dark"] .workspace .top { background: rgba(14, 17, 23, .94); }
:root[data-theme="dark"] .round, :root[data-theme="dark"] .nav { background: rgba(22, 26, 35, .85); }
:root[data-theme="dark"] .chip.sug { background: rgba(96, 165, 250, .15); color: #93c5fd; }
:root[data-theme="dark"] .list-h { background: rgba(240, 174, 46, .08); }
:root[data-theme="dark"] .chart-line { stroke: #22d3ee; }
:root[data-theme="dark"] .chart-point { fill: #a3e635; stroke: var(--card); }
:root[data-theme="dark"] .logo { background: #e9ebf0; color: #161616; }

/* ── Menú lateral con íconos; el botón de abajo lo achica a una barra ── */
.sidebar .nav button::before { content: none; }
.sidebar .nav button .i, .nav-toggle .i { width: 18px; height: 18px; flex: none; }
.sidebar .nav button .i { opacity: .8; }
.sidebar .nav button.active .i { opacity: 1; color: var(--accent); }
.nav-toggle { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 10px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.nav-toggle:hover { background: var(--paper); color: var(--ink); }
.sidebar, .workspace .top, .workspace .content, .workspace .diag { transition: width .18s ease, margin-left .18s ease; }
body.workspace.nav-compact { --sidebar-width: 72px; }
.nav-compact .sidebar { padding-inline: 12px; }
.nav-compact .brand { padding-inline: 7px; }
.nav-compact .brand > span:not(.brand-mark), .nav-compact .nav-label, .nav-compact .sidebar-note, .nav-compact .nav-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-compact .sidebar .nav button, .nav-compact .nav-toggle { justify-content: center; padding: 12px 0; }
.nav-compact .nav-toggle { margin-top: auto; }
@media (max-width: 640px) { body.workspace.nav-compact { --sidebar-width: 0px; } }
@media (prefers-reduced-motion: reduce) { .sidebar, .workspace .top, .workspace .content, .workspace .diag { transition: none; } }

/* ── Ficha con íconos, colores y panel (pedido de Fran del 10/11) ──
   El color va en el ícono y en el borde; el texto queda en el color de lectura. */
.t-hook, .t-rec, .t-key { --tone: #f2552c; }
.t-example, .t-tools, .t-cards, .t-context, .t-research { --tone: #2f7be5; }
.t-sequence, .t-steps, .t-flow { --tone: #7656f0; }
.t-show, .t-plans { --tone: #0e958f; }
.t-evidence, .t-claims { --tone: #1c9450; }
.t-suspense, .t-deeper { --tone: #c98c00; }
.t-pending { --tone: #e2701a; }
.t-close, .t-made { --tone: #d23f86; }
.t-compare { --tone: #4b5fe0; }
.t-timeline, .t-related, .t-default, .t-sources, .t-data { --tone: #6b7280; }
.t-state, .t-act, .t-index { --tone: var(--accent); }
:root[data-theme="dark"] .t-hook, :root[data-theme="dark"] .t-rec, :root[data-theme="dark"] .t-key { --tone: #ff7d5c; }
:root[data-theme="dark"] .t-example, :root[data-theme="dark"] .t-tools, :root[data-theme="dark"] .t-cards, :root[data-theme="dark"] .t-context, :root[data-theme="dark"] .t-research { --tone: #6aa5ff; }
:root[data-theme="dark"] .t-sequence, :root[data-theme="dark"] .t-steps, :root[data-theme="dark"] .t-flow { --tone: #a48dff; }
:root[data-theme="dark"] .t-show, :root[data-theme="dark"] .t-plans { --tone: #34c8c0; }
:root[data-theme="dark"] .t-evidence, :root[data-theme="dark"] .t-claims { --tone: #4cc97f; }
:root[data-theme="dark"] .t-suspense, :root[data-theme="dark"] .t-deeper { --tone: #f2bd3b; }
:root[data-theme="dark"] .t-pending { --tone: #ff9d4d; }
:root[data-theme="dark"] .t-close, :root[data-theme="dark"] .t-made { --tone: #f070ad; }
:root[data-theme="dark"] .t-compare { --tone: #8b9bff; }
:root[data-theme="dark"] .t-timeline, :root[data-theme="dark"] .t-related, :root[data-theme="dark"] .t-default, :root[data-theme="dark"] .t-sources, :root[data-theme="dark"] .t-data { --tone: #a3a9b8; }
.tone-ic { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; color: var(--tone, var(--accent)); background: color-mix(in srgb, var(--tone, var(--accent)) 15%, transparent); font-style: normal; }
.tone-ic .i { width: 17px; height: 17px; }
.ficha-page h2:has(> .tone-ic) { display: flex; align-items: center; gap: 12px; }
.ficha-page .lead .state { padding: 0; background: none; box-shadow: none; font-size: 12px; color: var(--soft-ink); }

/* Para grabarlo: todo en una pantalla, en tarjetas con su ícono. */
.ficha-page .screen.rec, .workspace .screen.rec { padding-block: 26px; }
.rec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 16px; }
.rec-title { display: grid; gap: 2px; margin-right: auto; }
.rec-title h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(22px, 2.3vw, 28px); line-height: 1.15; font-weight: 500; letter-spacing: -.03em; }
.rec-meta { font-size: 13px; color: var(--soft-ink); padding-left: 42px; }
.rec-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rec-tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card); border: 1px solid var(--hair); }
.rec-tabs button { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font: inherit; font-size: 13px; color: var(--soft-ink); cursor: pointer; }
.rec-tabs button[aria-selected="true"] { background: var(--ink); color: var(--card); }
.rec-acts .pill { display: inline-flex; align-items: center; gap: 7px; }
.rec-acts .pill .i { width: 15px; height: 15px; }
.rec-status { font-size: 12px; color: var(--soft-ink); }
.rec-status.draft { padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, #e2701a 14%, transparent); color: #a8520f; }
:root[data-theme="dark"] .rec-status.draft { color: #ffb27a; }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; justify-items: stretch; align-items: start; }
.rec-grid .rstep { width: auto; display: grid; align-content: start; gap: 8px; padding: 13px 16px 15px; border: 1px solid var(--hair); border-top: 3px solid var(--tone, var(--accent)); border-radius: 14px; background: var(--card); box-shadow: none; }
.rec-grid .rstep span { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; color: var(--ink); }
.rec-grid .rstep .tone-ic { width: 26px; height: 26px; border-radius: 8px; }
.rec-grid .rstep .tone-ic .i { width: 15px; height: 15px; }
.rec-grid .rstep p { font-size: 14px; line-height: 1.45; letter-spacing: 0; }
.rec-grid .rstep.hot { box-shadow: 0 0 0 1.5px var(--tone); }
.screen.rec .script { width: 100%; max-width: 780px; margin: 0; border-radius: 16px; border: 1px solid var(--hair); box-shadow: none; padding: 22px 24px; gap: 12px; }
.screen.rec .script p { font-size: 16px; line-height: 1.55; }

/* Panel: escuchar, decidir, acciones, datos e índice. */
.ficha-panel { display: grid; gap: 12px; align-content: start; }
.fp-block { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--hair); border-radius: 16px; background: var(--card); min-width: 0; }
.fp-block h3 { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; color: var(--soft-ink); letter-spacing: .02em; }
.fp-block h3 .tone-ic { width: 24px; height: 24px; border-radius: 7px; }
.fp-block h3 .tone-ic .i { width: 14px; height: 14px; }
.fp-listen { padding: 6px; }
.fp-listen .listen { width: 100%; max-width: none; box-shadow: none; }
.ficha-panel .decide-wrap { display: grid; gap: 6px; margin: 0; }
.ficha-panel .decide { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.ficha-panel .decide .status { padding: 7px 12px; font-size: 13px; }
.ficha-panel .acts, .ficha-panel .badge-row { justify-content: flex-start; margin: 0; }
.ficha-panel .from { margin: 0; font-size: 12px; justify-content: flex-start; }
.ficha-panel .research-progress { display: grid; gap: 8px; margin: 0; }
.ficha-panel .research-progress p { font-size: 12px; }
.fp-fact { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--soft-ink); }
.fp-fact .i { width: 15px; height: 15px; }
.fp-index { display: grid; gap: 2px; }
.fp-link { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 5px 8px 5px 5px; border-radius: 10px; font-size: 13px; color: var(--ink); text-decoration: none; }
.fp-link:hover { background: var(--paper); }
.fp-link .tone-ic { width: 26px; height: 26px; border-radius: 8px; }
.fp-link .tone-ic .i { width: 15px; height: 15px; }
.fp-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ajustes de secciones grandes dentro de la ficha nueva: títulos a la medida de una herramienta. */
.fp-listen .listen { display: flex; min-width: 0; width: 100%; }
.fp-listen .lbody { flex: 1; min-width: 0; }
.ficha-page .truth h2 { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.15; font-weight: 500; letter-spacing: -.03em; }
.ficha-page .huge { font-size: clamp(64px, 7vw, 104px); white-space: nowrap; }
.ficha-page .huge small { font-size: .24em; }
.ficha-page .huge.word { font-size: clamp(40px, 4.4vw, 60px); }
.ficha-page .truth .gist { font-size: 16px; }
.ficha-page .made { text-align: left; justify-items: start; gap: 22px; }
.ficha-page .made .k { display: none; }
.ficha-page .made h2 { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.2; font-weight: 500; letter-spacing: -.03em; max-width: 40ch; margin: 0; }
.ficha-page .made h2 b { font-weight: 600; }
.ficha-page > .end { margin: 0; max-width: 820px; }
.ficha-page > .end .opinion, .ficha-page > .end > div:first-child { margin-inline: 0; }
.ficha-panel .decide { justify-content: flex-start; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.ficha-panel .decide .status { border: 1px solid var(--hair); }
.ficha-panel .decide-wrap small { text-align: left; font-size: 11px; color: var(--soft-ink); }
.ficha-panel .from { flex-wrap: nowrap; align-items: center; gap: 10px; }
.ficha-panel .from img { width: 26px; height: 26px; flex: none; }
.ficha-panel .decide-wrap { justify-items: start; }
.ficha-panel .listen-wrap { width: 100%; }

/* Ficha sin panel fijo (pedido de Fran del 10/11): franja debajo del título que se va al bajar. */
.ficha-page .ficha-strip { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 22px 0 6px; justify-self: stretch; width: 100%; }
.ficha-strip .fp-nav { display: none; }
@media (max-width: 900px) {
  .ficha-strip .fp-nav { display: grid; grid-column: 1 / -1; }
  .ficha-strip .fp-index { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* El audio que acompaña: abajo, flotando, o arriba, dentro de la barra del portal. */
.ficha-dock .listen-wrap { display: block; width: 100%; }
.ficha-dock .listen { display: flex; width: 100%; min-width: 0; max-width: none; }
.ficha-dock .lbody { flex: 1; min-width: 0; }
.lback { display: none; }
.ficha-dock .lback { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; flex: none; }
.ficha-dock .lback .i { width: 17px; height: 17px; }
.ficha-dock.dock-abajo { position: fixed; z-index: 40; bottom: 16px; left: calc(var(--sidebar-width) + (100vw - var(--sidebar-width)) / 2); transform: translateX(-50%); width: min(600px, calc(100vw - var(--sidebar-width) - 32px)); }
.ficha-dock.dock-abajo .listen { box-shadow: 0 10px 30px rgba(16, 18, 24, .16), 0 0 0 1px var(--hair); }
body.dock-abajo .ficha-page { padding-bottom: 96px; }

/* Índice en rayitas, como en una conversación de Codex: al pasar el mouse aparecen los nombres. */
.ficha-ticks { position: fixed; z-index: 35; right: 8px; top: 50%; transform: translateY(-50%); display: grid; justify-items: end; padding: 8px 6px; border-radius: 14px; max-height: 76vh; overflow: hidden; }
.ficha-ticks .tick { display: flex; align-items: center; justify-content: flex-end; gap: 12px; height: 14px; color: var(--soft-ink); font-size: 13px; text-decoration: none; }
.tick-line { display: block; flex: none; width: 12px; height: 2px; border-radius: 2px; background: var(--soft-ink); opacity: .45; transition: width .15s, opacity .15s; }
.tick.on .tick-line { width: 20px; background: var(--ink); opacity: 1; }
.tick-label { max-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: 0; transition: opacity .15s; }
.ficha-ticks:hover, .ficha-ticks:focus-within { background: var(--card); box-shadow: 0 12px 32px rgba(16, 18, 24, .14), 0 0 0 1px var(--hair); padding: 10px 12px 10px 16px; }
.ficha-ticks:hover .tick, .ficha-ticks:focus-within .tick { height: 28px; }
.ficha-ticks:hover .tick-label, .ficha-ticks:focus-within .tick-label { max-width: 260px; opacity: 1; }
.ficha-ticks .tick:hover .tick-label, .ficha-ticks .tick.on .tick-label { color: var(--ink); }
.ficha-ticks .tick.on .tick-label { font-weight: 600; }
@media (max-width: 900px) { .ficha-ticks { display: none; } }

/* Repositorio y estrellas a la vista en cada herramienta o skill. */
.tool-repo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 2px 0 0; font-size: 14px; }
.repo-link { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 5px 11px 5px 8px; border: 1px solid var(--hair); border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 500; text-decoration: none; }
.repo-link:hover { border-color: var(--ink); }
.repo-link span { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-link .i { width: 16px; height: 16px; flex: none; }
.stars { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); }
.stars .i { width: 17px; height: 17px; color: #e3a008; }
.stars b { font-weight: 600; font-variant-numeric: tabular-nums; }

