:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-soft: rgba(15, 23, 42, 0.62);
  --panel-light: #172033;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --cyan-ghost: rgba(56, 189, 248, 0.1);
  --violet-ghost: rgba(129, 140, 248, 0.12);
  --shadow: 0 22px 64px rgba(2, 6, 23, 0.42);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1160px;
  --narrow: 760px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: linear-gradient(180deg, #020617 0%, #0f172a 46%, #111827 100%);
  color: var(--text);
  font-family: var(--sans);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.6;
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.14), transparent 28%),
    radial-gradient(circle at 80% 8%, rgba(129, 140, 248, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.98));
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

code,
pre {
  font-family: var(--mono);
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.narrow {
  width: min(calc(100% - 2rem), var(--narrow));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
  background: rgba(2, 6, 23, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 1.08rem;
  font-weight: 760;
  letter-spacing: 0.01em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 0.12rem;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
}

.hero {
  padding: 5.4rem 0 3.4rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #dbeafe;
  border: 1px solid rgba(147, 197, 253, 0.22);
  background: rgba(30, 41, 59, 0.5);
  border-radius: 999px;
  padding: 0.46rem 0.88rem;
  font-size: 0.92rem;
  box-shadow: var(--shadow);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.92fr;
  gap: 1.4rem;
  align-items: start;
  margin-top: 1.35rem;
}

.hero-grid-wide {
  grid-template-columns: 1.25fr 0.95fr;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.35rem, 5vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.lead {
  margin: 0 0 1.5rem;
  max-width: 64ch;
  color: #cbd5e1;
  font-size: 1.08rem;
}

.actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 1.25rem 0 1.45rem;
}

.actions-center {
  justify-content: center;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.84rem 1.22rem;
  border-radius: 999px;
  font-weight: 680;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #020617;
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.2);
  color: var(--muted);
}

.card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(15, 23, 42, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: 1.25rem;
}

.stack-gap {
  display: grid;
  gap: 1rem;
}

.hero-card {
  padding: 1.28rem;
}

.hero-bullets {
  display: grid;
  gap: 0.72rem;
  color: #cbd5e1;
  margin-top: 1rem;
}

.hero-bullets div::before {
  content: "•";
  margin-right: 0.6rem;
  color: var(--accent);
}

.schema-slab {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-sm);
  padding: 0.95rem;
}

.schema-title {
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.code-sample {
  margin: 0;
  font-size: 0.88rem;
  color: #dbeafe;
  white-space: pre-wrap;
  word-break: break-word;
}

.stat-row {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1rem;
}

.stat-row-2 {
  grid-template-columns: repeat(2, 1fr);
}

.stat {
  padding: 0.92rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-sm);
}

.stat strong {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 0.15rem;
}

.price-chip,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
  padding: 0.34rem 0.72rem;
  font-size: 0.9rem;
}

.badge {
  padding: 0.25rem 0.62rem;
  font-size: 0.82rem;
}

.notice {
  margin-top: 1rem;
  padding: 0.92rem 1rem;
  border-left: 3px solid var(--warning);
  background: rgba(245, 158, 11, 0.08);
  color: #fde68a;
  border-radius: 0 14px 14px 0;
}

.notice strong {
  color: #fff7d6;
}

.link-inline {
  color: #c7e8ff;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

section {
  padding: 2.2rem 0;
}

.section-head {
  max-width: 54rem;
  margin-bottom: 1.28rem;
}

.section-head h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.grid-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.feature-card,
.step-card,
.faq-card,
.support-card {
  padding: 1.18rem;
}

.feature-card h3,
.step-card h3,
.faq-card h3,
.support-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.07rem;
}

.feature-card p,
.step-card p,
.faq-card p,
.support-card p {
  margin: 0;
  color: #cbd5e1;
}

.step-count {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.74rem;
}

.compare-wrap {
  overflow: hidden;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 0.95rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.compare-table th {
  color: #dbeafe;
  font-weight: 700;
}

.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.support-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-hero {
  padding: 3rem 0 1rem;
}

.page-hero.compact {
  padding-bottom: 0.4rem;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  letter-spacing: -0.03em;
}

.page-hero p {
  margin: 0;
  color: #cbd5e1;
  max-width: 64ch;
}

.status-box {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  padding: 0.95rem 1rem;
}

.status-box strong {
  display: block;
  margin-bottom: 0.15rem;
}

.status-box.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f8e5ab;
}

.status-box.success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #d7f8e0;
}

.status-box.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ffd0d0;
}

.form-wrap {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.42rem;
  font-weight: 620;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 0.92rem;
  background: rgba(2, 6, 23, 0.5);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}

textarea {
  min-height: 170px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.85);
  outline-offset: 2px;
}

.inline-code {
  font-family: var(--mono);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 0.14rem 0.42rem;
}

.footer {
  padding: 2.2rem 0 2.5rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.92rem;
}

