/* Documentos legales de Pet it (términos, privacidad y eliminación de cuenta). Lo genera legal/gen_legal.py del repo Pet-it-v2: no editar a mano. */
:root {
  --orange: #ee9a12;
  --orange-ink: #a35f00; /* naranja de la marca oscurecido: contraste AA sobre fondo claro para texto y enlaces */
  --orange-soft: #fff2dc;
  --orange-line: #f3d3a0;
  --ink: #1e2a35;
  --ink-2: #46535f;
  --ink-3: #66727e;
  --line: #ece5da;
  --paper: #fffcf7;
  --card: #ffffff;
  --head-h: 60px;
  --display: 'Poppins', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.7 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; overflow-wrap: break-word; }
a { color: var(--orange-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #6f4100; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
[id] { scroll-margin-top: calc(var(--head-h) + 20px); }
strong { font-weight: 700; }

.skip { position: absolute; left: -9999px; top: 10px; z-index: 20; padding: 8px 14px; border-radius: 8px; background: var(--ink); color: #fff; text-decoration: none; }
.skip:focus { left: 12px; color: #fff; }

/* Barra superior */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255, 252, 247, .94); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
.topbar-inner { max-width: 1120px; min-height: var(--head-h); margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; flex: none; border-radius: 6px; }
.brand img { display: block; height: 28px; width: auto; }
.topnav { display: flex; gap: 2px; margin-left: auto; }
.topnav a { padding: 7px 12px; border-radius: 999px; color: var(--ink-2); font: 500 .875rem/1.3 var(--display); text-decoration: none; white-space: nowrap; }
.topnav a:hover { background: var(--orange-soft); color: var(--ink); }
.topnav a[aria-current="page"] { background: var(--orange-soft); color: var(--orange-ink); font-weight: 600; }
.lang { flex: none; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: 600 .8125rem/1.3 var(--display); text-decoration: none; }
.lang:hover { border-color: var(--orange); color: var(--ink); }

/* Estructura */
.layout { max-width: 1120px; margin: 0 auto; padding: 44px 20px 88px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.layout.no-toc { grid-template-columns: minmax(0, 1fr); max-width: 800px; }
.content { min-width: 0; max-width: 760px; }

.page-head { margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
h1, h2, h3 { font-family: var(--display); color: var(--ink); }
h1 { margin: 0 0 8px; font-size: clamp(1.75rem, 1.25rem + 2vw, 2.45rem); line-height: 1.2; font-weight: 700; letter-spacing: -.012em; text-wrap: balance; }
.updated { margin: 0; color: var(--ink-3); font-size: .9rem; }

.lead p { font-size: 1.0625rem; color: var(--ink-2); }
.doc + .doc { margin-top: 64px; padding-top: 44px; border-top: 2px solid var(--orange-line); }
.doc-title { margin: 0 0 16px; font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.85rem); line-height: 1.25; font-weight: 700; }
.anchor { display: block; }

.content section { margin-top: 38px; }
.content section > h2, .content section > h3 { display: flex; gap: 8px; align-items: baseline; margin: 0 0 12px; font-size: 1.2rem; line-height: 1.4; font-weight: 600; }
.num { flex: none; min-width: 1.75em; color: var(--orange-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.content p { margin: 0 0 14px; }
.content ul, .content ol { margin: 0 0 16px; padding: 0; list-style: none; }
.content li { position: relative; margin: 0 0 10px; padding-left: 24px; }
.content ul > li::before { content: ""; position: absolute; left: 6px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.content ol { counter-reset: paso; }
.content ol > li { counter-increment: paso; min-height: 30px; padding: 2px 0 0 42px; }
.content ol > li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--orange-soft); color: var(--orange-ink); font: 700 .875rem/30px var(--display); text-align: center; }

/* Tablas */
.table-wrap { margin: 4px 0 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.55; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--orange-soft); font: 600 .8125rem/1.4 var(--display); letter-spacing: .02em; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { min-width: 170px; }

/* Índice */
.toc-side { position: sticky; top: calc(var(--head-h) + 28px); max-height: calc(100vh - var(--head-h) - 56px); overflow-y: auto; padding: 0 6px 12px 0; font-size: .875rem; line-height: 1.45; }
.toc-title, .toc-group { margin: 0 0 10px; color: var(--ink-3); font: 600 .75rem/1.4 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.toc-group ~ .toc-group { margin-top: 24px; }
.toc-side ol, .toc-mobile ol { margin: 0; padding: 0; list-style: none; }
.toc-side a, .toc-mobile a { display: block; padding: 5px 10px; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; }
.toc-side a:hover, .toc-mobile a:hover { border-left-color: var(--orange); background: var(--orange-soft); color: var(--ink); }
.toc-mobile { display: none; margin: 0 0 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.toc-mobile summary { cursor: pointer; padding: 13px 16px; font: 600 .95rem/1.4 var(--display); }
.toc-mobile > div { padding: 0 16px 14px; font-size: .9375rem; }

/* Pie */
.foot { border-top: 1px solid var(--line); background: #fff7ea; }
.foot-inner { max-width: 1120px; margin: 0 auto; padding: 26px 20px 34px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; color: var(--ink-2); font-size: .875rem; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 30px; }
  .toc-side { display: none; }
  .toc-mobile { display: block; }
  .content { max-width: none; }
}
@media (max-width: 640px) {
  :root { --head-h: 0px; }
  .topbar { position: static; }
  .topbar-inner { flex-wrap: wrap; gap: 10px 12px; padding: 12px 16px 10px; }
  .brand img { height: 24px; }
  .lang { margin-left: auto; }
  .topnav { order: 3; width: 100%; margin: 0 -4px; overflow-x: auto; scrollbar-width: none; }
  .topnav a { padding: 6px 10px; font-size: .8125rem; }
  .layout { padding: 26px 16px 64px; }
  .content section { margin-top: 32px; }
  /* Tablas como tarjetas: cada celda lleva el nombre de su columna. */
  .table-wrap { overflow: visible; border: 0; background: none; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  tr { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
  td { min-width: 0; }
  td:first-child { min-width: 0; background: #fffaf1; }
  td:not(:last-child) { border-bottom: 1px solid var(--line); }
  tbody tr:last-child td:not(:last-child) { border-bottom: 1px solid var(--line); }
  td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--ink-3); font: 600 .6875rem/1.4 var(--display); letter-spacing: .06em; text-transform: uppercase; }
}
@media print {
  .topbar, .toc-side, .toc-mobile, .skip { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .layout { display: block; max-width: none; padding: 0; }
  .content { max-width: none; }
  a { color: inherit; }
  .table-wrap { overflow: visible; }
}
