:root {
  --ink: #17202a;
  --muted: #607080;
  --line: #d7dee5;
  --panel: #ffffff;
  --surface: #000000;
  --accent: #006d77;
  --accent-strong: #00515a;
  --accent-soft: #e2f2f3;
  --submit: #ffd21f;
  --submit-strong: #e7bb00;
  --warning: #8a5d00;
  --shadow: 0 20px 45px rgba(29, 49, 58, 0.14);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 32px 18px;
}

.form-panel {
  background: var(--panel);
  border: 1px solid rgba(215, 222, 229, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  color: var(--submit);
  background: #000000;
}

.banner-copy {
  display: grid;
  justify-items: end;
  gap: 8px;
  max-width: 650px;
  margin-left: auto;
  text-align: right;
}

.brand-logo {
  display: block;
  width: min(38vw, 240px);
  height: auto;
  border-radius: 6px;
  background: #000000;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 6vw, 3.9rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.header-note {
  width: min(100%, 270px);
  margin-bottom: 0;
  color: var(--submit);
  font-size: 1rem;
  line-height: 1.45;
}

.form-section {
  padding: 28px 30px 32px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-number {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
  line-height: 1.15;
}

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

.two-column {
  max-width: 720px;
}

.field,
.photo-field {
  display: grid;
  gap: 8px;
}

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

.field > span,
.field > label,
.photo-field > span:first-child {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #b8c3cc;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  padding: 12px 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

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

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 109, 119, 0.14);
}

.measurement-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid #b8c3cc;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.measurement-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 109, 119, 0.14);
}

.measurement-input input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.measurement-input span {
  padding: 0 14px;
  color: var(--muted);
  font-weight: 800;
}

.fraction-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.fraction-button {
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid #b8c3cc;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  font-size: 0.9rem;
}

.fraction-button[aria-pressed="true"] {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.photo-field {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.photo-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-actions {
  display: grid;
  gap: 8px;
}

.photo-action {
  display: inline-grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid #b8c3cc;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  padding: 0 10px;
  text-align: center;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.photo-field:focus-within .photo-action {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 109, 119, 0.14);
}

.photo-preview {
  display: grid;
  min-height: 144px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #afbbc5;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.photo-preview.has-image {
  border-style: solid;
  background-size: cover;
  background-position: center;
  color: transparent;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 30px 30px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.status-message {
  min-height: 1.35em;
  margin: 0;
  color: var(--warning);
  font-weight: 700;
  line-height: 1.35;
}

.button-row {
  display: flex;
  gap: 12px;
  flex: 0 0 auto;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  padding: 0 18px;
  transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.primary-button {
  background: var(--submit);
  color: #111111;
  box-shadow: 0 10px 18px rgba(231, 187, 0, 0.28);
}

.primary-button:hover {
  background: var(--submit-strong);
}

.secondary-button {
  background: #e7edf1;
  color: var(--ink);
}

@media (max-width: 820px) {
  .form-header,
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .banner-copy {
    justify-items: start;
    margin-left: 0;
    text-align: left;
  }

  .header-note {
    width: auto;
  }

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

@media (max-width: 620px) {
  .page-shell {
    padding: 12px;
  }

  .form-header,
  .form-section,
  .form-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .button-row {
    flex-direction: column-reverse;
  }

  button {
    width: 100%;
  }
}
