:root {
  --bg-1: #ecebff;
  --bg-2: #dce8ff;
  --ink: #121a44;
  --muted: #5c6792;
  --line: rgba(101, 118, 190, 0.28);
  --card: rgba(255, 255, 255, 0.78);
  --card-strong: rgba(255, 255, 255, 0.92);
  --brand: #4d63ff;
  --brand-2: #6a79ff;
  --ok: #10915f;
  --warn: #8f6a00;
  --err: #a22844;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 18px 40px rgba(64, 79, 145, 0.16);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 8% 8%, rgba(140, 123, 255, 0.24), transparent 34%),
    radial-gradient(circle at 94% 20%, rgba(132, 192, 255, 0.22), transparent 28%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
}

.bg-layer {
  position: fixed;
  z-index: 0;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(60px);
}

.bg-a { left: -90px; top: -120px; background: rgba(138, 121, 255, 0.5); }
.bg-b { right: -120px; bottom: -170px; background: rgba(126, 188, 255, 0.45); }

.container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 14px 56px;
}

/* Compatibility layer for SEO satellite pages generated earlier */
.site-shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 14px 56px;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  margin-bottom: 14px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-weight: 800;
}

.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(77, 99, 255, 0.34);
  padding: 0 11px;
  color: var(--brand);
  background: rgba(77, 99, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.seo-hero h1 {
  margin: 0;
}

.hero-lead {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 18px;
}

.hero-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integration-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integration-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-strong);
  padding: 0 12px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8c7bff, var(--brand));
  box-shadow: 0 0 0 5px rgba(77, 99, 255, 0.18);
}

.main-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  overflow-x: auto;
  order: 3;
  padding-bottom: 2px;
}

.main-menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 10px;
}

.main-menu a:hover { background: rgba(255, 255, 255, 0.5); color: var(--ink); }

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.api-pill.online { color: var(--ok); border-color: rgba(16, 145, 95, 0.36); }
.api-pill.offline { color: var(--err); border-color: rgba(162, 40, 68, 0.36); }

.hero,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  gap: 14px;
  padding: 20px 16px;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 8vw, 74px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(77, 99, 255, 0.34);
  padding: 0 11px;
  color: var(--brand);
  background: rgba(77, 99, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 18px;
}

.hero-form {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-form input {
  flex: 1 1 250px;
  min-height: 52px;
}

.hero-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.hero-metrics div {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-strong);
  padding: 10px;
}

.hero-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.hero-metrics strong {
  display: block;
  font-size: 38px;
  line-height: 1;
  margin: 4px 0;
}

.hero-metrics em {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
}

.card {
  padding: 18px 16px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.016em;
}

h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
}

.sub {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--muted);
}

.section-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.section-head.compact h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.scenario-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.scenario-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-strong);
  padding: 12px;
}

.scenario-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(77, 99, 255, 0.33);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
}

.scenario-grid h3 { margin: 10px 0 8px; font-size: 24px; }
.scenario-grid p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.4; }

.workspace {
  display: grid;
  gap: 14px;
}

.tool-layout {
  display: grid;
  gap: 12px;
}

.tool-column {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  padding: 12px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 12px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  min-height: 34px;
  padding: 0 12px;
  cursor: pointer;
}

.chip.active {
  color: #20378f;
  border-color: rgba(77, 99, 255, 0.48);
  background: rgba(77, 99, 255, 0.14);
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.tool-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
  padding: 11px;
  text-align: left;
  cursor: pointer;
}

.tool-card.active {
  border-color: rgba(77, 99, 255, 0.52);
  background: rgba(77, 99, 255, 0.12);
}

.tool-card.locked {
  border-color: rgba(143, 106, 0, 0.42);
  background: rgba(253, 245, 213, 0.72);
}

.tool-card .tool-name {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
}

.tool-card .tool-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  min-height: 34px;
}

.tool-card .tool-status {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 700;
}

.tool-status.live { color: var(--ok); border: 1px solid rgba(16,145,95,.28); background: rgba(16,145,95,.11); }
.tool-status.locked { color: var(--warn); border: 1px solid rgba(143,106,0,.34); background: rgba(143,106,0,.12); }
.tool-status.planned { color: #665f82; border: 1px solid rgba(102,95,130,.3); background: rgba(102,95,130,.1); }

.runner-box {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  padding: 12px;
}

.field-row {
  display: grid;
  gap: 6px;
}

.field-row label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

.range-row {
  display: grid;
  gap: 6px;
}

.range-row output {
  color: var(--muted);
  font-size: 13px;
}

.file-queue {
  margin: 10px 0;
  display: grid;
  gap: 8px;
}

.file-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-strong);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.file-row .name {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row .meta {
  color: var(--muted);
  font-size: 12px;
}

.file-row .controls {
  display: inline-flex;
  gap: 6px;
}

.mini-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  min-width: 32px;
  min-height: 32px;
  font-weight: 800;
  cursor: pointer;
}

