/* Terms and Conditions. Builds on ../styles.css ("Quarter"): tokens only, no new colours.
   A long legal document: the work is the measure, the hanging numbers and the way around it. */

html { scroll-padding-top: 100px; }
html:not(.js) .header { background: #fff; box-shadow: 0 1px 0 var(--navy-100); } /* no script: nothing switches the header to solid, and text would scroll under it */

/* ---------- page head ---------- */
/* Metric-matched stand-ins for the display face while Bricolage Grotesque downloads. Without them the h1
   is set in a much narrower fallback, fits on one line, then re-wraps to two when the web font arrives and
   pushes the lead, the buttons and the card down (CLS 0.14 on a throttled phone). size-adjust is the
   measured width ratio Bricolage 800 : Arial Bold (0.923, checked against the h1 in all six languages);
   the Roboto figure for Android is derived from the published average glyph widths, not measured. */
@font-face { font-family: "QLX Display Fallback"; font-weight: 700 800; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Helvetica-Bold"), local("Liberation Sans Bold"), local("Arimo Bold"); size-adjust: 92.3%; ascent-override: 93%; descent-override: 27%; line-gap-override: 0%; }
@font-face { font-family: "QLX Display Fallback Android"; font-weight: 700 800; src: local("Roboto Bold"), local("Roboto-Bold"), local("Roboto"); size-adjust: 97%; ascent-override: 93%; descent-override: 27%; line-gap-override: 0%; }
.tc-head { padding-top: clamp(116px, 15vh, 172px); padding-bottom: clamp(44px, 5.5vw, 88px); }
.tc-head__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(32px, 6vw, 112px); align-items: end; }
.tc-head__copy { display: grid; gap: 26px; justify-items: start; }
.tc-h1 { font-family: "Bricolage Grotesque", "QLX Display Fallback", "QLX Display Fallback Android", "Arial Narrow", system-ui, sans-serif; font-size: clamp(2.75rem, 7.4vw, 6.75rem); font-weight: 800; line-height: .92; }
.tc-head__lead { max-width: 40ch; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.5; color: var(--muted); }
.tc-dl { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.arr.tc-down { transform: rotate(90deg); }
@media (hover: hover) { .btn:hover .arr.tc-down { transform: rotate(90deg) translateX(4px); } }

.tc-card {
  --ring: #fff;
  padding: clamp(24px, 2.8vw, 40px);
  background: var(--navy-950); color: #fff;
  border-radius: var(--r) calc(var(--q) * .7) var(--r) var(--r);
}
.tc-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 13px; border-top: 1.5px solid rgba(255, 255, 255, .16); }
.tc-facts dt { font-size: .875rem; color: var(--on-dark); }
.tc-facts dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.tc-facts > .tc-facts__main { display: grid; gap: 6px; justify-content: start; padding: 0 calc(var(--q) * .28) 22px 0; border-top: 0; }
.tc-facts__main dt { font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-300); }
.tc-facts__main dd { font-family: var(--display); font-weight: 800; font-size: clamp(2.25rem, 3.6vw, 3.25rem); line-height: 1; letter-spacing: -.03em; text-align: left; }
.tc-card__note { padding-top: 16px; border-top: 1.5px solid rgba(255, 255, 255, .16); font-size: .9375rem; line-height: 1.5; color: var(--on-dark); }

/* ---------- body: contents + document ---------- */
.tc-body { padding-bottom: var(--sec); }
.tc-body__grid { display: grid; grid-template-columns: minmax(0, clamp(15rem, 26vw, 21rem)) minmax(0, 1fr); gap: clamp(40px, 6vw, 104px); align-items: start; }
.tc-body__grid::before { content: ""; grid-column: 1 / -1; height: 1.5px; background: var(--navy-100); margin-bottom: clamp(0px, 1vw, 16px); }

