/* Konsulatsmatrikel v2 - shared styles (look since 2026-11-21: the germanlegacy.net landing page; header = /assets/chrome.css of the main site) for the search page (index.html) and the about page (about.html).
   Home: one centred wordmark + search box, like a search engine's front page. Results and about: a slim top bar
   with the small wordmark, then the ledger tables and consulate cards of v1. */
:root {
  /* 2026-11-21: the germanlegacy.net landing page look (same colours and fonts as the main site's assets/site.css) */
  --paper: #F5F0E6; --sheet: #FBF8F2; --ink: #302B25; --muted: #5E554A; --rule: #D8CBB8; --rule-soft: #E4DACA;
  --margin: #304A3B; --online: #2E6040; --request: #7E520F; --lost: #625C55;
  --online-bg: #E2EAD6; --request-bg: #F1E2C4; --lost-bg: #E8E2D6; --foot-text: #E9E1D3;
  --f-display: 'UnifrakturMaguntia', 'Old English Text MT', serif;   /* the wordmark only (Fraktur, user 2026-11-16; kept 2026-11-21) */
  --f-sc: 'Newsreader', Georgia, 'Times New Roman', serif;
  --f-head: 'IM Fell English', Georgia, 'Times New Roman', serif;   /* headings (user 2026-11-21) */
  --f-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Courier Prime', 'Courier New', monospace;
}

* { box-sizing: border-box }
[hidden] { display: none !important }
html, body { margin: 0 }
body { background: var(--paper); color: var(--ink); font: 15px/1.55 var(--f-body); min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column }
a { color: inherit; text-decoration-color: var(--margin); text-underline-offset: 3px; text-decoration-thickness: 1px }
a:hover { color: var(--margin) }
:focus-visible { outline: 2px solid var(--margin); outline-offset: 2px }
h1, h2, h3 { font-family: var(--f-head); font-weight: 400; text-wrap: balance; margin: 0; line-height: 1.2 }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums }
.note { font-size: 13px; color: var(--muted) }
.wrap { width: 100%; max-width: 1144px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 24px; flex: 1; align-content: start }

/* wordmark + search box */
.top { display: flex; align-items: center; gap: 14px 22px; padding: 16px max(16px, calc((100% - 1112px) / 2)); border-bottom: 1px solid var(--rule);
  background: var(--sheet); flex-wrap: wrap }
.mark { font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1; text-decoration: none;
  color: var(--ink); letter-spacing: .01em; margin: 0 }
.mark:hover { color: var(--ink) }
form.search { display: flex; gap: 10px; flex: 1; max-width: 640px; min-width: 0 }
form.search input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--ink); background: var(--sheet);
  border: 1px solid #8C7F6E; border-radius: 2px; padding: 10px 16px; height: 46px }
form.search input:hover { border-color: var(--muted) }
form.search input:focus { outline: none; border-color: var(--margin); box-shadow: 0 0 0 3px color-mix(in srgb, var(--margin) 18%, transparent) }
form.search button { font: 700 15px var(--f-body); color: var(--sheet); background: var(--margin); border: 1px solid var(--margin);
  border-radius: 2px; padding: 0 22px; height: 46px; cursor: pointer; align-self: center }
form.search button:hover { background: #4F1A15; border-color: #4F1A15 }
@media (max-width: 640px) { body:not(.home) form.search { flex-basis: 100%; max-width: none } }

/* home: everything centred, a lot of air */
body.home .top { flex: 1; flex-direction: column; justify-content: center; border-bottom: 0; background: none;
  padding: 0 16px 12vh; gap: 30px }
body.home .mark { font-size: clamp(40px, 9vw, 80px) }
.top h1 { margin: 0; font: inherit; line-height: 1 }
body.home form.search { flex: none; width: 100%; max-width: 640px }
body.home form.search input, body.home form.search button { height: 50px }
/* home only: the subheader under the wordmark and the About link under the search bar (user 2026-11-16) */
.title { text-align: center }
.subhead { margin: 14px 0 0; font: italic 17px/1.4 var(--f-body); color: var(--muted); text-wrap: balance }
.about-link { font-size: 15px; color: var(--muted); margin-top: -12px }
body:not(.home) .subhead, body:not(.home) .about-link { display: none }

/* results */
.count { margin: 0 }
.conf-low { color: var(--muted) }
.tablewrap { overflow-x: auto }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 560px }
th { text-align: left; font: 400 15px var(--f-sc); letter-spacing: .04em; color: var(--muted);
  border-bottom: 1px solid var(--ink); padding: 6px 8px }
