/* =============================================================
   AtendeSEG — Documentação
   Design System / Folha de estilo principal
   Paleta da marca: roxo #6F0F7A · escuro #3D0745 · creme #FCF7F1
   ============================================================= */

/* ---------- Tokens de cor e tema ---------- */
:root {
  /* Marca */
  --brand:        #6F0F7A;
  --brand-600:    #5E0C68;
  --brand-700:    #4C0954;
  --brand-800:    #3D0745;
  --brand-400:    #8B2A95;
  --brand-300:    #A646B0;
  --brand-200:    #C98FCF;
  --brand-glow:   #C724D4;
  --brand-magenta:#B315C2;
  --cream:        #FCF7F1;

  /* Gradientes */
  --grad-brand:  linear-gradient(135deg, #6F0F7A 0%, #B315C2 100%);
  --grad-deep:   linear-gradient(135deg, #3D0745 0%, #6F0F7A 70%, #B315C2 120%);
  --grad-soft:   linear-gradient(135deg, rgba(111,15,122,.10), rgba(179,21,194,.06));

  /* Estados */
  --info:    #2563eb;
  --tip:     #16a34a;
  --warning: #d97706;
  --danger:  #dc2626;

  /* Tema claro (padrão) */
  --bg:          #f6f2f7;
  --bg-soft:     #efe8f1;
  --surface:     #ffffff;
  --surface-2:   #faf6fb;
  --surface-3:   #f3ecf4;
  --border:      #e7dcea;
  --border-2:    #ddcfe1;
  --text:        #2a1430;
  --text-soft:   #5b4763;
  --text-muted:  #8a7a90;
  --shadow-sm:   0 1px 2px rgba(61,7,69,.06), 0 1px 3px rgba(61,7,69,.05);
  --shadow:      0 4px 14px rgba(61,7,69,.08), 0 2px 6px rgba(61,7,69,.05);
  --shadow-lg:   0 18px 50px rgba(61,7,69,.16), 0 6px 16px rgba(61,7,69,.08);
  --ring:        0 0 0 3px rgba(111,15,122,.28);
  --code-bg:     #2a0b30;
  --code-text:   #f3e9f5;

  /* Estrutura */
  --sidebar-w:   292px;
  --toc-w:       232px;
  --header-h:    66px;
  --radius:      16px;
  --radius-sm:   10px;
  --radius-lg:   24px;
  --maxw:        1080px;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg:          #160a1a;
  --bg-soft:     #1d0f22;
  --surface:     #20122594;
  --surface:     #221327;
  --surface-2:   #2a1730;
  --surface-3:   #311a38;
  --border:      #3a2342;
  --border-2:    #4a2d54;
  --text:        #f3e9f5;
  --text-soft:   #c9b6d0;
  --text-muted:  #9b86a3;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.4);
  --shadow:      0 6px 20px rgba(0,0,0,.45);
  --shadow-lg:   0 24px 60px rgba(0,0,0,.6);
  --ring:        0 0 0 3px rgba(199,36,212,.35);
  --code-bg:     #0f0712;
  --code-text:   #f0e4f3;
  --grad-soft:   linear-gradient(135deg, rgba(179,21,194,.14), rgba(111,15,122,.05));
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 18px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-magenta); }
::selection { background: rgba(179,21,194,.25); }

/* Scroll progress */
#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad-brand); z-index: 120; transition: width .1s linear;
  box-shadow: 0 0 10px rgba(179,21,194,.6);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px; z-index: 100;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 800; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 4px 10px rgba(111,15,122,.35)); }
.brand .brand__name { font-size: 1.16rem; letter-spacing: -.02em; }
.brand .brand__name b { color: var(--brand); }
[data-theme="dark"] .brand .brand__name b { color: var(--brand-300); }
.brand .brand__tag {
  font-family: var(--font-sans); font-size: .62rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #fff; background: var(--grad-brand);
  padding: 3px 7px; border-radius: 6px; margin-left: 2px;
}
.header-spacer { flex: 1; }

