:root {
  --bg: #0c0d14;
  --panel: #151724;
  --text: #f5f7fb;
  --muted: #b8bfcc;
  --line: rgba(255, 255, 255, 0.12);
  --green: #18e779;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(110, 53, 199, 0.28), transparent 34rem), var(--bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(12, 13, 20, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner,
.container {
  width: calc(100% - 32px);
  max-width: var(--max);
  margin: 0 auto;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand picture {
  display: block;
}

.brand img {
  width: 158px;
  display: block;
}

.header-actions,
.footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  color: #06120b;
  background: linear-gradient(180deg, var(--green), #0fc966);
  border-color: rgba(24, 231, 121, 0.72);
  box-shadow: 0 12px 26px rgba(24, 231, 121, 0.2);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.hero {
  padding: 32px 0 34px;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #17072d;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}

.hero-image {
  display: block;
  width: 100%;
}

.hero-picture {
  display: block;
}

.hero-copy {
  position: absolute;
  inset: 0 auto 0 0;
  width: 48%;
  min-width: 460px;
  padding: clamp(26px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  background: linear-gradient(90deg, rgba(14, 8, 30, 0.78), rgba(14, 8, 30, 0.24), transparent);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 14px;
  max-width: 640px;
  font-size: clamp(2rem, 3.3vw, 3.45rem);
  line-height: 1.05;
}

.hero-copy p {
  max-width: 430px;
  margin: 0 0 24px;
  color: #e7e2f2;
  font-size: 1.05rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

main,
aside,
.toc {
  min-width: 0;
}

.intro,
section,
.author,
.toc {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 23, 36, 0.92);
}

.intro,
section,
.author {
  padding: clamp(20px, 3vw, 34px);
}

.intro {
  margin-bottom: 22px;
  border-color: rgba(24, 231, 121, 0.28);
}

section {
  margin: 0 0 22px;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.2;
}

p,
li,
dd,
td,
th {
  color: var(--muted);
}

strong,
dt {
  color: var(--text);
}

.toc {
  position: sticky;
  top: 96px;
  padding: 0;
  overflow: hidden;
}

.toc summary {
  cursor: pointer;
  padding: 18px 20px;
  color: var(--text);
  font-weight: 800;
  list-style: none;
}

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

.toc summary::after {
  content: "+";
  float: right;
  color: var(--green);
}

.toc[open] summary::after {
  content: "-";
}

.toc ul {
  margin: 0;
  padding: 0 20px 20px;
  list-style: none;
}

.toc li + li {
  margin-top: 9px;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--green);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  overflow: hidden;
  border-radius: 8px;
}

caption {
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 700;
  text-align: left;
}

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

th {
  color: var(--text);
  background: rgba(24, 231, 121, 0.12);
}

ul {
  padding-left: 1.2rem;
}

dl {
  margin: 0;
}

dt {
  margin-top: 18px;
  font-weight: 800;
}

dt:first-child {
  margin-top: 0;
}

dd {
  margin: 6px 0 0;
}

.author {
  margin-top: 22px;
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: #090a10;
}

.footer-inner {
  width: calc(100% - 32px);
  max-width: var(--max);
  min-height: 118px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  max-width: 520px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 4px;
}

.footer-brand p {
  margin: 0;
}

@media (max-width: 900px) {
  .content-grid {
    display: block;
  }

  .toc {
    position: static;
    margin-bottom: 22px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
    gap: 8px;
  }

  .brand img {
    width: 92px;
  }

  .header-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 5px;
    min-width: 0;
  }

  .btn {
    min-height: 40px;
    padding: 0 9px;
    font-size: 0.82rem;
  }

  .header-actions .btn {
    flex: 0 1 auto;
    min-width: 0;
  }

  .hero {
    padding-top: 18px;
  }

  .hero-frame {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .hero-image {
    border-radius: 8px;
    border: 1px solid var(--line);
  }

  .hero-copy {
    position: static;
    width: auto;
    min-width: 0;
    margin-top: 14px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
  }

  h1 {
    font-size: 2rem;
    line-height: 1.08;
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .footer-inner {
    padding: 24px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-actions {
    width: 100%;
  }

  .footer-actions .btn {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .container,
  .footer-inner {
    width: calc(100% - 20px);
  }

  .brand img {
    width: 64px;
  }

  .header-actions .btn {
    min-height: 36px;
    padding: 0 6px;
    font-size: 0.7rem;
  }

  .hero-copy .eyebrow {
    font-size: 0.68rem;
  }

  h1 {
    font-size: 1.6rem;
    line-height: 1.15;
  }

  .intro,
  section,
  .author {
    padding: 18px;
  }

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