/* The reading pages: privacy, terms, support. Built on site.css (tokens, nav,
   footer); everything here is specific to a long document with a contents list.

   Each page carries the same document twice, one .layout per language, and shows
   the one that matches <html lang> (set by i18n.js). The markup ships lang="en",
   so a page whose scripts fail still reads, in English. */

html:not([lang="mk"]) .layout[data-only-lang="mk"],
html[lang="mk"] .layout[data-only-lang="en"] { display: none; }

body { padding-top: 68px; }

#progress {
  position: fixed;
  top: 68px;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--mint);
  z-index: 99;
}

.layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 720px);
  gap: 64px;
  justify-content: center;
  max-width: 1160px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* ---- Contents ---- */
.sidebar { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 124px); overflow-y: auto; }
.toc-label { font: 800 .78rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--teal-press); margin-bottom: 14px; }
.toc { display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc-item {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: .95rem;
  line-height: 1.35;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.toc-item:hover { color: var(--ink); }
.toc-item.active { color: var(--teal-press); font-weight: 600; border-left-color: var(--teal); }
.toc-toggle { display: none; }

/* ---- Document head ---- */
.page-tag { display: inline-block; font: 800 .78rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--teal-press); border: 2px solid var(--teal-press); border-radius: 99px; padding: 7px 14px; margin-bottom: 22px; }
.plate-hero h1 { font: 800 clamp(2.2rem, 5vw, 3.4rem)/1.05 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 20px; font-size: .95rem; color: var(--ink-2); }
.meta-row strong { color: var(--ink); font-weight: 600; }
.meta-sep { color: var(--line); }

.callout {
  margin: 36px 0 8px;
  padding: 20px 24px;
  background: var(--tint);
  border-left: 5px solid var(--teal);
  border-radius: 0 14px 14px 0;
  color: var(--ink);
}
.callout + .callout { margin-top: 18px; }
.callout a { color: var(--teal); font-weight: 600; text-underline-offset: 3px; }
.callout a:hover { color: var(--teal-press); }

/* ---- Sections ---- */
.section { padding-top: 56px; }
.section-num { display: block; font: 700 .8rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--teal-press); margin-bottom: 12px; }
.section h2 { font: 800 clamp(1.5rem, 2.6vw, 1.9rem)/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 16px; text-wrap: balance; }
.section h3 { font: 800 1.1rem/1.35 var(--display); margin: 26px 0 8px; }
.section p { margin-bottom: 16px; color: var(--ink); font-size: 1.05rem; line-height: 1.7; }
.section ul, .section ol { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; }
.section li { position: relative; padding-left: 24px; font-size: 1.05rem; line-height: 1.65; }
.section ul > li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.section ol { counter-reset: n; }
.section ol > li { counter-increment: n; }
.section ol > li::before { content: counter(n) "."; position: absolute; left: 0; top: 0; font-weight: 600; color: var(--teal-press); }
.section strong { font-weight: 600; }
.section a { color: var(--teal); font-weight: 600; text-underline-offset: 3px; }
.section a:hover { color: var(--teal-press); }

.sections-wrap > .section:first-child { padding-top: 40px; }

.rights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; }
.right-card { padding: 16px 18px; border: 2px solid var(--line); border-radius: 14px; }
.right-card-title { font: 800 .9rem/1.3 var(--display); letter-spacing: .02em; color: var(--teal-press); margin-bottom: 6px; }
.right-card p { margin: 0; font-size: .98rem; line-height: 1.55; color: var(--ink-2); }

.data-table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .98rem; }
.data-table th { text-align: left; padding: 10px 14px; background: var(--tint); font: 800 .8rem/1.3 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--teal-press); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table td:first-child { font-weight: 600; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }

#btt {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  color: #FFFFFF;
  font: 800 1.2rem/1 var(--display);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s var(--ease);
  z-index: 98;
}
#btt.visible { opacity: 1; pointer-events: auto; }
#btt:hover { transform: translateY(-3px); }

.site-foot { padding-top: 56px; }

@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 720px); gap: 0; padding-top: 32px; }
  .sidebar { position: static; max-height: none; overflow: visible; margin-bottom: 28px; }
  .toc-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: #FFFFFF;
    color: var(--ink);
    font: 800 .95rem/1 var(--display);
    cursor: pointer;
  }
  .toc-toggle::after { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -4px; transition: transform .2s; }
  .sidebar.open .toc-toggle::after { transform: rotate(-135deg); margin-top: 4px; }
  .sidebar .toc-label { display: none; }
  .sidebar .toc { display: none; margin-top: 10px; }
  .sidebar.open .toc { display: grid; }
}

@media (max-width: 560px) {
  .layout { padding-left: 20px; padding-right: 20px; }
  .rights-grid { grid-template-columns: 1fr; }
  .data-table { display: block; overflow-x: auto; }
}
