:root {
  color-scheme: light;
  --red: #d93434;
  --red-dark: #b82424;
  --ink: #17241c;
  --muted: #5d655f;
  --green: #d93434;
  --green-dark: #17241c;
  --white: #ffffff;
  --cream: #f4eee5;
  --paper: #fffaf1;
  --sun: #f4d35e;
  --sky: #bfe7f5;
  --grass: #d93434;
  --soil: #7a5837;
  --shadow: 8px 8px 0 rgba(17, 27, 20, 0.92);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 22px),
    linear-gradient(135deg, #e33a3a, var(--red-dark));
  background-size: 28px 28px, auto;
  animation: halftoneDrift 18s linear infinite;
}

@keyframes halftoneDrift {
  0% {
    background-position: 0 0, center;
  }

  100% {
    background-position: 56px 28px, center;
  }
}

a:focus-visible {
  outline: 3px solid rgba(244, 211, 94, 0.5);
  outline-offset: 3px;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(14px, 3vw, 42px);
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 34px) clamp(24px, 4vw, 44px);
  border: 4px solid rgba(17, 27, 20, 0.08);
  border-radius: 4px;
  background:
    radial-gradient(circle at 22px 22px, rgba(23, 36, 28, 0.08) 0 2px, transparent 2px 24px),
    var(--cream);
  box-shadow: 0 24px 50px rgba(30, 14, 14, 0.3);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0;
}

.brand {
  margin: 0;
  color: var(--red);
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 1000;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 var(--sun), 4px 4px 0 var(--ink);
}

.back-link,
.next-link,
.next-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  color: var(--green-dark);
  background: var(--white);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  font: inherit;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.next-link,
.next-button {
  background: var(--red);
  color: var(--white);
  border-color: var(--ink);
}

.back-link:hover,
.next-link:hover,
.next-button:hover,
.secondary-button:hover,
.back-link:focus-visible,
.next-link:focus-visible,
.next-button:focus-visible,
.secondary-button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

main {
  display: grid;
  align-items: start;
  min-height: calc(100svh - 92px);
  padding: clamp(36px, 7vw, 84px) 0 72px;
}

.offer-card {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(24px, 6vw, 48px);
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.kicker {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--sun);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h2 {
  margin: 0;
  color: #102318;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 4px 4px 0 var(--sun), 7px 7px 0 rgba(191, 231, 245, 0.55);
}

p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.7;
}

.pricing-basis {
  width: 100%;
  max-width: 860px;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--green-dark);
  font-size: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.policy-note {
  width: 100%;
  max-width: 100%;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.schedule-note {
  max-width: none;
  padding: 13px 15px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--sun), #fff4d7);
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
}

.under-construction-note {
  max-width: none;
  padding: 12px 14px;
  border: 3px dashed var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 900;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  color: var(--green-dark);
  font-weight: 900;
}

.info-panel,
.choice-panel,
.summary-panel,
.invoice-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 5px 5px 0 rgba(16, 24, 32, 0.95);
}

.info-panel[hidden],
.choice-panel[hidden] {
  display: none;
}

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

.info-grid label {
  display: grid;
  gap: 7px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 900;
}

.info-grid input,
.info-grid select,
.info-grid textarea {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 12px 13px;
}

.info-grid textarea {
  resize: vertical;
}

.form-alert {
  margin: 0;
  padding: 12px 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff1b8;
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.4;
  box-shadow: 4px 4px 0 rgba(16, 24, 32, 0.95);
}

.form-alert[hidden] {
  display: none;
}

.wide-field {
  grid-column: 1 / -1;
}

.customer-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
}

.customer-summary[hidden] {
  display: none;
}

.customer-summary p {
  max-width: none;
  font-size: 15px;
  line-height: 1.45;
}

.customer-summary strong {
  color: var(--green-dark);
}

.customer-summary h4 {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-size: 18px;
  line-height: 1.2;
}

.invoice-panel[hidden] {
  display: none;
}

.invoice-head {
  display: grid;
  gap: 10px;
}

.invoice-head h3,
.invoice-customer h4 {
  margin: 0;
  color: var(--green-dark);
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: 0;
}

.invoice-customer {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
}

.invoice-customer p,
.invoice-head p,
.invoice-total span {
  max-width: none;
  font-size: 15px;
  line-height: 1.55;
}

.invoice-lines {
  display: grid;
  gap: 10px;
}

.invoice-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
}

.invoice-line div:first-child {
  display: grid;
  gap: 5px;
}

.invoice-line strong {
  color: var(--green-dark);
  font-size: 17px;
}

.invoice-line span,
.invoice-line small {
  color: var(--muted);
  line-height: 1.45;
}

.invoice-line-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.invoice-line-actions b {
  color: var(--green-dark);
  white-space: nowrap;
}

.invoice-line-actions small {
  max-width: 260px;
  text-align: right;
}

