:root {
  --bg: #f3f6f9;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #0ea5e9;
  --accent-2: #0369a1;
  --accent-soft: rgba(14, 165, 233, 0.12);
  --ok: #059669;
  --warn: #b45309;
  --danger: #dc2626;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1000px 420px at 8% -8%, rgba(14, 165, 233, 0.14), transparent 55%),
    radial-gradient(800px 360px at 100% 0%, rgba(56, 189, 248, 0.1), transparent 50%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
.hidden { display: none !important; }
a { color: var(--accent-2); text-decoration: none; }
button, input, select { font: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1140px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; font-size: 1.1rem;
}
.brand.compact { font-size: 0.95rem; margin-bottom: 8px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: #fff; font-size: 0.72rem; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #2563eb);
}
.brand-accent { color: var(--accent-2); }
.nav-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nav-links > a:not(.btn) { color: var(--muted); font-size: 0.92rem; }
.nav-links > a:not(.btn):hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 600; font-size: 0.92rem;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-outline { background: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent-2); }

.hero {
  max-width: 1140px; margin: 0 auto; padding: 48px 20px 24px;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: center;
}
.eyebrow { color: var(--accent-2); font-weight: 600; font-size: 0.85rem; margin-bottom: 10px; }
.hero h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; margin-bottom: 14px; }
.lede { color: var(--muted); font-size: 1.05rem; line-height: 1.55; margin-bottom: 20px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-stats { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { font-size: 1.1rem; }
.hero-stats span { color: var(--muted); font-size: 0.82rem; }

.usage-card, .feature, .info-card, .price-card, .auth-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.usage-card { padding: 22px; }
.usage-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pill {
  display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-2); font-size: 0.75rem; font-weight: 600;
}
.meter { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 14px 0 8px; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #2563eb); }
.usage-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.88rem; margin-bottom: 16px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini { background: var(--bg); border-radius: 10px; padding: 12px; }
.mini span { display: block; font-weight: 700; }
.mini small { color: var(--muted); }

.section, .narrow { max-width: 1140px; margin: 0 auto; padding: 28px 20px 40px; }
.narrow { max-width: 920px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.tiny { font-size: 0.82rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { padding: 18px; }
.feature h3 { margin-bottom: 8px; font-size: 1rem; }
.feature p { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.info-card { padding: 18px; }
.info-card ul { margin: 10px 0 16px 18px; color: var(--muted); }
.info-card li { margin: 6px 0; }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.price-card { padding: 20px; position: relative; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.price-card .pill { position: absolute; top: 14px; right: 14px; }
.price { font-size: 1.7rem; font-weight: 700; margin: 10px 0 14px; }
.price small { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.price-card ul { list-style: none; margin-bottom: 16px; color: var(--muted); }
.price-card li { padding: 6px 0; border-bottom: 1px dashed var(--line); }

.files-layout { max-width: 1140px; margin: 0 auto; min-height: 60vh; display: grid; grid-template-columns: 220px 1fr; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--line); padding: 18px 0;
}
.side-link, .sidebar a {
  display: block; width: 100%; text-align: left; padding: 10px 20px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 0.92rem;
}
.side-link.active, .side-link:hover, .sidebar a:hover { color: var(--accent-2); background: var(--accent-soft); }
.sidebar hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.files-main { padding: 24px 20px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar input[type="search"] {
  min-width: 180px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.file-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.file-table th, .file-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.file-table th { background: var(--bg); color: var(--muted); font-weight: 600; }
.file-table tr:last-child td { border-bottom: 0; }
.file-name { font-family: var(--mono); font-size: 0.85rem; }

.code-block {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 12px; margin: 16px 0 20px;
  font-family: var(--mono); font-size: 0.9rem;
}
.auth-wrap { min-height: 70vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(420px, 100%); padding: 24px; }
.auth-card.flat { width: 100%; margin-top: 8px; }
.auth-card h2, .auth-card h3 { margin-bottom: 6px; }
.auth-card form { display: grid; gap: 12px; margin-top: 14px; }
.auth-card label { display: grid; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.auth-card input, .auth-card select {
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff;
}
.check { display: flex !important; align-items: center; gap: 8px; grid-template-columns: none !important; }
.alert {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 0.9rem;
  background: #fff7ed; color: var(--warn); border: 1px solid #fed7aa;
}
.alert.danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.alert.ok { background: #ecfdf5; color: var(--ok); border-color: #a7f3d0; }

.toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow);
}
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 20px; }
.footer-inner {
  max-width: 1140px; margin: 0 auto; padding: 24px 20px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero, .feature-grid, .price-grid, .dual, .files-layout { grid-template-columns: 1fr; }
  .nav-links > a:not(.btn):nth-child(-n+4) { display: none; }
}
