:root {
  --bg: #0a0c11;
  --panel: #12151d;
  --panel-2: #161a24;
  --elevated: #1b2030;
  --border: #232838;
  --border-soft: #1b2030;
  --accent: #5b8cff;
  --accent-2: #7aa2ff;
  --accent-dim: rgba(91, 140, 255, 0.12);
  --text: #e7eaf2;
  --muted: #8b93a7;
  --ok: #3fb950;
  --bad: #f85149;
  --warn: #d29922;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --sidebar-w: 400px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

#app-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

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

/* ---------- Top bar ---------- */
.topbar {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0e1119, #0a0c11);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: conic-gradient(from 140deg, var(--accent), #9c6bff, var(--accent));
  box-shadow: 0 0 16px rgba(91, 140, 255, 0.5);
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--muted);
  padding-left: 0.6rem;
  border-left: 1px solid var(--border);
}

.job-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.status-pill {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--panel-2);
  text-transform: lowercase;
}

.status-pill.running {
  color: var(--accent-2);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.status-pill.completed {
  color: var(--ok);
  border-color: var(--ok);
  background: rgba(63, 185, 80, 0.12);
}
.status-pill.failed,
.status-pill.rejected {
  color: var(--bad);
  border-color: var(--bad);
  background: rgba(248, 81, 73, 0.12);
}
.status-pill.awaiting_approval {
  color: var(--warn);
  border-color: var(--warn);
  background: rgba(210, 153, 34, 0.12);
}

/* ---------- App body ---------- */
.app-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--panel);
  overflow-y: auto;
  padding: 1.25rem;
}

.panel-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

label {
  display: block;
  margin: 1rem 0 0.4rem;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone p {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.dz-icon {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 2px solid var(--accent);
  position: relative;
}
.dz-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 2px;
  height: 12px;
  background: var(--accent);
}
.dz-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 2px;
  background: var(--accent);
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  font-family: var(--mono);
}

.file-list li {
  padding: 0.35rem 0.6rem;
  margin-bottom: 0.3rem;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--muted);
  word-break: break-all;
}

button {
  margin-top: 1.25rem;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

button:hover:not(:disabled) {
  background: var(--accent-2);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sidebar-hint {
  margin-top: 1rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

/* ---------- Workspace ---------- */
.workspace {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem 2rem;
  min-width: 0;
}

.view-title {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
}

/* empty state */
.empty-state {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.empty-inner {
  max-width: 26rem;
}
.empty-glyph {
  display: inline-block;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 70%),
    var(--panel-2);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.empty-inner h2 {
  margin: 0 0 0.5rem;
}

/* ---------- Progress stepper ---------- */
.progress {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.progress li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
  padding-left: 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.progress li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 1.9rem;
  bottom: -0.4rem;
  width: 2px;
  background: var(--border);
}
.progress li .dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  z-index: 1;
}
.progress li.active {
  color: var(--text);
  font-weight: 600;
}
.progress li.active .dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
  animation: pulse 1.2s infinite;
}
.progress li.done {
  color: var(--text);
}
.progress li.done .dot {
  border-color: var(--ok);
  background: var(--ok);
}
.progress li.done:not(:last-child)::after {
  background: var(--ok);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-dim); }
  50% { box-shadow: 0 0 0 7px transparent; }
}

.status-line {
  margin-top: 1.25rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.error-box {
  margin-top: 1.25rem;
  border: 1px solid var(--bad);
  border-radius: 8px;
  overflow: hidden;
}
.error-box-head {
  background: rgba(248, 81, 73, 0.12);
  color: var(--bad);
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}
.error {
  color: var(--bad);
  white-space: pre-wrap;
  margin: 0;
  padding: 0.9rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}

/* ---------- Panels / code ---------- */
.panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
}
.panel-head {
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.panel-body {
  margin: 0;
  padding: 0.9rem;
  max-height: 22rem;
  overflow: auto;
}

.code,
pre {
  font-family: var(--mono);
  font-size: 0.8rem;
}

pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem;
  overflow: auto;
  margin: 0;
}
.panel-body.code {
  border: none;
  border-radius: 0;
  background: var(--bg);
}

/* ---------- Plan diagram ---------- */
.plan-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.plan-panel-head .seg-toggle {
  text-transform: none;
  letter-spacing: normal;
}
.plan-panel-head .seg-toggle button {
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
}
.plan-diagram.panel-body {
  max-height: 34rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.plan-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--elevated);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.plan-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.plan-step-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  background: var(--accent-dim);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}
