/* ================================================================
   Scaffold — SPA Stylesheet
   Dark-first theme with customizable accent color
   ================================================================ */

/* ----------------------------------------------------------------
   CSS Variables — Dark theme (default)
   ---------------------------------------------------------------- */
:root,
[data-theme="dark"] {
  --oz-bg:             #0c0b09;
  --oz-surface:        #1a1815;
  --oz-surface-hover:  #242118;
  --oz-border:         #2e2a24;
  --oz-text:           #e8e0d4;
  --oz-text-secondary: #8a8278;
  --oz-text-muted:     #5c564e;
  --oz-accent:         #c4a240;
  --oz-accent-hover:   #dbb85a;
  --oz-accent-subtle:  rgba(196,162,64,0.12);
  --oz-accent-subtle2: rgba(196,162,64,0.06);
  --oz-shadow:         0 2px 8px rgba(0,0,0,0.4);
  --oz-shadow-lg:      0 8px 32px rgba(0,0,0,0.5);
  --oz-topbar-bg:      rgba(12,11,9,0.92);
  --oz-sidebar-bg:     #131210;
  --oz-overlay:        rgba(0,0,0,0.6);
  --oz-scrollbar-thumb: #2e2a24;
  --oz-scrollbar-track: #0c0b09;
  --oz-badge-bg:       rgba(196,162,64,0.15);
  --oz-badge-text:     #dbb85a;
  --oz-ficha-bg:       #141311;
  --oz-ficha-border:   #2e2a24;
  --oz-ficha-header:   rgba(196,162,64,0.08);

  /* Campo accent colors (overrideable by themes) */
  --oz-color-level1:   #5a9b6e;
  --oz-color-level2:   #c4a240;
  --oz-color-level3:   #9a6a8a;
  --oz-color-available:#c4a240;
  --oz-color-locked:   #555;
  --oz-color-done:     #5a9b6e;
  --oz-color-glosario: #d4a058;
  --oz-color-personajes:#c87878;

  /* Aliases for injected atomos.js styles */
  --bg-secondary:      #1a1815;
  --border:            #2e2a24;
  --text-primary:      #e8e0d4;
  --text-secondary:    #8a8278;
  --text-muted:        #5c564e;
  --bg-hover:          rgba(255,255,255,0.05);
  --shadow-md:         0 4px 16px rgba(0,0,0,0.3);

  /* Typography & geometry — overrideable by themes */
  --oz-font-heading:   'Lora', Georgia, serif;
  --oz-font-body:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --oz-font-mono:      'JetBrains Mono', 'Courier New', monospace;
  --oz-radius:         12px;
  --oz-radius-sm:      8px;
  --oz-radius-lg:      16px;
  --oz-stroke-width:   2;
  --oz-letter-spacing: 0;
  --oz-letter-spacing-heading: 0;
  --oz-text-transform: none;
}

/* ----------------------------------------------------------------
   CSS Variables — Light theme
   ---------------------------------------------------------------- */
[data-theme="light"] {
  --oz-bg:             #faf8f5;
  --oz-surface:        #ffffff;
  --oz-surface-hover:  #f5f0ea;
  --oz-border:         #e8e0d4;
  --oz-text:           #1a1815;
  --oz-text-secondary: #5c564e;
  --oz-text-muted:     #8a8278;
  --oz-accent:         #9a7a2e;
  --oz-accent-hover:   #7a6420;
  --oz-accent-subtle:  rgba(154,122,46,0.08);
  --oz-accent-subtle2: rgba(154,122,46,0.04);
  --oz-shadow:         0 2px 8px rgba(0,0,0,0.08);
  --oz-shadow-lg:      0 8px 32px rgba(0,0,0,0.1);
  --oz-topbar-bg:      rgba(250,248,245,0.92);
  --oz-sidebar-bg:     #f5f0ea;
  --oz-overlay:        rgba(0,0,0,0.3);
  --oz-scrollbar-thumb: #d4cec6;
  --oz-scrollbar-track: #faf8f5;
  --oz-badge-bg:       rgba(154,122,46,0.1);
  --oz-badge-text:     #7a6420;
  --oz-ficha-bg:       #faf8f5;
  --oz-ficha-border:   #e8e0d4;
  --oz-ficha-header:   rgba(154,122,46,0.06);

  /* Campo accent colors (overrideable by themes) */
  --oz-color-level1:   #3a7a52;
  --oz-color-level2:   #9a7a2e;
  --oz-color-level3:   #7a4868;
  --oz-color-available:#9a7a2e;
  --oz-color-locked:   #888;
  --oz-color-done:     #3a7a52;
  --oz-color-glosario: #b08030;
  --oz-color-personajes:#a85858;

  /* Aliases for injected atomos.js styles */
  --bg-secondary:      #ffffff;
  --border:            #e8e0d4;
  --text-primary:      #1a1815;
  --text-secondary:    #5c564e;
  --text-muted:        #8a8278;
  --bg-hover:          rgba(0,0,0,0.04);
  --shadow-md:         0 4px 16px rgba(0,0,0,0.08);
}

/* ----------------------------------------------------------------
   Reset & Base
   ---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--oz-font-body);
  background-color: var(--oz-bg);
  color: var(--oz-text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--oz-font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--oz-text);
  letter-spacing: var(--oz-letter-spacing-heading);
  text-transform: var(--oz-text-transform);
}

/* SVG icons honor theme stroke width */
.oz-topbar svg,
.oz-sidebar svg,
.oz-themes-panel svg,
.oz-search-icon {
  stroke-width: var(--oz-stroke-width) !important;
}

a {
  color: var(--oz-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* Tabs (used by eras module for lentes) */
.oz-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 1.5rem 0 2rem;
  padding: 0.5rem 0 0;
  border-bottom: 1px solid var(--oz-border);
  position: sticky;
  top: 59px; /* topbar (56px) + reading progress bar (3px) */
  background: var(--oz-bg);
  z-index: 40;
}

.oz-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: var(--oz-radius-sm) var(--oz-radius-sm) 0 0;
  color: var(--oz-text-secondary);
  font-family: var(--oz-font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -1px;
}

.oz-tabs__tab:hover {
  color: var(--oz-text);
  background: var(--oz-accent-subtle2);
}

.oz-tabs__tab--active {
  color: var(--oz-accent);
  border-bottom-color: var(--oz-accent);
  background: var(--oz-accent-subtle);
  font-weight: 600;
}

.oz-tabs__tab-icon {
  display: inline-flex;
  align-items: center;
  font-size: 1.05em;
}

.oz-tabs__tab-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: var(--oz-stroke-width);
}

.oz-tabs__tab-label {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .oz-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .oz-tabs::-webkit-scrollbar {
    display: none;
  }
  .oz-tabs__tab {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

/* Era detail content rendering */
.era-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 32px;
}

.era-content h2 {
  position: relative;
  margin: 3rem 0 1.25rem;
  padding: 0.7rem 1.25rem;
  border: none;
  border-left: 4px solid var(--oz-accent);
  background: linear-gradient(to right, var(--oz-accent-subtle), transparent 60%);
  border-radius: 0 var(--oz-radius-sm) var(--oz-radius-sm) 0;
  font-size: 1.4rem;
}

.era-content h3 {
  position: relative;
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--oz-accent-subtle);
  color: var(--oz-text);
  font-size: 1.1rem;
}

