/* Guía de Talo — generado por scripts/build-guia-site.mjs. No editar a mano. */
/* Tokens tomados de desktop/packages/desktop/src/renderer/theme/builtinThemes.ts (Estudio). */

:root {
  --bg-base: #fafbfd;
  --bg-1: #ffffff;
  --bg-2: #f1f4f1;
  --bg-3: #e4e7e3;
  --bg-6: #9aa39c;
  --bg-hover: #eef1ec;
  --bg-active: #e4ebe1;
  --text-primary: #263f36;
  --text-secondary: #5b685f;
  --text-disabled: #a9b2a5;
  --border-base: #dee4db;
  --border-light: #ecefea;
  --border-special: #e4e7e3;
  --primary: #263f36;
  --info: #263f36;
  --focus-ring: #416c52;
  --brand: #263f36;
  --brand-light: #cedacb;
  --brand-hover: #dce6d9;
  --selection-active: #e4ebe1;
  --selection-soft: #cedacb;
  --warning: #ff7d00;
  --danger: #f53f3f;

  --estudio-radius-sm: 6px;
  --estudio-radius-md: 10px;
  --estudio-radius-lg: 14px;
  --estudio-space-xs: 4px;
  --estudio-space-sm: 8px;
  --estudio-space-md: 12px;
  --estudio-space-lg: 20px;
  --estudio-motion-duration-fast: 120ms;
  --estudio-motion-duration-base: 160ms;
  --estudio-motion-ease: cubic-bezier(0.23, 1, 0.32, 1);

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'Cascadia Code', 'Roboto Mono',
    Consolas, 'Liberation Mono', monospace;

  --sidebar-width: 264px;
  --content-max-width: 760px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-base: #1b2420;
    --bg-1: #222b26;
    --bg-2: #27302b;
    --bg-3: #38413d;
    --bg-6: #6b776f;
    --bg-hover: #2c3730;
    --bg-active: #3a493e;
    --text-primary: #edf0ee;
    --text-secondary: #adb4b0;
    --text-disabled: #6b776f;
    --border-base: #38413d;
    --border-light: #2c3730;
    --border-special: #4b5b4f;
    --primary: #9cc2a6;
    --info: #9cc2a6;
    --focus-ring: #9cc2a6;
    --brand: #9cc2a6;
    --brand-light: #3a493e;
    --brand-hover: #4b5b4f;
    --selection-active: #3a493e;
    --selection-soft: #2f3b33;
    --warning: #ff9a2e;
    --danger: #f76560;
  }
}

:root[data-theme="dark"] {
  --bg-base: #1b2420;
  --bg-1: #222b26;
  --bg-2: #27302b;
  --bg-3: #38413d;
  --bg-6: #6b776f;
  --bg-hover: #2c3730;
  --bg-active: #3a493e;
  --text-primary: #edf0ee;
  --text-secondary: #adb4b0;
  --text-disabled: #6b776f;
  --border-base: #38413d;
  --border-light: #2c3730;
  --border-special: #4b5b4f;
  --primary: #9cc2a6;
  --info: #9cc2a6;
  --focus-ring: #9cc2a6;
  --brand: #9cc2a6;
  --brand-light: #3a493e;
  --brand-hover: #4b5b4f;
  --selection-active: #3a493e;
  --selection-soft: #2f3b33;
  --warning: #ff9a2e;
  --danger: #f76560;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  transition: background var(--estudio-motion-duration-base) var(--estudio-motion-ease),
    color var(--estudio-motion-duration-base) var(--estudio-motion-ease);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--bg-1);
  color: var(--text-primary);
  padding: var(--estudio-space-sm) var(--estudio-space-md);
  border-radius: var(--estudio-radius-sm);
  z-index: 100;
}
.skip-link:focus { left: var(--estudio-space-sm); top: var(--estudio-space-sm); }

a { color: var(--primary); }
a:hover { color: var(--brand); }

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100%;
}

.sidebar {
  border-right: 1px solid var(--border-base);
  background: var(--bg-2);
  padding: var(--estudio-space-lg) var(--estudio-space-md);
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--estudio-space-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: var(--estudio-space-lg);
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--estudio-radius-sm);
  background: var(--brand);
  color: var(--bg-1);
  font-family: var(--font-mono);
  font-weight: 700;
}

.nav a {
  display: block;
  padding: 6px var(--estudio-space-sm);
  border-radius: var(--estudio-radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
}
.nav a:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav a.is-active {
  background: var(--bg-active);
  color: var(--text-primary);
  font-weight: 600;
}
.nav-heading {
  margin: var(--estudio-space-md) var(--estudio-space-sm) var(--estudio-space-xs);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-disabled);
  font-weight: 600;
}
.nav-heading--group {
  background: none;
  border: none;
  cursor: pointer;
  width: calc(100% - 2 * var(--estudio-space-sm));
  text-align: left;
  font-family: inherit;
}
.nav-group__items { padding-left: var(--estudio-space-sm); }

.content-col { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: var(--estudio-space-md);
  padding: var(--estudio-space-md) var(--estudio-space-lg);
  border-bottom: 1px solid var(--border-base);
  position: sticky;
  top: 0;
  background: var(--bg-base);
  z-index: 10;
}

