:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #17191f;
  --muted: #636b7a;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --danger: #b42318;
  --warning: #9a6700;
  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: var(--bg);
  color: var(--ink);
}

header,
main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 0 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.15rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

header p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

a,
button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
}

header a,
button {
  padding: 11px 14px;
}

main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  padding-bottom: 40px;
}

.workspace,
.results {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgb(17 24 39 / 0.06);
}

.workspace {
  padding: 16px;
}

.toolbar,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toolbar button {
  background: #eef2f7;
  color: var(--ink);
}

textarea {
  width: 100%;
  min-height: 420px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  color: var(--ink);
  font: 0.95rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  resize: vertical;
}

#summary {
  color: var(--muted);
  font-size: 0.92rem;
}

.rail-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

select {
  min-width: 132px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.results {
  padding: 16px;
}

.finding {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 6px;
  padding: 12px;
  margin-top: 12px;
}

.finding strong {
  display: block;
  margin-bottom: 6px;
}

.finding p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.error {
  border-left-color: var(--danger);
}

.warning {
  border-left-color: var(--warning);
}

.empty {
  margin-top: 12px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 16px;
  color: var(--muted);
}

@media (max-width: 760px) {
  header,
  main,
  .toolbar,
  .actions {
    display: block;
  }

  header a,
  .toolbar button,
  .actions button,
  .rail-control {
    display: inline-block;
    margin-top: 12px;
  }

  main {
    width: min(100% - 24px, 1120px);
  }
}