.era-content h4 {
  margin-top: 1.5rem;
  color: var(--oz-text);
}

.era-content p {
  margin-bottom: 1.15rem;
  color: var(--oz-text-secondary);
  line-height: 1.85;
  font-size: 0.95rem;
}

.era-content ul, .era-content ol {
  margin: 0.75rem 0 1.15rem;
  padding-left: 1.75rem;
}

.era-content li {
  margin-bottom: 0.5rem;
  color: var(--oz-text-secondary);
  line-height: 1.7;
}

.era-content li::marker {
  color: var(--oz-accent);
  font-weight: 700;
}

.era-content strong {
  color: var(--oz-text);
  font-weight: 700;
  background: linear-gradient(180deg, transparent 75%, var(--oz-accent-subtle) 75%);
  padding: 0 2px;
}

.era-content em {
  color: var(--oz-text);
}

.era-content blockquote {
  position: relative;
  margin: 2rem 0;
  padding: 1.4rem 1.75rem 1.4rem 3.25rem;
  border-left: 4px solid var(--oz-accent);
  background: var(--oz-surface);
  border-radius: 0 var(--oz-radius) var(--oz-radius) 0;
  font-style: italic;
  color: var(--oz-text-secondary);
  line-height: 1.75;
  box-shadow: var(--oz-shadow);
}

.era-content blockquote::before {
  content: '"';
  position: absolute;
  left: 0.6rem;
  top: -0.5rem;
  font-size: 4rem;
  line-height: 1;
  color: var(--oz-accent);
  opacity: 0.35;
  font-family: Georgia, serif;
  pointer-events: none;
}

.era-content blockquote p:last-child {
  margin-bottom: 0;
}

.era-content hr {
  margin: 3rem auto;
  border: none;
  border-top: 1px solid var(--oz-border);
  width: 50%;
  max-width: 200px;
  opacity: 0.6;
}

/* FAQ section — h3+p pairs after the last h2 (always "Preguntas frecuentes") */
.era-content h2:last-of-type ~ h3 {
  margin-top: 1.25rem;
  margin-bottom: 0;
  padding: 1rem 1.25rem 0.5rem;
  background: var(--oz-accent-subtle2);
  border-left: 3px solid var(--oz-accent);
  border-radius: var(--oz-radius-sm) var(--oz-radius-sm) 0 0;
  font-size: 1rem;
}

.era-content h2:last-of-type ~ h3 + p {
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 0.25rem 1.25rem 1rem;
  background: var(--oz-accent-subtle2);
  border-left: 3px solid var(--oz-accent);
  border-radius: 0 0 var(--oz-radius-sm) var(--oz-radius-sm);
}

/* Era detail header */
.era-detail__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem 0 1rem;
}

.era-detail__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--oz-radius);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.era-detail__header-text {
  flex: 1;
  min-width: 0;
}

.era-detail__title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.era-detail__title {
  font-size: 1.75rem;
  margin: 0;
}

.era-detail__periodo {
  color: var(--oz-text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--oz-scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--oz-scrollbar-thumb);
  border-radius: 4px;
}

/* ----------------------------------------------------------------
   Skip link
   ---------------------------------------------------------------- */
.oz-skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--oz-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  z-index: 10000;
  font-size: 0.875rem;
}

.oz-skip-link:focus {
  top: 0.5rem;
}

/* ----------------------------------------------------------------
   Top bar
   ---------------------------------------------------------------- */
.oz-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: var(--oz-topbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--oz-border);
  z-index: 1000;
  gap: 0.75rem;
}

.oz-topbar__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.oz-topbar__center {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
}

.oz-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.oz-topbar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--oz-text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.oz-topbar__btn:hover {
  background: var(--oz-accent-subtle);
  color: var(--oz-accent);
}
.oz-lang-btn {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  min-width: 36px;
}

.oz-topbar__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--oz-text);
  text-decoration: none;
  font-weight: 600;
}

.oz-topbar__logo-icon {
  color: var(--oz-accent);
  display: inline-flex;
  align-items: center;
  position: relative;
  top: 2px;
}

.oz-topbar__logo-text {
  font-family: var(--oz-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ----------------------------------------------------------------
   Themes panel (visual style picker)
   ---------------------------------------------------------------- */
.oz-themes-panel {
  position: fixed;
  top: 56px;
  right: 1rem;
  z-index: 1100;
  width: 260px;
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  border-radius: 12px;
  box-shadow: var(--oz-shadow-lg);
  padding: 1rem;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.oz-themes-panel--open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.oz-themes-panel__header {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--oz-text-muted);
  margin-bottom: 0.75rem;
}
.oz-themes-panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.oz-themes-panel__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  color: var(--oz-text);
}
.oz-themes-panel__item:hover {
  background: var(--oz-accent-subtle2);
  border-color: var(--oz-border);
}
.oz-themes-panel__item--active {
  background: var(--oz-accent-subtle);
  border-color: var(--oz-accent);
}
.oz-themes-panel__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}
.oz-themes-panel__label {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Hamburger visible only on mobile */
.oz-hamburger {
  display: none;
}

@media (max-width: 768px) {
  .oz-hamburger {
    display: flex;
  }
}

/* ----------------------------------------------------------------
   Search
   ---------------------------------------------------------------- */
.oz-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  border-radius: 8px;
  padding: 0 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.oz-search-wrapper:focus-within {
  border-color: var(--oz-accent);
  box-shadow: 0 0 0 3px var(--oz-accent-subtle);
}

.oz-search-icon {
  color: var(--oz-text-muted);
  flex-shrink: 0;
}

.oz-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--oz-text);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.5rem;
  outline: none;
}

.oz-search-input::placeholder {
  color: var(--oz-text-muted);
}

.oz-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  border-radius: 8px;
  box-shadow: var(--oz-shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
}

.oz-search-dropdown.open {
  display: block;
}

.oz-search-dropdown__item {
  display: block;
  padding: 0.625rem 0.875rem;
  color: var(--oz-text);
  cursor: pointer;
  border-bottom: 1px solid var(--oz-border);
  transition: background 0.15s ease;
}

.oz-search-dropdown__item:last-child {
  border-bottom: none;
}

.oz-search-dropdown__item:hover {
  background: var(--oz-surface-hover);
}

.oz-search-dropdown__item-title {
  font-size: 0.875rem;
  font-weight: 500;
}

.oz-search-dropdown__item-type {
  font-size: 0.75rem;
  color: var(--oz-text-muted);
  margin-top: 2px;
}

.oz-search-dropdown__empty {
  padding: 1rem;
  text-align: center;
  color: var(--oz-text-muted);
  font-size: 0.875rem;
}

/* ----------------------------------------------------------------
   Sidebar
   ---------------------------------------------------------------- */
.oz-sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  width: 260px;
  background: var(--oz-sidebar-bg);
  border-right: 1px solid var(--oz-border);
  overflow-y: auto;
  z-index: 900;
  transition: transform 0.3s ease;
}