.tool-options {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.option-grid {
  display: grid;
  gap: 8px;
}

.run-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  border: none;
  border-radius: var(--radius-sm);
  min-height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 20px rgba(77, 99, 255, 0.28);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 20px rgba(77, 99, 255, 0.28);
}

.btn.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
}

.btn.sm {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-sm {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.result-card .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-badge {
  border-radius: 999px;
  min-height: 30px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

.result-badge.loading { color: #3d4ec7; border-color: rgba(61,78,199,.4); background: rgba(61,78,199,.1); }
.result-badge.success { color: var(--ok); border-color: rgba(16,145,95,.34); background: rgba(16,145,95,.1); }
.result-badge.error { color: var(--err); border-color: rgba(162,40,68,.34); background: rgba(162,40,68,.09); }

.result-stage {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  padding: 12px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(77,99,255,.2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.result-stage.success .spinner,
.result-stage.error .spinner { animation: none; }

.result-stage.success .spinner {
  border-color: rgba(16,145,95,.28);
  background: radial-gradient(circle, rgba(16,145,95,.75) 30%, transparent 32%);
}

.result-stage.error .spinner {
  border-color: rgba(162,40,68,.25);
  background: radial-gradient(circle, rgba(162,40,68,.7) 30%, transparent 32%);
}

.result-stage h3 {
  margin: 0;
  font-size: 22px;
}

.result-stage .meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.progress-line {
  margin-top: 10px;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(77, 99, 255, 0.13);
  overflow: hidden;
}

.progress-line span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #5f74ff, #3f55f8);
  transition: width .25s ease;
}

.download {
  margin-top: 10px;
  color: var(--ok);
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
}

.debug-box {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,.74);
}

.debug-box summary { cursor: pointer; font-weight: 700; }

.debug-box pre {
  margin: 10px 0 0;
  border-radius: 10px;
  background: #101b4a;
  color: #d7e5ff;
  padding: 10px;
  min-height: 100px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.44;
}

.plans {
  display: grid;
  gap: 8px;
}

.plan {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
  padding: 11px;
  text-align: left;
  cursor: pointer;
}

.plan p { margin: 0; font-size: 18px; font-weight: 800; }
.plan small { display: block; margin-top: 2px; font-size: 15px; color: var(--muted); }

.plan.active {
  border-color: rgba(77,99,255,.5);
  background: rgba(77,99,255,.14);
}

.link-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.link-grid a {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
  padding: 10px 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
  padding: 10px 12px;
  margin-bottom: 8px;
}

.faq summary { cursor: pointer; font-weight: 800; }
.faq p { margin: 8px 0 0; color: var(--muted); line-height: 1.45; }

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.modal[hidden],
.account-drawer[hidden] { display: none; }

.modal {
  position: fixed;
  z-index: 20;
  inset: 0;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 34, 0.48);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  max-width: 520px;
  margin: 7vh auto 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-strong);
  padding: 18px;
  box-shadow: 0 28px 60px rgba(6, 13, 49, 0.28);
}

.icon-close {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-card .icon-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.notice {
  margin: 10px 0 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.8);
  padding: 8px 10px;
  font-size: 13px;
}

.notice.ok { color: var(--ok); border-color: rgba(16,145,95,.34); background: rgba(16,145,95,.1); }
.notice.error { color: var(--err); border-color: rgba(162,40,68,.34); background: rgba(162,40,68,.1); }

.account-drawer {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 21;
  width: min(380px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-strong);
  box-shadow: 0 20px 42px rgba(24, 34, 87, 0.26);
  padding: 14px;
}

.account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.account-head h3 { font-size: 24px; margin: 0; }

.account-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.account-stats div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.74);
  padding: 8px;
}

.account-stats span { display: block; font-size: 11px; color: var(--muted); }
.account-stats strong { display: block; margin-top: 2px; font-size: 14px; }

.seo-page h1 {
  margin: 8px 0 10px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.03;
}

.seo-grid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.seo-box {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-strong);
  padding: 12px;
  color: var(--ink);
  text-decoration: none;
}

.seo-box h3 { margin: 0 0 6px; font-size: 20px; }
.seo-box p { margin: 0; color: var(--muted); line-height: 1.4; }

.seo-steps,
.seo-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.seo-steps li,
.seo-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-strong);
  padding: 10px 12px;
  color: var(--muted);
}

.reveal { opacity: 1; transform: none; }
.js-enabled .reveal { opacity: 1; transform: translateY(14px); transition: transform .55s ease; }
.js-enabled .reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 760px) {
  .container { padding: 24px 18px 58px; }
  .top-nav { flex-wrap: nowrap; }
  .main-menu {
    width: auto;
    overflow: visible;
    order: 0;
  }
  .hero { grid-template-columns: 1.2fr .8fr; align-items: stretch; padding: 24px; }
  .scenario-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1040px) {
  .scenario-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero p { font-size: 19px; }
  .seo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .spinner { animation: none; }
}