.plan-card-title {
  font-weight: 700;
  font-size: 0.95rem;
}
.plan-card-tool {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: var(--mono);
  white-space: nowrap;
}
.plan-card-blurb {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}
.plan-io-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.78rem;
  align-items: baseline;
}
.plan-io-label {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  padding-top: 0.15rem;
}
.plan-io-value {
  word-break: break-word;
}
.plan-depends {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-2);
  background: var(--accent-dim);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  width: fit-content;
}
.plan-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}
.plan-chip {
  font-size: 0.7rem;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
}

/* ---------- Approval ---------- */
.approval-note {
  margin-top: -0.5rem;
  margin-bottom: 1.25rem;
}
.approval-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 1100px) {
  .approval-grid {
    grid-template-columns: 1fr;
  }
}
.approval-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
  justify-content: flex-end;
}
.approval-actions button {
  margin-top: 0;
  width: auto;
  padding: 0.7rem 1.6rem;
}
.btn-approve {
  background: var(--ok);
}
.btn-approve:hover:not(:disabled) {
  background: #46c95a;
}
.btn-reject {
  background: transparent;
  color: var(--bad);
  border: 1px solid var(--bad);
}
.btn-reject:hover:not(:disabled) {
  background: rgba(248, 81, 73, 0.1);
}

/* ---------- Results ---------- */
.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
#results-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.badge-ok {
  background: rgba(63, 185, 80, 0.15);
  color: var(--ok);
  border: 1px solid var(--ok);
}
.badge-bad {
  background: rgba(248, 81, 73, 0.12);
  color: var(--bad);
  border: 1px solid var(--bad);
}
.badge-neutral {
  background: var(--accent-dim);
  color: var(--text);
}
.summary-meta {
  font-size: 0.85rem;
  font-family: var(--mono);
}

/* ---------- Key stat cards ---------- */
.metric-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.metric-card {
  flex: 1 1 150px;
  min-width: 140px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--elevated);
  padding: 1rem 1.1rem;
}
.metric-value {
  font-size: 1.7rem;
  font-weight: 700;
  font-family: var(--mono);
  line-height: 1.1;
}
.metric-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.metric-up .metric-value {
  color: var(--ok);
}
.metric-down .metric-value {
  color: var(--bad);
}
.metric-accent .metric-value {
  color: var(--accent-2);
}
.issues {
  width: 100%;
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  color: var(--bad);
  font-size: 0.85rem;
}

.seg-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-2);
}
.seg-toggle button {
  margin: 0;
  width: auto;
  background: transparent;
  color: var(--muted);
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0;
}
.seg-toggle button.active {
  background: var(--accent);
  color: #fff;
}
.seg-toggle button:hover:not(.active) {
  color: var(--text);
  background: transparent;
}

.result-section {
  margin-bottom: 2rem;
}
.result-section h3 {
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}

.result-block {
  margin-bottom: 1.75rem;
}
.result-file-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  font-family: var(--mono);
}
.download-inline {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--sans);
}
.download-inline:hover {
  text-decoration: underline;
}

.result-image {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.report-block {
  margin-bottom: 1.75rem;
}
.report-frame {
  width: 100%;
  height: 34rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  margin-top: 0.5rem;
}

.table-scroll {
  overflow: auto;
  max-height: 26rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.result-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8rem;
  font-family: var(--mono);
}
.result-table th,
.result-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  text-align: left;
  white-space: nowrap;
}
.result-table th {
  background: var(--panel-2);
  position: sticky;
  top: 0;
  font-weight: 600;
  color: var(--muted);
}
.result-table tbody tr:hover {
  background: var(--accent-dim);
}

#output-files {
  list-style: none;
  padding: 0;
  margin: 0;
}
#output-files li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.85rem;
}
#output-files a {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--mono);
  word-break: break-all;
}
#output-files a:hover {
  text-decoration: underline;
}
.file-tag {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--mono);
  white-space: nowrap;
}

.report h1 { font-size: 1.5rem; }
.report h2 { font-size: 1.2rem; margin-top: 1.5rem; }
.report table {
  border-collapse: collapse;
}
.report code {
  background: var(--panel-2);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-family: var(--mono);
}