.oz-sidebar__nav {
  padding: 1rem 0;
}

.oz-sidebar__section {
  margin-bottom: 1.25rem;
}

.oz-sidebar__heading {
  padding: 0.375rem 1.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--oz-text-muted);
}

.oz-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--oz-text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.oz-sidebar__link:hover {
  color: var(--oz-text);
  background: var(--oz-accent-subtle);
}

.oz-sidebar__link.active {
  color: var(--oz-accent);
  background: var(--oz-accent-subtle);
  border-left-color: var(--oz-accent);
  font-weight: 500;
}

.oz-sidebar__link-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.oz-sidebar__divider {
  height: 1px;
  background: var(--oz-border);
  margin: 0.75rem 1.25rem;
}

/* Sidebar list (campo-specific expandable list, e.g. historia chapters) */
.oz-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0 0.5rem;
}

.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; margin: 1px 0; border-radius: var(--oz-radius, 6px);
  text-decoration: none; color: var(--oz-text-muted);
  font-size: 0.84rem; transition: background 0.15s, color 0.15s; cursor: pointer;
}
.sidebar-item:hover { background: var(--oz-border); color: var(--oz-text); text-decoration: none; }
.sidebar-item--active { background: var(--oz-border); color: var(--oz-text); font-weight: 600; }
.sidebar-item--dimmed { opacity: 0.4; pointer-events: none; }

.sidebar-item__num {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 4px;
  font-size: 0.72rem; font-weight: 700; color: #0f172a; flex-shrink: 0;
}
.sidebar-item__title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-item__check { flex-shrink: 0; color: #22c55e; }

/* Sidebar mobile behavior */
.oz-sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--oz-overlay);
  z-index: 899;
}

@media (max-width: 768px) {
  .oz-sidebar {
    transform: translateX(-100%);
  }

  .sidebar-open .oz-sidebar {
    transform: translateX(0);
  }

  .sidebar-open .oz-sidebar-backdrop {
    display: block;
  }
}

/* ----------------------------------------------------------------
   Main content area
   ---------------------------------------------------------------- */
.oz-main {
  margin-left: 260px;
  margin-top: 56px;
  min-height: calc(100vh - 56px);
  padding: 2rem;
}

.oz-content {
  max-width: 960px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .oz-main {
    margin-left: 0;
    padding: 1.25rem;
  }
}

/* ----------------------------------------------------------------
   Back link
   ---------------------------------------------------------------- */
.oz-back-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.oz-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--oz-text-secondary);
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

.oz-back-row .oz-back {
  margin-bottom: 0;
}

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

.oz-back--prev {
  color: var(--oz-accent);
  font-weight: 500;
}

.oz-back--prev:hover {
  opacity: 0.8;
}

/* ----------------------------------------------------------------
   Landing — Pillar cards
   ---------------------------------------------------------------- */
/* ---- Landing: filo-style layout ---- */
.oz-landing {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  box-sizing: border-box;
  max-width: 960px;
  margin: 0 auto;
}

/* Primary card (Átomos) — large, with per-level progress */
.oz-landing__primary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 200px;
  padding: 2rem 1.25rem;
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.oz-landing__primary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--oz-shadow);
  border-color: var(--oz-accent);
}
.oz-landing__primary-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--oz-accent-subtle);
  color: var(--oz-accent);
  flex-shrink: 0;
}
.oz-landing__primary-body {
  width: 100%;
  max-width: 500px;
}
.oz-landing__primary-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 1rem 0 .6rem;
  color: var(--oz-text);
  border-bottom: none;
  padding-bottom: 0;
}
.oz-landing__primary-desc {
  font-size: .95rem;
  color: var(--oz-text-secondary);
  margin: 0 0 1rem;
  line-height: 1.5;
}

/* Per-level progress bars */
.oz-landing__levels-progress {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.oz-landing__level-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.oz-landing__level-label {
  font-size: .75rem;
  font-weight: 500;
  color: var(--oz-text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  width: 100px;
}
.oz-landing__level-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--oz-border);
  overflow: hidden;
}
.oz-landing__level-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .3s;
}
.oz-landing__level-fill--l1 { background: var(--oz-color-level1); }
.oz-landing__level-fill--l2 { background: var(--oz-color-level2); }
.oz-landing__level-fill--l3 { background: var(--oz-color-level3); }
.oz-landing__level-label--l1 { color: var(--oz-color-level1); }
.oz-landing__level-label--l2 { color: var(--oz-color-level2); }
.oz-landing__level-label--l3 { color: var(--oz-color-level3); }
.oz-landing__level-count {
  font-size: .7rem;
  color: var(--oz-text-muted);
  font-weight: 500;
  min-width: 35px;
  text-align: right;
}

/* 3-column grid for other sections */
.oz-landing__grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}
.oz-landing__grid3 .oz-landing__section-card {
  height: 100%;
  box-sizing: border-box;
}

.oz-landing__section-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.25rem;
  min-height: 120px;
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.oz-landing__section-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--oz-shadow);
  border-color: var(--oz-accent);
}
.oz-landing__section-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--oz-accent-subtle);
  color: var(--oz-accent);
}
.oz-landing__section-body {
  flex: 1;
  min-width: 0;
}
.oz-landing__section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .6rem;
  color: var(--oz-text);
  border-bottom: none;
  padding-bottom: 0;
}
.oz-landing__section-desc {
  font-size: .8rem;
  color: var(--oz-text-secondary);
  margin: 0 0 .75rem;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .oz-landing__grid3 {
    grid-template-columns: 1fr;
  }
  .oz-landing {
    padding: .75rem;
  }
}

/* ----------------------------------------------------------------
   Generic card grid (recipes, topics, guides)
   ---------------------------------------------------------------- */
.oz-section-header {
  margin-bottom: 2rem;
}

.oz-section-header__title {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.oz-section-header__subtitle {
  color: var(--oz-text-secondary);
  font-size: 0.9375rem;
}

.oz-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.oz-card {
  display: flex;
  flex-direction: column;
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--oz-text);
  transition: all 0.2s ease;
}

.oz-card:hover {
  background: var(--oz-surface-hover);
  border-color: var(--oz-accent);
  box-shadow: var(--oz-shadow);
  color: var(--oz-text);
}

.oz-card--done {
  border-color: #10B981;
}

.oz-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.oz-card__title {
  font-family: var(--oz-font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.oz-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.625rem;
}

.oz-card__desc {
  font-size: 0.875rem;
  color: var(--oz-text-secondary);
  line-height: 1.5;
  flex: 1;
}

/* ----------------------------------------------------------------
   Badges
   ---------------------------------------------------------------- */
.oz-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 20px;
  background: var(--oz-badge-bg);
  color: var(--oz-badge-text);
  white-space: nowrap;
}

.oz-badge--family {
  background: rgba(139,92,246,0.12);
  color: #a78bfa;
}

[data-theme="light"] .oz-badge--family {
  background: rgba(139,92,246,0.1);
  color: #7c3aed;
}

.oz-badge--spirit {
  background: rgba(34,197,94,0.12);
  color: #4ade80;
}

