:root {
  color-scheme: light;
  --ink: #263238;
  --muted: #59656f;
  --line: #d7d1c5;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --field: #f7f5ef;
  --accent: #1d7f64;
  --accent-strong: #125842;
  --warn: #b45309;
  --shadow: 0 18px 45px rgba(38, 50, 56, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f4f1e8 0%, #e8edf0 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.intro {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  flex: 0 0 auto;
}

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

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 0.95;
}

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

.intro-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}

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

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

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-row {
  display: grid;
  gap: 7px;
}

label,
legend {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 127, 100, 0.18);
}

.evidence-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.evidence-group legend {
  padding: 0 6px;
}

.evidence-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 650;
}

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

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 800;
.action-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  border: 1px solid #b6d6ca;
  background: #edf8f4;
  color: var(--accent-strong);
}

.secondary-button:hover {
  background: #d9f0e8;
}

.copy-status {
  min-height: 22px;
  margin: -8px 0 0;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
}

.output-panel {
  overflow: hidden;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.privacy-note {
  border: 1px solid #b6d6ca;
  border-radius: 999px;
  color: var(--accent-strong);
  background: #edf8f4;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.report-output {
  min-height: 470px;
  margin: 0;
  padding: 20px;
  background: var(--paper);
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.94rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 800px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding: 24px 0;
  }

  .workspace,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .form-panel {
    padding: 16px;
  }

  .evidence-group {
    grid-template-columns: 1fr;
  }

  .action-row {
    grid-template-columns: 1fr;
  }

  .report-output {
    min-height: 360px;
  }
}

@media print {
  body {
    min-height: auto;
    background: white;
    color: black;
  }

  .app-shell {
    width: auto;
    margin: 0;
    padding: 0;
  }

  .intro,
  .form-panel,
  .privacy-note {
    display: none;
  }

  .workspace {
    display: block;
  }

  .panel,
  .output-panel {
    border: 0;
    box-shadow: none;
  }

  .output-header {
    border-bottom: 1px solid #999;
    padding: 0 0 12px;
  }

  .report-output {
    min-height: auto;
    padding: 16px 0 0;
    background: white;
    color: black;
    font-size: 12pt;
    line-height: 1.5;
  }
}