.search { position: relative; flex: 1; max-width: 420px; }
.search input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--estudio-radius-sm);
  border: 1px solid var(--border-base);
  background: var(--bg-1);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
}
.search input:focus {
  outline: none;
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 25%, transparent);
}
.search__results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-1);
  border: 1px solid var(--border-base);
  border-radius: var(--estudio-radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 360px;
  overflow-y: auto;
  z-index: 20;
}
.search__results a {
  display: block;
  padding: var(--estudio-space-sm) var(--estudio-space-md);
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}
.search__results a:last-child { border-bottom: none; }
.search__results a:hover, .search__results a.is-focused { background: var(--bg-hover); }
.search__results .result-title { font-weight: 600; font-size: 14px; }
.search__results .result-desc { font-size: 12px; color: var(--text-secondary); }
.search__empty { padding: var(--estudio-space-md); color: var(--text-secondary); font-size: 13px; }

.theme-toggle {
  border: 1px solid var(--border-base);
  background: var(--bg-1);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--estudio-radius-sm);
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg-hover); }

.sidebar-toggle { display: none; }

.page {
  display: grid;
  grid-template-columns: minmax(0, var(--content-max-width)) 200px;
  gap: var(--estudio-space-lg);
  padding: var(--estudio-space-lg) var(--estudio-space-lg) 64px;
  flex: 1;
}

.prose { min-width: 0; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--text-disabled);
  font-weight: 600;
  margin: 0 0 var(--estudio-space-xs);
}
.prose h1 { font-size: 30px; margin: 0 0 var(--estudio-space-sm); }
.prose .lede { font-size: 17px; color: var(--text-secondary); margin: 0 0 var(--estudio-space-lg); }
.prose h2 { font-size: 22px; margin: 2.2em 0 0.6em; border-top: 1px solid var(--border-light); padding-top: 0.8em; }
.prose h2:first-of-type { border-top: none; padding-top: 0; margin-top: 1.4em; }
.prose h3 { font-size: 18px; margin: 1.6em 0 0.5em; }
.prose h4 { font-size: 15px; margin: 1.3em 0 0.4em; color: var(--text-secondary); }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.4em; }
.prose li { margin: 0.3em 0; }
.prose li > ul, .prose li > ol { margin-top: 0.3em; }
.prose img { max-width: 100%; border-radius: var(--estudio-radius-md); border: 1px solid var(--border-base); display: block; margin: var(--estudio-space-sm) 0 var(--estudio-space-lg); }
.prose code { font-family: var(--font-mono); background: var(--bg-2); padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.9em; }
.prose pre { background: var(--bg-2); border: 1px solid var(--border-base); border-radius: var(--estudio-radius-md); padding: var(--estudio-space-md); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: none; border-top: 1px solid var(--border-base); margin: 2em 0; }
.prose blockquote { margin: 0 0 1em; padding: var(--estudio-space-sm) var(--estudio-space-md); border-left: 3px solid var(--border-base); color: var(--text-secondary); background: var(--bg-2); border-radius: 0 var(--estudio-radius-sm) var(--estudio-radius-sm) 0; }
.prose blockquote p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--border-base); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-2); font-weight: 600; }

.callout { margin: 0 0 1.4em; padding: var(--estudio-space-md) var(--estudio-space-md) var(--estudio-space-md) calc(var(--estudio-space-md) + 4px); border-radius: var(--estudio-radius-md); border-left: 4px solid var(--border-base); background: var(--bg-2); }
.callout__title { margin: 0 0 0.35em; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.callout p:last-child { margin-bottom: 0; }
.callout-nota { border-left-color: var(--info); }
.callout-consejo { border-left-color: var(--brand); background: var(--brand-light); }
.callout-importante { border-left-color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, var(--bg-2)); }

.video-embed { margin: 1.5rem 0; }
.video-embed video { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border-base); background: var(--bg-2); }

.video-placeholder {
  display: flex;
  gap: var(--estudio-space-md);
  align-items: center;
  border: 1px dashed var(--border-base);
  border-radius: var(--estudio-radius-md);
  padding: var(--estudio-space-md);
  margin: 0 0 1.4em;
  background: var(--bg-2);
}
.video-placeholder__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--brand);
  color: var(--bg-1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-placeholder__label { margin: 0; font-weight: 600; }
.video-placeholder__hint { margin: 0.2em 0 0; font-size: 12px; color: var(--text-secondary); }

.on-this-page { font-size: 13px; padding-top: var(--estudio-space-lg); position: sticky; top: 76px; align-self: start; }
.on-this-page__title { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; color: var(--text-disabled); font-weight: 600; margin: 0 0 var(--estudio-space-sm); }
.on-this-page ul { list-style: none; margin: 0; padding: 0; }
.on-this-page li { margin: 0.35em 0; }
.on-this-page li.level-3 { padding-left: var(--estudio-space-sm); }
.on-this-page li.level-4 { padding-left: calc(2 * var(--estudio-space-sm)); }
.on-this-page a { color: var(--text-secondary); text-decoration: none; }
.on-this-page a:hover { color: var(--text-primary); }

.footer { padding: var(--estudio-space-lg); border-top: 1px solid var(--border-base); color: var(--text-disabled); font-size: 12px; }

@media (max-width: 920px) {
  .page { grid-template-columns: minmax(0, 1fr); }
  .on-this-page { display: none; }
}

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(84vw, 300px);
    transform: translateX(-100%);
    transition: transform var(--estudio-motion-duration-base) var(--estudio-motion-ease);
    z-index: 30;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.18);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    align-items: flex-start;
    border: 1px solid var(--border-base);
    background: var(--bg-1);
    border-radius: var(--estudio-radius-sm);
    padding: 8px 10px;
    margin: var(--estudio-space-sm);
    cursor: pointer;
    width: fit-content;
  }
  .sidebar-toggle span:not(.sidebar-toggle__label) { width: 18px; height: 2px; background: var(--text-primary); display: block; }
  .sidebar-toggle__label { font-size: 11px; margin-top: 4px; color: var(--text-secondary); }
}
