:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #63706a;
  --line: #d8dfdc;
  --paper: #f6f8f3;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #0b4f4a;
  --warn: #a15c07;
  --danger: #9f2424;
  --soft: #e6f3ef;
  --shadow: 0 18px 48px rgba(23, 33, 29, 0.12);
}

* {
  box-sizing: border-box;
}

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

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

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

.workspace {
  display: grid;
  gap: 18px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
  max-width: 760px;
}

.status {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--accent-strong);
  font-weight: 800;
  text-align: center;
}

.signal-strip,
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.signal-strip div,
.metrics div {
  min-height: 86px;
  padding: 16px;
  background: var(--panel);
}

.signal-strip strong,
.metrics strong {
  display: block;
  margin-bottom: 7px;
  font-size: 1.12rem;
}

.signal-strip span,
.metrics span {
  color: var(--muted);
  font-size: 0.92rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(420px, 1.18fr);
  gap: 18px;
  align-items: start;
}

.panel,
.result-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.input-panel {
  display: grid;
  gap: 0;
}

fieldset {
  margin: 0;
  padding: 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

fieldset:last-child {
  border-bottom: 0;
}

legend {
  margin-bottom: 12px;
  color: var(--accent-strong);
  font-weight: 900;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

label:last-child {
  margin-bottom: 0;
}

label span {
  color: var(--ink);
  font-weight: 800;
}

input[type="text"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcfa;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.checks {
  display: grid;
  gap: 10px;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--ink);
  font-weight: 650;
}

.checks input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.result-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.score-band {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 122px;
  padding: 20px;
  background: var(--soft);
  border: 1px solid #bfdbd5;
}

.score-band.warning {
  background: #fff4df;
  border-color: #f1d29a;
}

.score-band.danger {
  background: #fff0ef;
  border-color: #f2b7b1;
}

.score-band span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-weight: 800;
}

.score-band strong {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.05;
}

.score {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 2px solid rgba(15, 118, 110, 0.26);
  background: rgba(255, 255, 255, 0.74);
}

.score output {
  font-size: 2.1rem;
  font-weight: 950;
}

.summary h2,
.menu-box h2,
.proposal h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.summary p,
.proposal p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.action-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mini-cta {
  display: grid;
  gap: 5px;
  min-height: 68px;
  align-content: center;
  justify-items: center;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  text-align: center;
  text-decoration: none;
  padding: 12px;
}

.mini-cta strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.35;
}

.mini-cta span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.4;
}

.mini-cta.secondary {
  border-color: #26312d;
  background: #26312d;
}

.mini-cta:hover {
  background: var(--accent-strong);
}

.mini-cta.secondary:hover {
  background: #111816;
}

.metrics {
  grid-template-columns: repeat(3, 1fr);
}

.menu-box {
  padding: 16px;
  border: 1px solid var(--line);
}

.menu-box ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.75;
}

.proposal {
  display: grid;
  gap: 12px;
}

.proposal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

button,
.cta {
  min-height: 44px;
  border: 0;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.cta:hover {
  background: var(--accent-strong);
}

#proposalText {
  min-height: 260px;
}

.copy-status {
  min-height: 22px;
  color: var(--accent-strong);
  font-weight: 800;
}

.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cta {
  display: grid;
  place-items: center;
  text-align: center;
}

.cta.secondary {
  background: #26312d;
}

.cta.secondary:hover {
  background: #111816;
}

@media (max-width: 860px) {
  .topbar,
  .proposal-head {
    display: grid;
  }

  .signal-strip,
  .layout,
  .metrics,
  .action-bar,
  .cta-row {
    grid-template-columns: 1fr;
  }

  .score-band {
    display: grid;
  }
}
