/* Content pages and the shared chrome. The grid's palette (grid.css :root)
   carries over; the one loud thing on a page is a site's status colour. */
:root { --surface: #12161b; --rule: #222831; --link: #8cc8ff; --text-2: #b9c0ca; }

/* Header: the same on every page. */
.site-header { max-width: 1040px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center;
               justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 650; font-size: 15px; letter-spacing: -0.005em; }
.site-header nav { display: flex; gap: 18px; font-size: 14px; }
.site-header nav a { color: var(--text-2); text-decoration: none; }
.site-header nav a:hover, .brand:hover { color: var(--fg); }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }

/* Reading pages: one left-aligned column, 16px body. */
.doc { max-width: 720px; margin: 0 auto; padding: 24px 16px 8px; font-size: 16px; line-height: 1.6; }
.doc h1 { font-size: 28px; line-height: 1.2; letter-spacing: -0.015em; font-weight: 650; margin: 4px 0 10px; text-wrap: balance; }
.doc h2 { font-size: 19px; line-height: 1.3; font-weight: 620; margin: 36px 0 10px; }
.doc h3 { font-size: 16px; font-weight: 620; margin: 22px 0 4px; }
.doc p, .doc li { color: var(--text-2); }
.doc p { margin: 0 0 14px; }
.doc a { color: var(--link); text-underline-offset: 2px; }
.doc code { font-size: 14px; background: var(--surface); padding: 1px 5px; border-radius: 4px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); }
.meta { color: var(--muted); font-size: 14px; }
.answer { font-size: 18px; line-height: 1.55; color: var(--fg); margin: 18px 0 26px; max-width: 64ch; }

/* Site page head: the site's block, as on the map, beside its name. */
.site-head { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: center; }
.site-head h1 { margin: 0 0 4px; }
.status-block { width: 56px; height: 56px; border-radius: 6px; background: var(--unknown); }
.status-line { margin: 0; color: var(--muted); font-size: 14px; }
.status-label { color: var(--fg); font-weight: 600; }
[data-colour="ok"] { --status: var(--ok); } [data-colour="warn"] { --status: var(--warn); }
[data-colour="challenge"] { --status: var(--challenge); } [data-colour="blocked"] { --status: var(--blocked); }
[data-colour="unknown"] { --status: var(--unknown); }
.status-block, .dot { background: var(--status, var(--unknown)); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 8px; vertical-align: 1px; flex: none; }

/* Tables: quiet rules, aligned numbers. */
.facts { border-collapse: collapse; width: 100%; margin: 6px 0 12px; font-size: 15px; font-variant-numeric: tabular-nums; }
.facts th, .facts td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.facts thead th { color: var(--muted); font-weight: 500; font-size: 13px; }
.facts tbody th { font-weight: 500; color: var(--fg); }
.facts td { color: var(--text-2); }
.facts td.value { color: var(--fg); white-space: nowrap; }
.facts tbody th { width: 34%; }

/* Lists of sites. */
.sites { list-style: none; padding: 0; margin: 8px 0; columns: 3 200px; column-gap: 24px; }
.sites li { break-inside: avoid; padding: 3px 0; }
.sites a { display: inline-flex; align-items: center; color: var(--text-2); text-decoration: none; }
.sites a:hover { color: var(--fg); }
.categories { padding-left: 18px; margin: 4px 0 8px; }
.key li { margin-bottom: 6px; }
.pager { display: flex; gap: 16px; margin: 20px 0; }

.site-footer { max-width: 1040px; margin: 48px auto 0; padding: 18px 16px 28px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
.site-footer a { color: var(--muted); }

/* Phones: tables become stacked rows with their column names. */
@media (max-width: 560px) {
  .doc { padding-top: 16px; }
  .doc h1 { font-size: 23px; }
  .site-head { grid-template-columns: 40px 1fr; gap: 12px; }
  .status-block { width: 40px; height: 40px; }
  .answer { font-size: 17px; }
  .facts thead { display: none; }
  .facts tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--rule); }
  .facts th, .facts td { display: block; border: 0; padding: 2px 0; }
  .facts tbody th { width: auto; }
  .facts td::before { content: attr(data-label) ": "; color: var(--muted); }
  .site-header nav { gap: 14px; }
}

/* Homepage text around the grid. */
.page .masthead { padding-top: 18px; }
.page .masthead p { max-width: 72ch; }
.page a:not(.block) { color: var(--link); text-underline-offset: 2px; }
