/* BittaExpress — Política de Privacidad
   Estilos aislados. NO comparte selectores con el landing. */

:root {
  --color-primary: #fe6502;
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-bg: #ffffff;
  --color-bg-subtle: #f5f5f5;
  --max-width: 720px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* ===== Header ===== */

header {
  text-align: center;
  border-bottom: 1px solid var(--color-bg-subtle);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

header img {
  height: 56px;
  width: auto;
  margin-bottom: 1rem;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-primary);
  line-height: 1.2;
}

header .last-updated {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin: 0.5rem 0 0;
}

/* ===== Layout ===== */

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .layout {
    grid-template-columns: 220px 1fr;
  }
}

/* ===== TOC ===== */

.toc {
  background: var(--color-bg-subtle);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.toc li::before {
  content: counter(toc) ".";
  color: var(--color-text-muted);
  margin-right: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.toc a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
}

.toc a:hover,
.toc a:focus {
  color: var(--color-primary);
  text-decoration: underline;
}

@media (min-width: 1024px) {
  .toc {
    position: sticky;
    top: 2rem;
    align-self: start;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
  }
}

/* ===== Article ===== */

article section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 1rem;
}

article h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--color-primary);
  line-height: 1.3;
}

article h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

article p,
article li {
  font-size: 0.9375rem;
  margin: 0 0 0.75rem;
}

article ul,
article ol {
  padding-left: 1.5rem;
  margin: 0 0 0.75rem;
}

article ul li {
  list-style: disc;
}

article ol li {
  list-style: decimal;
}

article a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

article a:hover {
  text-decoration-thickness: 2px;
}

article strong {
  color: var(--color-text);
  font-weight: 600;
}

article hr {
  border: 0;
  border-top: 1px solid var(--color-bg-subtle);
  margin: 2rem 0;
}

/* ===== Footer ===== */

footer {
  border-top: 1px solid var(--color-bg-subtle);
  margin-top: 3rem;
  padding-top: 1.5rem;
  color: var(--color-text-muted);
  text-align: center;
  font-size: 0.8125rem;
}

/* ===== Accesibilidad ===== */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}