/* contents, desktop: sticky beside the document */
.tc-toc { position: sticky; top: 100px; max-height: calc(100vh - 124px); overflow-y: auto; overscroll-behavior: contain; padding: 4px 4px 4px 0; scrollbar-width: thin; }
.tc-toc__label { margin-bottom: 14px; }
.tc-toc__note { margin-bottom: 16px; font-size: .875rem; line-height: 1.45; color: var(--muted); }
.tc-toc__note a { display: inline-block; padding-block: 6px; margin-block: -6px; font-weight: 600; color: var(--navy-950); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
html[lang="cs"] .tc-toc__note { display: none; } /* the Czech interface needs no notice that the document is Czech */
.tc-toc__list { border-top: 1.5px solid var(--navy-100); }
.tc-toc__list a {
  position: relative;
  display: flex; align-items: flex-start; min-height: 46px; padding: 11px 0 11px 16px;
  border-bottom: 1.5px solid var(--navy-100);
  font-size: .9375rem; line-height: 1.4; text-decoration: none; color: var(--muted);
  transition: color .3s;
}
/* current entry: a bar in the gutter that grows in place. Numerals and titles never move sideways. */
.tc-toc__list a::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 5px; background: var(--brand-400); border-radius: 1px; transform: scaleY(0); transform-origin: 50% 0; transition: transform .45s var(--ease); }
.tc-toc__n { flex: none; width: 2.75rem; font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.3125; color: var(--brand-700); transition: color .3s; }
.tc-toc__t { flex: 1; min-width: 0; }
@media (hover: hover) { .tc-toc__list a:hover { color: var(--navy-950); } }
.tc-toc__list a.is-on { color: var(--navy-950); font-weight: 600; }
.tc-toc__list a.is-on .tc-toc__n { color: var(--navy-950); font-weight: 800; }
.tc-toc__list a.is-on::before { transform: scaleY(1); }

/* contents, small screens: a compact collapsible bar that stays under the header */
.tc-tocm { display: none; }

