:root {
  --ink: #161310;
  --paper: #f4efe6;
  --panel: #faf7f2;
  --seal: #7a2e2a;
  --seal-hover: #5e221f;
  --rule: #c4a35a;
  --walnut: #3d2a1f;
  --muted: #5c5348;
  --line: #d8cfc0;
  --well: #2a241e;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 16px/1.5 system-ui, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a { color: inherit; }

img { max-width: 100%; height: auto; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
}

/* --- identity bar --- */

.identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.25rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.identity a.home {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  min-width: 0;
}

.identity .emblem {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px var(--line);
}

.identity h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}

.identity .tag {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--seal);
  margin: 0.18rem 0 0;
}

.identity .aside {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
  line-height: 1.35;
  max-width: 16rem;
}

/* --- service banner: four windows across --- */

.windows {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--walnut);
  border-bottom: 1px solid var(--rule);
}

.windows a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.85rem 1rem 0.9rem;
  text-decoration: none;
  color: var(--paper);
  text-align: center;
  border-right: 1px solid rgba(196, 163, 90, 0.45);
  min-height: 4.4rem;
}

.windows a:last-child { border-right: 0; }

.windows a:hover,
.windows a:focus-visible {
  background: #4a3428;
  outline: none;
}

.windows a[aria-current="page"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 3px 0 var(--seal);
}

.windows a[aria-current="page"] .job {
  color: var(--muted);
}

.windows .name {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.windows .job {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9bba8;
}

/* --- page --- */

main {
  flex: 1;
  width: min(68rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.25rem 0 3.5rem;
}

.hero h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  max-width: 22ch;
}

.hero .lede {
  font-size: 1.08rem;
  max-width: 40rem;
  margin: 0 0 1.5rem;
}

.hero .lede strong { font-weight: 600; }

.rule {
  height: 1px;
  border: 0;
  background: var(--rule);
  margin: 1.75rem 0;
}

.ledgers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.ledgers article {
  padding: 1.15rem 1.2rem 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.ledgers article:nth-child(odd) { padding-right: 1.6rem; }

.ledgers article:nth-child(even) {
  padding-left: 1.6rem;
  border-left: 1px solid var(--line);
}

.ledgers h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.ledgers h3 a {
  text-decoration: none;
  color: var(--ink);
}

.ledgers h3 a:hover { color: var(--seal); }

.ledgers p {
  margin: 0;
  color: var(--muted);
}

.note {
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 40rem;
}

.window-copy h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  margin: 0 0 0.5rem;
}

.window-copy .status {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  color: var(--seal);
  margin: 0 0 1.1rem;
}

.window-copy p { max-width: 40rem; }

.window-copy ul {
  margin: 0.4rem 0 1.2rem;
  padding-left: 1.15rem;
  max-width: 40rem;
}

.window-copy li { margin: 0.3rem 0; }

.back {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--seal);
  font-weight: 600;
  text-decoration: none;
}

.back:hover { text-decoration: underline; }

footer {
  padding: 0.9rem 1.25rem 1.15rem;
  border-top: 1px solid var(--walnut);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  justify-content: space-between;
}

footer p { margin: 0; }

@media (max-width: 820px) {
  .identity .aside { display: none; }
  .windows { grid-template-columns: 1fr 1fr; }
  .windows a:nth-child(2) { border-right: 0; }
  .windows a:nth-child(1),
  .windows a:nth-child(2) {
    border-bottom: 1px solid rgba(196, 163, 90, 0.45);
  }
  .ledgers { grid-template-columns: 1fr; }
  .ledgers article:nth-child(odd),
  .ledgers article:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }
}

@media (max-width: 520px) {
  .identity { padding: 0.65rem 0.9rem; }
  .identity h1 { font-size: 1.25rem; }
  .windows a { min-height: 3.8rem; padding: 0.7rem 0.6rem; }
  .windows .name { font-size: 1rem; }
  main { width: calc(100% - 1.8rem); padding-top: 1.5rem; }
}
