/* atusalud.bienesta.com: the app's legal and support pages (legal-site/README.md). The colours are client/'s design
   tokens (src/theme/tokens.json: paper, ink, olive, bronze; night and chalk in dark mode) and the fonts its two
   bundled typefaces, so the pages read as the app's. Nothing loads from another site. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/fraunces-normal-100-900-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/figtree-normal-300-900-latin.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --page: oklch(96.8% 0.009 85);
  --raised: oklch(100% 0 0);
  --sunken: oklch(94.1% 0.012 85);
  --line: oklch(90.2% 0.017 85);
  --ink: oklch(22.7% 0.011 115);
  --ink-2: oklch(46.7% 0.017 111);
  --brand: oklch(37.9% 0.069 119);
  --brand-soft: oklch(96.9% 0.011 118);
  --accent: oklch(50.2% 0.079 82);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: oklch(19.6% 0.014 114);
    --raised: oklch(23.8% 0.019 117);
    --sunken: oklch(17.3% 0.018 113);
    --line: oklch(29.5% 0.021 115);
    --ink: oklch(94.9% 0.011 90);
    --ink-2: oklch(77.8% 0.015 98);
    --brand: oklch(79.1% 0.06 115);
    --brand-soft: oklch(27.6% 0.046 118);
    --accent: oklch(80.8% 0.068 86);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
}

a {
  color: var(--brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--raised);
  z-index: 1;
}

.site-header,
main,
.site-footer {
  width: min(100% - 2rem, var(--measure));
  margin-inline: auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font: 600 1.25rem/1 var(--font-display);
}

.brand img {
  width: 2rem;
  height: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-nav a[aria-current='page'] {
  color: var(--brand);
  font-weight: 600;
}

main {
  padding-block: 2rem 3rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 2.75rem);
  letter-spacing: -0.01em;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.5rem;
  scroll-margin-top: 1rem;
}

h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.2rem;
  scroll-margin-top: 1rem;
}

h1 + p {
  margin-top: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

main li + li {
  margin-top: 0.25rem;
}

strong {
  font-weight: 650;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--raised);
}

table {
  width: 100%;
  min-width: 34rem; /* three readable columns; narrower screens scroll the box sideways */
  border-collapse: collapse;
  font-size: 0.95rem;
}

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

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

th {
  background: var(--sunken);
  font-weight: 600;
}

.doc-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.doc-list li + li {
  margin-top: 0;
}

.doc-list a {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--raised);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.doc-list a:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.doc-list strong {
  display: block;
  font: 500 1.2rem/1.3 var(--font-display);
}

.doc-list span {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.site-footer {
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0 0 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .doc-list a {
    transition: none;
  }
}
