:root {
  --bg-base: #1A1B1E;
  --bg-surface: #222328;
  --bg-card: #25262B;
  --bg-card-hover: #2C2E33;
  --bg-elevated: rgba(37, 38, 43, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.11);
  --border-accent: rgba(224, 122, 95, 0.35);

  --text-primary: #F1F3F5;
  --text-secondary: #C1C2C5;
  --text-muted: #909296;

  --brand-primary: #E07A5F;
  --brand-secondary: #F2CC8F;
  --brand-tertiary: #81B29A;
  --brand-gradient: linear-gradient(135deg, #E07A5F 0%, #F2CC8F 100%);
  --brand-glow: rgba(224, 122, 95, 0.16);

  --accent-green: #81B29A;
  --accent-green-bg: rgba(129, 178, 154, 0.10);
  --accent-green-border: rgba(129, 178, 154, 0.28);

  --accent-amber: #F2CC8F;
  --accent-amber-bg: rgba(242, 204, 143, 0.10);
  --accent-amber-border: rgba(242, 204, 143, 0.28);

  --font-sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'TikTok Sans', 'Host Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --nav-height: 76px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-card: 0 24px 60px -15px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] {
  --bg-base: #F4F1EA;
  --bg-surface: #EFECE6;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8F6F0;
  --bg-elevated: rgba(244, 241, 234, 0.88);
  --border-subtle: rgba(26, 27, 30, 0.08);
  --border-card: rgba(26, 27, 30, 0.12);
  --border-accent: rgba(224, 122, 95, 0.35);

  --text-primary: #1A1B1E;
  --text-secondary: #4A4D55;
  --text-muted: #787B84;

  --brand-primary: #D06346;
  --brand-secondary: #D49B3B;
  --brand-tertiary: #5B9279;
  --brand-gradient: linear-gradient(135deg, #E07A5F 0%, #D99B38 100%);
  --brand-glow: rgba(224, 122, 95, 0.10);

  --accent-green: #3E7B5F;
  --accent-green-bg: rgba(129, 178, 154, 0.14);
  --accent-green-border: rgba(91, 146, 121, 0.32);

  --accent-amber: #B4781A;
  --accent-amber-bg: rgba(242, 204, 143, 0.22);
  --accent-amber-border: rgba(212, 155, 59, 0.38);

  --shadow-card: 0 20px 50px -12px rgba(26, 27, 30, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 32px);
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  line-height: 1.65;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 30%, transparent 100%);
  opacity: 0.45;
}

.bg-glow {
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 420px;
  background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: var(--bg-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-nav__inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.brand-logo img {
  height: 36px;
  width: 36px;
  border-radius: 10px;
  object-fit: contain;
}

.brand-logo__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(224, 122, 95, 0.14);
  color: var(--brand-primary);
  border: 1px solid var(--border-accent);
}

.brand-logo__tag--green {
  background: rgba(129, 178, 154, 0.14);
  color: var(--accent-green);
  border-color: var(--accent-green-border);
}

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-btn {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  border-color: var(--brand-primary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.theme-btn svg {
  width: 18px;
  height: 18px;
}

.icon-sun { display: block; }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  transition: all 0.2s ease;
}

.btn-back-home:hover {
  color: var(--text-primary);
  border-color: var(--brand-primary);
  background: var(--bg-card-hover);
  transform: translateX(-2px);
}

.btn-back-home svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.btn-back-home:hover svg {
  transform: translateX(-3px);
}

.page-hero {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 24px 36px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(224, 122, 95, 0.12);
  border: 1px solid var(--border-accent);
  color: var(--brand-primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.pill-badge--green {
  background: var(--accent-green-bg);
  border-color: var(--accent-green-border);
  color: var(--accent-green);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 10px var(--brand-primary);
}

.pill-badge--green .pill-dot {
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 14px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.page-hero__meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.page-hero__meta span.sep {
  opacity: 0.4;
}

.layout-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 24px 96px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  flex: 1;
}

@media (max-width: 992px) {
  .layout-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 28px);
}

@media (max-width: 992px) {
  .sidebar {
    position: static;
  }
}

.sidebar__sticky {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.sidebar__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.sidebar__link:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.sidebar__link.active {
  color: var(--brand-primary);
  background: rgba(224, 122, 95, 0.10);
  border-left-color: var(--brand-primary);
  font-weight: 600;
}

.sidebar__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.65;
}

.sidebar__help-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sidebar__help-box strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 0.82rem;
}

.sidebar__help-box a {
  color: var(--brand-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.sidebar__help-box a:hover {
  text-decoration: underline;
}

.doc-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow-card);
}

.doc-intro {
  padding-bottom: 32px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 1.04rem;
  color: var(--text-secondary);
}

.doc-intro strong {
  color: var(--text-primary);
  font-weight: 600;
}

.section-block {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
  scroll-margin-top: calc(var(--nav-height) + 32px);
}

.section-block:last-of-type {
  border-bottom: none;
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.section-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(224, 122, 95, 0.12);
  border: 1px solid var(--border-accent);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.section-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  display: block;
  margin-bottom: 4px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.section-text {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin-bottom: 16px;
}

.section-text:last-child {
  margin-bottom: 0;
}

.section-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.info-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.info-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  flex-shrink: 0;
}

.info-card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.legal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0;
}

.legal-list li {
  position: relative;
  padding-left: 28px;
  font-size: 0.96rem;
  color: var(--text-secondary);
}

.legal-list li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 8px var(--brand-primary);
}

.legal-list li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.alert-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  margin-top: 20px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.alert-box svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-box.green {
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  color: var(--text-secondary);
}

.alert-box.green svg,
.alert-box.green strong {
  color: var(--accent-green);
}

.alert-box.amber {
  background: var(--accent-amber-bg);
  border: 1px solid var(--accent-amber-border);
  color: var(--text-secondary);
}

.alert-box.amber svg,
.alert-box.amber strong {
  color: var(--accent-amber);
}

.doc-cta {
  margin-top: 28px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(224, 122, 95, 0.12) 0%, rgba(242, 204, 143, 0.06) 100%);
  border: 1px solid var(--border-accent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.doc-cta--green {
  background: linear-gradient(135deg, rgba(129, 178, 154, 0.14) 0%, rgba(224, 122, 95, 0.08) 100%);
  border-color: var(--accent-green-border);
}

.doc-cta__text h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.doc-cta__text p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.doc-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 9999px;
  background: var(--brand-primary);
  color: #1A1B1E;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 24px -6px rgba(224, 122, 95, 0.45);
  transition: all 0.2s ease;
}

.doc-cta__btn:hover {
  background: var(--brand-secondary);
  transform: translateY(-2px);
}

.crosslink-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
}

.crosslink-bar:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.crosslink-bar__info span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.crosslink-bar__info strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
}

.crosslink-bar__arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(224, 122, 95, 0.12);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-footer {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 56px 24px 36px;
  margin-top: auto;
}

.site-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.footer-brand p {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 380px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.footer-col a:hover {
  color: var(--brand-primary);
}

.footer-legal-bar {
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
