:root {
  --ink: #1f2725;
  --paper: #f7f4ed;
  --panel: #fffdf8;
  --line: #d8d0c3;
  --muted: #66706b;
  --forest: #283331;
  --copper: #b65f36;
  --blue: #345f7b;
  --green: #59705b;
  --shadow: 0 22px 70px rgba(31, 39, 37, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(40, 51, 49, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(40, 51, 49, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
.incident-button {
  min-height: 44px;
  border: 1px solid var(--forest);
  border-radius: 6px;
  background: var(--panel);
  color: var(--forest);
  padding: 0 14px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:hover,
.incident-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(31, 39, 37, 0.12);
}

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

.incident-topbar {
  min-height: 68px;
  border-bottom: 1px solid rgba(40, 51, 49, 0.18);
  background: rgba(247, 244, 237, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.incident-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.incident-brand span {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--copper);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  text-decoration: none;
}

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

.incident-hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 36px;
  align-items: center;
  padding: 54px 0 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--copper);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lede {
  max-width: 780px;
  color: #4c5753;
  font-size: 18px;
  line-height: 1.62;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.incident-ledger,
.incident-panel,
.incident-sheet,
.validation-panel {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.incident-ledger {
  border-radius: 8px;
  padding: 22px;
  transform: rotate(0.7deg);
}

.incident-ledger dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.incident-ledger div,
.summary-strip div,
.signoff-row div {
  border-left: 4px solid var(--copper);
  background: #fbf8f1;
  padding: 12px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

dd {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 900;
}

.incident-workflow {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
  padding: 24px 0 48px;
}

.incident-panel,
.incident-sheet,
.validation-panel {
  border-radius: 8px;
}

.incident-panel {
  padding: 20px;
}

fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 20px 0 6px;
}

fieldset:first-child {
  border-top: 0;
  padding-top: 0;
}

legend {
  padding-right: 12px;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  color: #34403c;
  font-size: 13px;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #c8c0b4;
  border-radius: 6px;
  background: #fffaf0;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
  font-weight: 500;
}

textarea {
  resize: vertical;
}

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

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.stack-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.mini-card {
  border: 1px solid #ddd4c8;
  border-radius: 8px;
  background: #fbf8f1;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 0.65fr);
  gap: 10px;
}

.action-card {
  grid-template-columns: minmax(150px, 0.45fr) minmax(150px, 0.28fr) minmax(150px, 0.27fr);
}

.wide {
  min-width: 0;
}

.action-card .wide {
  grid-column: 1 / -1;
}

.status-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--blue);
  font-weight: 800;
}

.fine-print {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.incident-sheet {
  min-height: 720px;
  padding: 18px;
  position: sticky;
  top: 88px;
}

.sheet-label {
  margin-bottom: 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-document {
  border: 1px solid #d7d2c9;
  background: white;
  padding: 26px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 3px solid var(--forest);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.report-header h2 {
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  letter-spacing: 0;
}

.report-header span {
  align-self: start;
  border: 1px solid var(--blue);
  color: var(--blue);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.summary-strip,
.report-grid,
.signoff-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-strip span,
.signoff-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-block {
  margin-bottom: 18px;
}

.report-block h3 {
  margin-bottom: 8px;
  color: var(--forest);
  font-size: 18px;
}

.report-block p,
.report-block li {
  color: #3f4945;
  line-height: 1.55;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border: 1px solid #ddd4c8;
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f4ede0;
}

.validation-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: 28px;
  margin: 0 0 56px;
  padding: 28px;
}

.validation-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  line-height: 1.08;
}

.validation-copy p {
  color: #46514d;
  line-height: 1.6;
}

@media (max-width: 920px) {
  .incident-topbar,
  .report-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .incident-hero,
  .incident-workflow,
  .validation-panel {
    grid-template-columns: 1fr;
  }

  .incident-ledger {
    transform: none;
  }

  .incident-sheet {
    position: static;
  }
}

@media (max-width: 620px) {
  .incident-topbar {
    padding: 14px 16px;
  }

  main {
    width: min(100% - 20px, 1180px);
  }

  h1 {
    font-size: 42px;
  }

  .field-pair,
  .mini-card,
  .action-card,
  .summary-strip,
  .report-grid,
  .signoff-row {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .hero-actions {
    flex-direction: column;
  }

  button,
  .incident-button {
    width: 100%;
  }
}

@media print {
  body {
    background: white;
  }

  .incident-topbar,
  .incident-panel,
  .validation-panel,
  .sheet-label {
    display: none;
  }

  main,
  .incident-workflow,
  .incident-sheet {
    width: 100%;
    display: block;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: 0;
  }

  .report-document {
    border: 0;
  }
}
