@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:wght@500;600&family=Outfit:wght@400;500;600;700&display=swap");

:root {
  --bg: #051424;
  --bg-0: #061018;
  --surface: #0a1526;
  --surface-low: #0d1c2d;
  --surface-high: #1c2b3c;
  --surface-highest: #273647;
  --text: #d4e4fa;
  --muted: #c4c7cb;
  --outline: #44474b;
  --primary-btn: #1a7fd4;
  --primary-btn-hover: #156bb3;
  --secondary: #a0c9ff;
  --secondary-container: #0077cc;
  --ok: #4ae176;
  --danger: #ffb4ab;
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Outfit", "Segoe UI", system-ui, sans-serif;
  --display: "EB Garamond", Georgia, serif;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  background-color: var(--bg-0);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(26, 127, 212, 0.15) 0%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

a { color: var(--secondary); text-decoration: none; }
a:hover { color: #d2e4ff; }

.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.sidebar {
  display: none;
  width: 260px;
  flex-shrink: 0;
  background: var(--surface-low);
  border-right: 1px solid var(--outline);
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-direction: column;
  gap: 8px;
}
.sidebar .side-brand img { height: 48px; width: auto; max-width: 240px; display: block; margin-bottom: 4px; object-fit: contain; }
.sidebar .side-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(196, 199, 203, 0.7);
  font-weight: 600;
  margin-bottom: 12px;
}
.sidebar a.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sidebar a.side-link:hover { background: var(--surface-high); color: #fff; }
.sidebar a.side-link.active {
  background: var(--secondary-container);
  color: #fff;
}
.sidebar .side-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--outline); }

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(5, 20, 36, 0.9);
  border-bottom: 1px solid var(--outline);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topnav .brand img { height: 46px; width: auto; max-width: 210px; display: block; object-fit: contain; }
.topnav .links { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.topnav .links a { color: rgba(212, 228, 250, 0.7); font-size: 0.875rem; font-weight: 600; }
.topnav .links a:hover { color: #fff; }

/* Hamburger + mobile drawer */
.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(5, 20, 36, 0.98);
  border-bottom: 1px solid var(--outline);
  padding: 12px 16px 20px;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
  z-index: 60;
}
.mobile-nav-panel a {
  display: block;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}
.mobile-nav-panel a:hover,
.mobile-nav-panel a.active {
  background: var(--surface-high);
  color: #fff;
}
.mobile-nav-panel .btn {
  margin-top: 8px;
  text-align: center;
  color: #fff !important;
}
[data-mobile-nav].is-open .mobile-nav-panel { display: flex; }
body.nav-open { overflow: hidden; }

@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .topnav.mobile-only { display: none; }
  .hamburger { display: none !important; }
  .mobile-nav-panel { display: none !important; }
}
@media (max-width: 1023px) {
  .hamburger { display: inline-flex; }
  .topnav .desktop-nav,
  .landing-nav-links.desktop-nav { display: none; }
  .topnav { position: sticky; }
  .topnav[data-mobile-nav],
  .landing-nav[data-mobile-nav] { position: sticky; }
}

.container { max-width: 1100px; margin: 0 auto; padding: 28px 20px 48px; width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary-btn);
  color: #fff !important;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  font-family: inherit;
}
.btn:hover { background: var(--primary-btn-hover); }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--outline);
  color: var(--text) !important;
}
.btn.secondary:hover { background: var(--surface-high); }
.btn.danger { background: #93000a; }
.btn.block { width: 100%; }

.card {
  background: var(--surface);
  border: 1px solid #1e293b;
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--outline);
}
.btn.github-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #24292f;
  color: #fff !important;
  margin-top: 4px;
}
.btn.github-btn:hover { background: #1b1f24; color: #fff !important; }
.btn.github-btn svg { flex-shrink: 0; }

.auth-card {
  max-width: 440px;
  margin: 48px auto;
}
.auth-wrap {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo img { height: 48px; width: auto; max-width: 260px; object-fit: contain; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 960px) {
  .grid-2 { grid-template-columns: 5fr 7fr; }
}

h1, h2, h3 {
  margin-top: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.25rem; font-family: var(--font); font-weight: 700; }

.muted { color: rgba(196, 199, 203, 0.85); }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--outline);
  font-size: 0.92rem;
}
th { color: rgba(196, 199, 203, 0.65); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; }

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  margin: 6px 0 14px;
  font: inherit;
  background: var(--bg-0);
  color: var(--text);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--secondary-container);
  box-shadow: 0 0 0 2px rgba(0, 119, 204, 0.2);
}
label {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(196, 199, 203, 0.75);
  font-weight: 600;
}