.invoice-edit-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.invoice-total {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 8px;
  border: 3px solid var(--ink);
  background: linear-gradient(135deg, var(--red), #eb4b3d 58%, var(--red-dark));
  color: var(--white);
  box-shadow: 5px 5px 0 var(--ink);
}

.invoice-total strong {
  font-size: clamp(22px, 4vw, 34px);
}

.invoice-total span {
  color: rgba(255, 255, 255, 0.84);
}

.invoice-edit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.choice-head {
  display: grid;
  gap: 8px;
}

.choice-head h3,
.summary-panel h3 {
  margin: 0;
  color: var(--green-dark);
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: 0;
}

.choice-head p,
.summary-panel p {
  font-size: 16px;
}

.choice-list {
  display: grid;
  gap: 10px;
}

.choice-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--paper), #ffffff);
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(16, 24, 32, 0.95);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.choice-item.job-status-started {
  background: linear-gradient(135deg, #fff5f2, #ffffff);
  box-shadow: 4px 4px 0 #d93434;
}

.choice-item.job-status-in-progress {
  background: linear-gradient(135deg, #fff8dc, #ffffff);
  box-shadow: 4px 4px 0 #f4d35e;
}

.choice-item.job-status-complete {
  background: linear-gradient(135deg, #efffed, #ffffff);
  box-shadow: 4px 4px 0 #3da35d;
}

.choice-item.job-status-updated {
  animation: jobStatusUpdate 760ms ease-out;
}

.job-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.job-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 3px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  color: var(--green-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.job-status-started .job-status-badge {
  background: #d93434;
  color: var(--white);
}

.job-status-in-progress .job-status-badge {
  background: #f4d35e;
}

.job-status-complete .job-status-badge {
  background: #3da35d;
  color: var(--white);
}

@keyframes jobStatusUpdate {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  45% {
    transform: scale(1.018);
    filter: brightness(1.08);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.choice-item:hover,
.choice-item:focus-within {
  transform: translate(-2px, -2px);
  background: linear-gradient(135deg, #ffffff, #fff5df 45%, #ffe6e6);
  box-shadow: 7px 7px 0 var(--red);
}

.choice-item.disabled-choice {
  cursor: not-allowed;
  opacity: 0.78;
}

.choice-item input {
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--green);
}

.choice-item span {
  display: grid;
  gap: 4px;
}

.choice-item strong,
.summary-list strong {
  color: var(--green-dark);
  font-size: 17px;
  line-height: 1.25;
}

.choice-item small,
.summary-list span {
  color: var(--muted);
  line-height: 1.5;
  font-size: 15px;
}

.material-select {
  width: min(100%, 360px);
  margin-top: 6px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  color: var(--green-dark);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 12px;
}

.material-select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.material-note {
  display: block;
  max-width: 560px;
  color: var(--green-dark);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.material-edit-button {
  width: fit-content;
  margin-top: 6px;
  padding: 8px 12px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #f4d35e;
  color: var(--green-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.material-edit-button:hover,
.material-edit-button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.area-note {
  display: block;
  max-width: 620px;
  color: var(--green-dark);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.45;
}

.service-area-field {
  display: grid;
  gap: 6px;
  width: min(100%, 380px);
  margin-top: 8px;
  padding: 12px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
}

.service-area-field span {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 1000;
}

.service-area-field input,
.service-area-field select {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  padding: 10px 12px;
}

.service-area-field em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

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

.material-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--green-dark);
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.material-choice:hover,
.material-choice:focus-within {
  transform: translate(-2px, -2px);
  background: linear-gradient(135deg, #ffffff, #fff5df 45%, #ffe6e6);
  box-shadow: 6px 6px 0 var(--red);
}

.material-choice input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.custom-materials {
  display: grid;
  gap: 8px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 900;
}

.custom-materials textarea {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 12px 13px;
  resize: vertical;
}

.custom-materials input[type="file"] {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--green-dark);
  font: inherit;
  font-weight: 700;
  padding: 12px 13px;
}

.field-note {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.summary-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(36, 88, 59, 0.12);
}

.summary-list .summary-section-title {
  display: block;
  color: var(--green-dark);
  font-size: 18px;
  font-weight: 900;
}

.pricing-section {
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
}

.pricing-table th,
.pricing-table td {
  padding: 12px 18px;
  border-top: 1px solid rgba(36, 88, 59, 0.12);
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}

.pricing-table th {
  color: var(--ink);
  background: linear-gradient(135deg, var(--sun), #fff4d7);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pricing-table td:last-child {
  width: 34%;
  color: var(--green-dark);
  font-weight: 900;
  white-space: nowrap;
}

.pricing-note {
  margin: 0;
  padding: 0 18px 18px;
  max-width: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.edit-info-button {
  width: fit-content;
}

.edit-info-button[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .wrap {
    width: min(1080px, calc(100% - 48px));
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  main {
    min-height: auto;
    padding-top: 28px;
  }

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

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

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

  .progress-row,
  .summary-list li,
  .invoice-line {
    flex-direction: column;
  }

  .invoice-line {
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: clamp(34px, 11vw, 46px);
  }

  .offer-card {
    padding: clamp(20px, 6vw, 32px);
  }

  .invoice-line-actions {
    justify-items: start;
  }

  .pricing-section {
    overflow-x: auto;
  }

  .pricing-table {
    min-width: 560px;
  }
}
