* {
  box-sizing: border-box;
}

:root {
  --background: #ded6c3;
  --paper: #f3ecda;
  --ink: #302a23;
  --muted: #625849;
  --border: #8c7b60;
  --accent: #743b30;
}

body {
  margin: 0;
  background-color: var(--background);
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 5px,
    rgba(70, 50, 20, 0.025) 6px
  );
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-underline-offset: 4px;
}

a:hover {
  color: #43241d;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

.site-header {
  border-top: 8px solid var(--accent);
  border-bottom: 4px double var(--border);
  background: #cec2a8;
  text-align: center;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 20px 25px;
}

.overline {
  margin-bottom: 12px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 5vw, 48px);
}

.subtitle {
  margin-bottom: 18px;
  color: #494033;
}

.stamp {
  display: inline-block;
  padding: 3px 16px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: "Courier New", monospace;
  font-size: 19px;
  font-weight: bold;
  letter-spacing: 2px;
  transform: rotate(-2deg);
}

.navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: #eee5d1;
}

.navigation a {
  padding: 9px 17px;
  border: 1px solid transparent;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 14px;
  text-decoration: none;
}

.navigation a:hover {
  border-color: var(--border);
  background: #ded2b9;
}

.navigation a[aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff8ea;
}

.container {
  width: min(1000px, calc(100% - 32px));
  margin: 25px auto 40px;
}

.page-label {
  margin-bottom: 12px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 13px;
  text-transform: uppercase;
}

.paper {
  margin-bottom: 26px;
  padding: 28px;
  border: 1px solid var(--border);
  background: var(--paper);
  box-shadow: 4px 4px 0 rgba(76, 58, 35, 0.12);
}

h2 {
  margin-bottom: 20px;
  font-size: 27px;
}

h3 {
  margin-bottom: 12px;
  font-size: 21px;
}

.lead {
  font-size: 20px;
}

.note {
  margin-top: 22px;
  padding: 16px 20px;
  border-left: 5px solid var(--accent);
  background: #e7dcc3;
}

.section-title {
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.card {
  padding: 20px;
  border: 1px solid var(--border);
  background: #eae0cb;
}

.card-number {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: "Courier New", monospace;
  font-size: 29px;
  font-weight: bold;
}

.card p {
  margin-bottom: 0;
  font-size: 16px;
}

.button {
  display: inline-block;
  margin-top: 10px;
  padding: 9px 15px;
  border: 1px solid var(--accent);
  background: #e6d9bf;
  color: var(--accent);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
}

.button:hover {
  background: var(--accent);
  color: #fff8ea;
}

.timeline {
  margin-left: 7px;
  padding-left: 25px;
  border-left: 3px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 25px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  position: absolute;
  top: 9px;
  left: -33px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--paper);
  background: var(--accent);
  content: "";
}

.date {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: "Courier New", monospace;
  font-size: 21px;
  font-weight: bold;
}

.timeline-item p {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

caption {
  padding-bottom: 10px;
  color: var(--muted);
  text-align: left;
  font-style: italic;
}

th,
td {
  padding: 13px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

thead {
  background: #d9ccb1;
}

tbody th {
  min-width: 145px;
}

.history-list {
  padding-left: 24px;
}

.history-list li,
.sources li {
  margin-bottom: 12px;
}

.building {
  display: grid;
  grid-template-columns: 170px 1fr;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  background: var(--paper);
}

.building-label {
  padding: 25px 15px;
  border-right: 1px solid var(--border);
  background: #d9ccb1;
  text-align: center;
}

.building-label span {
  display: block;
  margin-bottom: 10px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  text-transform: uppercase;
}

.building-label strong {
  color: var(--accent);
  font-family: "Courier New", monospace;
  font-size: 21px;
}

.building-content {
  padding: 25px;
}

.building-content h2 {
  margin-bottom: 10px;
}

.meta {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
}

.building-result {
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.conclusion {
  border-top: 5px solid var(--accent);
}

.sources {
  font-size: 15px;
}

.site-footer {
  padding: 22px 16px;
  border-top: 4px double var(--border);
  background: #cec2a8;
  color: #494033;
  text-align: center;
  font-size: 14px;
}

.site-footer p {
  margin: 3px 0;
}

@media (max-width: 700px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .building {
    grid-template-columns: 1fr;
  }

  .building-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .building-label span {
    margin-bottom: 0;
  }

  .paper,
  .building-content {
    padding: 20px;
  }

  .navigation a {
    padding: 8px 10px;
    font-size: 13px;
  }

  h2 {
    font-size: 24px;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }

  .navigation,
  .button {
    display: none;
  }

  .container {
    width: 100%;
  }

  .paper,
  .card,
  .building {
    background: white;
    box-shadow: none;
  }

  .building {
    break-inside: avoid;
  }
}