[data-theme="light"] .oz-badge--spirit {
  background: rgba(34,197,94,0.1);
  color: #16a34a;
}

.oz-badge--technique {
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
}

[data-theme="light"] .oz-badge--technique {
  background: rgba(59,130,246,0.1);
  color: #2563eb;
}

.oz-badge--difficulty {
  background: var(--oz-badge-bg);
  color: var(--oz-badge-text);
}

/* ----------------------------------------------------------------
   Filter bar
   ---------------------------------------------------------------- */
.oz-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--oz-border);
}

.oz-filter-bar__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--oz-text-muted);
  display: flex;
  align-items: center;
  margin-right: 0.25rem;
}

.oz-filter-bar select,
.oz-filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--oz-surface);
  color: var(--oz-text);
  border: 1px solid var(--oz-border);
  border-radius: 6px;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8278' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  transition: border-color 0.2s ease;
}

.oz-filter-bar select:hover,
.oz-filter-select:hover {
  border-color: var(--oz-accent);
}

.oz-filter-bar select:focus,
.oz-filter-select:focus {
  outline: none;
  border-color: var(--oz-accent);
  box-shadow: 0 0 0 3px var(--oz-accent-subtle);
}

/* ----------------------------------------------------------------
   Recipe detail page
   ---------------------------------------------------------------- */
.oz-recipe-header {
  margin-bottom: 2rem;
}

.oz-recipe-header__top {
  margin-bottom: 0.75rem;
}

.oz-recipe-header__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.oz-recipe-header__name {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.oz-recipe-header__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.oz-recipe-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--oz-text-secondary);
  font-size: 0.875rem;
}

.oz-recipe-header__meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.oz-difficulty-dots {
  display: inline-flex;
  gap: 3px;
}

.oz-difficulty-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--oz-border);
}

.oz-difficulty-dot.filled {
  background: var(--oz-accent);
}

/* Recipe sections */
.oz-recipe-section {
  margin-bottom: 2rem;
}

.oz-recipe-section__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--oz-font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--oz-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--oz-border);
}

.oz-recipe-section__title::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--oz-accent);
  flex-shrink: 0;
}

/* Ingredient list */
.oz-ingredient-list {
  list-style: none;
  padding: 0;
}

.oz-ingredient-row {
  display: flex;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--oz-accent-subtle2);
  font-size: 0.9375rem;
}

.oz-ingredient-row:last-child {
  border-bottom: none;
}

.oz-ingredient-qty {
  width: 80px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--oz-accent);
}

.oz-ingredient-unit {
  width: 40px;
  flex-shrink: 0;
  color: var(--oz-text-secondary);
  font-size: 0.8125rem;
}

.oz-ingredient-name {
  flex: 1;
  color: var(--oz-text);
}

/* Preparation steps */
.oz-prep-technique {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--oz-accent-subtle);
  padding: 0.375rem 0.875rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--oz-accent);
  margin-bottom: 1rem;
}

.oz-prep-steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.oz-prep-step {
  counter-increment: step;
  display: flex;
  gap: 0.875rem;
  padding: 0.625rem 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.oz-prep-step::before {
  content: counter(step) '.';
  color: var(--oz-accent);
  font-weight: 600;
  flex-shrink: 0;
  width: 24px;
}

/* Serving info */
.oz-serving-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  background: var(--oz-accent-subtle2);
  border-radius: 8px;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.oz-serving-info__item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.oz-serving-info__label {
  color: var(--oz-text-muted);
  font-weight: 500;
}

.oz-serving-info__value {
  color: var(--oz-text);
}

/* History paragraph */
.oz-recipe-history {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--oz-text-secondary);
}

/* ----------------------------------------------------------------
   Ficha Tecnica (technical sheet)
   ---------------------------------------------------------------- */
.oz-ficha-tecnica {
  border: 1px solid var(--oz-ficha-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--oz-ficha-bg);
}

.oz-ficha-tecnica__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--oz-font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--oz-ficha-border);
  background: var(--oz-ficha-header);
}

.oz-ficha-tecnica__title::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--oz-accent);
  flex-shrink: 0;
}

.oz-ficha-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.oz-ficha-table thead th {
  padding: 0.75rem 1.25rem;
  text-align: right;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--oz-text-muted);
  border-bottom: 1px solid var(--oz-ficha-border);
}

.oz-ficha-table thead th:first-child {
  text-align: left;
}

.oz-ficha-table tbody td {
  padding: 0.625rem 1.25rem;
  border-bottom: 1px solid var(--oz-accent-subtle2);
}

.oz-ficha-table tbody tr:last-child td {
  border-bottom: none;
}

.oz-ficha-table tbody td:first-child {
  color: var(--oz-text-secondary);
  font-weight: 500;
}

.oz-ficha-table tbody td:nth-child(2),
.oz-ficha-table tbody td:nth-child(3) {
  text-align: right;
  font-weight: 500;
}

.oz-ficha-table tbody td .oz-ficha-highlight {
  color: var(--oz-accent);
  font-weight: 600;
}

.oz-ficha-volume {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--oz-text-secondary);
  border-bottom: 1px solid var(--oz-ficha-border);
}
.oz-ficha-volume__left,
.oz-ficha-volume__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.oz-ficha-volume__right {
  font-size: 0.85rem;
  gap: 0.5rem;
}
.oz-ficha-volume strong {
  color: var(--oz-text);
}
.oz-ficha-kcal-sep {
  color: var(--oz-text-muted);
}

/* ----------------------------------------------------------------
   Glosario — list view
   ---------------------------------------------------------------- */

.oz-glos-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.oz-glos-filter-btn {
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 0.825rem;
  font-weight: 500;
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  color: var(--oz-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.oz-glos-filter-btn:hover {
  background: var(--oz-surface-hover);
  color: var(--oz-text);
}

.oz-glos-filter-btn--active {
  background: var(--oz-accent);
  border-color: var(--oz-accent);
  color: #fff;
}

.oz-glos-list {
  display: flex;
  flex-direction: column;
}

.oz-glos-letter {
  font-family: var(--oz-font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--oz-accent);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--oz-border);
}

.oz-glos-letter:first-child {
  margin-top: 0;
}

.oz-glos-card {
  display: block;
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  border-left: 3px solid var(--glos-cat-color, var(--oz-border));
}

.oz-glos-card:hover {
  border-color: var(--oz-accent);
  background: var(--oz-surface-hover);
}

.oz-glos-card--done {
  border-color: #10B981;
}

.oz-glos-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.oz-glos-card__term {
  font-family: var(--oz-font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--oz-text);
  margin: 0 0 2px;
  display: inline;
}

.oz-glos-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 10px;
  background: var(--oz-surface-hover);
  border-radius: 20px;
  color: var(--oz-text-muted);
  margin-top: 6px;
}

.oz-glos-card__def {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--oz-text-secondary);
  margin: 10px 0 0;
}

/* Check button */
.oz-glos-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--oz-border);
  border-radius: 50%;
  background: none;
  color: var(--oz-text-muted);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.oz-glos-check:hover {
  border-color: var(--oz-accent);
  color: var(--oz-accent);
}

