/*
 * Styles for the published legal documents.
 * Linked from src/index.html; Vite hashes it into dist/<target>/assets/.
 *
 * Palette, type scale and font match microred-site's design system
 * ("OS de Energia") so the legal pages read as the same product.
 */

@font-face {
  font-family: "Satoshi";
  src:
    url("/assets/Satoshi-Variable-CFg-z2ne.woff2") format("woff2-variations"),
    url("/assets/Satoshi-Variable-ChAXbpFa.ttf") format("truetype-variations");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f4f5fa;
  --ink: #0e0e0e;
  --text-2: #3a3d49;
  --text-3: #6a6e7d;
  --text-4: #9aa0ae;
  --line: #e7e9f0;
  --line-2: #dde0ea;
  --accent: #2455e0;
  --accent-hover: #0741a9;
  --quote: var(--bg-soft);
  --code: var(--bg-soft);
  --font:
    "Satoshi", "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d12;
    --bg-soft: #15171f;
    --ink: #f4f5fa;
    --text-2: #aeb4c4;
    --text-3: #888fa0;
    --text-4: #787f90;
    --line: rgba(255, 255, 255, 0.09);
    --line-2: rgba(255, 255, 255, 0.14);
    --accent: #628ce8;
    --accent-hover: #9db4ef;
    --quote: var(--bg-soft);
    --code: #1a1d27;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 500;
  letter-spacing: -0.011em;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 47.5rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

/* -------------------------------------------------------------- document head */

header.doc {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

header.doc h1 {
  font-size: clamp(28px, 4.2vw, 40px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.meta {
  color: var(--text-4);
  font-size: 13.5px;
  font-weight: 600;
  margin: 0;
}

.meta .sep {
  opacity: 0.5;
  padding: 0 0.4rem;
}

/* What changed in this version, in one sentence, for the end user. */
.summary {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  font-weight: 500;
  background: var(--quote);
  border-radius: 14px;
  color: var(--text-2);
}

/* ------------------------------------------------------- rendered markdown body */

h2 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 2.75rem 0 0.75rem;
}

h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 2rem 0 0.5rem;
}

h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 1.5rem 0 0.5rem;
}

p {
  font-size: 15.5px;
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

li {
  font-size: 15px;
  margin-bottom: 0.4rem;
}

a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

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

strong {
  color: var(--ink);
  font-weight: 700;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

code {
  background: var(--code);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.88em;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

blockquote {
  margin: 1.25rem 0;
  padding: 0.85rem 1.1rem;
  background: var(--quote);
  border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0;
}

blockquote > :last-child {
  margin-bottom: 0;
}

/* Wide tables scroll inside themselves instead of pushing the page sideways. */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93rem;
  display: block;
  overflow-x: auto;
}

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

th {
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 700;
}

/* -------------------------------------------------------------------- footer */

footer.doc {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--text-4);
  font-size: 13.5px;
  font-weight: 600;
}

footer.doc a {
  color: var(--text-4);
  transition: color 0.15s;
}

footer.doc a:hover {
  color: var(--ink);
}

footer.doc p {
  margin: 0 0 0.4rem;
}

/* ---------------------------------------------------------------------- print */

@media print {
  :root {
    --bg: #ffffff;
    --ink: #000000;
    --text-2: #222222;
    --text-3: #444444;
    --text-4: #444444;
    --line: #cccccc;
    --quote: #f4f4f4;
  }

  .wrap {
    max-width: none;
    padding: 0;
  }

  .noprint {
    display: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