td { border-bottom: 1px solid var(--rule-soft); padding: 7px 8px; vertical-align: top }
td.sig { white-space: nowrap }
td .sub { color: var(--muted); font-size: 12.5px }
#hits { table-layout: fixed; min-width: 780px }
#hits td { overflow-wrap: anywhere }
#hits th:nth-child(1) { width: 20% } #hits th:nth-child(2) { width: 12% } #hits th:nth-child(3) { width: 15% }
#hits th:nth-child(4) { width: 23% } #hits th:nth-child(5) { width: 12% } #hits th:nth-child(6) { width: 18% }
td.orig { overflow-wrap: normal }
td.orig .thumb { display: block }
td.orig .thumb img { width: 72px; min-height: 40px; display: block; border: 1px solid var(--rule); background: var(--paper) }

/* about page */
.about { display: grid; gap: 12px; max-width: 72ch }
.about h1 { font-size: 26px }
.about p { margin: 0 }
.about h2 { font-size: 21px; margin-top: 6px }
.about ul { margin: 0; padding-left: 20px; display: grid; gap: 6px }
.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chip { font-size: 12.5px; font-weight: 500; padding: 3px 10px; border-radius: 999px; border: 1px solid transparent;
  display: inline-flex; gap: 6px; align-items: center; white-space: nowrap }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor }
.chip.online { color: var(--online); background: var(--online-bg) }
.chip.request { color: var(--request); background: var(--request-bg) }
.chip.lost { color: var(--lost); background: var(--lost-bg) }
.chip.fs { color: var(--ink); background: var(--rule-soft) }
ul.fslist { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px }
ul.fslist .sub { color: var(--muted); font-size: 12.5px }
.consulates { display: grid; gap: 18px }
.consulates h2.country { font-size: 26px; margin: 22px 0 0 }
.country-head { scroll-margin-top: 14px; display: grid; gap: 4px; margin-top: 22px }   /* about#venezuela: heading + country search bar + counts */
.country-head h2.country { margin: 0 }
.country-head .counts { margin: 2px 0 0; font-size: 15px; color: var(--muted) }
article.cons { scroll-margin-top: 14px }   /* about#santos lands with a little air above the card */
form.search.cons-search { max-width: 520px; margin: 6px 0 2px } form.search.cons-search input, form.search.cons-search button { height: 40px }
.cons .counts { margin: 4px 0 10px; font-size: 15px; color: var(--muted) } .cons .counts b { color: var(--ink); font-weight: 600 }
article.cons { background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) 230px }
.cons-main { padding: 16px 18px 18px; display: grid; gap: 14px; min-width: 0; border-left: 3px double var(--margin) }
.cons-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; justify-content: space-between }
.cons-head h3 { font-size: 21px }
.cons-head .de { color: var(--muted); font-size: 13px }
.preview { border-left: 1px solid var(--rule); background: var(--paper); display: grid; place-items: center; padding: 10px; min-width: 0 }
.preview button { border: 0; padding: 0; background: none; cursor: zoom-in; display: grid; gap: 6px; color: var(--muted); font-size: 12px }
.preview img { width: 100%; max-height: 300px; object-fit: contain; display: block; border: 1px solid var(--rule) }
.preview .none { color: var(--muted); font-size: 12.5px; text-align: center; padding: 20px 6px }
@media (max-width: 720px) { article.cons { grid-template-columns: 1fr } .preview { border-left: 0; border-top: 1px solid var(--rule) } }
.strip { display: grid; gap: 4px }
.strip-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 12px; color: var(--muted) }
.track { position: relative; height: 12px; background: repeating-linear-gradient(90deg, var(--rule-soft) 0 1px, transparent 1px 12.5%); border-bottom: 1px solid var(--rule) }
/* timeline colours = the two labels (2026-11-23): green = scans online, orange dashed = on request; the row label says the record type */
.bar { position: absolute; top: 2px; height: 8px; border-radius: 1px; background: var(--online); opacity: .78 }
.bar.offline { background: var(--request-bg); border: 1px dashed var(--request); opacity: 1 }
.axis { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; font-size: 11px; color: var(--muted) }
.axis div { display: flex; justify-content: space-between }
td.links { white-space: nowrap; text-align: right }
td.links a { margin-left: 10px }
details.more summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 8px }
.reqbox { font-size: 13.5px; background: #FAF1DF; border: 1px solid #E9D3A6; border-radius: 3px; padding: 10px 12px; margin-top: 4px }
.reqbox .chip { display: inline-flex; margin-bottom: 4px } .reqbox p { margin: 6px 0 0 }
.berlin { font-size: 13.5px; background: var(--paper); border: 1px solid var(--rule-soft); border-radius: 3px; padding: 10px 12px }

/* entry pages (rendered by tools/worker.js) */
/* wide screens: the original page in the right column from the top, everything else on the left (the last 1fr row
   takes up any height the image has beyond the left column, so the left items never spread apart) */
.entry { display: grid; gap: 22px 36px; grid-template-columns: minmax(0, 3fr) minmax(240px, 2fr);
  grid-template-rows: repeat(4, auto) 1fr; align-items: start }
.entry > * { grid-column: 1; min-width: 0 }
.entry > .original { grid-column: 2; grid-row: 1 / -1 }
.entry:not(:has(> .original)) { grid-template-columns: minmax(0, 1fr) }
/* phones: name, image, facts, then the archive links (so the transcription starts on the first screen) */
@media (max-width: 760px) { .entry { grid-template-columns: minmax(0, 1fr); grid-template-rows: none }
  .entry > .original { display: contents } .original .links { order: 1 } .entry > .proves, .entry > p { order: 2 } }
.entry h1 { font-size: clamp(26px, 4.5vw, 36px) }
.entry .kind { color: var(--muted); margin: 6px 0 0 }
.facts { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); border-top: 1px solid var(--ink); margin: 0;
  background: var(--sheet) }
