/* ============================================================================
   BEPCO Studio — Legal page styles (loaded only on /legal/ via pageCss).
   Ported from design/mockups/bepco-legal.html; colors/fonts → tokens.
   ============================================================================ */

/* ── PAGE HEADER ── */
.page-header {
  padding: 64px 52px 48px;
  border-bottom: 1px solid rgba(26,22,18,0.08);
  max-width: 1060px;
  margin: 0 auto;
}
.page-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(200,134,10,0.8); margin-bottom: 12px; }
.page-title { font-family: var(--font-serif); font-size: 40px; font-weight: 400; color: var(--color-carbon); letter-spacing: -0.01em; margin-bottom: 10px; }
.page-updated { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: rgba(26,22,18,0.55); }

/* ── LAYOUT ── */
.layout {
  max-width: 1060px;
  margin: 0 auto;
  padding: 64px 52px 80px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  align-items: start;
  grid-auto-rows: min-content;
}

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: 120px; align-self: start; width: 100%; }
.sidebar-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(26,22,18,0.5); margin-bottom: 14px; display: block; }

/* Reset so the global `nav {}` styles don't apply to this in-page TOC nav. */
.sidebar-nav {
  display: block;
  position: static;
  height: auto;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  backdrop-filter: none;
  animation: none;
}

.sidebar-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(26,22,18,0.62);
  text-decoration: none;
  padding: 8px 0 8px 12px;
  border-left: 2px solid transparent;
  display: block;
  width: 100%;
  white-space: nowrap;
  text-align: left;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.sidebar-link:hover { color: var(--color-amber); border-left-color: var(--color-amber); }

/* ── LEGAL SECTIONS ── */
.legal-section { margin-bottom: 64px; padding-bottom: 64px; border-bottom: 1px solid rgba(26,22,18,0.07); scroll-margin-top: 120px; }
.legal-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.section-num { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(200,134,10,0.75); margin-bottom: 5px; }
.section-title { font-family: var(--font-serif); font-size: 22px; font-weight: 400; color: var(--color-carbon); margin-bottom: 4px; }
/* Anchor hash (#disclaimer, …) is a build aid, not shown to readers. */
.section-anchor { display: none; }
.section-rule { width: 32px; height: 1px; background: var(--color-amber); opacity: 0.3; margin: 14px 0 24px; }

.legal-note { background: var(--color-vellum); border-left: 3px solid rgba(200,134,10,0.35); padding: 14px 18px; margin: 0 0 20px; font-family: var(--font-mono); font-size: 11px; line-height: 1.7; color: rgba(26,22,18,0.5); letter-spacing: 0.02em; }

.legal-body { font-family: var(--font-serif); font-size: 14px; line-height: 1.9; color: rgba(26,22,18,0.6); margin-bottom: 16px; }
.legal-body:last-child { margin-bottom: 0; }

.legal-h3 { font-family: var(--font-serif); font-size: 15px; font-weight: 700; color: var(--color-carbon); margin: 24px 0 10px; }

.legal-list { list-style: none; margin: 12px 0 16px; padding: 0; }
.legal-list li { font-family: var(--font-serif); font-size: 14px; line-height: 1.75; color: rgba(26,22,18,0.6); padding: 4px 0 4px 16px; position: relative; }
.legal-list li::before { content: '·'; position: absolute; left: 0; color: var(--color-amber); opacity: 0.6; }

/* ── MOBILE ── */
@media (max-width: 900px) {
  .page-header { padding: 44px 20px 32px; }
  .page-title { font-size: 30px; }
  .layout { grid-template-columns: 1fr; gap: 32px; padding: 32px 20px 56px; }
  .sidebar { position: static; top: auto; }
  .sidebar-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .sidebar-link { width: auto; padding: 4px 0; border-left: none; }
  .legal-section { margin-bottom: 48px; padding-bottom: 48px; }
}