.flash { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; }
.flash.ok { background: rgba(74, 225, 118, 0.12); color: var(--ok); border: 1px solid rgba(74, 225, 118, 0.25); }
.flash.err { background: rgba(255, 180, 171, 0.12); color: var(--danger); border: 1px solid rgba(255, 180, 171, 0.25); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(26, 127, 212, 0.2);
  color: #9fd0ff;
  letter-spacing: 0.04em;
}
.badge.ok { background: rgba(74, 225, 118, 0.18); color: var(--ok); }
.badge.err { background: rgba(255, 180, 171, 0.18); color: var(--danger); }

.price { font-size: 2rem; font-weight: 700; color: var(--secondary); font-family: var(--display); }
.hero { padding: 40px 0 10px; text-align: center; }
.hero img.hero-logo { height: 72px; width: auto; max-width: 100%; margin-bottom: 18px; }
.hero-visual {
  margin-top: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(160, 201, 255, 0.35);
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(26, 127, 212, 0.18);
  background: #0a1526;
}
.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 1;
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

/* Sharp HTML hero mock (replaces soft Stitch photo) */
.hero-mock { text-align: left; }
.hero-mock-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #061018;
  border-bottom: 1px solid #1e293b;
}
.hero-mock-dots { display: inline-flex; gap: 6px; }
.hero-mock-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #273647;
  display: block;
}
.hero-mock-dots i:nth-child(1) { background: #ff5f57; }
.hero-mock-dots i:nth-child(2) { background: #febc2e; }
.hero-mock-dots i:nth-child(3) { background: #28c840; }
.hero-mock-title {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(196, 199, 203, 0.8);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.hero-mock-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
}
@media (min-width: 800px) {
  .hero-mock-body { grid-template-columns: 1.05fr 1fr; gap: 16px; padding: 20px; }
}
.hero-mock-panel {
  background: #061018;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 16px;
}
.hero-mock-check {
  width: 56px;
  height: 56px;
  margin: 4px auto 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #04150c;
  background: linear-gradient(160deg, #6bff8f, #4ae176);
  box-shadow: 0 0 24px rgba(74, 225, 118, 0.35);
}
.hero-mock-code { display: flex; flex-direction: column; }
.hero-mock-pre {
  margin: 0;
  flex: 1;
  background: #010f1f;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 14px;
  color: #9fd0ff;
  font-size: 0.82rem;
  line-height: 1.55;
  overflow-x: auto;
}

code, .mono, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}
pre {
  background: #010f1f;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  color: #b8d9f7;
}

.footer {
  margin-top: auto;
  padding: 28px 24px 40px;
  color: rgba(196, 199, 203, 0.45);
  font-size: 0.85rem;
  text-align: center;
  border-top: 1px solid var(--outline);
}

.result-grid { display: grid; gap: 8px; }
.result-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(68, 71, 75, 0.6);
  font-size: 0.92rem;
}
.result-row .k { color: rgba(196, 199, 203, 0.65); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; padding-top: 2px; }
@media (max-width: 560px) {
  .result-row { grid-template-columns: 1fr; gap: 4px; }
}

.mb-stack { margin-bottom: 24px; }
.sandbox-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(0, 119, 204, 0.18), transparent 70%);
  pointer-events: none;
}
.sandbox-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -6px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1e293b;
}
.demo-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.demo-mode-tab {
  appearance: none;
  border: 1px solid #1e293b;
  background: rgba(6, 16, 24, 0.7);
  color: var(--muted);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.demo-mode-tab:hover { color: var(--text); border-color: rgba(26, 127, 212, 0.45); }
.demo-mode-tab.active {
  color: #fff;
  border-color: rgba(26, 127, 212, 0.65);
  background: rgba(26, 127, 212, 0.18);
}
.demo-panel-help {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: rgba(196, 199, 203, 0.8);
  line-height: 1.45;
}
.sandbox-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
  min-height: 320px;
}
.sandbox-empty-ring {
  width: 88px;
  height: 88px;
  margin-bottom: 20px;
  border-radius: 50%;
  border: 2px dashed #1e293b;
  box-shadow: inset 0 0 0 1px #1e293b;
  background:
    radial-gradient(circle at center, #061018 55%, transparent 56%),
    linear-gradient(135deg, rgba(26, 127, 212, 0.12), transparent);
}

/* ── Marketing landing (PHP root `/`) ─────────────────────────────────────── */
.landing-body { display: flex; flex-direction: column; min-height: 100vh; }
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 20, 36, 0.92);
  border-bottom: 1px solid var(--outline);
  backdrop-filter: blur(16px);
}
.landing-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@media (min-width: 1024px) {
  .landing-nav-inner { padding: 16px 24px; }
}
.landing-nav .brand img { height: 46px; width: auto; max-width: 210px; display: block; object-fit: contain; }
@media (min-width: 1024px) {
  .landing-nav .brand img { height: 56px; max-width: 280px; }
  .topnav .brand img { height: 52px; max-width: 260px; }
  .sidebar .side-brand img { height: 58px; max-width: 280px; }
}
.landing-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
.landing-nav-links a {
  color: rgba(212, 228, 250, 0.72);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.landing-nav-links a:hover { color: #fff; }
.landing-nav-links .btn { color: #fff !important; }
.landing-nav { position: sticky; }
.landing-mobile-panel { max-width: none; }

.landing-hero {
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px 20px;
}
.landing-hero .hero-logo {
  height: auto;
  width: min(380px, 82vw);
  margin: 0 auto 28px;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
}
.landing-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
}
.landing-lead {
  max-width: 640px;
  margin: 0 auto 24px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(196, 199, 203, 0.9);
  text-align: center;
}
.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}
.landing-trust {
  color: rgba(160, 201, 255, 0.7);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  margin: 0 0 28px;
}
.landing-hero .hero-visual {
  margin-top: 8px;
  max-width: 100%;
}
@media (min-width: 960px) {
  .landing-hero .hero-visual {
    margin-top: 20px;
  }
}

.landing-section { padding: 56px 20px; }
.landing-alt { background: rgba(1, 15, 31, 0.45); border-top: 1px solid var(--outline); border-bottom: 1px solid var(--outline); }
.landing-wrap { max-width: 1100px; margin: 0 auto; }
.landing-section h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 12px;
}
.landing-banks { text-align: center; overflow: hidden; }
.landing-kicker {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(160, 201, 255, 0.7);
  margin: 0 0 12px;
}
.landing-bank-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 900px;
  margin: 28px auto 0;
}
.landing-chip {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

/* Infinite horizontal bank logo carousel */
.landing-banks .banks-marquee,
.banks-marquee {
  position: relative;
  display: block;
  width: 100%;
  max-width: 960px;
  margin: 32px auto 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
@media (min-width: 1100px) {
  .landing-banks .banks-marquee,
  .banks-marquee {
    max-width: 1040px;
  }
}
.banks-marquee-second { margin-top: 14px; }
.landing-banks .banks-marquee-track,
.banks-marquee-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 16px;
  width: max-content !important;
  max-width: none !important;
  will-change: transform;
}
.banks-marquee-left { animation: banks-scroll-left 38s linear infinite; }
.banks-marquee-right { animation: banks-scroll-right 44s linear infinite; }
.banks-marquee:hover .banks-marquee-track { animation-play-state: paused; }
.landing-banks .banks-marquee-item,
.banks-marquee-item {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 168px;
  height: 76px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #ffffff;
  box-sizing: border-box;
}
.landing-banks .banks-marquee-item img,
.banks-marquee-item img {
  display: block !important;
  height: 44px !important;
  width: auto !important;
  max-width: 140px !important;
  max-height: 44px !important;
  object-fit: contain !important;
}
@keyframes banks-scroll-left {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@keyframes banks-scroll-right {
  from { transform: translate3d(-50%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .banks-marquee-track {
    animation: none !important;
    transform: none !important;
  }
  .banks-marquee {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .banks-marquee-second { display: none; }
}
.landing-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 560px;
}
.landing-list li {
  padding: 12px 14px;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
}
.landing-list li::before {
  content: "▸ ";
  color: var(--secondary);
  font-weight: 700;
}
.landing-plan-featured {
  border-color: rgba(26, 127, 212, 0.55);
  box-shadow: 0 0 0 1px rgba(26, 127, 212, 0.25), var(--shadow);
}

/* Pricing page + home plan cards */
.pricing-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}
.pricing-hero {
  text-align: center;
  margin-bottom: 40px;
}
.pricing-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 12px;
}
.pricing-hero .landing-lead {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.pricing-home .landing-kicker { text-align: left; }
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}
@media (min-width: 900px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px 24px 24px;
  border-radius: 16px;
  border: 1px solid #1e293b;
  background:
    linear-gradient(180deg, rgba(26, 127, 212, 0.08) 0%, transparent 42%),
    var(--surface);
  box-shadow: var(--shadow);
}
.plan-card-featured {
  border-color: rgba(26, 127, 212, 0.55);
  background:
    linear-gradient(180deg, rgba(26, 127, 212, 0.22) 0%, rgba(10, 21, 38, 0.95) 48%),
    var(--surface);
  box-shadow: 0 0 0 1px rgba(26, 127, 212, 0.28), 0 24px 60px rgba(0, 40, 80, 0.45);
}
@media (min-width: 900px) {
  .plan-card-featured {
    transform: translateY(-6px);
  }
}
.plan-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #061018;
  background: var(--secondary);
}
.plan-card-head h2,
.plan-card-head h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}
.plan-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  min-height: 2.7em;
}
.plan-price {
  margin: 22px 0 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.plan-amount {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.03em;
}
.plan-unit {
  color: rgba(212, 228, 250, 0.65);
  font-size: 0.95rem;
  font-weight: 500;
}
.plan-yearly {
  width: 100%;
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: rgba(160, 201, 255, 0.85);
}
.plan-features {
  list-style: none;
  margin: 18px 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
  flex: 1;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: rgba(212, 228, 250, 0.88);
  line-height: 1.4;
}
.plan-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #061018;
  background: var(--ok);
  margin-top: 1px;
}
.plan-cta {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: auto;
}
.pricing-footnote,
.pricing-more {
  margin: 28px 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: rgba(196, 199, 203, 0.75);
  line-height: 1.5;
}
.pricing-more a {
  font-weight: 600;
}
.docs-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}
.docs-hero {
  text-align: center;
  margin-bottom: 28px;
}
.docs-hero h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 10px;
}
.docs-hero .landing-lead {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.docs-card h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}
.docs-card .table-wrap { overflow-x: auto; }
.docs-code {
  margin: 12px 0 0;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #1e293b;
  background: #061018;
  color: #d4e4fa;
  font-size: 0.82rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}
