:root {
  color-scheme: dark;
  --bg: #0b1014;
  --bg-2: #111923;
  --text: #f4f7f8;
  --muted: #9aa8ad;
  --line: rgba(255, 255, 255, 0.12);
  --panel: rgba(14, 22, 29, 0.9);
  --cyan: #57d7e7;
  --cyan-2: #1aa6b8;
  --amber: #f1b45b;
  --green: #7fd889;
  --danger: #ff7777;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  background: rgba(7, 11, 14, 0.62);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(87, 215, 231, 0.5);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(87, 215, 231, 0.09);
}

.nav {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 112px clamp(20px, 6vw, 80px) 54px;
  border-bottom: 1px solid var(--line);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 10, 13, 0.93) 0%, rgba(7, 10, 13, 0.8) 35%, rgba(7, 10, 13, 0.32) 75%, rgba(7, 10, 13, 0.65) 100%),
    linear-gradient(0deg, rgba(11, 16, 20, 0.95), rgba(11, 16, 20, 0.05) 35%);
}

.hero-content {
  position: relative;
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 720;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 12vw, 132px);
  line-height: 0.9;
}

.hero-copy {
  max-width: 590px;
  margin: 26px 0 0;
  color: #d7e1e4;
  font-size: 19px;
  line-height: 1.65;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 720;
  font-size: 14px;
  cursor: pointer;
}

.button.primary {
  background: var(--cyan);
  color: #061012;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.button:hover {
  transform: translateY(-1px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 560px;
  margin: 42px 0 0;
}

.hero-metrics div,
.plan-card,
.node-row,
.flow div,
.admin-panel,
.settings-surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 19, 25, 0.72);
}

.hero-metrics div {
  padding: 14px;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 5px 0 0;
  font-weight: 760;
}

.section {
  padding: 72px clamp(20px, 6vw, 80px);
}

.section-head {
  max-width: 700px;
  margin-bottom: 28px;
}

.section h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.intro {
  background: var(--bg);
}

.node-list {
  display: grid;
  gap: 10px;
}

.node-row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.node-row h3,
.node-row p {
  margin: 0;
}

.node-row p {
  margin-top: 4px;
  color: var(--muted);
}

.node-row strong {
  color: var(--green);
}

.node-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 22px rgba(127, 216, 137, 0.7);
}

.plans {
  background: var(--bg-2);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan-card {
  padding: 22px;
}

.plan-card h3 {
  margin: 0;
  font-size: 22px;
}

.price {
  margin: 20px 0 10px;
  font-size: 36px;
  font-weight: 820;
}

.plan-card p:not(.price) {
  min-height: 50px;
  color: var(--muted);
  line-height: 1.5;
}

.workflow {
  background: #0d1519;
}

.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.flow div {
  padding: 20px;
}

.flow span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(241, 180, 91, 0.14);
  color: var(--amber);
  font-weight: 800;
}

.flow p {
  margin: 16px 0 0;
  color: #d7e1e4;
}

.footer {
  display: flex;
  justify-content: space-between;
  padding: 26px clamp(20px, 6vw, 80px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.admin-body {
  min-height: 100vh;
  background: #0b1014;
}

.admin-shell {
  min-height: 100vh;
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-brand {
  position: fixed;
  top: 24px;
  left: 24px;
}

.admin-panel {
  width: min(420px, 100%);
  padding: 24px;
}

.admin-panel h1,
.settings-header h1 {
  margin: 0 0 22px;
  font-size: 30px;
}

label {
  display: grid;
  gap: 8px;
  color: #dfe7e9;
  font-size: 13px;
  font-weight: 680;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  accent-color: var(--cyan);
}

select option {
  background: #111923;
}

.form-note {
  min-height: 20px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.admin-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #0a0f13;
}

.admin-sidebar .brand {
  position: static;
  margin-bottom: 20px;
}

.tab-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
}

.tab-button.active,
.tab-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.tab-button.muted {
  margin-top: auto;
}

.settings-surface {
  margin: 24px;
  padding: 24px;
  background: rgba(12, 19, 25, 0.88);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.settings-actions {
  display: flex;
  gap: 10px;
}

.inline-actions {
  justify-content: flex-start;
  margin-top: 16px;
}

.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
}

.settings-section h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

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

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
}

.plans-editor {
  display: grid;
  gap: 12px;
}

.plan-editor-row {
  display: grid;
  grid-template-columns: 1.2fr 0.65fr 0.75fr 0.75fr 0.75fr 72px;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.monitor-output {
  margin: 18px 0 0;
  min-height: 180px;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080d10;
  color: #d7e1e4;
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .hero {
    min-height: 88vh;
  }

  .hero-metrics,
  .plan-grid,
  .flow {
    grid-template-columns: 1fr;
  }

  .admin-app {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .settings-header,
  .settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid,
  .plan-editor-row {
    grid-template-columns: 1fr;
  }
}
