:root {
  --ink: #1d221f;
  --paper: #ece9df;
  --panel: #fffdf6;
  --line: #c5bca7;
  --muted: #62675f;
  --steel: #2b312d;
  --blue: #1e5b68;
  --safety: #d6a328;
  --green: #2d6542;
  --shadow: 0 22px 54px rgba(29, 34, 31, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(43, 49, 45, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(30, 91, 104, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: "Aptos", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
.co-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--steel);
  border-radius: 6px;
  background: var(--panel);
  color: var(--steel);
  padding: 0 14px;
  font: inherit;
  font-weight: 780;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease-out, box-shadow 140ms ease-out, background-color 140ms ease-out;
}

button:hover,
.co-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(29, 34, 31, 0.13);
}

button:active,
.co-button:active {
  transform: translateY(0);
}

.primary {
  background: var(--steel);
  color: #fff;
}

.co-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  border-bottom: 1px solid rgba(43, 49, 45, 0.18);
  background: rgba(236, 233, 223, 0.94);
  backdrop-filter: blur(12px);
  padding: 0 32px;
}

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

.co-brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--steel);
  color: #fff;
  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(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.co-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 36px;
  align-items: center;
  min-height: 500px;
  padding: 48px 0 24px;
}

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

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

h1 {
  max-width: 920px;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 7vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 920px;
  color: #4e554f;
  font-size: 18px;
  line-height: 1.58;
}

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

.co-ledger,
.co-panel,
.co-sheet,
.demand-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.97);
  box-shadow: var(--shadow);
}

.co-ledger {
  padding: 22px;
}

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

.co-ledger div,
.summary-strip div {
  border-left: 4px solid var(--safety);
  background: #f7f3e6;
  padding: 12px;
}

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

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

.demand-note {
  margin: 0 0 22px;
  padding: 16px 18px;
  color: #434c47;
  line-height: 1.55;
}

.demand-note p {
  margin: 0;
}

.co-workflow {
  display: grid;
  grid-template-columns: minmax(350px, 0.92fr) minmax(0, 1.08fr);
  gap: 22px;
  align-items: start;
  padding: 0 0 52px;
}

.co-panel,
.co-sheet {
  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: 10px;
  color: var(--steel);
  font-size: 15px;
  font-weight: 900;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  font: inherit;
}

textarea {
  resize: vertical;
}

button:focus-visible,
a:focus-visible,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(30, 91, 104, 0.24);
  outline-offset: 2px;
}

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

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

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

.change-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(197, 188, 167, 0.84);
  border-radius: 8px;
  background: #faf7ec;
}

.change-row .wide {
  grid-column: 1 / -1;
  min-width: 0;
}

.status-message,
.fine-print,
.instrumentation p {
  color: var(--muted);
  line-height: 1.5;
}

.status-message {
  min-height: 22px;
  margin: 12px 0 0;
  font-weight: 800;
}

.instrumentation {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.instrumentation h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

code {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.fine-print {
  margin: 16px 0 0;
  font-size: 13px;
}

.co-sheet {
  min-height: 720px;
}

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

.change-document {
  display: grid;
  gap: 18px;
  color: #1d221f;
}

.document-header {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--steel);
}

.document-header h2 {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
}

.document-header > strong {
  min-width: 150px;
  color: var(--green);
  font-size: 30px;
  text-align: right;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.summary-strip strong {
  display: block;
  margin-top: 3px;
}

.report-grid,
.totals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.report-block h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.report-block p {
  margin-bottom: 9px;
  color: #444c47;
  line-height: 1.5;
}

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

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

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

.total-card p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid #d9d3c2;
}

.total-card p:last-child {
  border-bottom: 0;
}

.total-card strong {
  color: var(--green);
}

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

.signature-row div {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.signature-row strong,
.signature-row span {
  display: block;
}

.signature-row span {
  margin-top: 12px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .co-hero,
  .co-workflow,
  .report-grid,
  .totals-grid,
  .summary-strip,
  .signature-row {
    grid-template-columns: 1fr;
  }

  .co-hero {
    min-height: auto;
  }

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

@media (max-width: 640px) {
  .co-topbar {
    align-items: flex-start;
    padding: 14px 16px;
  }

  nav {
    display: none;
  }

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

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

  .document-header {
    display: grid;
  }

  .document-header > strong {
    min-width: 0;
    text-align: left;
  }
}

@media print {
  body {
    background: #fff;
  }

  .co-topbar,
  .co-hero,
  .demand-note,
  .co-panel,
  .sheet-label {
    display: none;
  }

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