.hidden {
  display: none !important;
}

.list-clean {
  margin: 0;
  padding-left: 1.1rem;
  color: #cbd5e1;
}

.support-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.legal-copy h2 {
  margin: 0 0 0.2rem;
  font-size: 1.12rem;
}

.legal-copy p {
  margin: 0;
  color: #cbd5e1;
}

.meta-list {
  display: grid;
  gap: 0.4rem;
}

/* Tool */

.tool-section {
  padding-top: 1rem;
}

.tool-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.tool-sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 94px;
}

.tool-main {
  min-width: 0;
}

.tool-card-head,
.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.tool-card-head h2,
.panel-head h3,
.result-topbar h2,
.chart-card h3 {
  margin: 0;
}

.tool-card-head p,
.panel-head p,
.result-topbar p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.tab-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.tab-button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.46);
  color: var(--muted);
  padding: 0.55rem 0.85rem;
  min-height: 40px;
}

.tab-button.active {
  color: #02131f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.tab-panel {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #dbeafe;
}

.field-grid {
  display: grid;
  gap: 0.85rem;
}

.range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 0.8rem;
  align-items: center;
}

.range-input {
  padding: 0;
  min-height: 0;
  background: transparent;
  border: 0;
}

.range-input::-webkit-slider-runnable-track {
  height: 8px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.35), rgba(129, 140, 248, 0.35));
  border-radius: 999px;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
}

.range-input::-moz-range-track {
  height: 8px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.35), rgba(129, 140, 248, 0.35));
  border-radius: 999px;
}

.range-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
}

.empty-state {
  padding: 1.6rem;
  text-align: center;
  color: #cbd5e1;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.results-stack {
  display: grid;
  gap: 1rem;
}

.result-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.metric-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.82), rgba(15, 23, 42, 0.86));
}

.metric-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-value {
  margin-top: 0.15rem;
  font-size: 1.62rem;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.metric-help {
  margin-top: 0.22rem;
  color: #cbd5e1;
  font-size: 0.84rem;
}

.two-up,
.premium-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-list {
  display: grid;
  gap: 0.58rem;
}

.summary-list div {
  padding: 0.72rem 0.82rem;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.confusion-grid {
  display: grid;
  grid-template-columns: 0.9fr repeat(2, 1fr);
  gap: 0.62rem;
}

.conf-cell {
  min-height: 88px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(30, 41, 59, 0.42);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.conf-head {
  color: var(--muted);
  font-size: 0.84rem;
}

.conf-number {
  font-size: 1.7rem;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.conf-foot {
  font-size: 0.86rem;
  color: #cbd5e1;
}

.chart-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-card {
  min-width: 0;
}

.chart-shell {
  margin-top: 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.45);
  padding: 0.6rem;
  min-height: 320px;
}

.chart-svg {
  width: 100%;
  height: auto;
}

.chart-svg text {
  fill: #cbd5e1;
  font-family: var(--sans);
  font-size: 12px;
}

.chart-legend {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-item::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}

.empty-chart {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 1rem;
}

.pro-lock {
  border: 1px dashed rgba(148, 163, 184, 0.26);
  background: rgba(30, 41, 59, 0.26);
  border-radius: 16px;
  padding: 1rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.table-wrap th,
.table-wrap td {
  padding: 0.78rem 0.82rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  text-align: left;
  white-space: nowrap;
}

.table-wrap th {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
}

.table-wrap tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.28);
}

.tool-note,
.chart-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.warning-list {
  margin: 0;
  padding-left: 1rem;
}

.warning-list li {
  color: #fde68a;
}

.file-drop {
  display: grid;
  gap: 0.7rem;
}

.access-pill {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(320px, calc(100vw - 2rem));
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.92);
  box-shadow: var(--shadow);
  padding: 1rem;
  z-index: 40;
}

.access-pill strong {
  display: block;
  margin-bottom: 0.2rem;
}

.pill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.pill-actions a {
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.6);
}

.pill-actions a.primary {
  border-color: transparent;
  color: #020617;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

@media (max-width: 1024px) {
  .hero-grid,
  .tool-layout,
  .support-grid,
  .grid-3,
  .chart-grid,
  .two-up,
  .premium-grid {
    grid-template-columns: 1fr;
  }

  .tool-sidebar {
    position: static;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .support-strip,
  .result-topbar {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .nav {
    min-height: 68px;
  }

  .hero {
    padding-top: 4rem;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .stat-row,
  .stat-row-2,
  .confusion-grid {
    grid-template-columns: 1fr;
  }

  .range-row {
    grid-template-columns: 1fr;
  }

  .access-pill {
    left: 1rem;
    right: 1rem;
    width: auto;
  }
}

.legend-cyan { color: #38bdf8; }
.legend-violet { color: #818cf8; }
.legend-slate { color: #64748b; }
.top-gap-sm { margin-top: 0.55rem; }
