/* Self-hosted like the landing page: the notice itself states that no third-party font is loaded. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/montserrat-latin-ext.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: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/montserrat-latin.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;
}

:root {
  --tm-green: #1F4A2C;
  --tm-green-deep: #16351F;
  --tm-cream: #F5F2EA;
  --tm-cream-deep: #EDE8DC;
  --tm-text: #1A1A1A;
  --tm-text-2: #5C5C5C;
  --tm-line: #E2DDD2;
  --tm-line-strong: #D3CBBA;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: #fff;
  color: var(--tm-text);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--tm-green); text-decoration-thickness: 1px; text-underline-offset: 0.18em; overflow-wrap: anywhere; }
a:hover { color: var(--tm-green-deep); }
a:focus-visible { outline: 2px solid var(--tm-green); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--tm-green);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; color: #fff; }

.legal-header,
.legal {
  width: 100%;
  max-width: 50rem;
  margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

.legal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--tm-line);
}
.legal-header__brand { display: inline-flex; }
.legal-header__brand img { display: block; width: 11.2rem; max-width: 60vw; height: auto; }
.legal-header__back { font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.legal-header__back:hover { text-decoration: underline; }

.legal { padding-top: 2.25rem; padding-bottom: 4rem; }

h1, h2, h3, h4 { color: var(--tm-green); line-height: 1.25; text-wrap: balance; }
h1.doc { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.1rem); font-weight: 700; margin: 0 0 1.25rem; }
h1.part {
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.6rem);
  font-weight: 700;
  margin: 3.5rem 0 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--tm-green);
}
h2 { font-size: 1.2rem; font-weight: 700; margin: 2.25rem 0 0.75rem; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 1.75rem 0 0.5rem; }
h4 { font-size: 1rem; font-weight: 700; color: var(--tm-text); margin: 1.25rem 0 0.5rem; }

p { margin: 0 0 0.9rem; }
strong { font-weight: 700; }
.t { color: var(--tm-green-deep); }
code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.9em; white-space: nowrap; }

ul { margin: 0 0 0.9rem; padding-left: 1.3rem; }
li { margin-bottom: 0.4rem; }
li::marker { color: var(--tm-green); }

.note {
  background: var(--tm-cream);
  border-left: 3px solid var(--tm-green);
  padding: 1rem 1.15rem;
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
}
.note p:last-child { margin-bottom: 0; }

.parts {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--tm-line);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
}
.parts a { text-decoration: none; }
.parts a:hover { text-decoration: underline; }

/* Wide tables scroll inside their own box instead of widening the page on a phone. */
.table-wrap { margin: 0 0 1.1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; line-height: 1.5; }
table:not(.kv) { min-width: 34rem; }
th, td { border: 1px solid var(--tm-line-strong); padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; }
th { background: var(--tm-cream-deep); font-weight: 600; }
table.kv td:first-child { width: 36%; font-weight: 500; background: var(--tm-cream); }

@media (max-width: 30rem) {
  body { font-size: 0.9375rem; }
  table.kv td:first-child { width: 40%; }
}

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

@media print {
  @page { size: A4; margin: 22mm 20mm 20mm; }

  body { font-size: 10.4pt; line-height: 1.6; }
  .skip-link, .legal-header__back, .parts { display: none; }
  .legal-header, .legal { max-width: none; padding-left: 0; padding-right: 0; }
  .legal-header { padding-top: 0; border-bottom: 0; }
  .legal { padding: 0; }

  h1, h2, h3, h4 { break-after: avoid-page; }
  h1.part { break-before: page; margin-top: 0; }
  p { orphans: 2; widows: 2; }
  tr { break-inside: avoid; }
  .table-wrap { overflow: visible; }
  table { font-size: 9.2pt; }
  table:not(.kv) { min-width: 0; }
  a { color: inherit; text-decoration: none; }
}
