/* Nexus Dark–aligned surface for NANOKAT Forge */
:root {
  color-scheme: dark;
  --bg: #0a0a0c;
  --panel: #121016;
  --panel-2: #1a1820;
  --text: #e8e6ed;
  --muted: #8a8a94;
  --border: #2e2a38;
  --accent: #c4a8d8;
  --accent-strong: #d4c0e8;
  --indigo: #6b6ecf;
  --brass: #d4b86a;
  --success: #7dd4a0;
  --danger: #e88a9a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(107, 110, 207, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(196, 168, 216, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: var(--accent);
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--brass);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 12px;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.85rem, 4.8vw, 3.1rem);
  line-height: 1.08;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 14px 0 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.chip {
  border: 1px solid var(--border);
  background: rgba(26, 24, 32, 0.85);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 6px 10px;
}

.status-stack {
  flex: 0 0 auto;
  max-width: 280px;
}

.status {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status.is-live .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(125, 212, 160, 0.15);
}

.status.is-down .status-dot {
  background: var(--danger);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--muted);
  border-radius: 50%;
}

.status-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.panel {
  border: 1px solid var(--border);
  background: rgba(18, 16, 22, 0.92);
  padding: clamp(20px, 4vw, 36px);
  margin-top: 18px;
  backdrop-filter: blur(6px);
}

.hidden {
  display: none !important;
}

.step-heading {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.step-heading h2 {
  margin: 0 0 5px;
  font-weight: 550;
  font-size: 1.25rem;
}

.step-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.step-number {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border: 1px solid var(--indigo);
  color: var(--accent);
  font-size: 0.85rem;
}

label {
  display: block;
  margin: 18px 0 8px;
  color: var(--text);
  font-size: 0.92rem;
}

input,
textarea {
  width: 100%;
  padding: 14px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 0;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

button {
  margin-top: 20px;
  padding: 13px 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #121016;
  cursor: pointer;
  font-weight: 550;
}

button:hover:not(:disabled) {
  filter: brightness(1.06);
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.message {
  min-height: 24px;
  color: var(--muted);
  margin-top: 10px;
}

.message.is-error {
  color: var(--danger);
}

.plan-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.plan-card {
  border: 1px solid var(--border);
  background: var(--panel-2);
  padding: 16px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.plan-card h3 {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.plan-card p,
.plan-card ul,
.plan-card li {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.plan-card ul {
  padding-left: 1.1rem;
}

.approval-callout {
  margin-top: 20px;
  border-left: 3px solid var(--brass);
  background: var(--panel-2);
  padding: 16px;
}

.approval-callout strong {
  color: var(--brass);
  font-weight: 550;
}

.approval-callout p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.trace {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.trace-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.trace-check {
  color: var(--success);
  flex: 0 0 auto;
}

.preview-frame {
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3efe6;
  color: #202020;
}

.preview-iframe {
  width: 100%;
  min-height: 28rem;
  border: 1px solid var(--border, #2a2a32);
  border-radius: 12px;
  background: #0a0a0c;
}

.preview-site {
  min-height: 480px;
}

.preview-hero {
  padding: clamp(36px, 8vw, 72px);
}

.preview-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.preview-title {
  max-width: 700px;
  margin: 12px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 0.98;
  font-weight: 400;
}

.preview-summary {
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.6;
}

.preview-pages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.preview-page {
  min-height: 120px;
  padding: 20px;
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.preview-page:last-child {
  border-right: 0;
}

.preview-page strong {
  display: block;
  margin-bottom: 8px;
}

.palette-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.palette-chip {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
}

.palette-chip span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.palette-swatch {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  background: transparent;
}

.site-footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.site-footer p {
  margin: 0;
}

.site-footer strong {
  color: var(--text);
  font-weight: 550;
}

@media (max-width: 720px) {
  .hero {
    display: block;
  }

  .status-stack {
    margin-top: 18px;
    max-width: none;
  }

  .actions {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }
}
