:root {
  --paper: #f3eee4;
  --ink: #1c1916;
  --muted: #5a5148;
  --card: #fffaf3;
  --line: #e2d6c6;
  --felt: #1c3b31;
  --felt-deep: #13281f;
  --accent: #8d2c28;
  --accent-ink: #ffffff;
  --note: #f7efe0;
  --variant: #f4e4d4;
  --focus: #8d2c28;
  --max: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141210;
    --ink: #f4eee6;
    --muted: #cbbdaa;
    --card: #211c18;
    --line: #3c342c;
    --felt: #10241d;
    --felt-deep: #0b1914;
    --accent: #e7a19c;
    --accent-ink: #1c1916;
    --note: #2a241c;
    --variant: #3a2a22;
    --focus: #f0b8b4;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-150%);
  background: var(--card);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  z-index: 2;
}

.skip:focus {
  transform: none;
}

.site-header {
  background: var(--felt);
  color: #f6f1e7;
}

.site-header a {
  color: #f6f1e7;
}

.header-inner,
.site-footer .footer-inner,
main {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header .header-inner {
  width: min(100% - 2rem, 52rem);
  padding: 1.1rem 0 0.4rem;
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}

.brand a {
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 0;
  color: #e4d7c4;
}

.dice {
  display: flex;
  gap: 0.35rem;
  margin: 0.8rem 0 0;
}

.dice span {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.3rem;
  background: #f7f1e6;
  color: #1c1916;
  font-weight: 700;
  font-size: 0.95rem;
}

nav {
  margin-top: 0.9rem;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0 0 0.9rem;
  margin: 0;
}

nav a {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
  border-radius: 999px;
}

nav a:hover,
nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

main {
  padding: 1.6rem 0 2.5rem;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  margin: 0 0 0.8rem;
}

h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.6rem;
}

h3 {
  font-size: 1.15rem;
  margin: 1.3rem 0 0.4rem;
}

p,
ul,
ol,
table {
  margin: 0.7rem 0;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.lede,
.ruleset {
  font-size: 1.12rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.2rem 0 0.4rem;
}

.actions a {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  padding: 0.65rem 0.95rem;
  border-radius: 0.4rem;
  font-weight: 650;
}

.actions a.secondary {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.panel,
.summary,
.variant,
.separate,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 1rem 1.05rem;
}

.summary {
  background: var(--note);
}

.variant {
  background: var(--variant);
  margin-top: 0.6rem;
}

.separate {
  margin-top: 0.6rem;
}

.kicker {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.breadcrumb {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
}

caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--note);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--felt-deep);
  color: #f3ecdf;
}

.site-footer a {
  color: #f6d2cf;
}

.footer-inner {
  width: min(100% - 2rem, 52rem);
  padding: 1.2rem 0 1.6rem;
}

.footer-inner p {
  margin: 0.4rem 0;
}

.sources li {
  margin: 0.35rem 0;
}

.muted,
footer .small {
  color: var(--muted);
}

.site-footer .small,
.site-footer .muted {
  color: #e4d7c4;
}

@media (max-width: 40rem) {
  body {
    font-size: 1.05rem;
  }

  .header-inner,
  .site-footer .footer-inner,
  main {
    width: min(100% - 1.4rem, var(--max));
  }

  nav a {
    padding: 0.55rem 0.65rem;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip,
  .actions {
    background: white;
    color: black;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
  }
}
