:root {
  --bg: #0d1321;
  --bg-soft: #141c2f;
  --panel: #18233a;
  --text: #edf1f7;
  --muted: #aab7cf;
  --primary: #5fa7ff;
  --primary-strong: #327be0;
  --line: #293758;
  --success: #6dd3b6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #1b2c4b 0%, var(--bg) 42%);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  background: rgba(13, 19, 33, 0.85);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
  padding-top: max(0px, env(safe-area-inset-top));
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  min-height: 40px;
  padding: 0.45rem 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.brand img {
  width: 34px;
  height: 34px;
}

.nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--text);
}

.nav a.active {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(95, 167, 255, 0.45);
}

.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
}

.hero::before {
  right: -120px;
  top: -210px;
  background: rgba(95, 167, 255, 0.2);
}

.hero::after {
  left: -180px;
  bottom: -280px;
  background: rgba(109, 211, 182, 0.12);
}

.section-kpis {
  padding: 12px 0 44px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 0.8rem;
}

.kpi {
  background: linear-gradient(180deg, rgba(33, 49, 81, 0.8), rgba(20, 29, 48, 0.8));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 0.8rem;
}

.kpi-value {
  display: block;
  font-size: 1.38rem;
  font-weight: 800;
  color: #ffffff;
}

.kpi-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.docs-grid .card {
  display: flex;
  flex-direction: column;
}

.doc-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.doc-link:hover {
  color: #88beff;
}

.notice {
  margin-top: 1rem;
  border: 1px solid #47628f;
  background: rgba(26, 38, 62, 0.7);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  color: #c8d4ea;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--success);
  font-weight: 700;
  font-size: 0.76rem;
  margin-bottom: 1rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  line-height: 1.12;
}

.hero-text p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-badges {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  border: 1px solid #3f5a89;
  background: rgba(46, 73, 119, 0.33);
  color: #d7e5ff;
  border-radius: 999px;
  padding: 0.35rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0.72rem 1.1rem;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: 0 6px 22px rgba(55, 125, 234, 0.33);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.hero-card {
  background: linear-gradient(180deg, rgba(34, 52, 87, 0.7), rgba(24, 35, 58, 0.7));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem;
}

.hero-card h3 {
  margin-top: 0;
}

.hero-card ul {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.8;
  color: var(--muted);
}

.status-list {
  padding-left: 0;
  list-style: none;
}

.status-list li {
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(114, 143, 198, 0.35);
}

.status-list li:last-child {
  border-bottom: 0;
}

.status-link {
  margin-top: 0.8rem;
}

.section {
  padding: 56px 0;
  scroll-margin-top: 80px;
}

.section-soft {
  background: rgba(17, 25, 41, 0.55);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-title {
  margin-top: 0;
  margin-bottom: 1.1rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.section-intro {
  margin-top: -0.25rem;
  margin-bottom: 1rem;
  color: var(--muted);
  max-width: 900px;
  line-height: 1.6;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #3f5a89;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.card h3 {
  margin-top: 0;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.timeline {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.75rem;
  line-height: 1.55;
}

.timeline li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
}

.rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.9rem;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 1rem;
}

.faq {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 0.95rem 1rem;
}

.faq-item h3 {
  margin: 0 0 0.5rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.contact-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.9rem;
}

.rule {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 1rem;
}

.rule h3 {
  margin-top: 0;
}

.rule p {
  margin-bottom: 0;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 calc(34px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.92rem;
}

.doc-shell {
  min-height: calc(100vh - 80px);
}

.doc-panel {
  background: linear-gradient(180deg, rgba(24, 35, 58, 0.88), rgba(20, 30, 49, 0.9));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem;
}

.doc-toolbar {
  display: flex;
  gap: 0.9rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.doc-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.doc-title {
  margin: 0 0 1rem;
  font-size: clamp(1.3rem, 3.4vw, 2rem);
}

.doc-content {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.doc-prose {
  line-height: 1.62;
  color: #e7eefc;
}

.doc-prose h1,
.doc-prose h2,
.doc-prose h3 {
  margin-top: 1.15rem;
  margin-bottom: 0.75rem;
}

.doc-prose p {
  margin: 0.5rem 0 0.75rem;
}

.doc-prose ul,
.doc-prose ol {
  margin: 0.5rem 0 1rem 1.2rem;
}

.doc-prose li {
  margin: 0.2rem 0;
}

.doc-prose code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.06rem 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #d8e6ff;
}

.doc-prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}

.doc-prose blockquote {
  margin: 0.9rem 0;
  border-left: 3px solid #4e6fa6;
  padding: 0.2rem 0.8rem;
  color: #c8d6f2;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 8px 8px 0;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.7rem 0 1rem;
}

.doc-table td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.5rem;
  vertical-align: top;
}

.doc-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  color: #e5eefc;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
}

.doc-alert {
  border: 1px solid #3f5a89;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: rgba(37, 52, 84, 0.5);
}

.doc-alert h3 {
  margin-top: 0;
}

.doc-alert-error {
  border-color: #8b4b62;
  background: rgba(110, 34, 59, 0.35);
}

/* Smooth entrance transitions */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .container {
    width: min(1120px, calc(100% - 1.5rem));
  }

  .hero {
    padding: 58px 0 44px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    order: 2;
  }

  .hero-text {
    order: 1;
  }

  .cards,
  .rules,
  .process-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 920px) {
  .topbar-inner {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.55rem 0 0.65rem;
  }

  .brand {
    min-height: 42px;
    margin-right: auto;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 0.45rem;
    padding-top: 0.2rem;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    white-space: normal;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
    width: 100%;
  }

  .hero-grid,
  .cards,
  .rules,
  .process-grid,
  .contact-grid,
  .kpis {
    grid-template-columns: 1fr;
  }

  .kpi {
    padding: 0.8rem 0.75rem;
  }
}

@media (max-width: 600px) {
  .container {
    width: calc(100% - 1rem);
  }

  .section {
    padding: 44px 0;
  }

  .hero {
    padding: 46px 0 36px;
  }

  .eyebrow {
    font-size: 0.72rem;
    margin-bottom: 0.7rem;
  }

  h1 {
    font-size: clamp(1.52rem, 7.2vw, 2rem);
    line-height: 1.18;
  }

  .hero-text p {
    font-size: 0.97rem;
    line-height: 1.56;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .btn {
    width: 100%;
    min-height: 44px;
    padding: 0.72rem 0.9rem;
  }

  .hero-card,
  .card,
  .rule,
  .timeline li {
    border-radius: 12px;
  }

  .section-title {
    margin-bottom: 0.8rem;
    font-size: clamp(1.18rem, 6vw, 1.56rem);
    line-height: 1.25;
  }

  .card p,
  .rule p,
  .timeline li,
  .muted {
    font-size: 0.95rem;
  }

  .footer {
    font-size: 0.86rem;
  }

  .doc-panel {
    padding: 0.8rem;
    border-radius: 12px;
  }

  .doc-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 390px) {
  .brand span {
    font-size: 0.92rem;
  }

  .hero-card ul {
    padding-left: 1rem;
  }

  .kpi-value {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  body {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
