:root {
  --bg: #f6f3ee;
  --panel: #fffaf1;
  --ink: #1d1720;
  --muted: #655b65;
  --line: #e6d8c3;
  --gold: #d79b27;
  --gold-dark: #9b5f08;
  --red: #9d2435;
  --green: #123f36;
  --shadow: 0 18px 45px rgba(36, 24, 14, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(29, 23, 32, 0.96);
  border-bottom: 1px solid rgba(215, 155, 39, 0.3);
}

.header-inner,
.breadcrumbs,
.hero-inner,
.page-shell,
.footer-inner {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  width: 132px;
  height: 54px;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 10px;
}

.desktop-nav a,
.mobile-menu a {
  color: #fff7e8;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(180deg, #ffc75d, var(--gold));
  color: #211103;
  box-shadow: 0 8px 18px rgba(215, 155, 39, 0.26);
}

.btn-secondary {
  background: transparent;
  color: #fff7e8;
  border-color: rgba(255, 247, 232, 0.48);
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.04);
}

.mobile-menu {
  position: relative;
  display: none;
}

.mobile-menu summary {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 247, 232, 0.48);
  border-radius: var(--radius);
  color: #fff7e8;
  cursor: pointer;
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.burger-lines,
.burger-lines::before,
.burger-lines::after {
  width: 18px;
  height: 2px;
  display: block;
  background: currentColor;
  border-radius: 4px;
  content: "";
}

.burger-lines {
  position: relative;
}

.burger-lines::before,
.burger-lines::after {
  position: absolute;
  left: 0;
}

.burger-lines::before {
  top: -6px;
}

.burger-lines::after {
  top: 6px;
}

.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 14px;
  background: #211927;
  border: 1px solid rgba(215, 155, 39, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mobile-menu-panel a {
  display: block;
  padding: 8px 6px;
}

.breadcrumbs-wrap {
  background: #efe4d4;
  border-bottom: 1px solid var(--line);
}

.breadcrumbs {
  padding: 10px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs span {
  color: var(--ink);
  font-weight: 700;
}

.hero {
  position: relative;
  width: min(1160px, calc(100vw - 32px));
  min-height: 430px;
  margin: 28px auto 0;
  display: flex;
  align-items: stretch;
  background: #120d16;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fffaf1;
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(16, 9, 19, 0.8) 0%, rgba(16, 9, 19, 0.68) 35%, rgba(16, 9, 19, 0.08) 62%);
  content: "";
  pointer-events: none;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 54px;
}

.hero-copy {
  width: min(590px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: #ffd783;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.18;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  overflow-wrap: anywhere;
}

h2 {
  margin: 48px 0 16px;
  font-size: clamp(25px, 3vw, 34px);
}

h3 {
  margin: 30px 0 10px;
  font-size: 22px;
}

.hero p {
  max-width: 540px;
  margin: 0 0 24px;
  color: #f7e6c7;
  font-size: 19px;
}

.page-shell {
  padding: 34px 0 56px;
}

article {
  width: min(920px, 100%);
}

.toc {
  max-width: 920px;
  margin: 0 0 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(36, 24, 14, 0.08);
}

.toc summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 900;
  color: var(--green);
}

.toc nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0 18px 18px;
}

.toc a {
  display: inline-flex;
}

section {
  scroll-margin-top: 104px;
}

table {
  width: 100%;
  margin: 20px 0 28px;
  border-collapse: collapse;
  overflow: hidden;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #2a202f;
  color: #fff7e8;
}

tr:last-child td {
  border-bottom: 0;
}

.author-box {
  margin-top: 42px;
  padding: 18px;
  background: #efe4d4;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
}

.author-box p {
  margin: 4px 0;
}

.site-footer {
  background: #1d1720;
  color: #fff7e8;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.footer-links a {
  color: #ffd783;
}

.redirect-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #1d1720;
  color: #fff7e8;
  text-align: center;
}

.redirect-page a {
  margin-top: 14px;
}

@media (max-width: 1100px) {
  body {
    font-size: 16px;
  }

  .header-inner,
  .breadcrumbs,
  .hero-inner,
  .page-shell,
  .footer-inner {
    width: min(calc(100vw - 22px), 1160px);
  }

  .header-inner {
    min-height: 62px;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 36px;
    gap: 6px;
  }

  .brand img {
    width: 66px;
    height: 44px;
  }

  .desktop-nav {
    display: none;
  }

  .header-actions {
    gap: 6px;
    margin-left: 0;
    justify-self: end;
    min-width: 0;
  }

  .brand {
    margin-right: 0;
  }

  .btn {
    min-height: 36px;
    padding: 0 8px;
    font-size: 11px;
  }

  .mobile-menu {
    display: block;
    justify-self: end;
  }

  .mobile-menu summary {
    width: 36px;
    height: 36px;
  }

  .hero {
    width: min(calc(100vw - 22px), 1160px);
    min-height: 390px;
    margin-top: 18px;
  }

  .hero-inner {
    padding: 38px 18px;
    align-items: flex-start;
  }

  h1 {
    max-width: calc(100vw - 22px);
    font-size: 29px;
  }

  .hero p {
    max-width: calc(100vw - 22px);
    font-size: 16px;
  }

  .page-shell {
    padding-top: 24px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th,
  td {
    padding: 11px 12px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .brand img {
    width: 68px;
  }

  .btn {
    padding: 0 8px;
    font-size: 12px;
  }

  .header-inner {
    width: calc(100vw - 14px);
  }
}

.header-inner {
  width: auto;
  width: min(368px, calc(100dvw - 22px));
  margin: 0 11px;
  min-height: 62px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 36px;
  gap: 6px;
}

.brand img {
  width: 54px;
  height: 44px;
}

.desktop-nav {
  display: none;
}

.header-actions {
  gap: 6px;
  margin-left: 0;
  justify-self: end;
  min-width: 0;
}

.btn {
  min-height: 36px;
  padding: 0 7px;
  font-size: 10px;
}

.mobile-menu {
  display: block;
  justify-self: end;
}

.mobile-menu summary {
  width: 36px;
  height: 36px;
}

@media (min-width: 1101px) {
  .header-inner {
    width: min(1160px, calc(100vw - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 18px;
  }

  .brand img {
    width: 132px;
    height: 54px;
  }

  .desktop-nav {
    display: flex;
  }

  .header-actions {
    gap: 10px;
    margin-left: auto;
    justify-self: auto;
  }

  .btn {
    min-height: 42px;
    padding: 0 18px;
    font-size: 17px;
  }

  .mobile-menu {
    display: none;
  }
}

@media (max-width: 760px) {
  .hero {
    width: auto;
    max-width: none;
    margin: 18px 11px 0;
    display: block;
    min-height: 0;
    background: var(--panel);
    color: var(--ink);
  }

  .hero::after {
    display: none;
  }

  .hero-image {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background-color: #120d16;
  }

  .hero-inner {
    width: auto;
    padding: 22px 18px 24px;
  }

  .hero-copy {
    width: min(100%, 310px);
  }

  .eyebrow {
    color: var(--gold-dark);
  }

  .hero h1 {
    max-width: 100%;
    font-size: 26px;
    color: var(--ink);
    word-break: normal;
    overflow-wrap: break-word;
  }

  .hero p {
    max-width: 100%;
    color: var(--muted);
  }
}
