/* Farm — Sunny meadow, barn red and wheat gold */
:root {
  --color-bg: #f1ebd6;
  --color-surface: #fbf6e6;
  --color-border: #8a6a3a;
  --color-border-strong: #5c4326;
  --color-accent: #a8321f;
  --color-accent-green: #4f7a2b;
  --color-accent-gold: #d9a521;
  --color-text: #33281a;
  --color-muted: #6b5d44;
  --radius-sm: 3px;
  --radius: 10px;
  --shadow: 0 6px 20px rgba(60, 45, 20, 0.25);
  --line: 1.75;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: 16px;
  line-height: var(--line);
  background: var(--color-bg);
  background-image:
    radial-gradient(
      ellipse at 20% 0%,
      rgba(217, 165, 33, 0.18) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 100%,
      rgba(168, 50, 31, 0.1) 0%,
      transparent 60%
    );
  color: var(--color-text);
  padding: 32px 18px 72px;
}

/* ─── Header ─── */
.header {
  max-width: 940px;
  margin: 0 auto 44px;
  background: var(--color-surface);
  border: 4px double var(--color-border);
  border-top: 10px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 52px 48px 46px;
  text-align: center;
  position: relative;
  box-shadow:
    inset 0 0 36px rgba(138, 106, 58, 0.1),
    0 6px 20px rgba(20, 35, 10, 0.35);
}
.header__title {
  margin: 0 0 6px;
  font-size: 46px;
  font-weight: 700;
  color: var(--color-accent);
  text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);
  font-variant: small-caps;
  letter-spacing: 0.06em;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.header__subtitle {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--color-muted);
  letter-spacing: 0.08em;
}

/* ─── Main content ─── */
.main {
  max-width: 940px;
  margin: 0 auto;
  background: var(--color-surface);
  padding: 52px 58px;
  border: 3px double var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}
.main::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(138, 106, 58, 0.25);
  border-radius: 6px;
  pointer-events: none;
}

/* ─── Sections ─── */
.section {
  margin-bottom: 52px;
  position: relative;
}
.section:last-child {
  margin-bottom: 0;
}
.section + .section::before {
  content: "\2767   \2767   \2767";
  display: block;
  text-align: center;
  color: var(--color-accent-green);
  font-size: 16px;
  letter-spacing: 0.3em;
  margin-bottom: 32px;
  opacity: 0.6;
}
.section--included {
  font-size: 0.6em;
}
.section--included .section__heading {
  font-size: 20px;
}
.section--included .subheading {
  font-size: 13px;
}
.section--included .table {
  font-size: 10px;
}
.section--included .table th,
.section--included .table td {
  padding: 5px 7px;
}
.section__heading {
  font-size: 27px;
  margin: 0 0 20px;
  padding: 8px 20px;
  border-bottom: 3px solid var(--color-accent-green);
  border-top: 3px solid var(--color-accent-gold);
  color: var(--color-accent);
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  text-align: center;
}
.subheading {
  font-size: 19px;
  margin: 32px 0 10px;
  color: var(--color-accent-green);
  font-weight: 600;
  font-style: italic;
  padding-bottom: 4px;
  border-bottom: 1px dotted rgba(79, 122, 43, 0.5);
}

/* ─── Text ─── */
p {
  margin: 0 0 14px;
  text-align: justify;
  hyphens: auto;
}
strong {
  color: var(--color-accent);
}
em {
  color: var(--color-border-strong);
}
ul,
ol {
  margin: 0 0 18px 28px;
  padding: 0;
}
li {
  margin-bottom: 6px;
}
li::marker {
  color: var(--color-accent-green);
}

/* ─── Tables ─── */
.table {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), auto);
  width: 100%;
  margin: 20px 0 30px;
  font-size: 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(20, 35, 10, 0.12);
}
.table thead,
.table tbody,
.table tr {
  display: contents;
}
.table th,
.table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(138, 106, 58, 0.6);
  border-right: 1px solid rgba(138, 106, 58, 0.6);
  vertical-align: top;
}
.table th:last-child,
.table td:last-child {
  border-right: none;
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table th {
  background: linear-gradient(to bottom, #5f8a36, var(--color-accent-green));
  color: #fbf6e6;
  font-weight: 600;
  text-align: left;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.table tbody tr:nth-child(even) td {
  background: rgba(217, 165, 33, 0.1);
}
.table tbody tr:hover td {
  background: rgba(168, 50, 31, 0.07);
}
.caption {
  font-weight: 600;
  font-size: 15px;
  padding: 4px 2px 10px;
  color: var(--color-accent);
  text-align: left;
  font-style: italic;
}

/* ─── Callout / blockquote ─── */
.callout {
  background: rgba(79, 122, 43, 0.07);
  border: 1px solid rgba(79, 122, 43, 0.3);
  border-left: 6px solid var(--color-accent-green);
  padding: 16px 22px;
  margin: 28px 0 36px;
  font-style: italic;
  color: var(--color-muted);
  border-radius: var(--radius-sm);
}

/* ─── Page Breaks ─── */
.pagebreak {
  page-break-before: always;
  break-before: page;
  height: 0;
  margin: 0;
  padding: 0;
}

/* ─── Footer ─── */
.footer {
  text-align: center;
  margin-top: 72px;
  font-size: 13px;
  color: var(--color-muted);
  font-style: italic;
}

/* ─── Links ─── */
a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--color-accent-gold);
  transition: border-color 0.2s;
}
a:hover {
  border-bottom-style: solid;
  color: #c9442e;
}

/* ─── Accessibility ─── */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  body {
    background: #fff;
    padding: 0;
    font-size: 12px;
    background-image: none;
  }
  .header,
  .main {
    box-shadow: none;
    border: none;
    background-image: none;
  }
  .main::before,
  .section + .section::before {
    display: none;
  }
  .header {
    margin-bottom: 12px;
    padding: 0 0 12px;
    border-bottom: 2px solid var(--color-accent-green);
    background: #fff;
  }
  .main {
    padding: 0;
    background: #fff;
  }
  .section__heading {
    page-break-after: avoid;
  }
  .table {
    page-break-inside: avoid;
  }
  .section {
    page-break-inside: avoid;
  }
  .footer {
    display: none;
  }
}
