:root {
  color-scheme: light;
  --ink: #1e2528;
  --muted: #647176;
  --paper: #f7f4ed;
  --panel: #fffdf8;
  --line: #d8d1c4;
  --teal: #0d8276;
  --teal-dark: #07574f;
  --coral: #e95d47;
  --gold: #d99a20;
  --plum: #6b3e75;
  --shadow: 0 18px 50px rgba(30, 37, 40, 0.12);
  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:
    linear-gradient(90deg, rgba(13, 130, 118, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(13, 130, 118, 0.08) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.hero {
  min-height: 32vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.6fr);
  gap: 28px;
  align-items: center;
}

.hero-copy {
  padding: 18px 0 24px;
}

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

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.02;
}

h1 {
  max-width: 760px;
  font-size: clamp(3.1rem, 8vw, 6.5rem);
}

h2 {
  font-size: 1.5rem;
}

h3 {
  color: var(--teal-dark);
  font-size: 1rem;
}

.lede {
  max-width: 670px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.6;
}

.signal-art {
  min-height: 280px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 30% 20%, rgba(233, 93, 71, 0.24), transparent 32%),
    radial-gradient(circle at 75% 65%, rgba(13, 130, 118, 0.25), transparent 35%),
    linear-gradient(135deg, #fffaf0, #dfeee8);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}

.signal-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAAR0lEQVR4Ae3OQQ0AIBDAMMC/58MCP7KkVbCY0frXVN8Ba3mKQAiE4CMFQvCRAiH4SIEQfKRA6JSAB7yLQAiE4CMFQvCRAoFzAa72J07ZDb3YAAAAAElFTkSuQmCC");
  mix-blend-mode: multiply;
  opacity: 0.35;
}

.signal-grid {
  position: absolute;
  inset: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.signal-grid span {
  border: 1px solid rgba(30, 37, 40, 0.18);
  background: rgba(255, 253, 248, 0.58);
  border-radius: 6px;
}

.signal-grid span:nth-child(3n) {
  background: rgba(233, 93, 71, 0.18);
}

.signal-grid span:nth-child(4n) {
  background: rgba(217, 154, 32, 0.22);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
  gap: 20px;
  align-items: stretch;
}

.control-panel,
.result-panel {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.control-panel {
  padding: 16px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(160px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffefa;
  color: var(--ink);
  border-radius: 6px;
}

select,
input {
  height: 42px;
  margin-top: 6px;
  padding: 0 10px;
}

.notes-label {
  display: block;
  margin-top: 16px;
}

textarea {
  display: block;
  min-height: 462px;
  margin-top: 8px;
  padding: 14px;
  resize: vertical;
  line-height: 1.55;
}

button {
  height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

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

.primary {
  background: var(--teal);
  color: white;
}

.ghost {
  border-color: var(--line);
  background: #fffefa;
  color: var(--ink);
}

.icon-button {
  min-width: 70px;
}

.result-panel {
  padding: 18px;
  min-height: 580px;
}

.result-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.status {
  margin: 14px 0;
  padding: 10px 12px;
  background: rgba(13, 130, 118, 0.1);
  color: var(--teal-dark);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

.results {
  display: grid;
  gap: 14px;
}

.empty-state {
  color: var(--muted);
  line-height: 1.6;
}

.section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.section p {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.55;
}

.section ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.5;
}

.section.risks {
  border-left: 5px solid var(--coral);
}

.section.plan {
  border-left: 5px solid var(--teal);
}

.section.ux {
  border-left: 5px solid var(--gold);
}

.section.angle {
  border-left: 5px solid var(--plum);
}

@media (max-width: 900px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .signal-art {
    min-height: 180px;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0;
  }

  h1 {
    font-size: 3rem;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .result-heading {
    align-items: flex-start;
  }
}
