/* Borders and Property — shared styles
   Palette: iron-gall ink, document white, carmine boundary line, cobalt wash.
   Type: Besley, a Clarendon (the slab of Victorian official printing and maps) for titles and text;
         Work Sans, drawn after the early British grotesques, for navigation, labels and figures. */

:root{
  --header-h: 72px;

  --paper:        #f2f3ef;
  --sheet:        #ffffff;
  --ink:          #182238;
  --ink-2:        #22304d;
  --on-ink:       #eef0ea;
  --on-ink-soft:  #94a0b8;

  --text:         #1f2430;
  --text-soft:    #596273;
  --rule:         #c9cfd6;
  --rule-soft:    #e1e5e8;

  --frontier:     #b8172e;
  --cobalt:       #2a4d9b;

  --hatch-dark:   repeating-linear-gradient(135deg, var(--ink) 0 1.5px, transparent 1.5px 6px);
  --hatch-light:  repeating-linear-gradient(135deg, rgba(238,240,234,.75) 0 1.5px, transparent 1.5px 6px);

  --serif: "Besley", "Clarendon", "Rockwell", Georgia, serif;
  --sans:  "Work Sans", "Helvetica Neue", Arial, sans-serif;

  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
}

*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; scroll-padding-top:var(--header-h); }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }
body{
  margin:0; background:var(--paper); color:var(--text);
  font-family:var(--serif); font-size:17px; line-height:1.65;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
a{ color:var(--cobalt); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; }
a:hover{ color:var(--frontier); }
a:focus-visible, button:focus-visible{ outline:2px solid var(--frontier); outline-offset:3px; }
p{ margin:0 0 1.1em; }
em{ font-style:italic; }

/* ---------- Header: one band shared by every page, including the gazetteer ---------- */
.app-header{
  position:fixed; inset:0 0 auto 0; height:var(--header-h); z-index:2000;
  display:flex; align-items:center; gap:24px;
  padding:0 var(--gutter);
  background:var(--ink); color:var(--on-ink);
}
.brand{ display:flex; flex-direction:column; justify-content:center; min-width:0; text-decoration:none; color:inherit; }
.brand:hover{ color:inherit; }
.brand-name{
  font-family:var(--serif); font-size:20px; font-weight:700; line-height:1.1; letter-spacing:0;
  color:var(--on-ink); white-space:nowrap;
}
.brand-sub{
  margin-top:3px; font-family:var(--sans); font-size:12.5px; line-height:1.2; font-weight:400;
  color:var(--on-ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

.site-nav{ margin-left:auto; display:flex; align-items:center; gap:2px; flex:0 0 auto; max-width:100%; }
.site-nav a{
  font-family:var(--sans); font-size:14.5px; font-weight:500; line-height:1;
  color:var(--on-ink-soft); text-decoration:none; white-space:nowrap;
  padding:9px 10px 7px; border-bottom:2px solid transparent;
}
.site-nav a:hover{ color:var(--on-ink); }
.site-nav a[aria-current]{ color:var(--on-ink); border-bottom-color:var(--frontier); }

/* Boundary symbol: the dash-dot line of an international frontier, drawn once on load. */
.frontier-line{
  position:fixed; left:0; right:0; top:calc(var(--header-h) - 1px); height:2px; z-index:2001;
  background:repeating-linear-gradient(to right,
    var(--frontier) 0 18px, transparent 18px 24px,
    var(--frontier) 24px 27px, transparent 27px 33px);
  clip-path:inset(0 100% 0 0);
  animation:draw 1.1s cubic-bezier(.72,0,.2,1) .1s forwards;
}
@keyframes draw{ to{ clip-path:inset(0 0 0 0); } }

/* Narrow screens: brand on one row, navigation on the next. */
@media (max-width:720px){
  :root{ --header-h: 102px; }
  .app-header{ flex-wrap:wrap; align-content:center; gap:6px 12px; padding-top:4px; }
  .brand{ flex:1 1 100%; }
  .brand-sub{ display:none; }
  .site-nav{ margin-left:-8px; overflow-x:auto; scrollbar-width:none; }
  .site-nav::-webkit-scrollbar{ display:none; }
  .site-nav a{ font-size:13.5px; font-stretch:85%; padding:8px 8px 6px; }
  .site-nav .long{ display:none; }
}
@media (max-width:360px){
  .site-nav a{ font-stretch:75%; padding:8px 6px 6px; }
}

/* ---------- Page scaffold ---------- */
.page{ max-width:1080px; margin:0 auto; padding:calc(var(--header-h) + 40px) var(--gutter) 64px; }
.hero + .page{ padding-top:16px; }

/* Side-headed sections: the heading sits in the margin beside its first paragraph,
   the way shoulder-notes do in nineteenth-century treatises. */
.section{
  display:grid; grid-template-columns:200px minmax(0, var(--measure)); column-gap:44px;
  padding:30px 0 18px; border-top:1px solid var(--rule-soft);
}
.section:first-of-type{ border-top:0; padding-top:12px; }
.section > h2, .section > h3{
  grid-column:1; margin:0; font-family:var(--serif); font-weight:600;
  font-size:16.5px; line-height:1.7; color:var(--text);
}
.section > .body{ grid-column:2; min-width:0; }
.body > :last-child{ margin-bottom:0; }
.body h3, .body h4{ font-family:var(--serif); font-weight:600; font-size:20px; line-height:1.3; margin:1.2em 0 .35em; }
.body h3:first-child, .body h4:first-child{ margin-top:0; }
.body ul{ padding-left:1.2em; margin:0 0 1.1em; }
.body li{ margin-bottom:.45em; }
.body li::marker{ color:var(--text-soft); }

@media (max-width:860px){
  .section{ grid-template-columns:1fr; row-gap:10px; }
  .section > h2, .section > h3, .section > .body{ grid-column:1; }
}

/* ---------- Parts of the single page: each opens by crossing a boundary line ---------- */
.part{ padding-bottom:28px; }
.part + .part{ margin-top:36px; }
.part-head{
  padding:34px 0 10px; margin-bottom:6px;
  border-top:2px solid transparent;
  border-image:repeating-linear-gradient(to right,
    var(--frontier) 0 18px, transparent 18px 24px,
    var(--frontier) 24px 27px, transparent 27px 33px) 2;
}
.part-head h2{ margin:0; font-family:var(--serif); font-weight:700; font-size:clamp(28px, 3.2vw, 36px); line-height:1.1; color:var(--ink); }
.part-head p{ margin:6px 0 0; font-family:var(--serif); font-size:18px; line-height:1.4; color:var(--text-soft); }
.part .section:first-of-type{ border-top:0; padding-top:12px; }
.part-home .section:first-of-type{ padding-top:12px; }

/* Small sans labels used where a word has to act like a caption, not a heading. */
.label{ font-family:var(--sans); font-size:13px; font-weight:500; color:var(--text-soft); }

/* ---------- Home hero ---------- */
.hero{ background:var(--ink); color:var(--on-ink); }
.hero-inner{ max-width:1080px; margin:0 auto; padding:calc(var(--header-h) + 56px) var(--gutter) 52px; }
.hero h1{
  margin:0 0 44px; font-family:var(--serif); font-weight:700;
  font-size:clamp(34px, 4.6vw, 56px); line-height:1.08; letter-spacing:-.01em;
}
.hero .title-sub{
  display:block; margin-top:12px; font-weight:400; letter-spacing:0;
  font-size:clamp(18px, 2vw, 26px); line-height:1.3; max-width:36ch;
}

/* Project timeline drawn as a map scale bar: surveyed time solid, unsurveyed time hatched. */
.scale{ max-width:420px; font-family:var(--sans); }
.scale-bar{ display:flex; height:12px; border:1px solid var(--on-ink); }
.scale-seg{ flex:1 1 0; position:relative; background:var(--hatch-light); }
.scale-seg + .scale-seg{ border-left:1px solid var(--on-ink); }
.scale-seg .fill{ position:absolute; inset:0 auto 0 0; width:0; background:var(--on-ink); }
.scale-ticks{ position:relative; height:20px; margin:6px 0 0; padding:0; list-style:none; font-size:13px; color:var(--on-ink-soft); font-variant-numeric:tabular-nums; }
.scale-ticks li{ position:absolute; top:0; transform:translateX(-50%); white-space:nowrap; }
.scale-ticks li:first-child{ transform:none; }
.scale-ticks li:last-child{ transform:translateX(-100%); }
.scale-note{ margin:10px 0 0; font-size:14px; color:var(--on-ink); }
.scale-note strong{ font-weight:600; }

/* ---------- Resource status: a three-stage pipeline, the current stage hatched ---------- */
.status{ list-style:none; margin:0 0 18px; padding:0; display:grid; grid-template-columns:repeat(3, 1fr); gap:4px; max-width:300px; }
.status li{ font-family:var(--sans); font-size:12px; line-height:1.3; color:var(--text-soft); white-space:nowrap; }
.status li::before{ content:""; display:block; height:7px; margin-bottom:7px; box-shadow:inset 0 0 0 1px var(--rule); }
.status li.is-done::before{ background:var(--ink); box-shadow:none; }
.status li.is-now::before{ background:var(--hatch-dark); box-shadow:inset 0 0 0 1px var(--ink); }
.status li.is-now{ color:var(--text); font-weight:600; }

/* ---------- Sheets: a white document laid on the desk ---------- */
.sheet{
  background:var(--sheet); border:1px solid var(--rule-soft); border-radius:3px;
  padding:22px 26px 24px; max-width:var(--measure);
}
.sheet h3, .sheet h4{ margin:0 0 4px; }
.sheet .status{ margin:8px 0 16px; }

.btn{
  display:inline-block; font-family:var(--sans); font-size:15px; font-weight:600; line-height:1;
  color:var(--on-ink); background:var(--ink); text-decoration:none;
  padding:11px 16px 10px; border-radius:3px; border:1px solid var(--ink);
}
.btn:hover{ color:var(--on-ink); background:var(--ink-2); }

/* ---------- People: same side-headed grid as .section (name and role in the margin, bio beside) ---------- */
.people{ display:flex; flex-direction:column; margin:0 0 20px; }
.person{
  display:grid; grid-template-columns:200px minmax(0, var(--measure)); column-gap:44px; align-items:start;
  padding:30px 0 18px; border-top:1px solid var(--rule-soft);
}
.person:first-child{ border-top:0; padding-top:12px; }
.person-text{ display:contents; }
.person-name{ grid-column:1; grid-row:1; margin:0; font-family:var(--serif); font-weight:700; font-size:19px; line-height:1.3; color:var(--ink); }
.person-role{ grid-column:1; grid-row:2; margin:6px 0 0; font-family:var(--sans); font-size:13px; line-height:1.45; color:var(--text-soft); }
.person-bio{ grid-column:2; grid-row:1 / span 3; min-width:0; font-size:16.5px; line-height:1.6; }
.person-bio > :last-child{ margin-bottom:0; }
.person-photo{
  width:200px; aspect-ratio:1 / 1; overflow:hidden; border:1px solid var(--rule);
  background:var(--hatch-dark); background-color:var(--paper);   /* hatched until a photo arrives */
}
.person-photo img{ display:block; width:100%; height:100%; object-fit:cover; }

@media (max-width:860px){
  .person{ grid-template-columns:1fr; row-gap:0; }
  .person-name, .person-role, .person-bio{ grid-column:1; grid-row:auto; }
  .person-role{ margin:4px 0 12px; }
}

/* ---------- Tables ---------- */
.sources{ width:100%; border-collapse:collapse; margin:0 0 1.1em; }
.sources th, .sources td{ text-align:left; vertical-align:top; padding:12px 0; border-top:1px solid var(--rule-soft); }
.sources th{ font-family:var(--sans); font-size:14px; font-weight:600; color:var(--text); width:36%; padding-right:20px; line-height:1.4; }
.sources td{ font-size:16px; line-height:1.55; }
.sources tr:first-child th, .sources tr:first-child td{ border-top:0; padding-top:0; }

/* ---------- Numbered workflow (a real sequence) ---------- */
.workflow{ list-style:none; margin:0 0 1.1em; padding:0; counter-reset:step; }
.workflow li{ position:relative; padding-left:48px; margin-bottom:1em; counter-increment:step; }
.workflow li::before{
  content:counter(step); position:absolute; left:0; top:.1em;
  font-family:var(--sans); font-size:14px; font-weight:600; color:var(--on-ink);
  background:var(--ink); width:28px; height:28px; line-height:28px; text-align:center; border-radius:2px;
}
.workflow h3, .workflow h4{ margin:0 0 .25em; }

/* ---------- Footer ---------- */
.site-footer{ border-top:1px solid var(--rule); margin:0 var(--gutter); padding:22px 0 40px; max-width:1080px; }
@media (min-width:1160px){ .site-footer{ margin:0 auto; } }
.site-footer p{ margin:0 0 6px; font-family:var(--sans); font-size:13.5px; color:var(--text-soft); line-height:1.5; }
.site-footer a{ color:var(--text-soft); }

/* Placeholders the project team still has to fill in. Visible on purpose. */
.todo{ background:#fff3c4; color:#5a4500; padding:0 .3em; border-radius:2px; font-family:var(--sans); font-size:.9em; }

@media (prefers-reduced-motion: reduce){
  .frontier-line{ animation:none; clip-path:inset(0 0 0 0); }
}