.facts dt, .facts dd { margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--rule-soft) }
.facts dt { color: var(--muted); font-family: var(--f-sc); font-size: 15px; letter-spacing: .04em; padding-top: 9px }
.facts dd { overflow-wrap: anywhere }
.facts dd.deleted { color: var(--margin) }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr } .facts dt { border-bottom: 0; padding-bottom: 0 } }
.original { display: grid; gap: 12px }
.original .scan { position: relative; display: block; border: 1px solid var(--rule); background: var(--paper); min-height: 120px }
.original .scan img { display: block; width: 100%; height: auto }
.original .scan .full { position: absolute; inset: 0; height: 100%; object-fit: contain }
.original .links { display: grid; gap: 6px; font-size: 14px; min-width: 0; align-content: start }
.original .links .mono { overflow-wrap: anywhere }
.proves { background: var(--sheet); border: 1px solid var(--rule); border-left: 3px double var(--margin); border-radius: 4px;
  padding: 16px 18px; display: grid; gap: 10px }
.proves h2 { font-size: 20px }
.proves p + h2 { margin-top: 10px }
.proves p { margin: 0; max-width: 72ch }
.proves .flag { background: var(--request-bg); border-radius: 3px; padding: 8px 10px }
table.hublist td a { text-decoration: none } table.hublist td a:hover { text-decoration: underline }
#hits td a.name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; color: inherit }
#hits tr.hit { cursor: pointer }   /* the whole row opens the entry (index.html openRow) */
#hits tr.hit:hover td { background: var(--sheet) } #hits tr.hit:hover a.name { color: var(--margin) }

/* lightbox */
dialog { border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); padding: 10px; max-width: min(96vw, 1000px) }
dialog::backdrop { background: rgb(10 15 20 / .7) }
dialog img { max-height: 84vh; max-width: 100%; width: auto; display: block; margin: 0 auto }
dialog .cap { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 8px 2px 0; flex-wrap: wrap }
dialog button { font: inherit; background: none; border: 1px solid var(--rule); color: var(--ink); padding: 2px 10px; cursor: pointer }

/* bottom links: the main site's dark footer */
footer.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding: 26px max(16px, calc((100% - 1112px) / 2)); background: var(--ink); color: var(--foot-text); font-size: 14px }
footer.foot a { color: var(--foot-text); margin: 0 }
footer.foot a:hover { color: #FFFFFF; text-decoration: underline }
footer.foot .foot-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-sc); font-size: 20px; letter-spacing: .04em }
footer.foot .foot-brand svg { width: 34px; height: 28px; color: #D8C3A0; stroke-width: 1.8 }
footer.foot .foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px }

/* the main site's header (ship + German Legacy + menu), same as germanlegacy.net/assets/site.css */
.gl-head { background: var(--paper) }
.gl-row { max-width: 1160px; margin: 0 auto; padding: 22px 24px 18px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 14px 36px }
.gl-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none }
.gl-brand:hover { color: var(--ink) }
.gl-brand svg { flex: none; width: 44px; height: 37px; color: var(--margin); stroke-width: 1.7 }
.gl-brand span { font-family: var(--f-sc); font-size: 28px; line-height: 1; letter-spacing: .04em }
.gl-nav { display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 16px }
.gl-nav a { color: var(--ink); text-decoration: none }
.gl-nav a:hover { color: var(--margin) }
.gl-nav a[aria-current="page"] { color: var(--margin); text-decoration: underline; text-underline-offset: 6px }
.gl-rule { max-width: 1160px; margin: 0 auto; padding: 0 24px }
.gl-rule div { border-top: 4px double var(--ink) }
@media (max-width: 560px) { .gl-row { padding: 16px 16px 14px } .gl-brand span { font-size: 24px }
  .gl-brand svg { width: 38px; height: 32px } .gl-nav { gap: 4px 18px; font-size: 15px } .gl-rule { padding: 0 16px } }
@media (prefers-reduced-motion: no-preference) { article.cons { animation: rise .25s ease-out both } @keyframes rise { from { transform: translateY(4px) } } }
