:root {
  color-scheme: dark;
  --paper: #1b151b;
  --surface: #241c23;
  --ink: #fff5ed;
  --text: #e2d5df;
  --muted: #c6abbc;
  --navy: #1b141a;
  --line: #513947;
  --blue: #ffbd99;
  --yellow: #ffaf7b;
  --header: 4.4rem;
  --radius: 1rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header) + 1rem); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 1rem/1.66 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #ffaf7b;
  outline-offset: 3px;
}
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.14; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
.wrap { width: min(73rem, calc(100% - 3rem)); margin-inline: auto; }
.skip-link {
  position: fixed;
  inset: .6rem auto auto .6rem;
  transform: translateY(-140%);
  z-index: 5;
  padding: .6rem .85rem;
  color: var(--ink);
  background: var(--yellow);
}
.skip-link:focus { transform: translateY(0); }

.site-header, .site-footer { background: var(--navy); color: #fff0ec; }
.site-header { position: sticky; top: 0; z-index: 3; border-bottom: 1px solid #5b3b4a; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.header-inner { min-height: var(--header); gap: .4rem; padding-block: .42rem; }
.identity { display: inline-flex; align-items: center; gap: .85rem; color: #fff0ec; text-decoration: none; font-size: .86rem; font-weight: 650; }
.identity img { width: 6.1rem; }
.header-actions { display: flex; align-items: center; gap: .55rem; }
.button {
  min-height: 2.8rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .55rem 1rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  font: 750 .875rem/1.25 system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { background: var(--yellow); color: #201a09; border-color: #eb8f58; }
.button-primary:hover { background: #ffd1ae; }
.button-secondary { background: #3c2938; color: #fff; border-color: #795467; }
.button-secondary:hover { background: #52364a; }
.site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--yellow); }

.context, .article-section, .legal-content { padding: clamp(1.1rem, 3.3vw, 2.25rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.context { margin-bottom: .9rem; border-inline-start: 4px solid #e88258; background: #30212e; }
.article-section { margin-bottom: .9rem; }
.article-section:target { border-color: #d98875; }
.article-section h2, .legal-content h1 { margin-bottom: 1.06rem; font-size: clamp(1.55rem, 3.3vw, 2.5rem); letter-spacing: -.035em; }
.article-section h2::before { content: ""; display: block; width: 2.35rem; height: .3rem; background: #e88258; border-radius: .3rem; margin-bottom: .8rem; }
.article-section h3, .legal-content h2 { margin: 1.35rem 0 .65rem; font-size: clamp(1.09rem, 2.2vw, 1.35rem); }
.article-section ul { padding-inline-start: 1.45rem; }
.article-section li + li { margin-top: .35rem; }
.article-section li::marker { color: var(--blue); }
.table-scroll { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: .55rem; scrollbar-color: #ac798c #3d2b37; }
table { width: 100%; min-width: 35rem; border-collapse: collapse; font-size: .925rem; }
th, td { text-align: left; vertical-align: top; padding: .7rem .8rem; }
th { background: #623947; color: #fff; }
td { border-top: 1px solid var(--line); }
tr:nth-child(even) td { background: #30222d; }
.article-image { margin: 1.4rem 0; }
.article-image img { width: 100%; border: 1px solid #705165; border-radius: .6rem; }
.article-image figcaption { margin-top: .35rem; color: var(--muted); font-size: .875rem; }
.content-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .7rem .95rem;
  background: #38252f;
  border: 1px solid #745063;
  border-radius: .6rem;
  padding: .8rem 1rem;
  margin-top: 1.25rem;
  color: var(--ink);
}
.content-action p { margin: 0; font-weight: 680; }

.legal-wrap { min-height: 56vh; padding-block: clamp(1.3rem, 4vw, 3.6rem); }
.legal-content { max-width: 51rem; margin-inline: auto; }
.legal-content h1 { margin-top: .9rem; }
.back { font-weight: 650; }
.site-footer { border-top: 1px solid #5b3b4a; }
.footer-inner { gap: .6rem 1.6rem; padding-block: 1.4rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.footer-inner nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: #fff0ec; font-size: .925rem; }
.footer-inner nav a[aria-current] { color: var(--yellow); }
.footer-inner p { flex-basis: 100%; font-size: .875rem; }
.age { display: inline-block; padding: .1rem .38rem; margin-right: .25rem; border: 1px solid #a97d90; border-radius: .25rem; font-weight: 750; }
.download-dialog { width: min(28rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); border: 1px solid #9f6179; border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 1.2rem; }
.download-dialog::backdrop { background: #110b11ce; }
.download-dialog form { margin-bottom: .7rem; text-align: right; }
.download-dialog h2 { margin-bottom: .6rem; font-size: 1.5rem; }


.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: clamp(21rem, 43vw, 32rem);
  background: #271827;
  border-bottom: 1px solid #875366;
}
.hero-art { position: absolute; aspect-ratio: 3; inset: 0 0 0 auto; width: min(79%, 76rem); height: 100%; z-index: -1; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 48%; }
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #271827 0%, #271827f5 15%, #271827d9 49%, #27182712 85%);
}
.hero-copy { padding-block: clamp(2.2rem, 6vw, 5rem); }
.hero h1 {
  max-width: 21ch;
  font-size: clamp(2.25rem, 5.2vw, 4.4rem);
  letter-spacing: -.052em;
  text-wrap: balance;
}
.hero-copy p { max-width: 58ch; margin: 1rem 0 0; color: #ffeded; }

.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding-block: .85rem;
  border-bottom: 1px solid var(--line);
}
.chapter-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .4rem .7rem;
  border: 1px solid #694657;
  border-radius: .35rem;
  background: #2a2028;
  color: #ffede6;
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.chapter-nav a:hover { background: #4e303b; color: var(--yellow); }

.article { padding-block: 1rem 3.5rem; }
.context { max-width: 63rem; margin-inline: auto; }
.article-section {
  display: grid;
  grid-template-columns: minmax(13rem, .8fr) minmax(0, 2.3fr);
  gap: clamp(1rem, 3vw, 2.7rem);
  padding-block: 1.7rem;
  margin-bottom: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.article-section:target { border-bottom-color: #d98875; }
.section-heading { min-width: 0; }
.section-copy { min-width: 0; }
.section-copy > h3:first-child { margin-top: 0; }
.section-heading h2 { font-size: clamp(1.45rem, 2.7vw, 2.1rem); text-wrap: pretty; }
.section-heading h2::before { width: 1.7rem; }
.section-copy blockquote {
  margin: 1.15rem 0 0;
  padding: .75rem 1rem;
  border-inline-start: 3px solid #e88258;
  border-radius: .35rem;
  background: #38252f;
}

@media (max-width: 54rem) {
  .wrap { width: min(46rem, calc(100% - 2rem)); }
  .hero { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-art { position: relative; width: 100%; height: auto; max-height: 14rem; overflow: hidden; }
  .hero-art img { height: auto; max-height: 14rem; object-fit: cover; object-position: center; }
  .hero-art::after { background: linear-gradient(0deg, #271827 0%, transparent 32%); }
  .hero-copy { padding-block: .5rem 1.8rem; }
  .article-section { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 35rem) {
  :root { --header: 3.75rem; }
  .wrap { width: calc(100% - 1.25rem); }
  .header-inner > .identity img { width: 4.15rem; }
  .header-inner > .identity span { display: none; }
  .header-actions { gap: .35rem; }
  .header-actions .button { padding-inline: .55rem; }
  .hero h1 { font-size: clamp(1.95rem, 7.3vw, 2.7rem); }
  .hero-copy { padding: .45rem .3rem 1.35rem; }
  .chapter-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter-nav a { padding: .35rem .55rem; }
  .article-section { padding: 1.15rem .15rem; }
  .content-action { align-items: stretch; flex-direction: column; }
  #bonus table { min-width: 24rem; }
}