/* ---------- the document (Czech, binding; never translated) ---------- */
.tc-doc {
  --tc-num: 3.25rem;
  max-width: calc(35.5em + var(--tc-num)); /* about 72 characters a line */
  font-size: 1.0625rem; line-height: 1.68;
  overflow-wrap: break-word;
  text-wrap: pretty;
}
.tc-front { display: grid; gap: 18px; }
.tc-front__title { font-family: var(--display); font-weight: 750; font-size: clamp(1.75rem, 2.8vw, 2.5rem); line-height: 1.04; letter-spacing: -.03em; font-variation-settings: "opsz" 96; text-wrap: balance; }
.tc-front__title em { font-style: normal; color: var(--brand-700); }
.tc-front__co { color: var(--muted); }
.tc-front__meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin-top: 6px; border-bottom: 1.5px solid var(--navy-100); }
.tc-front__meta > div { padding-block: 12px; border-top: 1.5px solid var(--navy-100); }
.tc-front__meta dt { font-size: .8125rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.tc-front__meta dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.tc-front__meta a { display: inline-block; padding-block: 11px; margin-block: -11px; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.tc-front__note { margin-top: 6px; padding-left: 20px; border-left: 6px solid var(--brand-400); }

.tc-art { padding-top: clamp(52px, 6vw, 88px); }
.tc-art__h {
  --tc-q: 88px;
  display: grid; grid-template-columns: var(--tc-q) minmax(0, 1fr); gap: clamp(16px, 2vw, 24px); align-items: end;
  border-bottom: 1px solid var(--navy-900); /* the wedge stands on this rule: no padding between them */
  font-family: var(--display); font-weight: 700; font-variation-settings: "opsz" 96;
  text-wrap: balance;
}
.tc-art__n { /* the numeral sits in the quarter: the 90 degree wedge of the dial */
  display: flex; align-items: flex-end;
  width: var(--tc-q); height: var(--tc-q); padding: 0 0 9px 11px;
  background: var(--brand-400); border-radius: 0 100% 0 0;
  font-size: 2.25rem; font-weight: 800; line-height: 1; letter-spacing: -.015em; white-space: nowrap; color: var(--navy-950);
}
.tc-art__t { font-size: clamp(1.5rem, 2.5vw, 2.25rem); line-height: 1.06; letter-spacing: -.028em; text-wrap: balance; padding-bottom: 18px; }

.tc-cl { padding-top: 10px; }
.tc-cl__i { display: grid; grid-template-columns: var(--tc-num) minmax(0, 1fr); align-items: baseline; padding-block: .62em; scroll-margin-top: 8px; }
.tc-cl__n, .tc-sub__l { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.tc-sub { display: grid; gap: .5em; margin-top: .7em; }
.tc-sub > li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); align-items: baseline; }
.tc-cl__i:target { margin-inline: -14px; padding-inline: 14px; background: var(--brand-50); border-radius: 12px; }

/* ---------- closing band (the footer's quarter corner cuts into it, as on the homepage) ---------- */
.tc-end { position: relative; z-index: 1; padding-block: clamp(64px, 7vw, 116px) clamp(72px, 8vw, 128px); background: var(--brand-400); color: var(--navy-950); border-radius: 0 var(--q) 0 0; }
.tc-end__in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 6vw, 112px); align-items: end; }
.tc-end__copy { display: grid; gap: 22px; }
.tc-end__p { max-width: 42ch; font-size: 1.125rem; font-weight: 500; }
.tc-end__act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.tc-end .btn--ghost { --hov: #fff; box-shadow: inset 0 0 0 1.5px var(--navy-950); }
.tc-top { margin-left: 8px; }
.tc-top::after { transform: rotate(-45deg); margin-top: 5px; }
@media (hover: hover) { .tc-top:hover::after { transform: translateY(-4px) rotate(-45deg); } }
html:not(.js) .tc-print { display: none; }

/* ---------- responsive ---------- */
@media (min-width: 1280px) {
  .tc-doc { font-size: 1.125rem; }
}
@media (max-width: 1040px) {
  .tc-head__grid, .tc-end__in { grid-template-columns: 1fr; align-items: start; }
  .tc-card { max-width: 34rem; }
}
@media (max-width: 959.98px) {
  html { scroll-padding-top: 148px; }
  .tc-body__grid { display: block; }
  .tc-body__grid::before { display: block; }
  .tc-toc { display: none; }
  .tc-doc { margin: clamp(28px, 5vw, 48px) auto 0; } /* one column: centred, not left with a third of the screen empty */

  .tc-tocm { display: block; position: sticky; top: 76px; z-index: 40; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); background: #fff; box-shadow: 0 1.5px 0 var(--navy-100); }
  .tc-tocm summary { display: flex; align-items: center; gap: 12px; min-height: 56px; list-style: none; cursor: pointer; }
  .tc-tocm summary::-webkit-details-marker { display: none; }
  .tc-tocm summary:focus-visible { outline-offset: -3px; }
  .tc-tocm__label { flex: none; font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-700); }
  .tc-tocm__cur { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .9375rem; font-weight: 600; }
  .tc-tocm summary i { flex: none; width: 9px; height: 9px; margin: -4px 4px 0 auto; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .3s var(--ease); }
  .tc-tocm[open] summary i { transform: rotate(225deg); margin-top: 5px; }
  .tc-tocm nav { max-height: calc(100vh - 76px - 56px - 16px); max-height: calc(100dvh - 76px - 56px - 16px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: 14px; }
  .tc-tocm .tc-toc__list a { min-height: 48px; }
  .tc-tocm .tc-toc__note { margin: 4px 0 14px; }
}
@media (max-width: 640px) {
  .tc-doc { --tc-num: 2.25rem; font-size: 1rem; line-height: 1.65; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 9 4 3; }
  .tc-front__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
  .tc-art__h { --tc-q: 64px; gap: 14px; } /* the wedge stays inline, left of the heading */
  .tc-art__n { padding: 0 0 7px 8px; font-size: 1.625rem; }
  .tc-art__t { padding-bottom: 12px; }
  .tc-dl .btn, .tc-end__act .btn { flex: 1 1 100%; justify-content: space-between; }
  .tc-top { margin-left: 0; }
  .tc-cl__i:target { margin-inline: -8px; padding-inline: 8px; }
}
@media (max-width: 350px) {
  .tc-front__meta { grid-template-columns: 1fr; }
}

/* ---------- print: the document only, black on white ---------- */
@media print {
  @page { margin: 18mm 17mm 20mm; }
  html, body { background: #fff; color: #000; }
  body { font-size: 10.5pt; }
  .skip, .header, .footer, .tc-head, .tc-toc, .tc-tocm, .tc-end, .tc-body__grid::before { display: none !important; }
  .tc-body { padding: 0; }
  .tc-body__grid { display: block; }
  .wrap { max-width: none; padding: 0; }
  .tc-doc { max-width: none; margin: 0; font-size: 10.5pt; line-height: 1.5; color: #000; orphans: 3; widows: 3; --tc-num: 2.4rem; }
  .tc-doc * { color: #000 !important; }
  .tc-front { gap: 10pt; }
  .tc-front__title { font-size: 20pt; }
  .tc-front__meta { grid-template-columns: repeat(3, minmax(0, 1fr)); border-color: #000; }
  .tc-front__meta > div { border-color: #000; padding-block: 5pt; }
  .tc-front__meta a { text-decoration: none; }
  .tc-front__note { border-left: 2pt solid #000; padding-left: 10pt; }
  .tc-art { padding-top: 20pt; }
  .tc-art__h { grid-template-columns: var(--tc-num) minmax(0, 1fr); gap: 0; align-items: baseline; padding-bottom: 5pt; border-bottom: 1pt solid #000; break-after: avoid; page-break-after: avoid; }
  .tc-art__n { display: block; width: auto; height: auto; padding: 0; background: none; border-radius: 0; font-size: 14pt; }
  .tc-art__t { font-size: 14pt; padding: 0; }
  .tc-cl { padding-top: 4pt; }
  .tc-cl__i { padding-block: 3.5pt; }
  .tc-cl__i:target { margin: 0; padding-inline: 0; background: none; }
  .tc-cl__n, .tc-sub__l { font-size: 10.5pt; }
  .tc-sub > li { break-inside: avoid; }
}