/* ---------- Logs drawer ---------- */
.logs-drawer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  transition: height 0.18s ease;
  height: 42vh;
}
.logs-drawer.minimized {
  height: 42px;
}
.logs-bar {
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  cursor: pointer;
  user-select: none;
  background: var(--panel-2);
}
.logs-title {
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.logs-drawer:not(.minimized) .logs-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.logs-hint {
  font-family: var(--mono);
  font-size: 0.76rem;
}
.logs-toggle {
  margin: 0 0 0 auto;
  width: auto;
  background: transparent;
  color: var(--muted);
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  transition: transform 0.18s;
}
.logs-toggle:hover {
  background: transparent;
  color: var(--text);
}
.logs-drawer.minimized .logs-toggle {
  transform: rotate(180deg);
}
.logs-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.logs-drawer.minimized .logs-content {
  display: none;
}
.logs-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}
.logs-tabs button {
  margin: 0;
  width: auto;
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px 6px 0 0;
  white-space: nowrap;
}
.logs-tabs button.active {
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom-color: var(--bg);
  margin-bottom: -1px;
}
.logs-tabs button:hover:not(.active) {
  background: transparent;
  color: var(--text);
}
.logs-panels {
  flex: 1;
  overflow: auto;
  padding: 0.9rem;
  background: var(--bg);
}
.logs-panel pre {
  border: none;
  background: transparent;
  padding: 0;
}
.stdio-block {
  margin-bottom: 1rem;
}
.stdio-head {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* timeline */
.timeline {
  font-family: var(--mono);
  font-size: 0.78rem;
}
.tl-event {
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.tl-time {
  color: var(--muted);
  white-space: nowrap;
}
.tl-layer {
  color: var(--accent-2);
  min-width: 6rem;
}
.tl-event-kind {
  min-width: 4rem;
}
.tl-event-kind.error {
  color: var(--bad);
}
.tl-event-kind.output {
  color: var(--ok);
}
.tl-payload {
  color: var(--muted);
  word-break: break-word;
  flex: 1;
}

/* ================= Landing ================= */
#landing {
  min-height: 100vh;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 17, 0.8);
  backdrop-filter: blur(10px);
}

.btn-cta {
  margin: 0;
  width: auto;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 6px 22px rgba(91, 140, 255, 0.28);
}
.btn-cta:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
}
.btn-cta-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  box-shadow: none;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.4rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 2rem 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 52rem;
  margin: 0 auto;
}
.hero-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(circle, rgba(91, 140, 255, 0.22), transparent 60%);
  pointer-events: none;
}
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-2);
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: 2.9rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 42rem;
  margin: 0 auto 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-tools {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.hero-tools span {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

.landing-section {
  max-width: 60rem;
  margin: 0 auto;
  padding: 3.5rem 2rem 0;
}
.section-title {
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}
.section-lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 46rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}
.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  transition: border-color 0.15s, transform 0.15s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.feature-ico {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  margin-bottom: 0.9rem;
  background: linear-gradient(135deg, var(--accent), #9c6bff);
  box-shadow: 0 0 16px rgba(91, 140, 255, 0.35);
}
.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}
.step-n {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent-2);
  background: var(--accent-dim);
  border: 1px solid var(--accent);
}
.steps h4 {
  margin: 0 0 0.15rem;
  font-size: 0.98rem;
}
.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.cta-band {
  margin: 2.5rem 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem 2rem;
}
.cta-band h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.landing-footer {
  max-width: 60rem;
  margin: 4rem auto 0;
  padding: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.landing-footer .brand-name {
  font-weight: 700;
}

#brand-home {
  cursor: pointer;
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 2.1rem;
  }
}

/* ---------- coming soon (pre-launch) ---------- */
/* Small pill appended to the hero eyebrow so the state is obvious before any click. */
.eyebrow.eyebrow-soon {
  color: var(--warn);
  border-color: rgba(210, 153, 34, 0.4);
  background: rgba(210, 153, 34, 0.1);
}

.cs-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(6, 8, 12, 0.78);
  backdrop-filter: blur(4px);
}
.cs-card {
  max-width: 30rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.cs-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  line-height: 1.3;
}
.cs-card p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  line-height: 1.6;
}
.cs-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.cs-actions .btn-cta {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.cs-actions .btn-ghost {
  cursor: pointer;
  background: none;
  font-family: inherit;
}

/* thin scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #313749;
}
::-webkit-scrollbar-track {
  background: transparent;
}