.search-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); padding: 9px 14px; border-radius: 999px;
  font-size: .88rem; cursor: pointer; width: 260px; transition: all .18s ease;
  font-family: var(--font-sans);
}
.search-trigger svg { width: 17px; height: 17px; flex: none; }
.search-trigger span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger:hover { border-color: var(--brand-300); color: var(--text-soft); box-shadow: var(--shadow-sm); }
.search-trigger kbd {
  margin-left: auto; font-family: var(--font-mono); font-size: .72rem;
  background: var(--surface-3); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; color: var(--text-muted);
}
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-soft); cursor: pointer; transition: all .18s ease;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand-300); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
#menuBtn { display: none; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0; width: var(--sidebar-w);
  overflow-y: auto; padding: 22px 14px 60px;
  border-right: 1px solid var(--border); background: var(--surface);
  z-index: 90; overscroll-behavior: contain;
}
.sidebar::-webkit-scrollbar { width: 9px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 9px; border: 2px solid var(--surface); }
.nav-group { margin-bottom: 6px; }
.nav-group__label {
  font-size: .69rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-muted); padding: 14px 14px 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 13px; border-radius: 11px; color: var(--text-soft);
  font-size: .92rem; font-weight: 500; transition: all .15s ease; position: relative;
}
.nav-link:hover { background: var(--surface-3); color: var(--brand); }
.nav-link .nav-ic {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: grid; place-items: center; background: var(--surface-3); color: var(--brand);
  transition: all .15s ease;
}
.nav-link .nav-ic svg { width: 17px; height: 17px; }
.nav-link.active {
  background: var(--grad-brand); color: #fff; font-weight: 700;
  box-shadow: 0 8px 20px -6px rgba(111,15,122,.55);
}
.nav-link.active .nav-ic { background: rgba(255,255,255,.22); color: #fff; }
.sidebar-foot {
  margin: 22px 12px 0; padding: 16px; border-radius: var(--radius);
  background: var(--grad-soft); border: 1px solid var(--border); position: relative; overflow: hidden;
}
.sidebar-foot h4 { margin: 0 0 4px; font-family: var(--font-head); font-size: .92rem; }
.sidebar-foot p { margin: 0 0 12px; font-size: .8rem; color: var(--text-soft); }
.sidebar-foot .btn { width: 100%; justify-content: center; }
.sidebar-foot img.mini-mascot { position: absolute; right: -14px; bottom: -10px; width: 78px; opacity: .22; }

/* ---------- Layout principal ---------- */
.layout { padding-top: var(--header-h); }
.main {
  margin-left: var(--sidebar-w);
  min-height: calc(100vh - var(--header-h));
  display: grid; grid-template-columns: minmax(0,1fr) var(--toc-w);
  gap: 36px; align-items: start;
}
.content { max-width: var(--maxw); padding: 40px 40px 80px; min-width: 0; }
.page-only .main { grid-template-columns: minmax(0,1fr); }

/* ---------- TOC (nesta página) ---------- */
.toc {
  position: sticky; top: calc(var(--header-h) + 24px);
  align-self: start; padding: 22px 18px 22px 0; max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
}
.toc__title { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.toc a {
  display: block; padding: 5px 0 5px 14px; font-size: .84rem; color: var(--text-muted);
  border-left: 2px solid var(--border); line-height: 1.45; transition: all .15s ease;
}
.toc a:hover { color: var(--brand); border-color: var(--brand-300); }
.toc a.active { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.toc a.lvl-3 { padding-left: 26px; font-size: .8rem; }

/* ---------- Breadcrumb ---------- */
.crumb { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-muted); margin-bottom: 18px; flex-wrap: wrap; }
.crumb a { color: var(--text-muted); }
.crumb a:hover { color: var(--brand); }
.crumb .sep { opacity: .5; }

/* ---------- Tipografia de conteúdo ---------- */
.content h1 {
  font-family: var(--font-head); font-size: clamp(1.9rem, 1.3rem + 2vw, 2.6rem);
  line-height: 1.1; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 800;
}
.content h2 {
  font-family: var(--font-head); font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em;
  margin: 54px 0 16px; padding-top: 10px; scroll-margin-top: 90px; position: relative;
}
.content h2::before {
  content: ""; position: absolute; left: -40px; top: 18px; width: 22px; height: 3px;
  background: var(--grad-brand); border-radius: 3px;
}
.content h3 {
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em;
  margin: 34px 0 12px; scroll-margin-top: 90px;
}
.content h4 { font-family: var(--font-head); font-size: 1.02rem; font-weight: 700; margin: 24px 0 10px; color: var(--brand); }
[data-theme="dark"] .content h4 { color: var(--brand-300); }
.content p { margin: 0 0 16px; }
.content p.lead { font-size: 1.14rem; color: var(--text-soft); line-height: 1.6; margin-bottom: 26px; }
.content ul, .content ol { margin: 0 0 18px; padding-left: 22px; }
.content li { margin: 7px 0; }
.content ul li::marker { color: var(--brand-300); }
.content strong { color: var(--text); font-weight: 700; }
[data-theme="dark"] .content strong { color: #fff; }
.content hr { border: none; border-top: 1px solid var(--border); margin: 44px 0; }
.anchor {
  opacity: 0; margin-left: 8px; font-size: .8em; color: var(--brand-300); text-decoration: none;
  transition: opacity .15s ease;
}
h2:hover .anchor, h3:hover .anchor { opacity: 1; }

/* ---------- Hero (index) ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--grad-deep); color: #fff; padding: 52px 48px;
  margin-bottom: 40px; box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 320px at 80% -20%, rgba(199,36,212,.5), transparent 60%),
              radial-gradient(600px 300px at 10% 120%, rgba(179,21,194,.35), transparent 60%);
}
.hero__content { position: relative; z-index: 2; max-width: 560px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .76rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: #fff;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 18px; backdrop-filter: blur(6px);
}
.hero h1 { color: #fff; font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); margin-bottom: 16px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg,#ffd6fb,#fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: rgba(255,255,255,.86); font-size: 1.1rem; margin-bottom: 26px; }
.hero__art { position: relative; z-index: 2; }
.hero__art img { width: 230px; filter: drop-shadow(0 24px 40px rgba(0,0,0,.45)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }
@media (prefers-reduced-motion: reduce){ .hero__art img { animation: none; } }
.hero .btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-head);
  font-weight: 700; font-size: .92rem; padding: 11px 20px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer; transition: all .18s ease; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: 0 10px 24px -8px rgba(111,15,122,.7); }
.btn--primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 16px 30px -8px rgba(179,21,194,.7); }
.btn--ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); }
.btn--ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn--soft { background: var(--surface-3); color: var(--brand); border-color: var(--border); }
.btn--soft:hover { background: var(--surface-2); border-color: var(--brand-300); color: var(--brand); transform: translateY(-1px); }
[data-theme="dark"] .btn--soft { color: var(--brand-300); }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px,1fr)); gap: 18px; margin: 26px 0; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; transition: all .2s ease; overflow: hidden;
  display: block; color: inherit;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-brand);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
a.card:hover, .card.is-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); color: inherit; }
a.card:hover::before, .card.is-link:hover::before { transform: scaleX(1); }
.card__icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--brand); margin-bottom: 14px; border: 1px solid var(--border);
}
.card__icon svg { width: 24px; height: 24px; }
[data-theme="dark"] .card__icon { color: var(--brand-300); }
.card__title { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; }
.card__text { font-size: .9rem; color: var(--text-soft); margin: 0; line-height: 1.55; }
.card__more { margin-top: 14px; font-size: .85rem; font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; }
a.card:hover .card__more { gap: 10px; }
[data-theme="dark"] .card__more { color: var(--brand-300); }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; margin: 26px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat__num { font-family: var(--font-head); font-size: 2rem; font-weight: 800; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stat__label { font-size: .82rem; color: var(--text-soft); margin-top: 6px; }

/* ---------- Callouts / admonitions ---------- */
.callout {
  position: relative; border-radius: var(--radius); padding: 16px 18px 16px 52px;
  margin: 22px 0; border: 1px solid var(--border); background: var(--surface-2);
  border-left: 4px solid var(--brand);
}
.callout::before {
  content: ""; position: absolute; left: 16px; top: 17px; width: 22px; height: 22px;
  background: var(--brand); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.callout__title { font-family: var(--font-head); font-weight: 700; margin: 0 0 4px; font-size: .96rem; }
.callout p:last-child { margin-bottom: 0; }
.callout--info    { border-left-color: var(--info); }
.callout--info::before    { background: var(--info);    -webkit-mask-image: var(--ic-info); mask-image: var(--ic-info); }
.callout--tip     { border-left-color: var(--tip); }
.callout--tip::before     { background: var(--tip);     -webkit-mask-image: var(--ic-tip); mask-image: var(--ic-tip); }
.callout--warning { border-left-color: var(--warning); }
.callout--warning::before { background: var(--warning); -webkit-mask-image: var(--ic-warn); mask-image: var(--ic-warn); }
.callout--danger  { border-left-color: var(--danger); }
.callout--danger::before  { background: var(--danger);  -webkit-mask-image: var(--ic-danger); mask-image: var(--ic-danger); }
.callout--new     { border-left-color: var(--brand-magenta); background: var(--grad-soft); }
.callout--new::before     { background: var(--brand-magenta); -webkit-mask-image: var(--ic-spark); mask-image: var(--ic-spark); }
:root {
  --ic-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E");
  --ic-tip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.1V18h6v-1.2c0-.8.4-1.6 1-2.1A7 7 0 0 0 12 2z'/%3E%3C/svg%3E");
  --ic-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.3 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.3a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
  --ic-danger: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M15 9l-6 6M9 9l6 6'/%3E%3C/svg%3E");
  --ic-spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M12 2l1.8 5.2L19 9l-5.2 1.8L12 16l-1.8-5.2L5 9l5.2-1.8L12 2z'/%3E%3C/svg%3E");
}

/* ---------- Badges / pills / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700;
  letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; vertical-align: middle;
}
.badge--new { color: #fff; background: var(--grad-brand); }
.badge--soft { color: var(--brand); background: var(--surface-3); border: 1px solid var(--border); }
[data-theme="dark"] .badge--soft { color: var(--brand-300); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; background: var(--surface-3); color: var(--text-soft);
  border: 1px solid var(--border); margin: 3px 4px 3px 0;
}
.pill--brand { background: var(--grad-soft); color: var(--brand); border-color: var(--brand-200); }
[data-theme="dark"] .pill--brand { color: var(--brand-300); }
.pill-row { display: flex; flex-wrap: wrap; gap: 2px; margin: 14px 0 22px; }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 24px 0; }
.steps > li {
  position: relative; padding: 4px 0 22px 52px; margin: 0;
  border-left: 2px solid var(--border); margin-left: 16px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 4px; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -17px; top: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad-brand); color: #fff; font-family: var(--font-head); font-weight: 800;
  display: grid; place-items: center; font-size: .92rem; box-shadow: 0 6px 14px -4px rgba(111,15,122,.6);
}
.steps > li strong { display: block; font-family: var(--font-head); margin-bottom: 3px; }

/* ---------- Specs / definition list ---------- */
.specs { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 0; margin: 22px 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.specs dt { font-weight: 700; font-family: var(--font-head); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: .9rem; }
.specs dd { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: .92rem; }
.specs dt:last-of-type, .specs dd:last-of-type { border-bottom: none; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
thead th { background: var(--grad-soft); font-family: var(--font-head); font-weight: 700; text-align: left; padding: 13px 16px; color: var(--text); border-bottom: 2px solid var(--border-2); white-space: nowrap; }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }
table code { font-size: .82em; }

/* ---------- Código ---------- */
.content :not(pre) > code {
  font-family: var(--font-mono); font-size: .86em; background: var(--surface-3);
  color: var(--brand); padding: .15em .45em; border-radius: 6px; border: 1px solid var(--border);
  word-break: break-word;
}
[data-theme="dark"] .content :not(pre) > code { color: var(--brand-200); }
.code-block { position: relative; margin: 22px 0; }
.code-block__head {
  display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .76rem;
  color: #c9b0d0; background: #1d0822; padding: 9px 14px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid #3a1140; border-bottom: none;
}
.code-block__head .dot { width: 11px; height: 11px; border-radius: 50%; }
.code-block__lang { margin-left: auto; text-transform: uppercase; letter-spacing: .08em; color: #b98ec2; }
pre {
  margin: 0; background: var(--code-bg); color: var(--code-text); padding: 18px 18px;
  border-radius: var(--radius-sm); overflow-x: auto; font-family: var(--font-mono);
  font-size: .85rem; line-height: 1.6; border: 1px solid #3a1140;
}
.code-block pre { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
pre code { font-family: inherit; background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
.copy-btn {
  position: absolute; top: 7px; right: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); color: #f0d9f5; border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px; padding: 5px 10px; font-size: .74rem; cursor: pointer; transition: all .15s ease; font-family: var(--font-sans);
}
.copy-btn:hover { background: rgba(255,255,255,.2); }
.copy-btn.copied { background: var(--tip); color: #fff; border-color: transparent; }
.copy-btn svg { width: 14px; height: 14px; }

/* ---------- Blockquote ---------- */
blockquote {
  margin: 22px 0; padding: 14px 20px; border-left: 4px solid var(--brand-300);
  background: var(--grad-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-soft); font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

/* ---------- Accordion (details) ---------- */
details.acc {
  border: 1px solid var(--border); border-radius: var(--radius); margin: 12px 0; background: var(--surface); overflow: hidden;
}
details.acc > summary {
  list-style: none; cursor: pointer; padding: 15px 18px; font-family: var(--font-head); font-weight: 700;
  display: flex; align-items: center; gap: 12px; transition: background .15s ease;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after {
  content: ""; margin-left: auto; width: 18px; height: 18px; flex: none;
  background: var(--brand); -webkit-mask: var(--ic-chev) center/contain no-repeat; mask: var(--ic-chev) center/contain no-repeat;
  transition: transform .2s ease;
}
details.acc[open] > summary::after { transform: rotate(180deg); }
details.acc[open] > summary { background: var(--surface-2); border-bottom: 1px solid var(--border); }
details.acc > summary:hover { background: var(--surface-2); }
.acc__body { padding: 16px 18px; }
.acc__body > :first-child { margin-top: 0; }
.acc__body > :last-child { margin-bottom: 0; }
:root { --ic-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.summary-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--grad-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.summary-ic svg { width: 16px; height: 16px; }
[data-theme="dark"] .summary-ic { color: var(--brand-300); }

/* ---------- Video placeholder ---------- */
.vid-tag {
  display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 600;
  color: var(--brand); background: var(--grad-soft); border: 1px solid var(--brand-200);
  padding: 5px 12px; border-radius: 999px; margin: 2px 0 14px;
}
[data-theme="dark"] .vid-tag { color: var(--brand-300); }
.vid-tag svg { width: 15px; height: 15px; }

/* ---------- Section intro / page header ---------- */
.page-head { margin-bottom: 8px; }
.page-head .kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: .76rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
[data-theme="dark"] .page-head .kicker { color: var(--brand-300); }
.page-head .kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad-brand); }

.section-banner {
  display: flex; gap: 20px; align-items: center; padding: 24px 28px; border-radius: var(--radius-lg);
  background: var(--grad-soft); border: 1px solid var(--border); margin: 6px 0 30px;
}
.section-banner img { width: 92px; flex: none; }
.section-banner h1 { margin: 0 0 6px; }
.section-banner p { margin: 0; color: var(--text-soft); }

/* ---------- Pager (prev/next) ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; border-top: 1px solid var(--border); padding-top: 28px; }
.pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); transition: all .18s ease;
}
.pager a:hover { border-color: var(--brand-300); box-shadow: var(--shadow); transform: translateY(-2px); }
.pager .dir { font-size: .76rem; color: var(--text-muted); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pager .ttl { font-family: var(--font-head); font-weight: 700; color: var(--brand); }
[data-theme="dark"] .pager .ttl { color: var(--brand-300); }
.pager a.next { text-align: right; }

/* ---------- Footer ---------- */
.site-footer {
  margin-left: var(--sidebar-w); border-top: 1px solid var(--border);
  background: var(--surface); padding: 30px 40px; color: var(--text-muted); font-size: .86rem;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.site-footer img { width: 26px; }
.site-footer .foot-sep { flex: 1; }

/* ---------- Search modal ---------- */
.search-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.search-modal.open { display: block; }
.search-modal__backdrop { position: absolute; inset: 0; background: rgba(20,5,24,.55); backdrop-filter: blur(4px); }
.search-modal__panel {
  position: relative; max-width: 620px; margin: 9vh auto 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.search-modal__input { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.search-modal__input svg { width: 20px; height: 20px; color: var(--brand); flex: none; }
.search-modal__input input { flex: 1; border: none; background: none; outline: none; font-size: 1.05rem; color: var(--text); font-family: var(--font-sans); }
.search-modal__results { max-height: 56vh; overflow-y: auto; padding: 8px; }
.search-result {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; cursor: pointer; transition: background .12s ease;
}
.search-result:hover, .search-result.sel { background: var(--surface-3); }
.search-result .sr-cat { font-size: .72rem; color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
[data-theme="dark"] .search-result .sr-cat { color: var(--brand-300); }
.search-result .sr-title { font-family: var(--font-head); font-weight: 700; font-size: .98rem; }
.search-result .sr-text { font-size: .84rem; color: var(--text-muted); }
.search-result mark { background: rgba(179,21,194,.22); color: inherit; border-radius: 3px; padding: 0 2px; }
.search-empty { padding: 30px; text-align: center; color: var(--text-muted); }
.search-foot { padding: 10px 18px; border-top: 1px solid var(--border); font-size: .76rem; color: var(--text-muted); display: flex; gap: 16px; }
.search-foot kbd { font-family: var(--font-mono); background: var(--surface-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }

/* ---------- Back to top ---------- */
#toTop {
  position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px; border-radius: 14px;
  background: var(--grad-brand); color: #fff; border: none; cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translateY(12px); transition: all .25s ease; z-index: 80;
}
#toTop.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
#toTop svg { width: 20px; height: 20px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity: 1; transform: none; } }

/* ---------- Utilidades ---------- */
.muted { color: var(--text-muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.divider-soft { height: 1px; background: var(--border); margin: 36px 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .main { grid-template-columns: minmax(0,1fr); }
  .toc { display: none; }
}
@media (max-width: 920px) {
  :root { --sidebar-w: 280px; }
  #menuBtn { display: inline-grid; }
  .sidebar {
    transform: translateX(-104%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  .nav-scrim { position: fixed; inset: var(--header-h) 0 0 0; background: rgba(20,5,24,.5); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 85; }
  body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .site-footer { margin-left: 0; }
  .content { padding: 28px 22px 70px; }
  .hero { grid-template-columns: 1fr; padding: 38px 28px; text-align: center; }
  .hero__content { margin: 0 auto; }
  .hero .btn-row { justify-content: center; }
  .hero__art img { width: 170px; margin: 8px auto 0; }
  .search-trigger { min-width: 0; padding: 9px; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .content h2::before { display: none; }
  .grid-2, .specs { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .brand .brand__tag { display: none; }
  .hero { padding: 30px 20px; }
  .pager { grid-template-columns: 1fr; }
}