.oz-glos-check--active {
  border-color: #10B981;
  background: #10B981;
  color: #fff;
}

.oz-glos-check--active:hover {
  border-color: #059669;
  background: #059669;
}

.oz-glos-check--lg {
  width: 40px;
  height: 40px;
}

/* ----------------------------------------------------------------
   Glosario — detail view
   ---------------------------------------------------------------- */

.oz-glos-detail {
  max-width: 720px;
}

.oz-glos-detail__header {
  margin-bottom: 2rem;
}

.oz-glos-detail__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.oz-glos-detail__title {
  font-family: var(--oz-font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--oz-text);
  margin: 0;
}

.oz-glos-detail__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  background: var(--oz-surface-hover);
  border-radius: 20px;
  color: var(--oz-text-muted);
  margin-top: 8px;
}

.oz-glos-detail__section {
  margin-bottom: 2rem;
}

.oz-glos-detail__section h2 {
  font-family: var(--oz-font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--oz-text);
  margin: 0 0 0.75rem;
}

.oz-glos-detail__section p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--oz-text-secondary);
  margin: 0 0 0.75rem;
}

.oz-glos-detail__section ul, .oz-glos-detail__section ol { margin: 0.75rem 0; padding-left: 1.75rem; }
.oz-glos-detail__section li { margin-bottom: 0.4rem; color: var(--oz-text-secondary); line-height: 1.7; }

.oz-glos-detail__example {
  background: color-mix(in srgb, var(--oz-accent) 5%, var(--oz-surface));
  border: 1px solid color-mix(in srgb, var(--oz-accent) 20%, var(--oz-border));
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--oz-accent);
}
.oz-glos-detail__example h2 {
  color: var(--oz-accent);
}

/* Prev/Next nav */
.oz-glos-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--oz-border);
}

.oz-glos-nav__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--oz-text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.oz-glos-nav__link--prev { margin-right: auto; }
.oz-glos-nav__link--next { margin-left: auto; }

.oz-glos-nav__link:hover {
  color: var(--oz-accent);
}

.oz-glos-nav__arrow {
  font-size: 1.1rem;
}

/* ----------------------------------------------------------------
   Glosario — inline term links (2 colors)
   ---------------------------------------------------------------- */

.oz-glos-link {
  color: #D97706;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.oz-glos-link:hover {
  color: #F59E0B;
}

.oz-glos-link--done {
  color: #10B981;
}

.oz-glos-link--done:hover {
  color: #34D399;
}

/* Reference auto-links (blue) */
.oz-ref-link {
  color: #3B82F6;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.oz-ref-link:hover {
  color: #60A5FA;
}

.oz-ref-link--done {
  color: #10B981;
}

.oz-ref-link--done:hover {
  color: #34D399;
}

/* Glossary tooltip */
.oz-glos-tooltip {
  position: absolute;
  z-index: 9999;
  max-width: 340px;
  padding: 14px 18px;
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  border-left: 3px solid var(--oz-accent, #D97706);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  pointer-events: auto;
  animation: oz-glos-tip-in 0.15s ease;
}

@keyframes oz-glos-tip-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.oz-glos-tooltip__term {
  font-family: var(--oz-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--oz-text);
  margin-bottom: 6px;
}

.oz-glos-tooltip__def {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--oz-text-secondary);
}

.oz-glos-tooltip__badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 8px;
  color: var(--oz-text-muted);
}

.oz-glos-tooltip__badge--done {
  color: #10B981;
}

/* ----------------------------------------------------------------
   Referencias — card grid
   ---------------------------------------------------------------- */

.oz-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.oz-ref-card {
  display: flex;
  flex-direction: column;
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.oz-ref-card:hover {
  border-color: var(--oz-accent);
  background: var(--oz-surface-hover);
}

.oz-ref-card--done {
  border-color: #10B981;
}

.oz-ref-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.oz-ref-card__type {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--oz-accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.oz-ref-card__name {
  font-family: var(--oz-font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--oz-text);
  margin: 0 0 0.25rem;
}

.oz-ref-card__precio {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--oz-accent);
  margin-bottom: 0.5rem;
}

.oz-ref-card__desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--oz-text-secondary);
  margin: 0 0 0.75rem;
  flex: 1;
}

.oz-ref-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 10px;
  background: var(--oz-surface-hover);
  border-radius: 20px;
  color: var(--oz-text-muted);
}

