/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   SmartShift — privacy policy page

   Los colores NO son inventados: son los dos temas reales de la app
   (`AppColorTheme.swift` / Compose). Oscuro = preset "DarkBlue", que es el
   default; claro = preset "Light". Así la web se ve como la app que describe.
   ========================================================================== */

:root {
  /* DarkBlue — el tema por defecto de la app */
  --bg:            #0C1B2A;
  --bg-deep:       #040B28;
  --glass:         rgba(255, 255, 255, 0.055);
  --glass-strong:  rgba(255, 255, 255, 0.085);
  --hairline:      rgba(255, 255, 255, 0.11);
  --primary:       #3891A6;
  --primary-soft:  rgba(56, 145, 166, 0.16);
  --secondary:     #E0A458;
  --secondary-soft: rgba(224, 164, 88, 0.14);
  --text:          #FFFFFF;
  --text-dim:      rgba(255, 255, 255, 0.62);
  --text-faint:    rgba(255, 255, 255, 0.42);

  --measure: 68ch;
  --step--1: 0.8125rem;
  --step-0:  1.0625rem;
  --step-1:  1.1875rem;
  --step-2:  1.4375rem;
  --step-3:  1.9rem;
  --step-4:  clamp(2.1rem, 6vw, 3rem);
}

@media (prefers-color-scheme: light) {
  :root {
    /* Light — el otro preset gratuito de la app */
    --bg:            #F5F5F5;
    --bg-deep:       #E9EBEE;
    --glass:         rgba(255, 255, 255, 0.72);
    --glass-strong:  #FFFFFF;
    --hairline:      rgba(18, 18, 18, 0.1);
    --primary:       #1976D2;
    --primary-soft:  rgba(25, 118, 210, 0.09);
    --secondary:     #00897B;
    --secondary-soft: rgba(0, 137, 123, 0.1);
    --text:          #121212;
    --text-dim:      rgba(18, 18, 18, 0.66);
    --text-faint:    rgba(18, 18, 18, 0.45);
  }
}

* {
  box-sizing: border-box;
}

html {
  color: var(--text);
  font-size: 100%;
  line-height: 1.65;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  padding: 0 0 5rem;
  background:
    radial-gradient(1200px 620px at 50% -12%, var(--primary-soft), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-color: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-0);
  -webkit-font-smoothing: antialiased;
}

/* --- accesibilidad ------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.7rem 1.1rem;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 12px 0;
  z-index: 50;
}

.skip-link:focus {
  left: 0;
}

a:focus-visible,
.toc a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- barra superior (glass, como las superficies de la app) -------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--glass);
  border-bottom: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.7rem 1.35rem;
}

.masthead__icon {
  border-radius: 9px;
  flex: none;
}

.masthead__name {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.masthead__sep {
  width: 1px;
  height: 1.05em;
  background: var(--hairline);
}

.masthead__section {
  color: var(--text-dim);
  font-size: var(--step--1);
}

/* --- entradilla ---------------------------------------------------------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.35rem;
}

.lede {
  padding: 3.5rem 0 0;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--primary);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 0.85rem;
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.026em;
  text-wrap: balance;
}

.standfirst {
  margin: 0 0 1.4rem;
  color: var(--text-dim);
  font-size: var(--step-1);
  max-width: 56ch;
}

.publisher {
  margin: 0 0 1.25rem;
  max-width: 56ch;
  color: var(--text-dim);
}

.publisher strong {
  color: var(--text);
}

/* Identificación del responsable: etiqueta a la izquierda, dato a la derecha;
   se apila en móvil para que no se estrangule el valor. */
.identity {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.1rem;
  margin: 0;
}

.identity dt {
  color: var(--text-faint);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 0.18em;
}

.identity dd {
  margin: 0;
}

@media (max-width: 480px) {
  .identity {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .identity dd {
    margin-bottom: 0.7rem;
  }
}

.updated {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.35rem 0.85rem 0.35rem 0.7rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text-dim);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}

.updated .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* --- índice -------------------------------------------------------------- */

.toc {
  margin: 3rem 0 0;
  padding: 1.35rem 1.5rem 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.toc__title {
  margin: 0 0 0.9rem;
  color: var(--text-faint);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 2rem;
}

@media (max-width: 620px) {
  .toc__list {
    columns: 1;
  }
}

.toc__list li {
  counter-increment: toc;
  break-inside: avoid;
  margin-bottom: 0.45rem;
}

.toc__list a {
  display: flex;
  gap: 0.6rem;
  color: var(--text-dim);
  text-decoration: none;
}

.toc__list a::before {
  content: counter(toc);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  min-width: 1.3em;
  text-align: right;
}

.toc__list a:hover {
  color: var(--text);
}

.toc__list a:hover::before {
  color: var(--primary);
}

/* --- cuerpo del documento ------------------------------------------------ */

.policy {
  margin-top: 1rem;
}

.policy section {
  padding-top: 3.25rem;
  scroll-margin-top: 4.5rem;
}

.policy section + section {
  border-top: 1px solid var(--hairline);
}

h2 {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin: 0 0 1.15rem;
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.021em;
  text-wrap: balance;
}

h2 .num {
  flex: none;
  min-width: 1.75em;
  padding: 0.1em 0;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.6em;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

h3 {
  margin: 2.1rem 0 0.7rem;
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.011em;
}

h4 {
  margin: 0 0 0.55rem;
  font-size: var(--step-0);
  font-weight: 600;
}

p {
  margin: 0 0 1.05rem;
}

ul {
  margin: 0 0 1.15rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.55rem;
}

li::marker {
  color: var(--primary);
}

strong {
  font-weight: 600;
}

a {
  color: var(--primary);
  text-decoration-color: color-mix(in srgb, var(--primary) 45%, transparent);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: var(--primary);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.tag {
  display: inline-block;
  padding: 0.15em 0.6em;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass-strong);
  color: var(--text-dim);
  font-size: 0.5em;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

/* --- avisos destacados --------------------------------------------------- */

.note {
  margin: 1.6rem 0;
  padding: 1.2rem 1.35rem;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--primary);
  border-radius: 14px;
  background: var(--glass);
}

.note > :last-child {
  margin-bottom: 0;
}

.note--accent {
  border-left-color: var(--secondary);
  background: var(--secondary-soft);
}

.note--accent h4 {
  color: var(--secondary);
}

.todo {
  padding: 0.95rem 1.15rem;
  border: 1px dashed var(--secondary);
  border-radius: 12px;
  background: var(--secondary-soft);
  color: var(--text-dim);
}

/* --- tabla de bases jurídicas -------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.15rem;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--glass);
}

table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: var(--step--1);
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* --- pie ----------------------------------------------------------------- */

.foot {
  max-width: var(--measure);
  margin: 4rem auto 0;
  padding: 1.75rem 1.35rem 0;
  border-top: 1px solid var(--hairline);
  color: var(--text-dim);
  font-size: var(--step--1);
}

.foot__inner {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.foot__icon {
  border-radius: 7px;
  flex: none;
}

.foot p {
  margin: 0;
}

/* --- 404 ----------------------------------------------------------------- */

.centered {
  display: flex;
  min-height: 70vh;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

