:root {
  --ink: #0b1f2a;
  --ink-2: #163645;
  --amber: #e89a1a;
  --amber-2: #f5b942;
  --mint: #1f8a70;
  --paper: #f3f6f8;
  --card: #ffffff;
  --line: #d7e1e8;
  --muted: #5d7380;
  --shadow: 0 18px 50px rgba(11, 31, 42, 0.12);
  --radius: 18px;
  --font: "Onest", sans-serif;
  --display: "Unbounded", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(232, 154, 26, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(31, 138, 112, 0.12), transparent 50%),
    linear-gradient(180deg, #f7fafc 0%, var(--paper) 40%, #eef3f6 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.doc-section a[href^="mailto:"],
.highlight-box a[href^="mailto:"] {
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(243, 246, 248, 0.86);
  border-bottom: 1px solid rgba(215, 225, 232, 0.8);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand span {
  color: var(--amber);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover,
.nav a.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  color: #1a1205;
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

.doc-hero {
  padding: 2.5rem 0 2rem;
}

.doc-hero .shell {
  text-align: center;
}

.doc-hero .tag {
  display: inline-block;
  background: rgba(31, 138, 112, 0.12);
  color: var(--mint);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.doc-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 4vw, 2.35rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 0.65rem;
}

.doc-hero .meta {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.doc-wrap {
  width: min(820px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 4rem;
}

.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.5rem;
  margin-bottom: 2.5rem;
}

.toc h3 {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mint);
  margin-bottom: 0.85rem;
}

.toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  counter-reset: toc;
}

.toc ol li {
  counter-increment: toc;
}

.toc ol li a {
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  transition: color 0.15s;
}

.toc ol li a::before {
  content: counter(toc) ".";
  color: var(--amber);
  font-weight: 800;
  font-size: 0.85rem;
  min-width: 1.15rem;
}

.toc ol li a:hover {
  color: var(--mint);
}

.doc-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 5.5rem;
}

.doc-section h2 {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.02em;
}

.doc-section h2 .sec-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(232, 154, 26, 0.14);
  color: #9a6208;
  border-radius: 0.65rem;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.doc-section p {
  color: var(--ink-2);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.doc-section p:last-child {
  margin-bottom: 0;
}

.doc-section .item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
  color: var(--ink-2);
}

.doc-section .item .num {
  color: var(--amber);
  font-weight: 700;
  min-width: 2.25rem;
  flex-shrink: 0;
}

.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}

.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--ink-2);
}

.bullet-list li::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  background: var(--mint);
  border-radius: 50%;
  margin-top: 0.55rem;
  flex-shrink: 0;
}

.glossary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.5rem 0;
}

.glossary-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
}

.glossary-item strong {
  color: var(--mint);
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.glossary-item span {
  font-size: 0.9rem;
  color: var(--ink-2);
}

.highlight-box {
  background: rgba(232, 154, 26, 0.1);
  border-left: 3px solid var(--amber);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  font-size: 0.95rem;
  color: var(--ink-2);
}

.note-box {
  background: rgba(31, 138, 112, 0.08);
  border-left: 3px solid var(--mint);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.doc-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.doc-table th {
  background: rgba(11, 31, 42, 0.04);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.82rem;
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}

.doc-table td {
  padding: 0.7rem 1rem;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.doc-table tr:last-child td {
  border-bottom: none;
}

.doc-table tr:nth-child(even) td {
  background: rgba(243, 246, 248, 0.65);
}

.footer {
  margin: 1rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer-brand-title {
  font-size: 1.05rem;
  line-height: 1.25;
}

.footer-brand-title strong {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.footer-tagline {
  color: var(--muted);
  font-size: 0.92rem;
}

.eco-neon {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1f8a70;
  text-shadow:
    0 0 6px rgba(31, 138, 112, 0.55),
    0 0 14px rgba(31, 138, 112, 0.35);
  animation: eco-neon-pulse 2.8s ease-in-out infinite;
}

@keyframes eco-neon-pulse {
  0%,
  100% {
    color: #1f8a70;
    text-shadow:
      0 0 5px rgba(31, 138, 112, 0.4),
      0 0 12px rgba(31, 138, 112, 0.22);
  }
  50% {
    color: #2bb896;
    text-shadow:
      0 0 10px rgba(43, 184, 150, 0.7),
      0 0 22px rgba(43, 184, 150, 0.4);
  }
}

.footer-docs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.footer-docs a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  font-size: 0.88rem;
}

.footer-docs a:hover,
.footer-docs a.active {
  color: var(--mint);
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .nav .nav-hide-sm {
    display: none;
  }

  .doc-hero {
    padding: 1.75rem 0 1.25rem;
  }

  .toc {
    padding: 1.1rem 1.15rem;
  }
}