.docs-lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 4px;
}
.docs-lang-tab {
  appearance: none;
  border: 1px solid #1e293b;
  background: rgba(6, 16, 24, 0.75);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.docs-lang-tab:hover { color: var(--text); border-color: rgba(26, 127, 212, 0.45); }
.docs-lang-tab.active {
  color: #fff;
  border-color: rgba(26, 127, 212, 0.7);
  background: rgba(26, 127, 212, 0.22);
}
.try-demo-card {
  max-width: 520px;
  margin-top: 24px;
}
.try-demo-card .btn { margin-top: 8px; }
.try-demo-note {
  margin: 14px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
}
.try-gate {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 72px;
  text-align: center;
}
.try-gate h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin: 0 0 12px;
}
.try-gate .landing-lead {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.try-gate-card {
  text-align: left;
  margin-top: 28px;
}
.try-gate-card h3 { margin-top: 0; }
.landing-final {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 28px;
}
.landing-final .landing-lead { margin-bottom: 20px; }

.landing-footer {
  margin-top: auto;
  border-top: 1px solid var(--outline);
  padding: 40px 20px 32px;
  background: #010f1f;
}
.landing-footer-inner {
  max-width: 1100px;
  margin: 0 auto 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}
.landing-footer-logo { height: 36px; width: auto; max-width: 180px; display: block; margin-bottom: 12px; object-fit: contain; }
.landing-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.landing-footer-links a {
  color: rgba(196, 199, 203, 0.7);
  font-size: 0.85rem;
  font-weight: 600;
}
.landing-footer-links a:hover { color: #fff; }
.landing-footer-legal {
  max-width: 1100px;
  margin: 0 auto;
  color: rgba(196, 199, 203, 0.4);
  font-size: 0.8rem;
}
.landing-footer-legal a { color: rgba(160, 201, 255, 0.75); }
.landing-footer-legal a:hover { color: #fff; }
.landing-footer-partner { min-width: 180px; }
.partner-link { display: inline-block; }
.partner-logo {
  height: 44px;
  width: auto;
  max-width: 200px;
  display: block;
  object-fit: contain;
}
.footer a { color: rgba(160, 201, 255, 0.8); }
.footer a:hover { color: #fff; }

/* Skeleton loading */
.js .page-skeleton {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg-0);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(26, 127, 212, 0.12) 0%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.js.page-ready .page-skeleton {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.sk-bar {
  height: 60px;
  border-bottom: 1px solid var(--outline);
  background: rgba(5, 20, 36, 0.9);
}
.sk-hero { max-width: 1100px; margin: 0 auto; padding: 48px 20px; text-align: center; }
.sk-line {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #0d1c2d 0%, #1c2b3c 50%, #0d1c2d 100%);
  background-size: 200% 100%;
  animation: sk-shine 1.2s ease-in-out infinite;
}
.sk-logo { width: min(280px, 70%); height: 48px; margin: 0 auto 28px; }
.sk-title { width: min(520px, 90%); height: 36px; margin: 0 auto 16px; }
.sk-sub { width: min(420px, 80%); height: 16px; margin: 0 auto 24px; }
.sk-btn-row { display: flex; gap: 12px; justify-content: center; margin-bottom: 28px; }
.sk-btn { width: 140px; height: 44px; }
.sk-visual { width: 100%; height: min(360px, 42vw); margin: 0 auto; border-radius: 12px; }
.sk-card {
  background: var(--surface);
  border: 1px solid #1e293b;
  border-radius: var(--radius);
  padding: 22px;
}
@keyframes sk-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Responsive tables / mobile cards */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.form-stack .btn { margin-top: 4px; }
.key-reveal {
  display: block;
  margin-top: 8px;
  word-break: break-all;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mobile-cards { display: none; }
.mobile-card {
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  padding: 14px;
  margin-bottom: 10px;
}
.mobile-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.mobile-card-meta { font-size: 0.9rem; margin-top: 4px; }

.email-preview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.email-preview-frame-wrap {
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #051424;
}
.email-preview-frame {
  width: 100%;
  min-height: 720px;
  border: 0;
  background: #051424;
}

.inline-status-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.inline-status-form select {
  width: auto;
  min-width: 120px;
  margin: 0;
}
.inline-status-form .btn { width: auto; }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 8px 0 16px;
}
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}
.legal-page h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 8px;
}
.legal-updated {
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: rgba(196, 199, 203, 0.7);
}
.legal-lead {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.05rem;
}
.legal-section {
  margin-bottom: 26px;
}
.legal-section h2 {
  font-size: 1.2rem;
  margin: 0 0 10px;
}
.legal-section p,
.legal-section li {
  color: rgba(212, 228, 250, 0.86);
  line-height: 1.65;
  font-size: 0.95rem;
}
.legal-section ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
}
.legal-related {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #1e293b;
  color: var(--muted);
}
.agree-terms {
  margin: 14px 0 4px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}
.agree-terms a { font-weight: 600; }
.agree-terms input { margin-top: 3px; }

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  margin: 0;
}
.check-line input {
  width: auto;
  margin: 0;
}

@media (max-width: 720px) {
  .container { padding: 20px 14px 40px; }
  .card { padding: 16px; }
  .desktop-table { display: none; }
  .mobile-cards { display: block; }
  .btn { width: 100%; }
  .btn.danger { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .topnav .brand img,
  .landing-nav .brand img {
    height: 48px;
    max-width: min(220px, 58vw);
  }
  .landing-nav-inner,
  .topnav { min-height: 64px; }
  h1 { font-size: 1.6rem; }
  pre, .landing-code { font-size: 0.75rem; }
  .result-row { grid-template-columns: 1fr; }
  .sandbox-result { min-height: 280px !important; }
  table th, table td { white-space: nowrap; }
  .inline-status-form { flex-direction: column; align-items: stretch; }
  .inline-status-form select,
  .inline-status-form .btn { width: 100%; }
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
  .admin-home-grid .btn { width: 100%; }
}

@media (min-width: 721px) {
  .mobile-cards { display: none !important; }
  .desktop-table { display: block; }
}


/* Unpaid invoice banner (dashboard + billing) */
.unpaid-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 180, 171, 0.35);
  background: linear-gradient(135deg, rgba(255, 180, 171, 0.12), rgba(26, 127, 212, 0.08));
}
.unpaid-banner-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--danger);
  font-weight: 700;
}
.unpaid-banner-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  color: #fff;
}
.unpaid-banner-list {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--text);
}
.unpaid-banner-list li { margin: 4px 0; }
.unpaid-banner-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 42rem;
}
.unpaid-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
@media (max-width: 720px) {
  .unpaid-banner-actions { width: 100%; }
  .unpaid-banner-actions .btn { flex: 1 1 auto; text-align: center; }
}

