:root {
  color-scheme: dark;
  --bg: #070809;
  --panel: #111318;
  --panel-2: #171a21;
  --text: #f5efe4;
  --muted: #b8ad9a;
  --line: #2a2d35;
  --gold: #d8a948;
  --amber: #f2c86b;
  --green: #78d99a;
  --red: #ff7b72;
  --blue: #8ecaff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(216, 169, 72, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 0%, rgba(142, 202, 255, 0.11), transparent 30rem),
    linear-gradient(180deg, #08090b 0%, #101116 100%);
  color: var(--text);
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

.hero, .workspace, .footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero { padding: 28px 0 22px; }

.nav, .panel__head, .button-row, .hero__actions, .cli-box__head {
  display: flex;
  align-items: center;
}

.nav { justify-content: space-between; gap: 18px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.25rem;
}
.brand img { display: block; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35)); }

.nav__links { display: flex; gap: 18px; font-size: 0.95rem; }

.hero__copy {
  padding: 78px 0 46px;
  max-width: 850px;
}

.eyebrow {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin: 0 0 10px;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  font-size: clamp(2.6rem, 8vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
  margin-bottom: 24px;
}
h2 { font-size: 1.2rem; margin-bottom: 0; }
h3 { font-size: 0.95rem; margin-bottom: 0; }

.hero__copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.7;
  max-width: 720px;
}

.hero__actions { gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.panel {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel.full { grid-column: 1 / -1; }
.panel__head { justify-content: space-between; gap: 16px; margin-bottom: 18px; }

.field { display: grid; gap: 6px; color: var(--muted); font-size: 0.8rem; font-weight: 700; }
select, textarea, button {
  font: inherit;
}
select {
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 34px 10px 12px;
}

textarea {
  width: 100%;
  min-height: 330px;
  resize: vertical;
  color: var(--text);
  background: #0b0d11;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  line-height: 1.65;
  outline: none;
}
textarea:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.button-row { gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #111;
  background: linear-gradient(135deg, var(--amber), #f9e7a6);
  font-weight: 850;
  cursor: pointer;
}
.button.secondary, .button.ghost {
  color: var(--text);
  background: #1d2028;
  border: 1px solid var(--line);
}
.button:hover { transform: translateY(-1px); }

.status, .quiet, .muted {
  color: var(--muted);
}
.status { min-height: 1.4em; margin: 10px 0 0; }

.score-band, .pill {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.8rem;
  font-weight: 800;
}
.score-band[data-tone="good"], .pill.clean { color: #10351e; background: var(--green); }
.score-band[data-tone="warn"] { color: #3d2a00; background: var(--amber); }
.score-band[data-tone="hot"], .pill.hot { color: #3f0c08; background: var(--red); }

.score-meter { display: grid; gap: 18px; }
.score-meter__number { font-size: 5rem; line-height: 1; letter-spacing: -0.08em; font-weight: 900; }
.score-meter__number small { color: var(--muted); font-size: 1.3rem; letter-spacing: 0; }
.score-meter__bar {
  height: 14px;
  border-radius: 999px;
  background: #0b0d11;
  border: 1px solid var(--line);
  overflow: hidden;
}
.score-meter__bar span {
  --score: 0%;
  display: block;
  height: 100%;
  width: var(--score);
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
  transition: width 180ms ease;
}

.summary { display: grid; gap: 8px; padding-left: 1.1rem; color: var(--muted); }
.summary strong { color: var(--text); }

.cli-box {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0b0d11;
  overflow: hidden;
}
.cli-box__head {
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.cli-box pre {
  margin: 0;
  padding: 14px;
  max-height: 220px;
  overflow: auto;
  color: #f5efe4;
  white-space: pre-wrap;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }

.diff-list { display: grid; gap: 14px; }
.diff-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0b0d11;
  padding: 16px;
}
.diff-card.hot { border-color: color-mix(in srgb, var(--red) 60%, var(--line)); }
.diff-card.clean { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.diff-card__head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); }
.diff-card p { line-height: 1.75; }
.diff-card ul { color: var(--muted); padding-left: 1.2rem; }
.diff-card code {
  display: inline-block;
  margin: 0 4px 6px 0;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--amber);
  background: #151820;
}
mark {
  color: #140f05;
  background: var(--amber);
  border-radius: 6px;
  padding: 0 4px;
}
.empty-state {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 18px;
}
.footer {
  padding: 34px 0 48px;
  color: var(--muted);
}

@media (max-width: 880px) {
  .workspace { grid-template-columns: 1fr; }
  .nav { align-items: flex-start; }
  .nav__links { flex-wrap: wrap; justify-content: flex-end; }
  .panel__head { align-items: flex-start; flex-direction: column; }
  .score-meter__number { font-size: 4rem; }
}
