/* Layout: one narrow centered column of plain links, Berkshire-style; each section is a sub-page shown via #hash */
:root {
  --bg: #ffffff;
  --fg: #000000;
  --link: #0000ee;
  --visited: #551a8b;
  --rule: #808080;
  --muted: #333333;
  --serif: "Times New Roman", Times, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --fg: #e6e6e6; --link: #8ab4f8; --visited: #c58af9; --rule: #6a6a6a; --muted: #bdbdbd;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --fg: #e6e6e6; --link: #8ab4f8; --visited: #c58af9; --rule: #6a6a6a; --muted: #bdbdbd;
  color-scheme: dark;
}

html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.35;
  padding-block: 24px 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: var(--link); }
a:visited { color: var(--visited); }
a:focus-visible { outline: 2px dotted var(--fg); outline-offset: 2px; }

.page { max-width: 640px; margin: 0 auto; }

/* Sub-pages: home shows by default; others show when targeted */
.view { display: none; }
#home { display: block; }
.view:target { display: block; }
.view:target ~ #home { display: none; }

h1.masthead {
  text-align: center;
  font-size: 2.6rem;
  font-weight: bold;
  letter-spacing: 0.02em;
  margin: 8px 0 4px;
}
.address { text-align: center; margin: 0; font-size: 1rem; }
.address + .address { margin-bottom: 4px; }
.stamp { text-align: center; font-size: 0.85rem; margin: 6px 0 22px; }

.links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  row-gap: 0;
  margin: 0 auto;
  max-width: 560px;
}
.links ul { margin: 0; padding-left: 22px; }
.links li { margin: 0 0 12px; font-size: 1.05rem; }
@media (max-width: 520px) {
  .links { grid-template-columns: 1fr; }
  h1.masthead { font-size: 2rem; }
}

hr { border: 0; border-top: 1px solid var(--rule); margin: 22px 0; }

.fineprint { font-size: 0.85rem; text-align: center; color: var(--muted); }
.fineprint p { margin: 0 0 10px; }

/* Sub-page styling */
h2 { text-align: center; font-size: 1.6rem; margin: 6px 0 2px; }
h3 { font-size: 1.1rem; margin: 22px 0 6px; text-decoration: underline; }
.sub { text-align: center; margin: 0 0 18px; font-size: 0.95rem; }
.back { text-align: center; margin: 24px 0 0; }
.view p { margin: 0 0 12px; }
.view ul { padding-left: 22px; margin: 0 0 12px; }
.view li { margin-bottom: 6px; }

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; margin: 6px auto 12px; font-size: 0.95rem; }
th, td { border: 1px solid var(--rule); padding: 4px 10px; text-align: left; vertical-align: top; }
th { font-weight: bold; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.role { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: bold; }
.role span:last-child { font-weight: normal; }

/* Résumé PDF viewer: wider than the text column on large screens */
.pdfview {
  display: block;
  width: min(900px, calc(100vw - 32px));
  height: 85vh;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid var(--rule);
  background: var(--bg);
}
.pdffallback { text-align: center; padding: 24px 12px; }
