:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #647084;
  --line: #d9dee8;
  --panel: #ffffff;
  --page: #f3f6fa;
  --teal: #0f8b8d;
  --green: #178f55;
  --amber: #b76e00;
  --red: #b83232;
  --navy: #20314d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
}

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

.workbench {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 18px;
  min-height: 560px;
}

.checker-panel,
.visual-panel,
.result-card,
.explain-band {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checker-panel {
  padding: 22px;
}

.brand-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

.brand-row p,
.explain-band p,
.result-card p {
  color: var(--muted);
  line-height: 1.55;
}

.brand-row p {
  margin-top: 8px;
}

.check-form {
  display: grid;
  gap: 15px;
}

label {
  display: grid;
  gap: 7px;
  color: #334058;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
button {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  font: inherit;
}

input,
select {
  border: 1px solid #c9d0dd;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus {
  outline: 3px solid rgba(15, 139, 141, 0.18);
  border-color: var(--teal);
}

button {
  border: 0;
  margin-top: 4px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #0b7375;
}

.visual-panel {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background: #10192b;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
}

.status-strip {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: rgba(16,25,43,0.88);
  color: #fff;
}

.status-strip strong,
.status-strip span {
  display: block;
}

.status-strip span {
  color: #cbd5e1;
  margin-top: 3px;
}

.pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  font-size: 13px;
  font-weight: 800;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.result-card {
  min-height: 176px;
  padding: 20px;
}

.card-kicker {
  display: block;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.result-card h2 {
  font-size: 22px;
  line-height: 1.18;
  margin-bottom: 10px;
  letter-spacing: 0;
}

.explain-band {
  display: grid;
  grid-template-columns: 0.86fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 18px;
  padding: 24px;
}

.explain-band h2 {
  margin-bottom: 10px;
}

.explain-band ul {
  margin: 0;
  padding-left: 20px;
  color: #334058;
  line-height: 1.65;
}

.footer-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.is-ok {
  color: var(--green);
}

.is-warn {
  color: var(--amber);
}

.is-bad {
  color: var(--red);
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding-top: 12px;
  }

  .workbench,
  .results-grid,
  .explain-band {
    grid-template-columns: 1fr;
  }

  .visual-panel,
  canvas {
    min-height: 400px;
  }

  .status-strip {
    align-items: flex-start;
    flex-direction: column;
  }
}
