/* ==========================================================================
   Detalle de sesión (versión de prueba) — se suma a inicio-prueba.css y sesiones-prueba.css
   ========================================================================== */

[data-item][hidden], .block[hidden], .event[hidden] { display: none !important; }

.code--dark { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: var(--on-navy); margin-left: .25rem; }
.lede-sep { margin: 0 .5rem; color: var(--gold); }
.page-hero--session .page-lede { font-size: 1.125rem; color: #fff; }

/* ---------- Autoridades de la sesión ---------- */
.board { padding: 24px 28px 26px; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.board .eyebrow { display: block; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.board-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.board-list li { display: flex; flex-direction: column; gap: .15rem; padding: 2px 18px; border-left: 1px solid var(--line); min-width: 0; }
.board-list li:first-child { padding-left: 0; border-left: 0; }
.b-role { font-size: .6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.b-name { font-family: var(--serif); font-weight: 700; font-size: 1.0625rem; line-height: 1.25; color: var(--ink); }
.b-sub { font-size: .8125rem; color: var(--muted); }

.notice { padding: 32px; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.notice h2 { margin-bottom: .5rem; font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }
.notice p { margin-bottom: 1.25rem; color: var(--muted); }

/* ---------- Barra de herramientas fija ---------- */
.layout--detail { margin-top: 40px; }
.toolbar--sticky { background: var(--page); }
.jump { display: flex; flex-wrap: wrap; gap: .5rem; }
.jump a {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: 0 1rem;
  font-size: .8125rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; transition: border-color .2s, box-shadow .2s;
}
.jump a:hover { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .16); }
.jump a span { padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; background: var(--page); color: var(--muted); }

/* ---------- Secciones ---------- */
.block { scroll-margin-top: 24px; }
.block + .block { margin-top: 44px; }

/* ---------- Orden del día y mociones ---------- */
.agenda { display: grid; gap: 12px; }
.entry {
  display: grid; grid-template-columns: 92px minmax(0, 1fr);
  background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden;
  border: 1px solid var(--line);
}
.e-rail {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .35rem; padding: 16px 8px;
  background: var(--page); border-right: 1px solid var(--line); text-align: center;
}
.e-num { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; line-height: 1; color: var(--ink); }
.e-time { font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--gold-text); font-variant-numeric: tabular-nums; }
.e-main { padding: 16px 22px 18px; min-width: 0; }

.exps { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .55rem; }
.exp {
  display: inline-flex; align-items: center; padding: .15rem .6rem; border: 1px solid var(--line); border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8125rem; font-weight: 700; letter-spacing: .02em;
  color: var(--ink); text-decoration: none; background: var(--page); transition: border-color .2s, background .2s;
}
a.exp:hover { border-color: var(--gold); background: #fff; }
.exp--plain { font-weight: 500; color: var(--muted); }

.e-title { font-family: var(--sans); font-weight: 500; font-size: 1rem; line-height: 1.55; color: var(--text); }
.e-result { margin-top: .65rem; }

.pill {
  display: inline-block; padding: .3rem .8rem; font-size: .75rem; font-weight: 700; line-height: 1.35; letter-spacing: .02em;
  border-radius: 999px; border: 1px solid transparent;
}
.pill--sm { padding: .15rem .6rem; font-size: .6875rem; }
.pill--aprobado { background: #e3f1ec; color: #0d4a39; border-color: #b9dccf; }
.pill--rechazado { background: #fbe6e6; color: #7a1414; border-color: #efbcbc; }
.pill--aplazado { background: #fbf3d6; color: #5c4605; border-color: #e7d48a; }
.pill--no-tratado { background: #eceff3; color: #3b4656; border-color: #d3d9e1; }
.pill--quorum, .pill--otro { background: #e8edf5; color: #0f1d32; border-color: #cfd8e6; }

.media { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .85rem; }
.media-label { min-width: 150px; font-size: .6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.media-label .fa { margin-right: .35rem; color: var(--gold-text); font-size: .7rem; }
audio { display: block; width: 100%; max-width: 420px; height: 40px; }
.media audio { flex: 1 1 260px; }

.votes { margin-top: .9rem; border-top: 1px solid var(--line); }
.votes li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.votes li:last-child { border-bottom: 0; padding-bottom: 0; }
.v-label { flex: 1 1 200px; font-size: .875rem; font-weight: 500; color: var(--ink); }
.v-files { display: inline-flex; gap: .4rem; margin-left: auto; }
.file {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 .85rem; border-radius: 6px;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-decoration: none;
  color: #fff; background: var(--navy-900); border: 1px solid var(--navy-900); transition: box-shadow .2s, background .2s;
}
.file:hover { box-shadow: inset 0 -3px 0 var(--gold); }
.file--alt { color: var(--ink); background: var(--card); border-color: var(--line); }
.file--alt:hover { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .16); }

/* Registros "No tratado": una línea */
.entry--compact { grid-template-columns: 92px minmax(0, 1fr); box-shadow: none; background: transparent; border-style: dashed; }
.entry--compact .e-rail { padding: 10px 8px; flex-direction: row; justify-content: center; background: transparent; border-right-style: dashed; }
.entry--compact .e-num { font-size: 1.125rem; color: var(--muted); }
.entry--compact .e-time { display: none; }
.entry--compact .e-main { padding: 10px 18px; display: grid; gap: .35rem; }
.entry--compact .exps { margin-bottom: 0; }
.entry--compact .e-title { font-size: .875rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry--compact .e-result { margin-top: 0; }
.entry--compact .pill { padding: .1rem .6rem; font-size: .6875rem; }

.event { display: flex; align-items: center; gap: 1rem; margin: 6px 0; font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); }
.event::before, .event::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ---------- Oradores ---------- */
.speakers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.speaker {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.sp-n {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-family: var(--serif); font-weight: 700; font-size: 1rem; color: var(--gold); background: var(--navy-900);
}
.sp-body { flex: 1; min-width: 0; }
.sp-name { margin-bottom: .35rem; font-family: var(--serif); font-weight: 700; font-size: 1rem; line-height: 1.25; color: var(--ink); }
.speaker audio { max-width: none; height: 36px; }

/* ---------- Barra lateral ---------- */
.btn-block { width: 100%; justify-content: center; margin-top: 1rem; }
.meter { display: flex; gap: 3px; height: 10px; margin: 2px 0 14px; }
.meter-seg { border-radius: 3px; min-width: 6px; }
.meter-seg--aprobado, .dot--aprobado { background: #2f8f6f; }
.meter-seg--rechazado, .dot--rechazado { background: #c04545; }
.meter-seg--aplazado, .dot--aplazado { background: #c9a227; }
.meter-seg--no-tratado, .dot--no-tratado { background: #98a3b3; }
.legend { display: grid; gap: .35rem; font-size: .875rem; color: var(--text); }
.legend li { display: flex; align-items: center; gap: .55rem; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- Accesibilidad: contraste alto / amarillo ---------- */
html.a11y-contrast .board, html.a11y-yellow .board,
html.a11y-contrast .notice, html.a11y-yellow .notice,
html.a11y-contrast .entry, html.a11y-yellow .entry,
html.a11y-contrast .speaker, html.a11y-yellow .speaker,
html.a11y-contrast .jump a, html.a11y-yellow .jump a { background: #000; border: 1px solid #fff; color: var(--text); }
html.a11y-contrast .e-rail, html.a11y-yellow .e-rail { background: #000; border-right: 1px solid #fff; }
html.a11y-contrast .b-name, html.a11y-yellow .b-name, html.a11y-contrast .e-num, html.a11y-yellow .e-num,
html.a11y-contrast .sp-name, html.a11y-yellow .sp-name, html.a11y-contrast .v-label, html.a11y-yellow .v-label { color: var(--text); }
html.a11y-contrast .pill, html.a11y-yellow .pill, html.a11y-contrast .exp, html.a11y-yellow .exp { background: #000; color: var(--text); border-color: #fff; }
html.a11y-contrast .file, html.a11y-yellow .file { background: var(--gold); color: #000; border-color: var(--gold); }
html.a11y-contrast .toolbar--sticky, html.a11y-yellow .toolbar--sticky { background: #000; }

/* ---------- Responsive ---------- */
@media (min-width: 992px) {
  .toolbar--sticky { position: sticky; top: 0; z-index: 20; padding: 12px 0; margin-top: -12px; box-shadow: 0 10px 14px -12px rgba(15, 29, 50, .25); }
}

@media (max-width: 991.98px) {
  .board-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
  .board-list li:nth-child(odd) { padding-left: 0; border-left: 0; }
}

@media (max-width: 640px) {
  .board { padding: 20px; }
  .board-list { grid-template-columns: 1fr; gap: 14px; }
  .board-list li { padding: 0 0 14px; border-left: 0; border-bottom: 1px solid var(--line); }
  .board-list li:last-child { border-bottom: 0; padding-bottom: 0; }
  .entry, .entry--compact { grid-template-columns: 1fr; }
  .e-rail, .entry--compact .e-rail { flex-direction: row; justify-content: flex-start; gap: .75rem; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .entry--compact .e-time { display: inline; }
  .e-main { padding: 14px 16px 16px; }
  .speakers { grid-template-columns: 1fr; }
  .v-files { margin-left: 0; }
  .media-label { min-width: 100%; }
}