/* Referencias — brand cards */
.oz-brand-card {
  background: var(--oz-card);
  border: 1px solid var(--oz-border);
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.18s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.oz-brand-card:hover {
  border-color: #D97706;
  box-shadow: 0 4px 20px rgba(217,119,6,.15), 0 0 0 1px rgba(217,119,6,.3);
  transform: translateY(-3px);
}
.oz-brand-card__mono {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, rgba(217,119,6,.12) 0%, rgba(217,119,6,.04) 100%);
  border-bottom: 1px solid var(--oz-border);
}
[data-theme="light"] .oz-brand-card__mono {
  background: linear-gradient(135deg, rgba(217,119,6,.1) 0%, rgba(245,158,11,.05) 100%);
}
.oz-brand-card__letter {
  font-family: var(--oz-ff-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: #D97706;
  opacity: 0.25;
  line-height: 1;
  user-select: none;
}
.oz-brand-card__cat-icon {
  position: absolute;
  bottom: 8px;
  right: 10px;
  color: var(--oz-text-muted);
  opacity: 0.45;
}
.oz-brand-card__body {
  padding: 0.85rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.oz-brand-card__name {
  font-family: var(--oz-ff-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--oz-text);
  margin: 0;
}
.oz-brand-card__count {
  font-size: 0.75rem;
  color: var(--oz-text-muted);
  font-weight: 500;
}
.oz-brand-card__arrow {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--oz-text-muted);
  opacity: 0;
  transition: opacity 0.2s, right 0.2s;
  line-height: 1;
}
.oz-brand-card:hover .oz-brand-card__arrow {
  opacity: 0.6;
  right: 10px;
}

/* Referencias — breadcrumb */
.oz-ref-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.oz-ref-crumb {
  background: none;
  border: none;
  font: inherit;
  color: var(--oz-accent);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.oz-ref-crumb:hover { opacity: 0.8; }
.oz-ref-crumb--current {
  color: var(--oz-text);
  cursor: default;
  text-decoration: none;
}
.oz-ref-crumb-sep {
  color: var(--oz-text-muted);
  user-select: none;
}

/* Referencias detail meta */
.oz-ref-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ----------------------------------------------------------------
   Landing — section progress bar
   ---------------------------------------------------------------- */

.oz-landing__section-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.oz-landing__section-bar {
  flex: 1;
  height: 4px;
  background: var(--oz-border);
  border-radius: 2px;
  overflow: hidden;
}

.oz-landing__section-fill {
  height: 100%;
  background: var(--oz-accent);
  border-radius: 2px;
  transition: width 0.3s;
}

.oz-landing__section-count {
  font-size: 0.75rem;
  color: var(--oz-text-muted);
  white-space: nowrap;
}

/* ----------------------------------------------------------------
   Topic / Guide list pages
   ---------------------------------------------------------------- */
.oz-topic-card {
  display: flex;
  flex-direction: column;
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--oz-text);
  transition: all 0.2s ease;
}

.oz-topic-card:hover {
  background: var(--oz-surface-hover);
  border-color: var(--oz-accent);
  box-shadow: var(--oz-shadow);
  color: var(--oz-text);
}

.oz-topic-card__number {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--oz-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.oz-topic-card__title {
  font-family: var(--oz-font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.oz-topic-card__desc {
  font-size: 0.8125rem;
  color: var(--oz-text-secondary);
  line-height: 1.5;
}

/* ----------------------------------------------------------------
   Article / Guide detail page
   ---------------------------------------------------------------- */
.oz-article {
  max-width: 720px;
}

.oz-article__title {
  font-size: 1.875rem;
  margin-bottom: 0.5rem;
}

.oz-article__meta {
  color: var(--oz-text-secondary);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.oz-article__body {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--oz-text);
}

.oz-article__body h2 {
  font-size: 1.375rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.oz-article__body h3 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.oz-article__body p {
  margin-bottom: 1rem;
}

.oz-article__body ul,
.oz-article__body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.oz-article__body li {
  margin-bottom: 0.375rem;
}

/* ----------------------------------------------------------------
   Empty states / Not found
   ---------------------------------------------------------------- */
.oz-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--oz-text-muted);
}

.oz-empty__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.oz-empty__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--oz-text-secondary);
  margin-bottom: 0.5rem;
}

.oz-empty__desc {
  font-size: 0.9375rem;
}

/* ----------------------------------------------------------------
   Utility
   ---------------------------------------------------------------- */
.oz-mt-1  { margin-top: 0.5rem; }
.oz-mt-2  { margin-top: 1rem; }
.oz-mt-3  { margin-top: 1.5rem; }
.oz-mt-4  { margin-top: 2rem; }
.oz-mb-1  { margin-bottom: 0.5rem; }
.oz-mb-2  { margin-bottom: 1rem; }
.oz-mb-3  { margin-bottom: 1.5rem; }
.oz-mb-4  { margin-bottom: 2rem; }

/* ----------------------------------------------------------------
   Animations
   ---------------------------------------------------------------- */
@keyframes oz-fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.oz-fade-in {
  animation: oz-fadeIn 0.3s ease forwards;
}

/* ----------------------------------------------------------------
   Responsive fine-tuning
   ---------------------------------------------------------------- */
@media (max-width: 480px) {
  .oz-recipe-header__name {
    font-size: 1.5rem;
  }

  .oz-recipe-header__top {
    flex-direction: column;
  }

  .oz-ficha-table {
    font-size: 0.8125rem;
  }

  .oz-ficha-table thead th,
  .oz-ficha-table tbody td {
    padding: 0.5rem 0.75rem;
  }

  .oz-serving-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .oz-ingredient-qty {
    width: 60px;
  }

  .oz-landing__grid3 {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   Wide content mode (skill tree)
   ================================================================ */

.oz-content--wide {
  max-width: 1200px;
}

/* Skill tree + atom reader styles are injected by atomos.js injectStyles() */

/* ================================================================
   Historia / Tutoriales — shared components
   ================================================================ */

.oz-page-header { margin-bottom: 24px; }
.oz-page-header h1 { margin-bottom: 4px; }
.oz-page-header p { color: var(--oz-text-muted); }

.landing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

.class-card {
  display: block; text-decoration: none; color: inherit;
  padding: 16px; border-radius: 12px;
  background: var(--oz-surface); border: 1px solid var(--oz-border);
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.class-card:hover { transform: translateY(-2px); box-shadow: var(--oz-shadow); }
.class-card--coming-soon { opacity: 0.4; cursor: default; }
.class-card--coming-soon:hover { transform: none; box-shadow: none; }
.class-card--studied { border-color: #22c55e; }

.class-card__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  font-size: 0.8rem; font-weight: 700; color: #0f172a; margin-bottom: 8px;
}
.class-card__title { font-size: 0.92rem; font-weight: 600; line-height: 1.3; }
.class-card__period { font-size: 0.78rem; color: var(--oz-text-muted); margin-top: 4px; }

.class-card__lock, .class-card__check {
  position: absolute; top: 12px; right: 12px;
}
.class-card__lock { color: var(--oz-text-muted); }
.class-card__check { color: #22c55e; }

/* Era cards — prominent cards for the eras landing grid */
.era-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}
.era-card {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  text-decoration: none;
  color: inherit;
  padding: 26px 28px 26px 22px;
  border-radius: var(--oz-radius);
  background: var(--oz-surface);
  border: 1px solid var(--oz-border);
  border-left: 5px solid;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.era-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--oz-shadow-lg);
}
.era-card--coming-soon {
  opacity: 0.35;
  cursor: default;
}
.era-card--coming-soon:hover {
  transform: none;
  box-shadow: none;
}
.era-card__numero {
  font-family: var(--oz-font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.6;
  flex-shrink: 0;
  min-width: 40px;
  text-align: center;
  padding-top: 4px;
}
.era-card__body {
  flex: 1;
  min-width: 0;
}
.era-card__title {
  font-family: var(--oz-font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--oz-text);
}
.era-card__period {
  font-size: 0.82rem;
  color: var(--oz-text-muted);
  margin-top: 5px;
  font-style: italic;
}
.era-card__resumen {
  font-size: 0.88rem;
  color: var(--oz-text-secondary);
  line-height: 1.55;
  margin-top: 8px;
}
.era-card__status {
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--oz-text-muted);
}
@media (max-width: 768px) {
  .era-card {
    padding: 20px 18px 20px 16px;
    gap: 16px;
  }
  .era-card__numero {
    font-size: 1.7rem;
    min-width: 32px;
  }
  .era-card__title {
    font-size: 1.05rem;
  }
}

/* Chapter / Tutorial header */
.cap-header {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 24px 0 16px;
}
.cap-header__badge {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  font-size: 1.25rem; font-weight: 800; color: #0f172a; flex-shrink: 0;
}
.cap-header__text { flex: 1; }
.cap-header__title { font-size: 1.5rem; margin: 0; }
.cap-header__period { font-size: 0.875rem; color: var(--oz-text-muted); margin-top: 2px; }

/* Article content */
.cap-content { padding: 0 0 32px; }
.cap-content h2 { margin-top: 2rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--oz-border); }
.cap-content h3 { margin-top: 1.75rem; }
.cap-content p { margin-bottom: 1rem; color: var(--oz-text-secondary); }
.cap-content ul, .cap-content ol { margin: 0.75rem 0; padding-left: 1.75rem; }
.cap-content li { margin-bottom: 0.4rem; color: var(--oz-text-secondary); }
.cap-content strong { color: var(--oz-text); }
.cap-content blockquote {
  margin: 1.5rem 0; padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--oz-accent); background: var(--oz-surface);
  border-radius: 0 8px 8px 0; font-style: italic; color: var(--oz-text-secondary);
}
.cap-content code {
  padding: 2px 6px; background: var(--oz-surface-hover);
  border-radius: 4px; font-size: 0.88em; color: var(--oz-accent);
}
.cap-content pre {
  margin: 1rem 0; padding: 16px; background: var(--oz-surface-hover);
  border-radius: 8px; overflow-x: auto;
}
.cap-content pre code { padding: 0; background: none; }
.cap-content hr { margin: 2rem 0; border: none; border-top: 1px solid var(--oz-border); }
.cap-content table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.cap-content th, .cap-content td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--oz-border); }
.cap-content th { font-weight: 600; background: var(--oz-surface); color: var(--oz-text); }
.cap-content td { color: var(--oz-text-secondary); }
.cap-content__empty { color: var(--oz-text-muted); font-style: italic; padding: 32px 0; text-align: center; }

