/* soybalzan: bandeja de lectura del blog (/blog/).
   Hereda las variables del tema (claro y oscuro). Solo afecta a .sbz-inbox. */

.sbz-inbox {
  --sbz-nav: 72px;
  --sbz-acc-txt: var(--accent);
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
  min-height: calc(100vh - var(--sbz-nav));
  min-height: calc(100dvh - var(--sbz-nav));
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
:root[data-theme="dark"] .sbz-inbox { --sbz-acc-txt: #8FA4FF; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sbz-inbox { --sbz-acc-txt: #8FA4FF; }
}

/* ---------- Lista ---------- */
/* La lista se queda fija bajo el menú y el artículo corre con la página,
   así el pie del sitio aparece al final del artículo. */
.sbz-list {
  position: sticky;
  top: var(--sbz-nav);
  height: calc(100vh - var(--sbz-nav));
  height: calc(100dvh - var(--sbz-nav));
  min-width: 0;
  overflow-y: auto;
  background: var(--bg);
}
.sbz-list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 24px 20px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.sbz-list-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sbz-list-title h1 { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.sbz-count { font-size: 13px; color: var(--text-muted); margin: 0; }

.sbz-search { position: relative; display: block; }
.sbz-search svg { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--text-muted); pointer-events: none; }
.sbz-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  font: 400 16px var(--font-body);
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
}
.sbz-search input::placeholder { color: var(--text-muted); }
.sbz-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.sbz-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sbz-chip {
  font: 600 13px var(--font-body);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.sbz-chip:hover { border-color: var(--accent); color: var(--sbz-acc-txt); }
.sbz-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.sbz-chip:focus-visible, .sbz-item:focus-visible, .sbz-back:focus-visible,
.sbz-copy:focus-visible, .sbz-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sbz-items { list-style: none; margin: 0; padding: 0; }
.sbz-items li[hidden] { display: none; }
.sbz-item {
  display: block;
  padding: 18px 20px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background .14s ease;
}
.sbz-item:hover { background: var(--bg-soft); }
.sbz-item.is-active { background: var(--accent-soft); }
.sbz-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.sbz-pill {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--sbz-acc-txt);
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 999px;
}
.sbz-item.is-active .sbz-pill { background: var(--bg); }
.sbz-item-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}
.sbz-item.is-active .sbz-item-title { color: var(--sbz-acc-txt); }
.sbz-item-teaser {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
.sbz-empty { padding: 32px 20px; text-align: center; color: var(--text-muted); font-size: 14.5px; margin: 0; }
.sbz-empty[hidden] { display: none; }

/* ---------- Lector ---------- */
.sbz-reader {
  align-self: stretch;
  min-width: 0;
  min-height: calc(100vh - var(--sbz-nav));
  min-height: calc(100dvh - var(--sbz-nav));
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--bg);
  border-left: 1px solid var(--border);
} /* anula `section { padding: 56px 0 }` del tema */
.sbz-reader-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  position: sticky;
  top: var(--sbz-nav);
  z-index: 3;
  min-height: 57px;
  padding: 10px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.sbz-reader-actions { display: flex; align-items: center; gap: 8px; }
.sbz-reader-actions[hidden] { display: none; }
.sbz-copy, .sbz-open, .sbz-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 13.5px var(--font-body);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .14s ease, color .14s ease;
}
.sbz-copy:hover, .sbz-open:hover, .sbz-back:hover { border-color: var(--accent); color: var(--sbz-acc-txt); }
.sbz-copy svg, .sbz-open svg, .sbz-back svg { width: 16px; height: 16px; }
.sbz-back { display: none; border: 0; padding-left: 0; margin-right: auto; color: var(--text-muted); }

.sbz-reader-scroll { flex: 1; padding: 40px 32px 64px; }
.sbz-article { max-width: 720px; margin: 0 auto; transition: opacity .14s ease; }
.sbz-article.is-loading { opacity: .45; }
.sbz-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin: 0 0 10px; }
.sbz-article h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.sbz-article .page-content { padding: 24px 0 0; max-width: none; }
.sbz-placeholder { text-align: center; color: var(--text-muted); padding: 96px 0; margin: 0; }

/* ---------- Móvil y tableta: primero la lista, luego el artículo a pantalla completa ---------- */
@media (max-width: 899px) {
  .sbz-inbox { display: block; height: auto; min-height: 0; border: 0; }
  .sbz-list { position: static; height: auto; overflow: visible; }
  .sbz-list-head { position: static; }
  .sbz-reader { display: none; border-left: 0; min-height: 0; }
  .sbz-inbox.is-reading .sbz-list { display: none; }
  .sbz-inbox.is-reading .sbz-reader { display: flex; }
  .sbz-reader-bar { padding: 8px 20px; }
  .sbz-back { display: inline-flex; white-space: nowrap; }
  .sbz-open { white-space: nowrap; }
  .sbz-reader-scroll { padding: 24px 20px 48px; }
  .sbz-article h1 { font-size: 28px; }
  .sbz-copy span { display: none; }
}
