/* The photographic chapter's visual language, shared by the whole archive. */
:root {
  --background: #f3f0e8;
  --paper: #f3f0e8;
  --foreground: #282b26;
  --ink: #282b26;
  --muted: #68695e;
  --muted-panel: #e9e6dc;
  --border: #cfcec2;
  --line: #cfcec2;
  --accent: #a64b2d;
  --rust: #a64b2d;
  --archive: #52644e;
  --amber: #a64b2d;
  --dark: #262d28;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow: none;
  color-scheme: light;
  font-synthesis: none;
}
html { background: var(--paper); color: var(--ink); font-family: var(--sans); scroll-padding-top: 30px; }
body { background: var(--paper); color: var(--ink); }
main, .document-main { width: min(100%, 1800px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
p { line-height: 1.75; }
a { color: inherit; text-underline-offset: 4px; }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible { outline: 2px solid var(--rust); outline-offset: 5px; }
.eyebrow { color: var(--rust); font: 600 10px/1.7 var(--sans); letter-spacing: 2px; margin-bottom: 26px; }
.kind, .years, .place, .fact-strip p, footer { font-family: var(--sans); }
.kind { font-size: 10px; font-weight: 600; letter-spacing: 1.6px; }
.lede, .dark-lede { color: var(--muted); font: 400 clamp(16px, 1.5vw, 20px)/1.75 var(--sans); max-width: 580px; margin-top: 30px; }
.grain-overlay::before, .hero-copy::after { display: none; }

/* Type and photographs have separate space, as in Life in America. */
.hero, .family-hero, .lineage-hero, .property-hero, .estate-hero, .voyage-hero,
.research-hero, .letters-hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 5vw;
  padding: clamp(48px, 6vw, 90px) 5vw clamp(48px, 6vw, 80px);
  background: transparent;
}
.hero-copy, .family-hero-copy, .research-hero-copy, .property-hero-copy, .estate-hero-copy, .voyage-hero-copy {
  min-height: 0;
  height: auto;
  display: block;
  overflow: visible;
  padding: 0;
  background: transparent !important;
  color: var(--ink);
}
.hero h1, .family-hero h1, .lineage-hero h1, .property-hero h1, .estate-hero h1,
.research-hero h1, .letters-hero h1, .voyage-hero h1, .train-hero h1 {
  font: 400 clamp(52px, 5.8vw, 98px)/1.02 var(--serif);
  letter-spacing: -.055em;
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
  hyphens: manual;
}
.hero h1 { font-size: clamp(80px, 9vw, 150px); line-height: .98; max-width: 8ch; }
.hero h1 em { color: var(--rust); font-style: italic; }
.family-hero h1 { font-size: clamp(58px, 6.4vw, 112px); }
.lineage-hero h1 { font-size: clamp(48px, 4.8vw, 80px); }
.hero-images { min-height: 0; height: auto; gap: 16px; align-items: start; }
.hero-images figure { background: transparent; overflow: visible; }
.hero-images img { height: clamp(350px, 40vw, 610px); object-fit: contain; background: #dedace; }
.hero-images figcaption, .family-hero-image figcaption, .property-hero-image figcaption {
  position: static; padding: 14px 0 0; margin: 0; background: transparent; color: var(--muted);
  font: 400 10px/1.6 var(--sans); backdrop-filter: none;
}
.family-hero-image, .property-hero-image { height: auto; min-height: 0; overflow: visible; background: transparent; }
.family-hero-image img { height: clamp(340px, 43vw, 650px); object-fit: contain; background: #dedace; }
.property-hero-image a { height: auto; }
.property-hero-image img { height: clamp(340px, 43vw, 650px); object-fit: cover; }
.estate-hero-evidence { min-height: 0; height: auto; gap: 28px; grid-template-rows: none; background: transparent; }
.estate-hero-evidence figure { overflow: visible; border: 0; background: transparent; }
.estate-hero-evidence a { height: auto; background: #dedace; }
.estate-hero-evidence img { height: auto; max-height: 270px; object-fit: contain; }
.estate-hero-evidence figcaption { position: static; background: transparent; backdrop-filter: none; color: var(--muted); font: 400 10px/1.6 var(--sans); padding: 12px 0 0; }

/* Index pages keep a visual introduction without putting prose over a scan. */
.research-hero::after, .letters-hero::after {
  content: ''; display: block; min-height: 430px; aspect-ratio: 1.16;
  background: url('/record/jakub-death') center / cover;
  filter: sepia(.13);
}
.document-hero::after { background-image: url('/record/ship-manifest'); }
.letters-hero::after { background-image: url('/record/family-tree-note-web'); }
.maps-hero::after { background-image: url('/record/brest-church-map-1939'); }
.churches-hero::after { background-image: url('/record/brest-holy-cross-old'); }
.archive-requests-hero::after { background-image: url('/record/dobrynka-piszczac-map-1933'); }

.voyages-page { --ocean: #52644e; --ocean-deep: #262d28; --sea-glass: #e6e8dd; --voyage-paper: #f3f0e8; }
.voyage-hero-copy { grid-column: 1; grid-row: 1; }
.voyage-hero-image { grid-column: 2; grid-row: 1; min-height: 0; height: clamp(420px, 48vw, 680px); background: #dedace; }
.voyage-hero-image::after { display: none; }
.voyage-hero-copy .eyebrow { color: var(--rust); }
.voyage-hero-copy .lede { color: var(--muted); font: 400 clamp(16px, 1.5vw, 20px)/1.75 var(--sans); }
.hero-time-pair { border-color: var(--line); margin-top: 32px; }
.hero-time-pair div + div { border-color: var(--line); }
.hero-time-pair span, .hero-time-pair small { color: var(--muted); font-size: 9px; font-weight: 500; }
.hero-time-pair strong { color: var(--rust); font-size: 32px; font-weight: 400; }
.train-hero { min-height: 0; padding: 76px 5vw; gap: 8vw; background: transparent; color: var(--ink); grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
.train-hero h1 { font-size: clamp(48px, 5.8vw, 90px); }
.train-hero-copy p { color: var(--muted); font: 400 16px/1.75 var(--sans); }
.train-hero-copy .train-verdict { border-radius: 0; padding: 7px 9px; border-color: #b99a88; color: var(--rust); font-weight: 500; font-size: 10px; }

/* Long records and research use the same calm reading hierarchy. */
.document-title-block { padding: 70px 5vw 50px; }
.document-title-block h1 { max-width: 1100px; font: 400 clamp(46px, 6vw, 94px)/1.04 var(--serif); letter-spacing: -.045em; overflow-wrap: anywhere; }
.reports-main { padding: 65px 5vw 85px; }
.reports-heading h1 { font-weight: 400; line-height: 1.04; }
.markdown-page { max-width: 1000px; padding: 45px 5vw 90px; }
.markdown-page h2 { font-weight: 400; font-size: clamp(31px, 3.2vw, 48px); line-height: 1.13; letter-spacing: -.025em; padding-top: 32px; margin-top: 50px; }
.markdown-page h3 { font-weight: 400; line-height: 1.2; }
.markdown-page p, .markdown-page li { font-size: 14px; line-height: 1.9; }
.markdown-page code { font-size: .82em; background: #e9e6dc; border: none; }
.markdown-page li::before { width: 5px; height: 5px; border: 1px solid var(--rust); background: transparent; top: 27px; }
.markdown-page strong { color: var(--ink); font-weight: 600; }

/* The login belongs to the archive too. */
.login-body, .login-main { min-height: 100vh; background: var(--paper); }
.login-shell { min-height: calc(100vh - 100px); padding: 70px 8vw; grid-template-columns: minmax(0, 1fr) minmax(300px, 410px); gap: 8vw; overflow: visible; color: var(--ink); }
.login-backdrop { inset: auto; position: relative; grid-column: 1; grid-row: 2; min-height: 190px; z-index: 0; background: url('/record/anna-twins-page') center 45%/cover; opacity: .85; }
.login-backdrop::after { display: none; }
.login-copy { align-self: center; padding: 0; grid-column: 1; grid-row: 1; }
.login-copy h1 { font: 400 clamp(54px, 6.5vw, 98px)/1.02 var(--serif); letter-spacing: -.05em; }
.login-copy p:not(.eyebrow) { color: var(--muted); font: 400 16px/1.75 var(--sans); }
.login-panel { grid-column: 2; grid-row: 1/3; border: 1px solid var(--line); border-radius: 0; background: #e9e6dc; box-shadow: none; backdrop-filter: none; padding: 32px; }
.login-panel h2 { font-weight: 400; }
.field-label { font-size: 11px; font-weight: 600; }
.login-panel input[type='text'], .login-panel input[type='password'] { border-radius: 0; background: var(--paper); font-size: 14px; }
.login-panel button { border-radius: 0; background: var(--rust); font-weight: 500; font-size: 13px; }
.login-panel button:hover { background: var(--ink); }
.login-row { font-size: 11px; }
.login-row a { font-weight: 500; }

/* A photographic doorway to the chapter from the overview. */
.america-feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 7vw; align-items: center; padding: 75px 8vw; background: var(--dark); color: var(--paper); }
.america-feature img { width: 100%; display: block; aspect-ratio: 1.2; object-fit: cover; }
.america-feature .eyebrow { color: #d4a47c; }
.america-feature h2 { color: var(--paper); font: 400 clamp(42px, 4.8vw, 76px)/1.03 var(--serif); letter-spacing: -.035em; margin: 0 0 24px; }
.america-feature p:not(.eyebrow) { font-size: 14px; color: #bbbfb5; }
.america-feature a { color: var(--paper); font-size: 12px; }

@media (max-width: 900px) {
  .hero, .family-hero, .lineage-hero, .property-hero, .estate-hero, .voyage-hero, .research-hero, .letters-hero { gap: 5vw; padding: 50px 6vw; }
  .hero h1 { font-size: clamp(64px, 9vw, 92px); }
  .family-hero h1, .lineage-hero h1, .property-hero h1, .estate-hero h1, .voyage-hero h1, .research-hero h1, .letters-hero h1 { font-size: clamp(40px, 5.4vw, 62px); }
  .research-hero::after, .letters-hero::after { min-height: 330px; }
}
@media (max-width: 680px) {
  .hero, .family-hero, .lineage-hero, .property-hero, .estate-hero, .voyage-hero, .research-hero, .letters-hero { grid-template-columns: minmax(0, 1fr); padding: 40px 6vw; gap: 32px; }
  .hero-copy, .family-hero-copy, .research-hero-copy, .property-hero-copy, .estate-hero-copy, .voyage-hero-copy { min-height: 0; padding: 0; }
  .hero h1 { font-size: clamp(72px, 20vw, 108px); line-height: .98; }
  .family-hero h1, .lineage-hero h1, .property-hero h1, .estate-hero h1, .voyage-hero h1, .research-hero h1, .letters-hero h1,
  html[lang='pl'] :is(.property-hero, .estate-hero, .lineage-hero, .letters-hero, .research-hero, .train-hero) h1 { font-size: clamp(40px, 11vw, 62px); line-height: 1.04; letter-spacing: -.04em; }
  .eyebrow { margin-bottom: 20px; font-size: 9px; }
  .lede { margin-top: 24px; font-size: 15px; }
  .hero-images { gap: 12px; }
  .hero-images img { height: 320px; }
  .hero-images figcaption { font-size: 9px; }
  .family-hero-image img, .property-hero-image img { height: auto; max-height: 500px; }
  .research-hero::after, .letters-hero::after { min-height: 220px; max-height: 330px; }
  .voyage-hero-copy, .voyage-hero-image { grid-column: 1; grid-row: auto; }
  .voyage-hero-copy { order: -1; }
  .voyage-hero-image { height: 330px; }
  .train-hero { padding: 45px 6vw; grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .train-hero h1 { font-size: clamp(42px, 11vw, 64px); line-height: 1.04; }
  .train-hero-copy p { font-size: 14px; }
  .document-title-block { padding: 42px 6vw 30px; }
  .document-title-block h1 { font-size: clamp(38px, 10vw, 56px); line-height: 1.08; }
  .reports-main { padding: 42px 6vw 60px; }
  .reports-heading h1 { font-size: 44px; }
  .markdown-page { padding: 20px 6vw 60px; }
  .markdown-page h2 { font-size: 31px; }
  .login-shell { min-height: 0; padding: 40px 6vw 60px; grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .login-copy, .login-backdrop, .login-panel { grid-column: 1; grid-row: auto; }
  .login-copy { order: 0; }
  .login-panel { order: 1; }
  .login-backdrop { order: 2; min-height: 200px; }
  .login-copy h1 { font-size: 60px; }
  .login-panel { padding: 24px; }
  .america-feature { grid-template-columns: minmax(0, 1fr); padding: 55px 6vw; gap: 32px; }
  .america-feature h2 { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.archive-opening-links { display: flex; flex-wrap: wrap; gap: 18px 32px; margin-top: 34px; }
.archive-opening-links a { display: inline-flex; gap: 24px; align-items: center; padding-bottom: 9px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 11px; font-weight: 500; text-decoration: none; }
.archive-opening-links a:first-child { border-color: var(--ink); }
.archive-opening-links a:hover { color: var(--rust); border-color: var(--rust); }