/* Pay reference modal */
body.pay-modal-open { overflow: hidden; }
.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.pay-modal.is-open,
.pay-modal:not([hidden]) {
  display: flex;
}
.pay-modal[hidden] { display: none !important; }
.pay-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 20, 0.72);
  backdrop-filter: blur(2px);
}
.pay-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px 20px 18px;
}
.pay-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.pay-modal-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 700;
}
.pay-modal-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
}
.pay-modal-close {
  border: 0;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.pay-modal-close:hover { background: rgba(255,255,255,0.12); }
.pay-modal-invoice {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: rgba(0,0,0,0.18);
  margin-bottom: 4px;
}
.pay-modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

/* Billing — bank transfer activation */
.billing-pay-card { margin-top: 18px; }
.billing-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}
.billing-account-tile {
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
}
.billing-account-provider {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.billing-account-number {
  margin-top: 8px;
  font-size: 1.05rem;
}
.billing-verify-box {
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 16px;
  margin-top: 14px;
  background: rgba(0,0,0,0.12);
}
.billing-verify-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.billing-verify-tabs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: start;
}
.billing-or {
  align-self: center;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
button.linkish {
  background: none;
  border: 0;
  color: var(--accent, #3b82f6);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}
@media (max-width: 720px) {
  .billing-verify-tabs { grid-template-columns: 1fr; }
  .billing-or { text-align: center; }
}

/* Billing OCR confirm + tips */
.billing-ocr-confirm {
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}
.billing-ocr-candidates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.billing-ocr-candidate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(0,0,0,0.15);
  font-size: 0.9rem;
}
.billing-ocr-candidate:has(input:checked) {
  border-color: rgba(56, 189, 248, 0.7);
  background: rgba(56, 189, 248, 0.12);
}
.billing-ocr-excerpt {
  margin-top: 12px;
  font-size: 0.85rem;
}
.billing-ocr-excerpt pre {
  white-space: pre-wrap;
  max-height: 160px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.25);
  font-size: 0.78rem;
}
.billing-ocr-tips {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.8rem;
  line-height: 1.45;
}
.billing-shot-preview {
  margin-top: 10px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  overflow: hidden;
  max-width: 280px;
  background: #000;
}
.billing-shot-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
}
