:root {
  --bg: #090d18;
  --bg-raised: #0e1423;
  --panel: #121a2b;
  --panel-2: #182239;
  --panel-3: #202d49;
  --ink: #f3f6ff;
  --ink-soft: #cbd5ed;
  --ink-muted: #9eabc9;
  --muted: #7f8dab;
  --border: #26334e;
  --border-strong: #3a4a6c;
  --purple: #8b6fff;
  --purple-soft: #b7a7ff;
  --cyan: #25d7ef;
  --cyan-soft: #88edf8;
  --green: #3dd6a1;
  --amber: #f6c453;
  --red: #fb7d7d;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
  --topbar: 70px;
  --font: "IBM Plex Sans Thai", "Noto Sans Thai", Thonburi, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Anuphan, "IBM Plex Sans Thai", "Noto Sans Thai", Thonburi, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 18px);
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 78% -6%, rgba(139, 111, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 12% 28%, rgba(37, 215, 239, 0.055), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(127, 141, 171, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 141, 171, 0.03) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 84%);
}

a {
  color: var(--cyan-soft);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: -1000px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
}

.skip-link:focus {
  left: 12px;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 10px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(58, 74, 108, 0.6);
  background: rgba(9, 13, 24, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--purple), #6d50e9);
  color: var(--bg);
  font-family: var(--mono);
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(139, 111, 255, 0.27);
}

.brand > span:last-child {
  display: grid;
  line-height: 1.2;
}

.brand b {
  font-family: var(--display);
  font-size: 14px;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.topbar nav {
  display: flex;
  gap: 5px;
  align-items: center;
}

.topbar nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 10px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 700;
}

.topbar nav a:hover,
.topbar nav a.active {
  background: var(--panel-2);
  color: var(--ink);
  text-decoration: none;
}

.topbar nav .nav-download {
  margin-left: 5px;
  border: 1px solid rgba(37, 215, 239, 0.3);
  color: var(--cyan-soft);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  border-color: var(--purple-soft);
  text-decoration: none;
  transform: translateY(-1px);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #7557ef, #6343d5);
  color: #fff;
  box-shadow: 0 14px 34px rgba(139, 111, 255, 0.2);
}

.button.danger {
  border-color: rgba(251, 125, 125, 0.35);
  background: rgba(251, 125, 125, 0.1);
  color: #ffaaaa;
}

.button.wide {
  width: 100%;
}

.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.section {
  padding-block: 88px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading.compact {
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(27px, 3.4vw, 38px);
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.section-heading p:last-child {
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 17px;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.status.ready {
  border-color: rgba(61, 214, 161, 0.3);
  background: rgba(61, 214, 161, 0.08);
  color: #8cebc9;
}

.status.planned {
  border-color: rgba(246, 196, 83, 0.3);
  background: rgba(246, 196, 83, 0.07);
  color: #f7d98e;
}

.status.large {
  margin-top: 10px;
  padding: 8px 12px;
  font-size: 10px;
}

.footer {
  margin-top: 54px;
  padding-block: 34px;
  border-top: 1px solid var(--border);
  background: rgba(14, 20, 35, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 28px;
}

.footer b {
  font-family: var(--display);
  font-size: 14px;
}

.footer p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 16px;
  border: 1px solid rgba(61, 214, 161, 0.35);
  border-radius: 12px;
  background: #12261f;
  color: #c7f8e6;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: rgba(251, 125, 125, 0.35);
  background: #2a151b;
  color: #ffd0d0;
}

@media (max-width: 760px) {
  :root {
    --topbar: 66px;
  }

  .shell {
    width: min(100% - 28px, 1180px);
  }

  .topbar {
    min-height: var(--topbar);
    gap: 8px;
    padding-inline: 14px;
  }

  .brand > span:last-child {
    display: none;
  }

  .topbar nav {
    min-width: 0;
    flex: 1;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .topbar nav::-webkit-scrollbar {
    display: none;
  }

  .topbar nav a {
    min-height: 44px;
    flex: 0 0 auto;
    padding-inline: 9px;
    font-size: 11px;
  }

  .topbar nav .nav-download {
    margin-left: 0;
  }

  .section {
    padding-block: 64px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .topbar,
  .hero-actions,
  .step-actions,
  .rail-footer,
  .footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }
}
