/* Tremplin legal and support pages. No external resources: system fonts only. */

:root {
  color-scheme: light dark;
  --paper: #f7f4ee;
  --card: #ffffff;
  --hairline: #e6e0d5;
  --ink: #18213a;
  --ink2: #5b6275;
  --accent: #8e1f42;
  --notice: #fbefd2;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1424;
    --card: #182036;
    --hairline: #2a3350;
    --ink: #ece8e1;
    --ink2: #a9aebd;
    --accent: #d46483;
    --notice: #2c2817;
  }
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

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

header.site,
main,
footer.site {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline);
}

.brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand span {
  color: var(--accent);
}

nav.site ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.9375rem;
}

nav.site a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

main {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2rem;
  margin: 0.5rem 0 0.5rem;
}

h2 {
  font-size: 1.375rem;
  margin: 2.25rem 0 0.5rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.25rem;
}

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

ul,
ol {
  padding-left: 1.25rem;
}

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

.meta {
  color: var(--ink2);
  font-size: 0.9375rem;
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.lang-switch li + li {
  margin-top: 0;
}

.lang-switch a {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--card);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
}

.summary,
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
}

.summary > :last-child,
.card > :last-child {
  margin-bottom: 0;
}

.summary h2,
.card h2 {
  margin-top: 0;
  font-size: 1.125rem;
}

.notice {
  background: var(--notice);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
}

.toc {
  font-size: 0.9375rem;
  columns: 2 16rem;
  column-gap: 2rem;
}

.toc li {
  break-inside: avoid;
}

section.lang {
  scroll-margin-top: 1rem;
}

section.lang + section.lang {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--hairline);
}

h2[id],
h3[id] {
  scroll-margin-top: 1rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
  background: var(--card);
}

.table-wrap table {
  margin: 0;
}

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

th {
  font-weight: 600;
}

dl.faq dt {
  font-weight: 600;
  margin-top: 1.25rem;
}

dl.faq dd {
  margin: 0.25rem 0 0;
}

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

.links li + li {
  margin-top: 0;
}

.links a {
  display: block;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 0.875rem 1.25rem;
  text-decoration: none;
  font-weight: 600;
}

.links a small {
  display: block;
  font-weight: 400;
  color: var(--ink2);
}

.top {
  font-size: 0.875rem;
}

footer.site {
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
  padding-bottom: 2rem;
  color: var(--ink2);
  font-size: 0.875rem;
}

footer.site p {
  margin: 0 0 0.5rem;
}

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.625rem;
  }

  h2 {
    font-size: 1.25rem;
  }
}

@media print {
  header.site nav,
  .lang-switch,
  .top,
  .skip {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
  }
}

/* Narrow screens: each table row becomes a small card with labelled cells. */
@media (max-width: 40rem) {
  table.stack,
  table.stack tbody,
  table.stack tr,
  table.stack td {
    display: block;
    width: 100%;
  }

  table.stack {
    background: none;
  }

  table.stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  table.stack tr {
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 0.5rem 0.875rem;
    margin-bottom: 0.75rem;
  }

  table.stack td {
    border: 0;
    padding: 0.25rem 0;
  }

  table.stack td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink2);
  }

  table.stack td:first-child {
    font-weight: 600;
  }

  table.stack td:first-child::before {
    display: none;
  }
}
