/* BASE */
:root {
    --bg: #100f18;
    --panel: #191725;
    --line: #353040;
    --gold: #e6bd68;
    --text: #f4eee3;
    --muted: #bdb7c8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.85 Arial, Helvetica, sans-serif; }
a { color: var(--gold); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
.wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: absolute; top: -90px; left: 20px; z-index: 99; background: var(--gold); color: #15101b; padding: 10px; }
.skip:focus { top: 10px; }
/* HEADER */
.header { position: sticky; top: 0; z-index: 20; background: #13111ced; backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-row { min-height: 83px; display: flex; gap: 30px; align-items: center; }
.brand { color: var(--gold); text-decoration: none; font: bold 24px/1.1 Georgia, serif; letter-spacing: 1px; white-space: nowrap; }
.brand small { display: block; font: 9px/1.8 Arial; letter-spacing: 6px; text-align: center; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: #e3dce8; text-decoration: none; font-size: 14px; padding: 14px 0; }
.nav a:hover, .nav a.active { color: var(--gold); }
.button { display: inline-flex; justify-content: center; padding: 11px 24px; background: linear-gradient(110deg, #f4d991, #c99742); color: #22190e; border-radius: 5px; font-size: 14px; font-weight: bold; text-decoration: none; }
.menu { display: none; background: transparent; color: var(--gold); border: 1px solid var(--line); font-size: 22px; padding: 5px 12px; }
/* HERO */
.hero { height: clamp(470px, 34vw, 650px); position: relative; isolation: isolate; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 66% center; z-index: -2; }
.hero:after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#080a25d9,transparent 70%),linear-gradient(0deg,var(--bg),transparent 25%); }
.hero-inner { height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.eyebrow { color: var(--gold); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; }
h1 { font: bold clamp(38px,5vw,66px)/1.08 Georgia,serif; max-width: 590px; margin: 12px 0 20px; }
.hero p { max-width: 410px; color: #d8d3e6; margin: 0 0 24px; }
.hero .fine { font-size: 11px; margin-top: 12px; }
/* LONG READ */
.layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 58px; padding-top: 44px; padding-bottom: 72px; }
.toc { position: sticky; top: 118px; align-self: start; border-left: 1px solid #8b6f41; padding-left: 20px; }
.toc p { color: var(--gold); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 14px; }
.toc a { display: block; font-size: 13px; text-decoration: none; color: var(--muted); margin: 9px 0; }
.toc a:hover { color: var(--gold); }
article { min-width: 0; }
article p, article li { color: var(--muted); }
article h2 { font: bold 32px/1.25 Georgia,serif; margin: 0 0 20px; color: #f1dfb8; }
article h3 { font-size: 19px; color: #e9d9b7; margin: 25px 0 12px; }
section.chapter { padding: 36px 0; border-bottom: 1px solid var(--line); }
.number { font-size: 11px; letter-spacing: 2px; color: var(--gold); display: block; margin-bottom: 12px; }
.intro { font-size: 18px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; margin: 28px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
caption { text-align: left; background: #231e2d; padding: 14px 18px; color: #e8d5a9; font-weight: bold; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead { background: #302719; color: #f0d699; }
td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #191722; }
figure { margin: 32px 0; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
figcaption { font-size: 11px; color: #90879d; margin-top: 7px; }
.callout { padding: 22px 26px; margin: 28px 0; border-left: 2px solid var(--gold); background: linear-gradient(110deg,#2a2230,#191722); }
.callout p { margin: 0; }
.steps { padding-left: 24px; }
.steps li { margin-bottom: 14px; padding-left: 6px; }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 18px 0; font-weight: bold; color: #e8dfd0; }
details p { margin: 0 0 20px; }
.end-cta { text-align: center; padding: 35px; margin-top: 35px; background: radial-gradient(ellipse at top,#302446,#181521); border: 1px solid #5c4934; border-radius: 8px; }
.end-cta h2 { font-size: 28px; }
.footer { border-top: 1px solid var(--line); background: #0b0a11; padding: 34px 0; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer nav { display: flex; gap: 24px; }
.footer nav a, .footer p { font-size: 12px; color: #a49bad; }
.back-top { text-decoration: none; font-size: 13px; }
@media(max-width:1000px) {
    .layout { grid-template-columns: 170px minmax(0,1fr); gap: 30px; }
    .nav { gap: 16px; }
    .header-row { gap: 20px; }
}
@media(max-width:800px) {
    .header-row { flex-wrap: wrap; padding-block: 12px; min-height: 76px; }
    .header-row > .button { margin-left: auto; }
    .menu { display: block; }
    .nav { display: none; order: 4; width: 100%; flex-wrap: wrap; margin: 0; }
    .nav.open { display: flex; }
    .nav a { padding: 5px 0; }
    .layout { display: block; padding-top: 20px; }
    .toc { position: static; margin: 20px 0; }
    .toc a { display: inline-block; margin-right: 18px; }
    .hero { height: 500px; }
    .hero:after { background: linear-gradient(90deg,#080a25ee,#080a2533),linear-gradient(0deg,var(--bg),transparent 30%); }
    h1 { max-width: 350px; font-size: 44px; }
    .hero p { max-width: 300px; font-size: 15px; }
    .footer-row { align-items: flex-start; flex-direction: column; }
}
@media(max-width:480px) {
    .wrap { width: calc(100% - 36px); }
    .brand { font-size: 20px; }
    .header-row { gap: 12px; }
    .header-row > .button { padding: 8px 13px; }
    h1 { font-size: 38px; max-width: 280px; }
    .hero img { object-position: 64% center; }
    .hero p { max-width: 250px; }
    article h2 { font-size: 28px; }
    table { min-width: 570px; }
    .footer nav { flex-wrap: wrap; gap: 14px; }
}
@media(prefers-reduced-motion:reduce) {
    html { scroll-behavior: auto; }
}
