:root {
  color-scheme: dark;
  --font-body: "Aptos", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  --bg: #101318;
  --panel: #171d24;
  --panel-soft: #1e2630;
  --border: #303a46;
  --text: #f4f7fa;
  --muted: #9aa7b7;
  --muted-2: #768395;
  --accent: #72d36c;
  --accent-2: #f3b33d;
  --danger: #ff7474;
  --warning: #f6bd60;
  --radius: 8px;
  font-family: var(--font-body);
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

h1,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.app-shell {
  width: min(820px, calc(100% - 24px));
  margin: 24px auto 48px;
}

.app-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.app-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.stack-list,
.result-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field span,
.metric span {
  color: var(--muted);
  font-size: 0.84rem;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #10151b;
  color: var(--text);
  padding: 12px 13px;
}

.field textarea {
  resize: vertical;
  min-height: 260px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(114, 211, 108, 0.8);
  box-shadow: 0 0 0 3px rgba(114, 211, 108, 0.16);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 1px solid #7ee276;
  border-radius: var(--radius);
  background: #72d36c;
  color: #071007;
  font-weight: 800;
}

.button:hover {
  background: #87e881;
}

.surface-note {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #111820;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.metric strong {
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-loading {
  color: var(--muted);
  background: #111820;
}

.status-ok {
  color: #bff5bd;
  background: rgba(114, 211, 108, 0.12);
  border-color: rgba(114, 211, 108, 0.34);
}

.status-warn {
  color: #ffe0aa;
  background: rgba(246, 189, 96, 0.14);
  border-color: rgba(246, 189, 96, 0.36);
}

.status-bad {
  color: #ffd0d0;
  background: rgba(255, 116, 116, 0.13);
  border-color: rgba(255, 116, 116, 0.36);
}

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

.is-hidden {
  display: none;
}

@media (max-width: 620px) {
  .app-shell {
    width: calc(100% - 16px);
    margin: 8px auto 24px;
  }

  .app-panel {
    padding: 14px;
  }

  .app-header {
    flex-direction: column;
  }

  .pill {
    width: 100%;
  }

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

  .metric {
    min-height: 66px;
  }
}
