@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-0: #12050c;
  --bg-1: #220a15;
  --bg-2: #3a1224;
  --ink: #f8f2eb;
  --ink-dark: #2b1721;
  --muted: #4f3540;
  --paper: #f7efe8;
  --paper-soft: #fffaf4;
  --line: rgba(255, 255, 255, 0.18);
  --line-dark: rgba(43, 23, 33, 0.2);
  --accent: #ff6e4c;
  --accent-2: #ffc47a;
  --radius: 16px;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  min-height: 100vh;
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1000px 700px at 8% -8%, #6b2440 0%, transparent 56%),
    radial-gradient(800px 560px at 94% 0%, #4d1830 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 64%, #0f040a 100%);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: #12070f;
  color: #fff;
  padding: 10px 14px;
  border-radius: 9px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

body > nav:not(.global-nav) {
  display: none !important;
}

#read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  background: rgba(255, 255, 255, 0.1);
}

#read-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.global-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  padding: 0.8rem 0;
  background: rgba(19, 8, 13, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.global-nav.scrolled {
  background: rgba(16, 6, 11, 0.94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}

.global-nav-inner {
  width: min(var(--max), calc(100% - 1.6rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.global-brand {
  text-decoration: none;
  color: #fff4eb;
  font-family: "Bebas Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(1.35rem, 3.6vw, 1.9rem);
  line-height: 1;
}

.global-brand span {
  color: var(--accent-2);
}

.global-nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #fdeee4;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.38rem 0.62rem;
}

.global-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.82rem;
}

.global-nav-links a {
  text-decoration: none;
  color: #f6e7dc;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.73rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 0.2rem;
}

.global-nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.global-nav-links a.active {
  color: #ffe2c5;
}

.global-nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.global-nav-links a:hover::after,
.global-nav-links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

main,
.page-main {
  width: min(var(--max), calc(100% - 1.6rem));
  margin: 5.5rem auto 1.4rem;
  padding: clamp(0.95rem, 2.5vw, 1.6rem);
  background: linear-gradient(180deg, rgba(247, 239, 232, 0.99), rgba(255, 250, 244, 0.99));
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink-dark);
}

nav[aria-label="Breadcrumb"] {
  width: min(var(--max), calc(100% - 1.6rem));
  margin: 5.2rem auto 0.6rem;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: rgba(255, 250, 244, 0.95);
  padding: 0.52rem 0.7rem;
}

nav[aria-label="Breadcrumb"] ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.78rem;
  color: #5a424d;
}

nav[aria-label="Breadcrumb"] li + li::before {
  content: "/";
  margin-right: 0.45rem;
  opacity: 0.58;
}

nav[aria-label="Breadcrumb"] a {
  text-decoration: none;
}

nav[aria-label="Breadcrumb"] a:hover {
  text-decoration: underline;
}

body.no-main {
  padding-top: 4.9rem;
}

body.no-main > :not(.global-nav):not(.skip-link):not(#read-progress):not(.site-footer):not(#back-to-top):not(.quick-actions):not(script):not(style):not(link):not(meta):not(title) {
  width: min(var(--max), calc(100% - 1.6rem));
  margin-inline: auto;
}

body.no-main > h1,
body.no-main > h2,
body.no-main > h3,
body.no-main > p,
body.no-main > ul,
body.no-main > ol,
body.no-main > section,
body.no-main > article,
body.no-main > form,
body.no-main > table,
body.no-main > div,
body.no-main > blockquote {
  background: linear-gradient(180deg, rgba(247, 239, 232, 0.99), rgba(255, 250, 244, 0.99));
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 0.95rem;
  margin-top: 0.85rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  color: var(--ink-dark);
}

body.no-main > h1 {
  margin-top: 0.2rem;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.62rem;
  font-family: "Bebas Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: #2d1822;
}

h1 {
  font-size: clamp(2.3rem, 7.5vw, 4.9rem);
}

h2 {
  font-size: clamp(1.75rem, 4.8vw, 2.9rem);
  margin-top: 1rem;
}

h3 {
  font-size: clamp(1.4rem, 3.8vw, 2.25rem);
  margin-top: 0.7rem;
}

p,
li,
label,
th,
td {
  color: #4d333d;
  font-size: 0.97rem;
}

a {
  color: #8a332f;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px dashed rgba(138, 51, 47, 0.5);
  outline-offset: 2px;
}

p,
ul,
ol,
blockquote,
table,
form,
section,
article {
  margin-top: 0.72rem;
}

ul,
ol {
  padding-left: 1.2rem;
}

article,
section,
.highlight,
.card,
blockquote {
  border: 1px solid rgba(43, 23, 33, 0.16);
  border-radius: 12px;
  background: var(--paper-soft);
  padding: 0.92rem;
}

form {
  border: 1px solid rgba(43, 23, 33, 0.2);
  border-radius: 12px;
  background: #fff;
  padding: 0.9rem;
  display: grid;
  gap: 0.5rem;
}

input,
textarea,
select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(43, 23, 33, 0.35);
  border-radius: 0;
  outline: none;
  background: transparent;
  font: inherit;
  color: #2f1c25;
  padding: 0.44rem 0.1rem;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button,
.btn,
.cta,
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 0.58rem 0.9rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  color: #1a0b12;
  background: linear-gradient(125deg, var(--accent) 0%, #ff9257 100%);
  transition: transform 0.2s ease, filter 0.2s ease;
}

button:hover,
.btn:hover,
.cta:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  transform: translateY(-2px);
  filter: saturate(1.07);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid rgba(43, 23, 33, 0.2);
}

