/* Shared by privacy.html, tietosuoja.html and terms.html: the standalone legal pages in the
   Kuusi style of rahora.app (tokens mirror src/styles/tokens.css; see DESIGN.md).
   Fonts are self-hosted copies in /fonts/ (SIL OFL 1.1, schibsted-grotesk-LICENSE.txt). */

@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --lumi: #ffffff;
  --huurre: #f1f4f2;
  --kuusi: #0f4d3c;
  --kuusi-deep: #0b3a2d;
  --ink: #0d1b16;
  --muted: #5f6b66; /* 5.55:1 on Lumi */
  --lakka: #e07b1f; /* marks only, never text */
  --rule: rgba(13, 27, 22, 0.12);
  --rule-strong: rgba(13, 27, 22, 0.5);
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--lumi);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--kuusi);
}

::selection { background: rgba(15, 77, 60, 0.18); color: var(--ink); }

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

header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--rule);
}

/* Wordmark: "RAHORA." in capitals, wide tracking, full stop in Lakka (same as the site). */
.logo {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--ink);
  text-decoration: none;
}
.logo span { color: var(--lakka); letter-spacing: 0; }

.back-link,
.footer-links a {
  color: var(--kuusi);
  text-decoration: none;
}

.back-link:hover,
.footer-links a:hover,
.footer-links a.active { color: var(--kuusi-deep); text-decoration: underline; }

.back-link {
  font-size: 15px;
  font-weight: 500;
}

.lang-tabs,
main {
  width: min(700px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding-left: 40px;
  padding-right: 40px;
  text-align: left;
}

.lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding-top: 36px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0;
}

.lang-tab {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--muted);
  text-decoration: none;
}

.lang-tab.active {
  color: var(--kuusi);
  border-bottom-color: var(--kuusi);
}

.lang-tab:hover { color: var(--ink); }

main { padding-top: 48px; padding-bottom: 96px; }

.doc-section { display: none; }
.doc-section.active { display: block; }

/* The small label above the title is redundant with the title itself. */
.doc-eyebrow { display: none; }

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
  max-width: 100%;
}

h2, h3 { max-width: 100%; line-height: 1.2; }

.doc-meta {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1.5px solid var(--ink);
}

h2 { font-size: 1.5rem; margin-top: 2.4em; margin-bottom: 0.6em; }
h3 { font-size: 1.15rem; margin-top: 1.6em; margin-bottom: 0.5em; }

p { margin-bottom: 1.1em; max-width: 66ch; text-wrap: pretty; }

ul { margin: 0 0 1.1em 1.25em; max-width: 66ch; }
ul li { margin-bottom: 0.4em; text-wrap: pretty; }
td { text-wrap: pretty; }
ul li::marker { color: var(--kuusi); }

a {
  color: var(--kuusi);
  text-decoration: underline;
  text-decoration-color: rgba(15, 77, 60, 0.35);
  text-underline-offset: 0.22em;
}

a:hover { text-decoration-color: currentColor; }

.logo,
.lang-tab,
.back-link,
.footer-links a { text-decoration: none; }

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

.note {
  background: var(--huurre);
  border: 0;
  border-radius: 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.note p:last-child { margin-bottom: 0; }

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 16px 0 24px;
  border: 0;
  border-radius: 0;
}

table { width: 100%; border-collapse: collapse; font-size: 15px; }

th {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  padding: 12px 16px 10px 0;
  border-bottom: 1.5px solid var(--ink);
  background: transparent;
}

td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.mono { font-family: var(--font); font-variant-numeric: lining-nums; }

footer {
  border-top: 1px solid var(--rule);
  background: var(--lumi);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }

.footer-links a {
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 640px) {
  header { padding: 0 20px; min-height: 64px; }
  .lang-tabs,
  main { padding-left: 20px; padding-right: 20px; }
  .lang-tabs { padding-top: 24px; }
  main { padding-top: 32px; padding-bottom: 64px; }
  footer { padding: 24px 20px; }

  h1 { font-size: clamp(1.75rem, 8vw, 2.4rem); }
  h2 { font-size: clamp(1.25rem, 4.6vw, 1.45rem); }

  .table-wrap:has(th:nth-child(3)) { overflow: visible; }

  .table-wrap:has(th:nth-child(3)) table,
  .table-wrap:has(th:nth-child(3)) thead,
  .table-wrap:has(th:nth-child(3)) tbody,
  .table-wrap:has(th:nth-child(3)) tr,
  .table-wrap:has(th:nth-child(3)) th,
  .table-wrap:has(th:nth-child(3)) td {
    display: block;
    width: 100%;
  }

  .table-wrap:has(th:nth-child(3)) tr {
    border-top: 1px solid var(--rule);
    padding: 12px 0;
  }

  .table-wrap:has(th:nth-child(3)) thead tr { border-top: 0; padding-top: 0; }

  .table-wrap:has(th:nth-child(3)) th,
  .table-wrap:has(th:nth-child(3)) td {
    border: 0;
    padding: 2px 0;
  }
}

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