/* App 112 Canarias · Términos de uso
   Diseño responsive y accesible. Modo claro por defecto. */

:root {
  --font-scale: 1;
  --page-bg: #f4f7fa;
  --surface: #ffffff;
  --surface-soft: #eef4f8;
  --text: #17212b;
  --muted: #617080;
  --heading: #0b2033;
  --border: #d8e1e8;
  --accent: #0069a8;
  --accent-strong: #004d7d;
  --accent-soft: #e8f4fb;
  --focus: #ffb400;
  --shadow: 0 14px 38px rgba(12, 36, 56, 0.10);
  --header-bg: #ffffff;
  --button-bg: #ffffff;
  --button-hover: #eef6fb;
  --button-text: #17324a;
  --danger-soft: #fff6e6;
}

html[data-theme="dark"] {
  --page-bg: #0b1218;
  --surface: #111c25;
  --surface-soft: #172632;
  --text: #eef5f8;
  --muted: #adbdc8;
  --heading: #ffffff;
  --border: #2b3d49;
  --accent: #69c9ff;
  --accent-strong: #9bdcff;
  --accent-soft: #102c3c;
  --focus: #ffd15a;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  --header-bg: #0f1a23;
  --button-bg: #172630;
  --button-hover: #203744;
  --button-text: #eef8fc;
  --danger-soft: #3a2b0f;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 11rem;
  background: var(--page-bg);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page-bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: calc(17px * var(--font-scale));
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  transition: background-color .2s ease, color .2s ease;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: var(--accent-strong);
  text-underline-offset: .16em;
  text-decoration-thickness: .08em;
}

a:hover {
  text-decoration-thickness: .13em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 9999;
  transform: translateY(-180%);
  padding: .7rem 1rem;
  border-radius: .55rem;
  background: var(--heading);
  color: var(--surface);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.15rem 0 1.9rem;
}


.brand-logo {
  width: clamp(118px, 17vw, 168px);
  height: auto;
  flex: 0 0 auto;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(12, 36, 56, 0.10);
}

html[data-theme="dark"] .brand-logo {
  background: #ffffff;
}

.identity-note {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1.2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.identity-note img {
  width: 72px;
  height: auto;
  flex: 0 0 auto;
  border-radius: .75rem;
  border: 1px solid var(--border);
  background: #ffffff;
}

.identity-note p {
  margin: 0;
}

@media (max-width: 570px) {
  .brand-logo {
    width: min(132px, 36vw);
    border-radius: .75rem;
  }

  .identity-note {
    align-items: flex-start;
  }

  .identity-note img {
    width: 58px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}


.eyebrow,
.updated {
  margin: 0;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

h1 {
  margin: .15rem 0 .12rem;
  color: var(--heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -.025em;
}

.updated {
  color: var(--muted);
  font-size: .93rem;
}

.utility-wrap {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.utility-bar {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: .68rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem .75rem;
}

.utility-group {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
}

.tool-label {
  margin-right: .1rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tool-button,
.icon-button {
  min-height: 2.7rem;
  border: 1px solid var(--border);
  border-radius: .68rem;
  background: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  font-weight: 750;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .04);
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .55rem .8rem;
}

.icon-button {
  min-width: 2.7rem;
  padding: .52rem .62rem;
}

.tool-button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  background: var(--button-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.tool-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.google-button {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.google-g {
  display: inline-grid;
  place-items: center;
  width: 1.48rem;
  height: 1.48rem;
  border-radius: 50%;
  background: #ffffff;
  color: #1a73e8;
  border: 1px solid #dadce0;
  font-weight: 900;
  line-height: 1;
}

.reader-status {
  width: min(1180px, calc(100% - 2rem));
  margin: -.15rem auto 0;
  padding: 0 0 .45rem;
  color: var(--muted);
  font-size: .79rem;
}

.layout {
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto 4rem;
  display: grid;
  grid-template-columns: minmax(190px, 245px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.toc-card,
.legal-card {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.toc-card {
  position: sticky;
  top: 8.3rem;
  padding: 1.1rem;
  border-radius: .9rem;
}

.toc-card h2 {
  margin: 0 0 .65rem;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.toc-card nav {
  display: grid;
  gap: .16rem;
}

.toc-card a {
  display: block;
  padding: .5rem .55rem;
  border-radius: .48rem;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}

.toc-card a:hover,
.toc-card a:focus-visible {
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.legal-card {
  border-radius: 1.05rem;
  overflow: hidden;
}

.intro-note {
  padding: 1rem clamp(1.2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--heading);
}


.terms-heading {
  padding: 1.75rem clamp(1.2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-soft), var(--surface));
}

.terms-heading h2 {
  margin: .18rem 0 .2rem;
  color: var(--heading);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.terms-heading .intro-note {
  margin: 1.35rem calc(clamp(1.2rem, 4vw, 3rem) * -1) 0;
}

.legal-section {
  padding: 2rem clamp(1.2rem, 4vw, 3rem);
  scroll-margin-top: 9rem;
}

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

.legal-section h2 {
  margin: 0 0 1rem;
  color: var(--heading);
  font-size: clamp(1.2rem, 2.5vw, 1.62rem);
  line-height: 1.25;
  letter-spacing: -.012em;
}

.legal-section p {
  margin: 0 0 1.05rem;
  max-width: 82ch;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.document-footer {
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem) 1.65rem;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  text-align: center;
}

.document-footer p {
  margin: .18rem 0;
}

.document-footer a {
  font-weight: 800;
}

.noscript-note {
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 3rem;
  padding: 1rem;
  border: 1px solid #d79922;
  border-radius: .75rem;
  background: var(--danger-soft);
}

@media (max-width: 850px) {
  html {
    scroll-padding-top: 13rem;
  }

  .layout {
    grid-template-columns: 1fr;
    margin-top: 1rem;
  }

  .toc-card {
    position: static;
  }

  .toc-card nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .utility-bar {
    align-items: stretch;
  }

  .reader-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 570px) {
  body {
    font-size: calc(16px * var(--font-scale));
  }

  .header-inner,
  .utility-bar,
  .reader-status,
  .layout {
    width: min(100% - 1rem, 1180px);
  }

  .header-inner {
    padding: 1.25rem 0 1.15rem;
  }

  .brand {
    align-items: flex-start;
  }

  
  .utility-group {
    flex-wrap: wrap;
  }

  .tool-button {
    padding-inline: .65rem;
  }

  .toc-card nav {
    grid-template-columns: 1fr;
  }

  .legal-section {
    padding-block: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .utility-wrap,
  .toc-card,
  .skip-link {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  .site-header,
  .legal-card {
    border: 0;
    box-shadow: none;
  }

  .layout {
    display: block;
    width: 100%;
    margin: 0;
  }

  .legal-section {
    break-inside: avoid-page;
  }

  a {
    color: #000000;
  }
}
