* {
  box-sizing: border-box;
}

:root {
  --bg: #fbfaf7;
  --text: #1d2522;
  --muted: #5d6761;
  --line: #d9ded8;
  --surface: #ffffff;
  --accent: #245b4f;
  --accent-2: #8f4d24;
}

html {
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

body {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-2);
}

.site-header,
.site-footer {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 18px 24px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.site-name {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

main {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 42px 24px 72px;
}

.home,
.standard-page,
.answer-packet {
  max-width: 850px;
}

h1,
h2,
h3,
p,
ul,
ol,
dl {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 1.65rem + 1.1vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 42px 0 12px;
  font-size: 1.2rem;
  letter-spacing: 0;
}

h3 {
  margin: 24px 0 8px;
  font-size: 1rem;
  letter-spacing: 0;
}

section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

section:first-child,
.home > section:first-of-type {
  border-top: 0;
}

.lede {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.15rem;
}

.as-of,
.small,
.summary,
.site-footer {
  color: var(--muted);
}

.as-of {
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.direct-answer {
  margin: 22px 0 30px;
  padding: 18px 20px;
  border-left: 5px solid var(--accent);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.search-panel {
  margin: 34px 0 44px;
  padding: 24px 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.search-row {
  display: flex;
  gap: 10px;
  max-width: 680px;
}

input[type="search"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aeb8b1;
  background: #fff;
  color: var(--text);
  font: inherit;
}

button {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
}

button:hover {
  background: #163e36;
}

.search-results {
  margin-top: 18px;
}

.packet-list {
  display: grid;
  gap: 18px;
  padding-left: 20px;
}

.packet-list p {
  margin: 6px 0 0;
}

li {
  margin-bottom: 10px;
}

.metadata {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 10px 18px;
}

.metadata dt {
  color: var(--muted);
  font-weight: 700;
}

.metadata dd {
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.site-footer p {
  margin-bottom: 8px;
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .metadata {
    grid-template-columns: 1fr;
  }
}
