:root {
  --ink: #17212b;
  --muted: #5d6873;
  --paper: #ffffff;
  --background: #f4f1ea;
  --line: #d9d5cc;
  --accent: #243c5a;
  --accent-soft: #e9eef4;
  --warn-soft: #f6f0df;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background: var(--background);
  line-height: 1.6;
}
a { color: #173d68; }
a:hover { text-decoration-thickness: 2px; }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: .6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }
.site-header {
  background: var(--accent);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.2);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.8rem;
}
.kicker {
  margin: 0 0 .35rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.site-header .kicker { color: #d7e2ed; }
h1, h2, h3 { line-height: 1.18; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.75rem); }
.site-subtitle { max-width: 760px; margin: .8rem 0 0; font-size: 1.1rem; color: #edf3f8; }
.site-nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.15rem;
  font-family: Arial, Helvetica, sans-serif;
}
.site-nav a { color: #fff; text-decoration: none; font-weight: 700; }
.site-nav a:hover { text-decoration: underline; }
main { max-width: var(--max); margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.paper {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(1.25rem, 3vw, 2.3rem);
  margin: 0 0 1.5rem;
  box-shadow: 0 2px 10px rgba(18,28,38,.04);
}
.paper h2 { margin: .1rem 0 1rem; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.lede { font-size: 1.17rem; max-width: 880px; }
.notice {
  border-left: 5px solid var(--accent);
  background: var(--accent-soft);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}
.notice p { margin: .35rem 0; }
.callout-title { font-weight: 700; }
.terminology { color: var(--muted); font-size: .98rem; }
.question-list { display: grid; gap: .9rem; }
.question {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  background: #fbfbf9;
}
.question p { margin: 0; font-size: 1.18rem; font-weight: 700; }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 .9rem;
  padding-bottom: .55rem;
  border-bottom: 2px solid var(--accent);
}
.section-heading h3 { margin: 0; font-size: 1.4rem; }
.section-heading a { font-family: Arial, Helvetica, sans-serif; font-size: .85rem; white-space: nowrap; }
.second-section { margin-top: 3.5rem; }
.record-list { display: grid; gap: 1rem; }
.record-entry {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.record-number {
  font-family: Arial, Helvetica, sans-serif;
  background: #eef1f3;
  color: #39444f;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .55rem .9rem;
  border-bottom: 1px solid var(--line);
}
.record-entry dl { margin: 0; }
.record-field { padding: 1rem; border-bottom: 1px solid var(--line); }
.record-field.response { background: #fbfbfa; }
.record-field.break { background: var(--warn-soft); }
dt {
  font-family: Arial, Helvetica, sans-serif;
  font-size: .76rem;
  line-height: 1.3;
  font-weight: 800;
  color: #46515b;
  text-transform: uppercase;
  letter-spacing: .065em;
  margin-bottom: .35rem;
}
dd { margin: 0; }
.record-meta {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(80px, .45fr) minmax(0, 2fr);
  gap: 0;
  background: #f7f7f5;
}
.record-meta > div { padding: .85rem 1rem; border-right: 1px solid var(--line); }
.record-meta > div:last-child { border-right: 0; }
.document-placeholder {
  border: 1px dashed #9ba4ad;
  border-radius: 10px;
  padding: 1rem 1.15rem;
  background: #fafafa;
}
.document-placeholder p { margin: .35rem 0 0; }
.small { color: var(--muted); font-size: .92rem; }
footer { border-top: 1px solid #cfc9be; }
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: .9rem;
}
.footer-inner p { margin: 0; max-width: 820px; }
@media (max-width: 760px) {
  .header-inner { padding-top: 2rem; }
  main { padding-left: .75rem; padding-right: .75rem; }
  .paper { border-radius: 8px; padding: 1.1rem; }
  .record-meta { grid-template-columns: 1fr; }
  .record-meta > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .record-meta > div:last-child { border-bottom: 0; }
  .section-heading { align-items: flex-start; }
  .footer-inner { flex-direction: column; }
}
@media print {
  body { background: #fff; }
  .site-nav, .skip-link, .section-heading a, footer a { display: none !important; }
  .site-header { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .site-header .kicker, .site-subtitle { color: #000; }
  main { max-width: none; padding: 0; }
  .paper, .record-entry { box-shadow: none; break-inside: avoid; }
}


.email-list { display: grid; gap: .8rem; margin-top: 1.25rem; }
.email-entry {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.email-entry summary {
  cursor: pointer;
  padding: .9rem 1rem;
  font-family: Arial, Helvetica, sans-serif;
  display: grid;
  grid-template-columns: minmax(150px, .45fr) minmax(0, 1.55fr);
  gap: .75rem 1rem;
  align-items: baseline;
  background: #f7f7f5;
  font-weight: 700;
}
.email-entry[open] summary { border-bottom: 1px solid var(--line); }
.email-date { color: #44515c; font-size: .88rem; }
.email-from { overflow-wrap: anywhere; }
.email-card { padding: 1rem; }
.email-meta {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  background: #fbfbfa;
}
.email-meta > div {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: .75rem;
  padding: .2rem 0;
}
.email-meta dt { margin: 0; }
.email-meta dd { overflow-wrap: anywhere; }
.email-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.55;
  background: #fff;
}
.correspondence-note { margin-top: 1rem; }

@media (max-width: 760px) {
  .email-entry summary { grid-template-columns: 1fr; gap: .2rem; }
  .email-meta > div { grid-template-columns: 1fr; gap: .1rem; }
}
@media print {
  .email-entry:not([open]) > *:not(summary) { display: block !important; }
  .email-entry summary { cursor: default; background: #fff; }
  .email-entry { break-inside: auto; }
  .email-card { break-inside: auto; }
  .email-body { white-space: pre-wrap; }
}


/* Process comparison page */
.process-section { scroll-margin-top: 1rem; }
.process-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.2rem;
  margin-top: 1.25rem;
}
.process-column {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  background: #fbfbfa;
}
.process-column.observed { background: #f8f7f2; }
.process-column h3 { margin: .15rem 0 .2rem; font-size: 1.25rem; }
.waterfall {
  display: grid;
  justify-items: center;
  margin-top: 1rem;
}
.step {
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr);
  gap: .75rem;
  align-items: center;
  border: 1px solid #a9a1cc;
  background: #f5f2ff;
  border-radius: 8px;
  padding: .8rem .9rem;
}
.step strong {
  font-family: Arial, Helvetica, sans-serif;
  color: #4d4771;
  font-size: .82rem;
}
.step span { line-height: 1.4; }
.arrow {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.35rem;
  line-height: 1;
  color: #6b7075;
  padding: .22rem 0;
}
.core-issue {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  background: #fff;
}
.core-issue h3 { margin: 0 0 .35rem; }
.core-issue p { margin: 0; }
.reference-box {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}
.reference-box summary {
  cursor: pointer;
  padding: .8rem 1rem;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
}
.reference-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 1rem;
}
.reference-grid h4 { margin: 0 0 .5rem; }
.reference-grid p { margin: .4rem 0; }
.process-note { margin-top: 1rem; }
.button-link {
  display: inline-block;
  margin: .35rem .5rem .2rem 0;
  padding: .65rem .9rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
}
.button-link:hover { text-decoration: underline; }
.secondary-link { background: #56636f; }

@media (max-width: 820px) {
  .process-compare, .reference-grid { grid-template-columns: 1fr; }
}

@media print {
  .process-compare { grid-template-columns: 1fr 1fr; }
  .process-column, .core-issue, .reference-box { break-inside: avoid; box-shadow: none; }
  .reference-box:not([open]) > *:not(summary) { display: block !important; }
  .reference-box summary { list-style: none; }
  .button-link { display: none; }
}


/* Supporting communications */
.comm-thread {
  display: grid;
  gap: .8rem;
  margin-top: 1rem;
}
.comm-message {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .9rem 1rem;
  background: #fff;
}
.comm-message.received {
  border-left: 5px solid #9a9fa5;
}
.comm-message.sent {
  border-left: 5px solid var(--accent);
  margin-left: min(7%, 3rem);
}
.comm-message p {
  margin: .35rem 0 0;
}
.comm-meta {
  font-family: Arial, Helvetica, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  color: #4f5962;
}



@media (max-width: 640px) {
  .comm-message.sent { margin-left: 0; }
}

@media print {
  .comm-message { break-inside: avoid; }
}


/* Complete Communication Log */
.comm-log-summary { margin-bottom: 1.1rem; }
.comm-log-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 1rem;
  background: #fff;
}
.comm-log-stats > div {
  padding: .85rem 1rem;
  border-right: 1px solid var(--line);
}
.comm-log-stats > div:last-child { border-right: 0; }
.comm-log-stats span {
  display: block;
  margin-bottom: .25rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #66717a;
}
.comm-log-stats strong {
  display: block;
  font-size: 1.15rem;
}

.comm-log-thread {
  max-width: 1180px;
  margin: 0 auto 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid #b9aa8e;
  border-radius: 12px;
  overflow: hidden;
}
.comm-log-thread:nth-of-type(even) { border-left-color: #aebfc6; }

.comm-log-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.comm-log-head h2 { margin: 0 0 .55rem; font-size: 1.35rem; }
.comm-log-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.comm-log-tags span,
.comm-log-kind {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .25rem .55rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .72rem;
  color: #5c646b;
  background: #fbfbfa;
}

.log-row {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.log-row:last-child { border-bottom: 0; }
.log-row.sent { background: #fcfcfb; }

.log-who {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  font-family: Arial, Helvetica, sans-serif;
}
.log-who strong { font-size: .86rem; }
.log-who span {
  font-size: .72rem;
  color: #66717a;
}
.log-message {
  line-height: 1.48;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .comm-log-stats { grid-template-columns: 1fr 1fr; }
  .comm-log-stats > div:nth-child(2) { border-right: 0; }
  .comm-log-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .comm-log-head { flex-direction: column; }
  .log-row { grid-template-columns: 1fr; gap: .4rem; }
}
@media print {
  .comm-log-thread { break-inside: auto; }
  .log-row { break-inside: avoid; }
}


/* Final front-page/header refinement */
.site-header .header-inner {
  padding: .8rem 1.25rem .55rem;
}
.site-header h1 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.05;
}
.site-header .site-subtitle {
  margin-top: .3rem;
  font-size: .88rem;
  line-height: 1.35;
  max-width: 820px;
}
.site-header .kicker {
  font-size: .67rem;
  margin-bottom: .15rem;
}
.site-nav {
  padding: 0 1.25rem .7rem;
  gap: .42rem;
}
.site-nav a {
  display: inline-block;
  padding: .42rem .68rem;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  text-decoration: none;
  font-size: .78rem;
  line-height: 1.1;
  box-shadow: 0 1px 3px rgba(0,0,0,.10);
}
.site-nav a:nth-child(8n+1) { background: #315f78; }
.site-nav a:nth-child(8n+2) { background: #76546d; }
.site-nav a:nth-child(8n+3) { background: #526f49; }
.site-nav a:nth-child(8n+4) { background: #80653b; }
.site-nav a:nth-child(8n+5) { background: #4f5f86; }
.site-nav a:nth-child(8n+6) { background: #755843; }
.site-nav a:nth-child(8n+7) { background: #536d6d; }
.site-nav a:nth-child(8n+8) { background: #6f5f7e; }
.site-nav a:hover,
.site-nav a:focus {
  filter: brightness(1.12);
  text-decoration: none;
  outline: 2px solid rgba(255,255,255,.5);
  outline-offset: 1px;
}

.front-disclaimer {
  margin: .9rem 0 1rem;
  padding: .55rem .15rem;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .82rem;
  line-height: 1.45;
  border-bottom: 1px solid var(--line);
}
.front-terminology {
  display: block;
  margin-top: .2rem;
}

.board-email .letter {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.03rem;
}
.board-email .letter p {
  margin: 0 0 1rem;
}
.board-email .signature {
  margin-top: 1.5rem;
}

#questions,
#board-email,
#record,
#correspondence,
#documents,
#corrections {
  scroll-margin-top: 1rem;
}

@media (max-width: 760px) {
  .site-header .header-inner {
    padding: .7rem .75rem .45rem;
  }
  .site-nav {
    padding: 0 .75rem .65rem;
    gap: .35rem;
  }
  .site-nav a {
    font-size: .74rem;
    padding: .4rem .56rem;
  }
  .front-disclaimer {
    margin-top: .55rem;
  }
}

@media print {
  .front-disclaimer {
    border-bottom: 1px solid #999;
    color: #000;
  }
}


/* Sticky global navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,.10);
}

.site-header .header-inner {
  padding-top: .45rem;
  padding-bottom: .25rem;
}

.site-header h1 {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  margin-bottom: .1rem;
}

.site-header .site-subtitle {
  font-size: .78rem;
  margin-top: .15rem;
  margin-bottom: .25rem;
}

.site-header .kicker {
  font-size: .62rem;
}

.site-nav {
  padding-bottom: .45rem;
}

/* Anchor targets should not hide under the sticky header. */
#questions,
#board-email,
#record,
#correspondence,
#documents,
#corrections,
#tradition-seven,
#tradition-two,
#crosstalk,
#imc,
#main {
  scroll-margin-top: 9rem;
}

@media (max-width: 760px) {
  .site-header .site-subtitle {
    display: none;
  }
  .site-header .header-inner {
    padding-top: .35rem;
    padding-bottom: .15rem;
  }
  .site-nav {
    max-height: 5.2rem;
    overflow-y: auto;
  }
}

@media print {
  .site-header {
    position: static;
    box-shadow: none;
  }
}
