/* Document-style pages (privacy notice, terms of use, all reports): a wide top
   bar with the menu button, then a readable column. Built on app.css tokens. */
body.page { height: auto; min-height: 100%; padding-inline: 16px; padding-block: 0 40px; }
.page-top { position: relative; display: flex; align-items: center; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); max-width: 960px; margin-inline: auto; }
.page-top .brand { text-decoration: none; color: var(--ink); }
.page-top .spacer { flex: 1; }
.page-top .back { color: var(--ink-2); font-size: 14px; }
.page-main { max-width: 960px; margin-inline: auto; }
/* Both languages are in the page; the menu's choice (html lang) shows one. */
html:lang(en) [data-l="sr"], html:not(:lang(en)) [data-l="en"] { display: none; }
.doc { max-width: 72ch; }
.doc h1 { font-family: var(--display); font-size: 30px; margin: 22px 0 4px; }
.doc .version { color: var(--ink-2); font-size: 13.5px; margin: 0 0 18px; }
.doc h2 { font-family: var(--display); font-size: 21px; margin: 26px 0 6px; }
.doc p, .doc li { line-height: 1.6; }
.doc ul { padding-left: 20px; }
.doc a { color: var(--ink); }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 8px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 700; }
.doc .note { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
/* All reports (/cases) */
.page-title { font-family: var(--display); font-size: 22px; margin: 0; }
.cases-tabs { padding: 14px 0 8px; }
.cases-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.cases-filters input, .cases-filters select { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.cases-filters input { flex: 1 1 220px; min-width: 0; }
.cases-filters select { flex: 0 1 auto; max-width: 100%; }
.cases-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); column-gap: 18px; }
.cases-list .row { text-decoration: none; color: inherit; }
.cases-list .row.static { cursor: default; }
.cases-list .row.static:hover { background: transparent; }
@media (max-width: 420px) { .cases-list { grid-template-columns: 1fr; } }
/* Phones: table rows stack (data, then purpose and basis) instead of squeezing three columns. */
@media (max-width: 600px) {
  .doc table, .doc tbody, .doc tr, .doc td, .doc th[scope="row"] { display: block; width: 100%; }
  /* The header row: a <thead>, or the first row of a table without one. */
  .doc thead, .doc table:not(:has(thead)) tr:first-child { display: none; }
  /* Who can do what: each cell names its role. */
  .doc table.how-matrix { min-width: 0; }
  .doc .how-matrix td { display: flex; gap: 6px; }
  .doc .how-matrix td::before { content: attr(data-role); flex: 0 0 140px; color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
  .doc tr { border-bottom: 1px solid var(--line); padding-block: 6px; }
  .doc td { border: 0; padding: 2px 0; }
  .doc td + td { color: var(--ink-2); font-size: 13.5px; }
}
/* Phones: the logo links to the map, so the "← Map" link gives way to the title. */
@media (max-width: 480px) {
  .page-top .back { display: none; }
  .page-title { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
/* My trail (/trail) */
.trail-private { margin: 14px 0 8px; }
.trail-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.trail-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.trail-stat b { font-family: var(--display); font-size: 30px; line-height: 1; }
.trail-stat span { color: var(--ink-2); font-size: 13px; }
.trail-h { font-family: var(--display); font-size: 21px; margin: 22px 0 6px; }
.trail-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
a.trail-row:hover { background: var(--surface-2); }
.trail-when { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.trail-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trail-what .pill { margin-left: 6px; }
.trail-note { font-size: 13.5px; font-style: italic; }
/* /takedown */
.takedown form { display: grid; gap: 12px; max-width: 560px; }
.takedown fieldset { border: 0; padding: 0; margin: 0; }
.takedown legend { font-weight: 600; margin-bottom: 6px; }
.takedown textarea { font: inherit; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface); color: var(--ink); }
/* /how-it-works */
.how .lead { font-size: 17px; }
/* The path: one step per state, who moves it there beside it. */
.how-path { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; counter-reset: step; }
.how-path li { display: grid; grid-template-columns: 190px 1fr; gap: 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); position: relative; }
.how-path li + li::before { content: "↓"; position: absolute; top: -17px; left: 22px; color: var(--ink-2); font-size: 14px; }
.how-path .pill { justify-self: start; }
.doc table.how-states td:first-child { white-space: nowrap; }
.how-lock { --pc: var(--s-declined); }
/* Roles, then who can do what. */
.how-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin: 10px 0; }
.how-role { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 12px 14px; }
.how-role h3 { margin: 0 0 4px; font-family: var(--display); font-size: 18px; }
.how-role p { margin: 0; font-size: 14px; line-height: 1.55; }
.how-matrix-wrap, [data-matrix] { overflow-x: auto; }
.doc table.how-matrix { font-size: 13.5px; min-width: 560px; }
.how-matrix thead th { font-size: 12.5px; color: var(--ink-2); }
.how-matrix th[scope="row"] { font-weight: 600; }
.how-matrix td.yes { color: var(--s-fixed); font-weight: 700; }
.how-matrix td.no { color: var(--ink-2); }
.how-matrix td.cond { font-size: 12.5px; }
@media (max-width: 560px) { .how-path li { grid-template-columns: 1fr; gap: 6px; } }
.how-by { margin-top: 28px; }
