:root {
  color-scheme: light;
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #d8e0e8;
  --text: #10212e;
  --muted: #607080;
  --brand: #0f5f80;
  --brand-dark: #0a4058;
  --accent: #d79a2b;
  --focus: #1687b4;
  --shadow: 0 22px 70px rgba(16, 33, 46, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(215, 154, 43, 0.14), transparent 34rem),
    linear-gradient(180deg, #f7fafc 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto;
}

.intro {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 22px;
}

.logo {
  width: 148px;
  height: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(16, 33, 46, 0.1);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.06;
}

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

.credit-form {
  background: var(--surface);
  border: 1px solid rgba(216, 224, 232, 0.8);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 34px);
}

fieldset {
  margin: 0;
  padding: 0 0 30px;
  border: 0;
}

fieldset + fieldset {
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

legend {
  width: 100%;
  margin-bottom: 18px;
  color: var(--brand-dark);
  font-size: 1.08rem;
  font-weight: 700;
}

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

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

label {
  display: grid;
  gap: 7px;
  color: #2b3c48;
  font-size: 0.92rem;
  font-weight: 700;
}

.span-2 {
  grid-column: span 2;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(22, 135, 180, 0.16);
}

.reference-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding-top: 4px;
}

.form-actions p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0 28px;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

button:hover {
  background: var(--brand-dark);
}

button:active {
  transform: translateY(1px);
}

@media (max-width: 800px) {
  .intro,
  .form-grid,
  .reference-grid,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .intro {
    gap: 18px;
  }

  .logo {
    width: 128px;
  }

  .span-2 {
    grid-column: auto;
  }

  button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    margin: 16px auto;
  }

  .credit-form {
    padding: 18px;
  }
}
