/* =========================
   RESET
========================= */

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

body {
  margin: 0;
}

/* =========================
   VARIABLES
========================= */

:root {
  --color-bg: #f5f2ea;

  --color-surface: #ffffff;

  --color-text: #2d2d2d;

  --color-heading: #1c1c1c;

  --color-border: #d9d4ca;

  --color-accent: #6d4c41;

  --color-accent-light: #ece3de;

  --max-width: 900px;

  --radius: 10px;
}

/* =========================
   PAGE
========================= */

body {
  background: var(--color-bg);

  color: var(--color-text);

  font-family: Georgia, serif;

  line-height: 1.8;
}

/* =========================
   ARTICLE
========================= */

.article {
  max-width: var(--max-width);

  margin: 3rem auto;

  padding: 2rem;

  background: var(--color-surface);

  border-radius: var(--radius);

  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* =========================
   HEADER
========================= */

.breadcrumb {
  margin: 0;

  font-size: 0.9rem;

  color: #777;
}

.article-header h1 {
  margin-top: 0.5rem;

  margin-bottom: 1rem;

  color: var(--color-heading);

  font-size: 2.6rem;

  line-height: 1.2;
}

.article-lead {
  font-size: 1.15rem;

  color: #555;

  border-left: 4px solid var(--color-accent);

  padding-left: 1rem;
}

/* =========================
   HEADINGS
========================= */

h2 {
  margin-top: 3rem;

  margin-bottom: 1rem;

  color: var(--color-heading);

  border-bottom: 2px solid var(--color-border);

  padding-bottom: 0.5rem;
}

/* =========================
   TABLE
========================= */

table {
  width: 100%;

  border-collapse: collapse;

  margin-top: 1rem;
}

th,
td {
  padding: 0.75rem;

  border: 1px solid var(--color-border);

  text-align: left;
}

th {
  width: 180px;

  background: var(--color-accent-light);
}

/* =========================
   TOC
========================= */

.article-toc {
  margin-top: 2rem;

  padding: 1.5rem;

  background: var(--color-accent-light);

  border-radius: var(--radius);
}

.article-toc ol {
  margin: 0;

  padding-left: 1.5rem;
}

.article-toc li {
  margin-bottom: 0.5rem;
}

.article-toc a {
  color: var(--color-accent);

  text-decoration: none;
}

.article-toc a:hover {
  text-decoration: underline;
}

/* =========================
   CONTENT
========================= */

section p {
  margin-bottom: 1rem;
}

/* =========================
   RELATED ARTICLES
========================= */

.related-articles {
  margin-top: 4rem;

  padding: 1.5rem;

  background: #faf8f4;

  border: 1px solid var(--color-border);

  border-radius: var(--radius);
}

.related-articles ul {
  margin: 0;

  padding-left: 1.5rem;
}

.related-articles li {
  margin-bottom: 0.5rem;
}

.related-articles a {
  color: var(--color-accent);

  text-decoration: none;
}

.related-articles a:hover {
  text-decoration: underline;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  .article {
    margin: 1rem;

    padding: 1.5rem;
  }

  .article-header h1 {
    font-size: 2rem;
  }

  th {
    width: auto;
  }
}

/* =========================
   SOURCE MATERIAL / DETAILS
========================= */

.source-material {
  margin-top: 4rem;
}

.source-material details {
  margin-top: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #faf8f4;
  overflow: hidden;
}

.source-material summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: bold;
  color: var(--color-heading);
  background: var(--color-accent-light);
  list-style: none;
}

.source-material summary::-webkit-details-marker {
  display: none;
}

.source-material summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.2s ease;
}

.source-material details[open] summary::before {
  transform: rotate(90deg);
}

.source-material summary:hover {
  background: #e3d7cf;
}

.source-content {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.source-content h3 {
  margin-top: 2rem;
  color: var(--color-heading);
}

.source-content h3:first-child {
  margin-top: 0;
}

.source-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--color-accent);
  background: #fff;
  font-style: italic;
}

.source-content blockquote p {
  margin: 0;
}