th,
td {
  border: 1px solid rgba(43, 23, 33, 0.16);
  padding: 0.52rem;
  text-align: left;
}

.table-wrap {
  margin-top: 0.8rem;
  overflow-x: auto;
  border-radius: 12px;
}

img,
video,
iframe {
  max-width: 100%;
  border-radius: 10px;
}

pre,
code,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

code,
kbd,
samp {
  background: rgba(43, 23, 33, 0.08);
  border: 1px solid rgba(43, 23, 33, 0.16);
  border-radius: 6px;
  padding: 0.04rem 0.28rem;
}

pre {
  margin-top: 0.8rem;
  overflow-x: auto;
  border: 1px solid rgba(43, 23, 33, 0.18);
  border-radius: 10px;
  background: #fff;
  padding: 0.7rem;
  color: #2e1d27;
}

pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

details {
  margin-top: 0.72rem;
  border: 1px solid rgba(43, 23, 33, 0.16);
  border-radius: 10px;
  background: #fff;
  padding: 0.6rem 0.7rem;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.heading-anchor {
  margin-left: 0.36rem;
  font-size: 0.72em;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

h2:hover .heading-anchor,
h3:hover .heading-anchor,
h4:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}

.toc-box {
  margin-top: 0.82rem;
  border: 1px dashed rgba(43, 23, 33, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  padding: 0.62rem 0.7rem;
}

.toc-box summary {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: #6a4a56;
}

.toc-list {
  margin-top: 0.46rem;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}

.toc-list a {
  text-decoration: none;
  color: #6f2d2f;
  font-size: 0.88rem;
}

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

.reveal-block {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-block.in {
  opacity: 1;
  transform: translateY(0);
}

.quick-actions {
  position: fixed;
  right: 0.85rem;
  bottom: 0.9rem;
  z-index: 101;
  display: flex;
  gap: 0.45rem;
}

.quick-actions a {
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.5rem 0.72rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  backdrop-filter: blur(8px);
  color: #ffeede;
  background: rgba(17, 7, 12, 0.84);
}

.quick-actions a.primary {
  border-color: rgba(0, 0, 0, 0.3);
  color: #1a0c12;
  background: linear-gradient(135deg, var(--accent) 0%, #ff9c5f 100%);
}

#back-to-top {
  position: fixed;
  right: 0.95rem;
  bottom: 3.65rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(17, 7, 12, 0.84);
  color: #fff3e9;
  font-size: 18px;
  cursor: pointer;
  display: none;
  z-index: 102;
}

.site-footer {
  width: min(var(--max), calc(100% - 1.6rem));
  margin: 0 auto 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #f3dece;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.75rem;
}

.site-footer a {
  color: #ffdbbe;
}

@media (max-width: 920px) {
  nav[aria-label="Breadcrumb"] {
    margin-top: 4.8rem;
  }

  .global-nav-toggle {
    display: inline-flex;
  }

  .global-nav-links {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0.8rem;
    right: 0.8rem;
    background: rgba(19, 8, 13, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.7rem;
    gap: 0.48rem;
  }

  .global-nav-links.open {
    display: flex;
  }

  main,
  .page-main {
    margin-top: 5rem;
  }
}

@media (max-width: 620px) {
  main,
  .page-main,
  body.no-main > :not(.global-nav):not(.skip-link):not(#read-progress):not(.site-footer):not(#back-to-top):not(.quick-actions):not(script):not(style):not(link):not(meta):not(title),
  .site-footer {
    width: calc(100% - 0.9rem);
  }

  .quick-actions {
    right: 0.55rem;
    bottom: 0.55rem;
  }

  #back-to-top {
    right: 0.6rem;
    bottom: 3.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
