/* Mesmo tema visual da página inicial (/) — público, sem painel */

:root {
  --bg: #0f1419;
  --fg: #e8eaed;
  --muted: #9aa0a6;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --surface: rgba(30, 41, 59, 0.45);
  --border: #334155;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #1e293b 0%, var(--bg) 55%);
  color: var(--fg);
  line-height: 1.55;
}

main {
  max-width: 32rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  text-align: center;
}

main.main--article {
  max-width: 36rem;
  text-align: left;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.actions--stack .btn {
  width: 100%;
  text-align: center;
}

/* Item do menu com etiqueta Mobile */
a.btn--menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
}

a.btn--menu-item .btn__label {
  flex: 1;
  min-width: 0;
}

.menu-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.18);
  color: var(--accent-hover);
  border: 1px solid rgba(59, 130, 246, 0.4);
}

a.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

a.btn--primary {
  background: var(--accent);
  color: #fff;
}

a.btn--primary:hover {
  background: var(--accent-hover);
}

a.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

a.btn--ghost:hover {
  color: var(--fg);
  border-color: #475569;
}

.back {
  margin-top: 1.75rem;
}

.back a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.back a:hover {
  color: var(--accent-hover);
}

.back a:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 3px;
  border-radius: 4px;
}

.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin: 0 0 1rem;
}

.demo-card:last-of-type {
  margin-bottom: 0;
}

.demo-card strong {
  color: var(--fg);
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.demo-grid {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

@media (min-width: 480px) {
  .demo-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.stat .num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-hover);
  line-height: 1.2;
}

.stat .lbl {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* Página Uiverse (lista por categoria) */
main.main--uiverse {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  text-align: left;
}

.uiverse-lead {
  margin-bottom: 1rem;
}

.uiverse-lead a,
.uiverse-note a {
  color: var(--accent-hover);
  text-decoration: none;
}

.uiverse-lead a:hover,
.uiverse-note a:hover {
  text-decoration: underline;
}

.uiverse-note {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.uiverse-note code {
  font-size: 0.88em;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: rgba(15, 20, 25, 0.6);
  border: 1px solid var(--border);
}

.uiverse-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 2rem;
}

.uiverse-toc__link {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.uiverse-toc__link:hover {
  color: var(--fg);
  border-color: #475569;
}

.uiverse-cat {
  margin-bottom: 2.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.uiverse-cat:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.uiverse-cat__title {
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.uiverse-cat__more {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.uiverse-cat__more a {
  color: var(--accent-hover);
  text-decoration: none;
  font-weight: 500;
}

.uiverse-cat__more a:hover {
  text-decoration: underline;
}

.uiverse-list {
  margin: 0;
  padding-left: 1.35rem;
  display: grid;
  gap: 0.5rem 1.25rem;
}

@media (min-width: 640px) {
  .uiverse-list {
    grid-template-columns: 1fr 1fr;
    padding-left: 1.5rem;
  }
}

.uiverse-list__item {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.45);
}

.uiverse-list__item::marker {
  color: var(--muted);
  font-weight: 600;
}

.uiverse-list__link {
  color: var(--fg);
  font-weight: 500;
  text-decoration: none;
}

.uiverse-list__link:hover {
  color: var(--accent-hover);
}

.uiverse-list__meta {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  margin-top: 0.15rem;
}

.inline-code {
  font-size: 0.88em;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: rgba(15, 20, 25, 0.6);
  border: 1px solid var(--border);
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

main.main--biblioteca {
  max-width: 56rem;
}

.uiverse-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 1.25rem 0 1.5rem;
}

.uiverse-search-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.uiverse-search {
  flex: 1;
  min-width: 12rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.55);
  color: var(--fg);
  font-size: 0.95rem;
}

.uiverse-search:focus {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.uiverse-toolbar__hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.bib-cat {
  margin-bottom: 2rem;
}

.bib-cat__title {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.bib-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.bib-src {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.bib-card__head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .bib-card__head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.bib-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.bib-card__slug {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

.bib-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex-shrink: 0;
}

a.btn--small,
button.btn--small {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
}

button.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

button.btn--ghost:hover {
  color: var(--fg);
  border-color: #475569;
}

button.btn--primary {
  background: var(--accent);
  color: #fff;
}

button.btn--primary:hover {
  background: var(--accent-hover);
}

.bib-cite {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
}

.bib-cite__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.bib-cite__pre {
  margin: 0 0 0.5rem;
  padding: 0.65rem 0.75rem;
  background: rgba(15, 20, 25, 0.65);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.45;
}

.bib-cite__pre code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  color: var(--fg);
  white-space: pre-wrap;
  word-break: break-word;
}

.bib-cite__btn {
  margin-top: 0;
}

.bib-missing {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: #fbbf24;
}

.bib-details {
  margin-top: 0.75rem;
}

.bib-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-hover);
}

.bib-details summary:hover {
  text-decoration: underline;
}

.bib-code {
  margin: 0.65rem 0 0;
  padding: 0.85rem 1rem;
  max-height: 22rem;
  overflow: auto;
  background: rgba(15, 20, 25, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.bib-code code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  color: var(--fg);
  white-space: pre;
}
