*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0f1117; --bg2: #16181f; --bg3: #1e2130;
  --border: #2a2d3e; --text: #e2e4ed; --text2: #8b8fa8;
  --accent: #3266ad; --accent2: #6ea8f7; --danger: #f87171;
}
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* TOPBAR */
.topbar { height: 48px; background: var(--bg2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 100; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.back-btn { display: flex; align-items: center; gap: 6px; color: var(--text2); font-size: 13px; padding: 6px 10px; border-radius: 8px; background: none; border: none; cursor: pointer; transition: background 0.15s, color 0.15s; }
.back-btn:hover { background: var(--bg3); color: var(--text); }
.topbar-logo { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.topbar-date { font-size: 12px; color: var(--text2); }

/* LAYOUT */
.page-layout { display: flex; max-width: 1000px; margin: 0 auto; padding: 32px 24px 60px; gap: 32px; }

/* SIDEBAR */
.terms-sidebar { width: 200px; flex-shrink: 0; position: sticky; top: 72px; height: fit-content; }
.sidebar-label { font-size: 10px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
#toc a { display: block; font-size: 12px; color: var(--text2); text-decoration: none; padding: 5px 10px; border-left: 2px solid var(--border); margin-bottom: 2px; transition: color 0.15s, border-color 0.15s; line-height: 1.4; }
#toc a:hover { color: var(--text); border-color: var(--text2); }
#toc a.active { color: var(--accent2); border-color: var(--accent2); }

/* TABS */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; font-size: 13px; font-weight: 500; color: var(--text2); background: none; border: none; border-radius: 9px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--bg3); color: var(--text); }

/* CONTENIDO */
.terms-content { flex: 1; min-width: 0; }
.doc-section { display: none; }
.doc-section.active { display: block; }

.doc-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.doc-header h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.doc-meta { font-size: 12px; color: var(--text2); }

.doc-body section { margin-bottom: 28px; scroll-margin-top: 80px; }
.doc-body h2 { font-size: 14px; font-weight: 600; color: var(--accent2); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.doc-body p { font-size: 13px; color: var(--text2); line-height: 1.75; margin-bottom: 10px; }
.doc-body p:last-child { margin-bottom: 0; }
.doc-body ul { padding-left: 20px; margin-bottom: 10px; }
.doc-body ul li { font-size: 13px; color: var(--text2); line-height: 1.7; margin-bottom: 4px; }
.doc-body strong { color: var(--text); font-weight: 600; }

@media (max-width: 680px) {
  .page-layout { flex-direction: column; padding: 20px 16px 40px; }
  .terms-sidebar { display: none; }
  .tab { font-size: 12px; padding: 8px 8px; }
}