/* Reading progress bar (shared — used by historia, eras, atomos) */
.reading-progress-bar {
  position: fixed; top: 56px; left: 260px; right: 0;
  z-index: 50; height: 3px; background: var(--oz-border);
  overflow: hidden; pointer-events: none;
}
.reading-progress-bar__fill {
  height: 100%; width: 0%; transition: width 80ms linear;
}
@media (max-width: 768px) {
  .reading-progress-bar { left: 0; }
}

/* Studied toggle */
.studied-toggle { padding: 16px 0; text-align: center; }
.studied-toggle__btn,
.personaje-detail__studied-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border: 2px solid var(--oz-border);
  border-radius: 999px; background: transparent;
  color: var(--oz-text-secondary); font-size: 0.875rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.studied-toggle__btn:hover,
.personaje-detail__studied-btn:hover { border-color: #22c55e; color: #22c55e; }
.studied-toggle__btn--active,
.personaje-detail__studied-btn--active { background: #22c55e; border-color: #22c55e; color: #0f172a; }
.personaje-detail__bottom-toggle { padding: 16px 0; text-align: center; margin-top: 8px; }

/* Prev / Next navigation */
.prev-next {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.5rem 0; border-top: 1px solid var(--oz-border); margin-top: 2rem;
}
.prev-next__link {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: var(--oz-surface); border: 1px solid var(--oz-border);
  border-radius: 12px; text-decoration: none;
  color: var(--oz-text-secondary); font-size: 0.875rem;
  transition: all 0.2s; max-width: 48%;
}
.prev-next__link:hover { border-color: var(--oz-accent); color: var(--oz-text); text-decoration: none; }
.prev-next__arrow { font-size: 1.1rem; flex-shrink: 0; }
.prev-next__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Coming soon placeholder */
.coming-soon-placeholder { text-align: center; padding: 64px 0; }
.coming-soon-placeholder__icon { color: var(--oz-text-muted); margin-bottom: 16px; }
.coming-soon-placeholder h2 { font-size: 1.25rem; margin-bottom: 8px; }
.coming-soon-placeholder p { color: var(--oz-text-muted); }

/* ── Filter bar (shared by personajes, etc.) ── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.filter-btn {
  padding: 5px 14px; border: 1px solid var(--oz-border);
  border-radius: 999px; background: transparent;
  color: var(--oz-text-muted); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-btn:hover { border-color: var(--oz-accent); color: var(--oz-text); }
.filter-btn--active { background: var(--oz-accent); border-color: var(--oz-accent); color: #0f172a; font-weight: 600; }

/* ── Personajes ── */
.personajes-list { display: grid; grid-template-columns: 1fr; gap: 12px; }

.personaje-card {
  text-decoration: none; color: var(--oz-text); display: flex; align-items: flex-start;
  gap: 16px; position: relative; cursor: pointer;
  padding: 16px; background: var(--oz-surface);
  border: 1px solid var(--oz-border); border-radius: var(--oz-radius, 8px);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.personaje-card__img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--oz-border); transition: border-color 0.2s;
}
.personaje-card__body { flex: 1; min-width: 0; }
.personaje-card__header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.personaje-card__name { font-size: 1.1rem; font-weight: 700; }
.personaje-card__dates { font-size: 0.8rem; color: var(--oz-text-muted); }
.personaje-card__who { font-size: 0.875rem; color: var(--oz-text-muted); margin-bottom: 4px; line-height: 1.5; }
.personaje-card__badge { position: absolute; bottom: 16px; right: 16px; font-size: 0.72rem; padding: 2px 10px; border-radius: 999px; color: #fff; font-weight: 600; }
.personaje-card:hover { border-color: var(--oz-accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.personaje-card--done { border-color: #22c55e; }
.personaje-card__check { position: absolute; top: 16px; right: 16px; color: #22c55e; }

/* Filter dot */
.filter-btn__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.filter-btn__count { font-size: 0.75rem; opacity: 0.7; margin-left: 2px; }

/* Personaje detail */
.personaje-detail__header {
  padding: 24px; border-radius: var(--oz-radius, 8px); margin-bottom: 28px;
  display: flex; align-items: flex-start; gap: 24px;
  background: color-mix(in srgb, var(--per-accent, var(--oz-accent)) 8%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--per-accent, var(--oz-accent)) 25%, transparent);
}
.personaje-detail__img {
  width: 160px; height: 160px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 3px solid color-mix(in srgb, var(--per-accent, var(--oz-border)) 50%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--per-accent, var(--oz-accent)) 8%, transparent);
}
.personaje-detail__header-text { flex: 1; min-width: 0; }
.personaje-detail__title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.personaje-detail__name { font-size: 1.75rem; font-weight: 700; }
.personaje-detail__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.personaje-detail__dates { font-size: 0.9rem; color: var(--oz-text-muted); }
.personaje-detail__cat-badge { font-size: 0.75rem; padding: 2px 10px; border-radius: 999px; color: #fff; font-weight: 600; }

/* Reading comfort */
.personaje-detail__content { max-width: 720px; }
.personaje-detail__section { margin-bottom: 28px; }
.personaje-detail__section h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--per-accent, var(--oz-accent)); }
.personaje-detail__quien { font-size: 1.05rem; line-height: 1.85; color: var(--oz-text-muted); font-style: italic; }
.personaje-detail__section p { line-height: 1.85; }
.personaje-detail__section ul, .personaje-detail__section ol { margin: 0.75rem 0; padding-left: 1.75rem; }
.personaje-detail__section li { margin-bottom: 0.4rem; color: var(--oz-text-secondary); line-height: 1.85; }
.personaje-detail__bio p { margin-bottom: 12px; line-height: 1.85; }
.personaje-detail__obras { color: var(--oz-text-muted); font-style: italic; }
.personaje-detail__citas blockquote {
  margin: 1rem 0 0.75rem; padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--per-accent, var(--oz-accent));
  background: var(--oz-surface); border-radius: 0 6px 6px 0;
  font-style: italic; color: var(--oz-text-muted); line-height: 1.6;
}

/* Bottom studied button */
.personaje-detail__bottom-toggle { margin: 32px 0 8px; padding-top: 20px; border-top: 1px solid var(--oz-border); text-align: center; }
.personaje-detail__studied-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--oz-radius, 8px);
  border: 2px solid var(--oz-border); background: var(--oz-surface);
  color: var(--oz-text-muted); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.personaje-detail__studied-btn:hover { border-color: #22c55e; color: #22c55e; }
.personaje-detail__studied-btn--active {
  background: #22c55e; border-color: #22c55e; color: #fff;
}
.personaje-detail__studied-btn--active:hover { background: #16a34a; border-color: #16a34a; }

/* ── Wiki ── */
.wiki-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }

.wiki-card {
  padding: 20px; background: var(--oz-surface);
  border: 1px solid var(--oz-border); border-radius: var(--oz-radius, 8px);
  cursor: pointer; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none; color: var(--oz-text);
  display: block;
}
.wiki-card:hover { border-color: var(--oz-accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); text-decoration: none; }

/* Category cards */
.wiki-card--category { text-align: center; padding: 28px 20px; }
.wiki-card__icon { margin-bottom: 12px; }
.wiki-card__count { font-size: 0.8rem; color: var(--oz-text-muted); margin-top: 6px; }

/* Entry cards */
.wiki-card__title { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.wiki-card__preview { font-size: 0.825rem; color: var(--oz-text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Breadcrumb */
.wiki-breadcrumb { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 0.85rem; }
.wiki-breadcrumb__link { color: var(--oz-accent); text-decoration: none; }
.wiki-breadcrumb__link:hover { text-decoration: underline; }
.wiki-breadcrumb__sep { color: var(--oz-text-muted); user-select: none; }
.wiki-breadcrumb__current { color: var(--oz-text-muted); }

/* Detail header */
.wiki-detail__header {
  padding: 24px; border-radius: var(--oz-radius, 8px); margin-bottom: 28px;
  background: color-mix(in srgb, var(--wiki-accent, var(--oz-accent)) 8%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--wiki-accent, var(--oz-accent)) 25%, transparent);
}
.wiki-detail__title { font-size: 1.75rem; font-weight: 700; margin: 0 0 8px; }
.wiki-detail__cat-badge { font-size: 0.75rem; padding: 2px 10px; border-radius: 999px; color: #fff; font-weight: 600; }

/* Reading comfort */
.wiki-detail__content { max-width: 720px; line-height: 1.85; }
.wiki-detail__content h2 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; font-weight: 600; }
.wiki-detail__content h3 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; font-weight: 600; }
.wiki-detail__content p { margin: 0 0 1rem; }
.wiki-detail__content ul, .wiki-detail__content ol { margin: 0.75rem 0; padding-left: 1.75rem; }
.wiki-detail__content li { margin-bottom: 0.4rem; }

/* ── Era detail — styles injected by eras.js ── */

/* ── Obras ─────────────────────────────────────────────── */
.obras-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }

.obra-card {
  position: relative; display: flex; align-items: flex-start; gap: 14px;
  padding: 20px; background: var(--oz-surface);
  border: 1px solid var(--oz-border); border-left: 3px solid var(--obra-tipo-color, var(--oz-border));
  border-radius: var(--oz-radius, 8px);
  text-decoration: none; color: var(--oz-text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.obra-card:hover { border-color: var(--oz-accent); border-left-color: var(--obra-tipo-color, var(--oz-accent)); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); text-decoration: none; }
.obra-card--done { border-color: #22c55e40; border-left-color: #22c55e; }
.obra-card__icon { flex-shrink: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: color-mix(in srgb, var(--obra-tipo-color, var(--oz-accent)) 12%, transparent); color: var(--obra-tipo-color, var(--oz-accent)); }
.obra-card__body { flex: 1; min-width: 0; }
.obra-card__title { font-size: 1.05rem; font-weight: 600; margin: 0 0 4px; }
.obra-card__autor { font-size: 0.875rem; color: var(--oz-text-muted); margin: 0 0 8px; font-style: italic; }
.obra-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.obra-card__badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 9999px; color: #fff; font-weight: 500; }
.obra-card__badge--muted { background: var(--oz-border); color: var(--oz-text-muted); }
.obra-card__desc { font-size: 0.825rem; color: var(--oz-text-muted); line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.obra-card__check { position: absolute; top: 12px; right: 12px; color: #22c55e; }

/* Obra detail */
.obra-detail__header {
  padding: 24px; border-radius: var(--oz-radius, 8px); margin-bottom: 28px;
  display: flex; align-items: flex-start; gap: 20px;
  background: color-mix(in srgb, var(--obra-accent, var(--oz-accent)) 8%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--obra-accent, var(--oz-accent)) 25%, transparent);
}
.obra-detail__type-icon { flex-shrink: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: color-mix(in srgb, var(--obra-accent, var(--oz-accent)) 15%, transparent); color: var(--obra-accent, var(--oz-accent)); }
.obra-detail__type-icon svg { width: 24px; height: 24px; }
.obra-detail__header-text { flex: 1; min-width: 0; }
.obra-detail__title-row { display: flex; align-items: center; gap: 12px; }
.obra-detail__title { font-size: 1.75rem; margin: 0; }
.obra-detail__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.obra-detail__autor { font-size: 0.95rem; color: var(--oz-text-muted); font-style: italic; }
.obra-detail__tipo-badge { font-size: 0.75rem; padding: 2px 10px; border-radius: 999px; color: #fff; font-weight: 600; }
.obra-detail__periodo-badge { font-size: 0.75rem; padding: 2px 10px; border-radius: 999px; background: var(--oz-border); color: var(--oz-text-muted); font-weight: 500; }

/* Reading comfort */
.obra-detail__content { max-width: 720px; }
.obra-detail__section { margin-bottom: 28px; }
.obra-detail__section h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 10px; color: var(--obra-accent, var(--oz-accent)); }
.obra-detail__section p { line-height: 1.85; margin: 0; }
.obra-detail__text p { margin-bottom: 12px; line-height: 1.85; }

/* Bottom studied button */
.obra-detail__bottom-toggle { margin: 32px 0 8px; padding-top: 20px; border-top: 1px solid var(--oz-border); text-align: center; }
.obra-detail__studied-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--oz-radius, 8px);
  border: 2px solid var(--oz-border); background: var(--oz-surface);
  color: var(--oz-text-muted); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.obra-detail__studied-btn:hover { border-color: #22c55e; color: #22c55e; }
.obra-detail__studied-btn--active { background: #22c55e; border-color: #22c55e; color: #fff; }
.obra-detail__studied-btn--active:hover { background: #16a34a; border-color: #16a34a; }

.era-content { line-height: 1.75; }
.era-content h2 { font-size: 1.35rem; margin: 0 0 16px; }
.era-content p { margin: 0 0 16px; color: var(--oz-text); }

/* Responsive */
@media (max-width: 768px) {
  .landing-grid { grid-template-columns: 1fr 1fr; }
  .wiki-grid { grid-template-columns: 1fr; }
  .obras-list { grid-template-columns: 1fr; }
  .cap-header { padding: 16px 0 12px; }
  .cap-header__badge { width: 40px; height: 40px; font-size: 1rem; }
  .cap-header__title { font-size: 1.25rem; }
  .prev-next { flex-direction: column; }
  .prev-next__link { max-width: 100%; }
}
@media (max-width: 480px) {
  .landing-grid { grid-template-columns: 1fr; }
}
