@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/nwpBtKy2OAdR1K-IwhWudF-R9QMylBJAV3Bo8Ky461EN.ttf") format("truetype");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/nwpBtKy2OAdR1K-IwhWudF-R9QMylBJAV3Bo8Kxm7FEN.ttf") format("truetype");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/nwpBtKy2OAdR1K-IwhWudF-R9QMylBJAV3Bo8Kxf7FEN.ttf") format("truetype");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vEFy2_tTDB4M7-auWDN0ahZJW3IX2ih5nk3AucvUHf6OAVIJmeUDygwjihdqrhw.ttf") format("truetype");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/vEFy2_tTDB4M7-auWDN0ahZJW3IX2ih5nk3AucvUHf6OAVIJmeUDygwjisltrhw.ttf") format("truetype");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/vEFy2_tTDB4M7-auWDN0ahZJW3IX2ih5nk3AucvUHf6OAVIJmeUDygwjivBtrhw.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --site-ink: #201c18;
  --site-muted: #6b6359;
  --site-accent: #b08a3c;
  --site-accent-dark: #8c6c2c;
  --site-paper: #f5f0e7;
  --site-paper-deep: #e9dfd1;
  --site-shadow: rgba(20, 16, 12, 0.25);
  --site-shell: #1f2426;
  --site-shell-deep: #131618;
}

html,
body {
  font-family: "Source Serif 4", "Times New Roman", serif;
  color: var(--site-ink);
  background: linear-gradient(160deg, #3a332d 0%, #2f2a25 55%, #24201c 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
  overscroll-behavior: none;
}

html {
  height: 100%;
  overscroll-behavior: none;
}

body {
  height: 100%;
}

.site-header {
  background: linear-gradient(120deg, #111314, #1f2324 55%, #2a2f31);
  color: #f3ede3;
}

.site-title {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  color: #f6efe4;
}

.site-subtitle {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  color: rgba(246, 239, 228, 0.8);
}

main {
  padding-bottom: 4rem;
}

.content-card {
  background: var(--site-paper);
  border-radius: 20px;
  padding: 2.75rem 3rem;
  box-shadow: 0 22px 55px var(--site-shadow);
  border: 1px solid rgba(176, 138, 60, 0.25);
  position: relative;
}

.content-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 14px;
  border: 1px solid rgba(176, 138, 60, 0.16);
  pointer-events: none;
}

.media-hero {
  margin: 1.4rem 0 2rem;
}

.media-hero img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(176, 138, 60, 0.25);
  box-shadow: 0 18px 40px rgba(20, 16, 12, 0.2);
  display: block;
}

.media-float-right,
.media-float-left {
  max-width: 320px;
  margin: 0.35rem 0 1rem 1.4rem;
}

.media-float-left {
  float: left;
  margin: 0.35rem 1.4rem 1rem 0;
}

.media-float-right {
  float: right;
}

.media-float-right img,
.media-float-left img,
.media-diagram img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(176, 138, 60, 0.2);
  background: #f8f3ea;
}

.media-diagram {
  margin: 1.6rem 0 2rem;
}

figcaption {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--site-muted);
  margin-top: 0.4rem;
}

h1,
h2,
h3 {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  color: #1f1a15;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 2.7vw, 2.8rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.45rem, 1.9vw, 1.85rem);
  margin-top: 2.6rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.15rem, 1.35vw, 1.4rem);
  margin-top: 2.1rem;
  margin-bottom: 0.75rem;
}

p {
  line-height: 1.75;
  color: var(--site-ink);
}

a {
  color: var(--site-accent);
  text-decoration: none;
}

a:hover {
  color: var(--site-accent-dark);
  text-decoration: underline;
}

.toc {
  background: var(--site-paper-deep);
  border: 1px solid rgba(176, 138, 60, 0.2);
}

.toc-title {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--site-muted);
}

.toc-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.toc-level-3 {
  padding-left: 1rem;
  font-size: 0.95rem;
}

.content-card > nav {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
}

.toc-page-list,
.toc-section-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1.5rem 0;
  display: grid;
  gap: 0.5rem;
}

.toc-page-list > li {
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  background: #f1e6d6;
  border: 1px solid rgba(176, 138, 60, 0.18);
}

.toc-section-list {
  margin-top: 0.5rem;
  padding-left: 0.75rem;
  gap: 0.35rem;
}

.toc-section-l3 {
  padding-left: 1rem;
  font-size: 0.95rem;
}

footer {
  background: var(--site-shell);
  color: rgba(246, 239, 228, 0.65);
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .content-card {
    padding: 1.8rem 1.6rem;
    border-radius: 16px;
  }

  .media-float-right,
  .media-float-left {
    float: none;
    max-width: 100%;
    margin: 1rem 0 1.4rem;
  }
}
