/* The portal pages (datasets, records, places, search, documentation, download, SQL, policies) in the entity pages' look
   (20/10/2026): the same tokens (site.css, ds.css), the entity pages' type scale (34 px title, 17 px lead, 19 px sections,
   15 px body), their row of labelled numbers and their timeline strip. Only on pages built by build.py's page() (body.pt). */
body.pt main p.t, body.pt main .doc { font-size: 15px; line-height: 1.6; }
body.pt main .lede, body.pt .pt-lead { font-size: 17px; line-height: 1.5; color: var(--ink); max-width: 64ch; margin-top: 10px; text-wrap: pretty; }
body.pt main h1 { margin-top: 6px; }
body.pt main h2 { margin: 44px 0 12px !important; }
body.pt .pt-kind { font-size: 13px; color: var(--ink2); margin-top: 18px; }
body.pt .pt-head .srch { max-width: 680px; margin-top: 22px; }
body.pt .pt-head .srch input, body.pt .pt-head .srch button { height: 44px; font-size: 15px; }

/* labelled numbers: the entity pages' .facts */
.pt-facts { display: flex; flex-wrap: wrap; margin-top: 26px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pt-facts > div { padding: 10px 22px 10px 0; margin-right: 22px; border-right: 1px solid var(--rule2); }
.pt-facts > div:last-child { border-right: 0; margin-right: 0; }
.pt-facts b { display: block; font-size: 21px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pt-facts span { font-size: 12.5px; color: var(--ink2); }

/* a bar per year: the entity pages' timeline strip */
.pt-chart { margin: 30px 0 0; padding: 12px 14px 10px; background: var(--bg2); border-radius: var(--r-l); }
.pt-chart figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.pt-chart figcaption b { font-weight: 650; } .pt-chart figcaption span { color: var(--ink2); }
.pt-bars { display: flex; align-items: flex-end; gap: 2px; height: 72px; margin-top: 10px; }
.pt-bars span { flex: 1; background: var(--accent); opacity: .82; border-radius: 1px 1px 0 0; min-height: 2px; }
.pt-bars span:hover { opacity: 1; background: var(--link-h); }
.pt-ax { position: relative; height: 15px; font-size: 11px; color: var(--ink3); margin-top: 4px; }
.pt-ax span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.pt-ax span::before { content: ''; position: absolute; left: 50%; top: -4px; height: 3px; border-left: 1px solid var(--axis); }
.pt-dec { margin-top: 8px; font-size: 12.5px; } .pt-dec summary { cursor: pointer; color: var(--link); width: max-content; }
.pt-mini { width: 100%; max-width: 520px; border-collapse: collapse; margin-top: 6px; font-size: 13px; }
.pt-mini td { padding: 4px 10px 4px 0; border-bottom: 1px solid var(--rule2); background: transparent !important; }
.pt-mini td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 90px; }
.pt-bc { width: 55%; } .pt-bc i { display: block; height: 8px; background: var(--accent); opacity: .7; border-radius: 0 2px 2px 0; }
.pt-cap { font-size: 12.5px; color: var(--ink2); margin-top: 8px; max-width: 72ch; }

/* dataset and file cards: name, one line, rows and size */
.pt-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pt-card { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px 13px; border: 1px solid var(--rule); border-radius: var(--r-l); color: var(--ink); background: var(--bg); min-width: 0; }
.pt-card:hover { text-decoration: none; border-color: var(--accent-line); background: var(--accent-wash); color: var(--ink); }
.pt-card .k { font: 11.5px var(--mono); color: var(--ink3); overflow-wrap: anywhere; }
.pt-card .t { font-size: 16px; font-weight: 650; color: var(--link); line-height: 1.3; } .pt-card:hover .t { color: var(--link-h); }
.pt-card .l { font-size: 13.5px; color: var(--ink2); line-height: 1.45; flex: 1; }
.pt-card .m { font-size: 12.5px; color: var(--ink2); margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--rule2); }
.pt-card .m b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.pt-ways { font-size: 15px; margin: 22px 0 0; max-width: 76ch; }

/* a count with a bar beside it, in a table cell */
td .pt-hb { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
td .pt-hb i { display: block; height: 8px; background: var(--accent); opacity: .7; border-radius: 0 2px 2px 0; }
td .pt-hb .bw { width: 120px; display: flex; justify-content: flex-start; }

/* the page that is not there */
.pt-404 { max-width: 680px; padding: 30px 0 20px; }
.pt-404 ul { list-style: none; padding: 0; margin: 18px 0 0; columns: 2; } .pt-404 li { padding: 5px 0; font-size: 15px; }

/* documentation: a readable column */
body.pt .doc { max-width: 72ch; }
body.pt .doc h2 { font-size: 19px !important; margin-top: 34px !important; }
body.pt .doc li { margin: 4px 0; }
body.pt .toc { font-size: 13.5px; }

/* tables: a little more air, and never wider than the phone */
body.pt main table { font-size: 14px; }
body.pt main .tw { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 860px) { .pt-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  body.pt main h1 { font-size: 28px !important; } body.pt main .lede, body.pt .pt-lead { font-size: 16px; }
  .pt-facts { display: grid; grid-template-columns: 1fr 1fr; } .pt-facts > div { padding: 8px 10px 8px 0; margin-right: 0; border-right: 0; } .pt-facts b { font-size: 18px; }
  .pt-cards { grid-template-columns: 1fr; gap: 10px; } .pt-bars { gap: 1px; height: 60px; }
  .pt-404 ul { columns: 1; } td .pt-hb .bw { width: 56px; }
  body.pt main h2 { margin-top: 36px !important; }
}

/* counts never break inside a number */
body.pt main td.n, body.pt main th.n { white-space: nowrap; }
body.pt .doc .pt-lic0 { font-weight: 600; }
body.pt .doc td, body.pt .doc th, body.pt .dd td, body.pt .dd th { overflow-wrap: normal; word-break: normal; }
body.pt .doc td:has(> code), body.pt .doc td code { overflow-wrap: anywhere; }

/* the record page's link to the entity's own page, and the search page's "about" line */
.pt-seepage { margin: 14px 0 0; padding: 11px 14px; border: 1px solid var(--accent-line); background: var(--accent-wash); border-radius: var(--r-l); font-size: 15px; font-weight: 600; max-width: 760px; }
.pt-about { margin: 22px 0 0; padding: 10px 14px; background: var(--bg2); border-radius: var(--r-l); font-size: 14px; max-width: 760px; }
.pt-about a + a { margin-left: 8px; font-weight: 400; }
#seepage:empty { display: none; }
.pt-tail summary { cursor: pointer; color: var(--link); } .pt-tail ul { list-style: none; padding: 4px 0 0 14px; margin: 0; columns: 2; font-size: 13.5px; } .pt-tail li { padding: 2px 0; }
@media (max-width: 600px) { .pt-tail ul { columns: 1; } }

/* the place page: filters folded under the connections (Daniel 20/10: first screen = name, sentence, numbers, connections) */
.pl-fd { margin: 34px 0 0; border: 1px solid var(--rule); border-radius: var(--r-l); padding: 0 14px; background: var(--bg); }
.pl-fd > summary { cursor: pointer; padding: 11px 0; font-weight: 600; font-size: 15px; } .pl-fd > summary .mut { font-weight: 400; font-size: 13px; margin-left: 6px; }
.pl-fd[open] { padding-bottom: 10px; } .pl-fd .pl-f { border: 0; margin: 0; }
.cr-t a { overflow-wrap: anywhere; }
