:root {
  --brand: #79ff00;
  --brand-dark: #2e7a00;
  --brand-accent: #4caf00;
  --brand-soft: #f0fde4;
  --ink: #0e1116;
  --text: #1f2430;
  --muted: #5d6576;
  --border: #e6e8ee;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20, 24, 40, 0.06), 0 8px 24px rgba(20, 24, 40, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #79ff00;
    --brand-dark: #8fff33;
    --brand-accent: #79ff00;
    --brand-soft: #1b2812;
    --ink: #0b0d11;
    --text: #e8eaf0;
    --muted: #a3aabb;
    --border: #2c3140;
    --bg: #12151c;
    --surface: #1a1e28;
    --shadow: none;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-accent);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.brand img {
  display: block;
  height: 36px;
  width: auto;
}

.header-tag {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}

/* Hero */
.hero {
  padding: 56px 0 40px;
  background:
    radial-gradient(circle at 85% 20%, rgba(121, 255, 0, 0.18), transparent 45%),
    linear-gradient(180deg, var(--ink) 0%, #1a2230 100%);
  color: #fff;
  border-bottom: 4px solid var(--brand);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.updated {
  margin: 0;
  font-size: 0.95rem;
  color: #c9d1dc;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding-top: 32px;
  padding-bottom: 48px;
}

/* Table of contents */
.toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toc-title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding-left: 22px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.toc li {
  margin: 6px 0;
  color: var(--muted);
}

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

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

/* Content */
.content {
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
}

.intro p:first-child {
  margin-top: 0;
}

.content section {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.content section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h2 .num {
  color: var(--brand-accent);
  margin-right: 4px;
}

h3 {
  margin: 24px 0 8px;
  font-size: 1.1rem;
}

p {
  margin: 0 0 12px;
}

ul {
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
}

ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 6px;
}

ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-accent);
}

ul.columns {
  columns: 2;
  column-gap: 32px;
}

ul.columns li {
  break-inside: avoid;
}

.callout {
  padding: 14px 18px;
  background: var(--brand-soft);
  border-left: 4px solid var(--brand-accent);
  border-radius: 0 8px 8px 0;
  font-weight: 500;
}

/* Contact card */
.contact-card {
  margin: 16px 0 20px;
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-name {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
}

.contact-card dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  margin: 0;
}

.contact-card dt {
  font-weight: 600;
  color: var(--muted);
}

.contact-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer {
  padding: 24px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.site-footer p {
  margin: 0;
}

.back-to-top {
  text-decoration: none;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    max-height: none;
  }

  .toc ol {
    columns: 2;
    column-gap: 24px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 40px 0 28px;
  }

  .brand img {
    height: 30px;
  }

  .layout {
    padding-top: 20px;
    gap: 20px;
  }

  .content {
    padding: 24px 18px;
  }

  ul.columns,
  .toc ol {
    columns: 1;
  }

  .contact-card {
    padding: 16px;
  }

  .contact-card dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .contact-card dd {
    margin-bottom: 10px;
  }
}

/* Print */
@media print {
  .site-header,
  .toc,
  .site-footer {
    display: none;
  }

  .hero {
    background: none;
    color: #000;
    padding: 0 0 16px;
    border-bottom: none;
  }

  .updated {
    color: #444;
  }

  .layout {
    display: block;
    padding: 0;
  }

  .content {
    border: none;
    box-shadow: none;
    padding: 0;
  }
}
