:root {
  --mf-blue: #00186b;
  --mf-blue-2: #082a8f;
  --mf-blue-3: #143aa8;
  --mf-light-blue: #dff2fb;
  --mf-light-blue-2: #eaf7fd;
  --mf-bg: #f5f8fd;
  --mf-card: #ffffff;
  --mf-text: #061b3f;
  --mf-muted: #64748b;
  --mf-border: #d9e6f2;
  --mf-input: #eef3f7;
  --mf-input-focus: #ffffff;
  --mf-danger: #e5484d;
  --mf-success: #167447;
  --mf-shadow: 0 18px 50px rgba(0, 24, 107, 0.10);
  --mf-soft-shadow: 0 10px 30px rgba(0, 24, 107, 0.08);
  --mf-radius: 24px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 8% -10%, rgba(43, 126, 234, .14), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--mf-bg) 100%);
  color: var(--mf-text);
  font-size: 15px;
}
a { color: var(--mf-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.page {
  min-height: 100vh;
}

.mf-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 3vw, 34px);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 230, 242, .9);
}
.mf-logo {
  display: flex;
  align-items: center;
  min-width: 0;
}
.mf-logo img {
  display: block;
  width: min(270px, 58vw);
  max-height: 48px;
  object-fit: contain;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.link-pill,
.progress-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--mf-border);
  background: #fff;
  color: var(--mf-blue);
  font-weight: 800;
  padding: 9px 14px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 24, 107, .06);
}
.progress-pill {
  background: #edf6ff;
  border-color: #d5e9ff;
  color: var(--mf-blue-2);
}

.page-shell {
  width: min(1260px, calc(100% - 36px));
  margin: 24px auto 42px;
}
.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: end;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--mf-radius);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.22), transparent 28%),
    linear-gradient(135deg, var(--mf-blue) 0%, #071f71 52%, #0a327e 100%);
  color: #fff;
  box-shadow: var(--mf-shadow);
  overflow: hidden;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-card h1 {
  margin: 14px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.04em;
  line-height: .98;
}
.hero-card p {
  margin: 0;
  max-width: 760px;
  color: rgba(255,255,255,.78);
  line-height: 1.65;
}
.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hero-badge {
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.11);
  border-radius: 18px;
  padding: 12px 14px;
  min-width: 132px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.hero-badge strong,
.hero-badge span {
  display: block;
}
.hero-badge strong { font-size: 20px; line-height: 1; }
.hero-badge span { margin-top: 6px; color: rgba(255,255,255,.74); font-size: 12px; }

.form-card,
.result-card,
.feedback {
  margin-top: 22px;
  background: var(--mf-card);
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius);
  box-shadow: var(--mf-shadow);
}
.form-card { overflow: hidden; }
.form-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 24px clamp(20px, 3vw, 32px);
  border-bottom: 1px solid var(--mf-border);
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}
.form-head h2 { margin: 4px 0 6px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.03em; }
.form-head p { margin: 0; color: var(--mf-muted); line-height: 1.55; }

.shipment-form {
  padding: clamp(18px, 3vw, 32px);
  display: grid;
  gap: 20px;
}
.form-section {
  display: grid;
  gap: 10px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.section-title h3 {
  margin: 0;
  color: var(--mf-blue);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.section-card {
  position: relative;
  border-radius: 8px;
  border-left: 6px solid var(--mf-blue);
  background: var(--mf-light-blue);
  padding: 22px 22px 20px;
  display: grid;
  gap: 18px;
  box-shadow: var(--mf-soft-shadow);
}
.section-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.58);
  pointer-events: none;
}
.field-grid {
  display: grid;
  gap: 18px;
}
.cols-1 { grid-template-columns: 1fr; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.field label,
.sample-type-field > label {
  color: var(--mf-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}
.req { color: var(--mf-danger); }
.field input,
.field select {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid #dce8ef;
  border-radius: 0;
  background: var(--mf-input);
  color: var(--mf-text);
  padding: 0 14px;
  font: inherit;
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: #8ab3c9; }
.field select { appearance: auto; }
.field input:focus,
.field select:focus {
  background: var(--mf-input-focus);
  border-color: var(--mf-blue-3);
  box-shadow: 0 0 0 4px rgba(44, 110, 234, .12);
}
.field input.error,
.field select.error,
.checkbox-card.error,
.consent-card.error {
  border-color: var(--mf-danger) !important;
  box-shadow: 0 0 0 4px rgba(229, 72, 77, .10);
}
.field-help,
.char-count {
  display: block;
  color: var(--mf-blue);
  font-size: 12px;
  line-height: 1.25;
}
.char-count { text-align: right; }

.sample-type-field {
  margin-top: 0;
  display: grid;
  gap: 10px;
}
.sample-inline {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
}
.checkbox-card,
.consent-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--mf-text);
}
.checkbox-card input,
.consent-card input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: var(--mf-blue);
}
.checkbox-card span { font-weight: 700; }
.checkbox-card small { display: none; }
.consent-section {
  margin-top: -2px;
  padding: 0 2px;
}
.consent-card {
  align-items: flex-start;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
  flex-wrap: wrap;
}
.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 0;
  padding: 12px 20px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--mf-blue);
  color: #fff;
  box-shadow: 0 14px 24px rgba(0, 24, 107, .22);
}
.btn-primary:hover { background: #153ca2; }
.btn-secondary {
  background: #eef3f8;
  color: var(--mf-blue);
  border: 1px solid var(--mf-border);
}
.btn[disabled] { opacity: .65; cursor: wait; transform: none; }
.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  animation: mf-spin .9s linear infinite;
}
.btn.is-loading .btn-loader { display: inline-block; }
@keyframes mf-spin { to { transform: rotate(360deg); } }

.feedback,
.result-card {
  padding: 18px 20px;
  line-height: 1.55;
}
.feedback { box-shadow: none; }
.feedback.error {
  background: #fff5f5;
  color: #8f1d22;
  border-color: #ffd4d7;
}
.feedback.success {
  background: #eef9f1;
  color: var(--mf-success);
  border-color: #cfead8;
}
.result-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.result-card h3 { margin: 0 0 8px; font-size: 24px; color: var(--mf-blue); }
.result-card p { margin: 0 0 12px; }
.result-meta { display: grid; gap: 10px; margin-top: 16px; }
.result-meta .row { display: flex; gap: 10px; flex-wrap: wrap; color: var(--mf-muted); }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.error-text { color: var(--mf-danger); font-size: 12px; font-weight: 800; margin-top: 4px; }

@media (max-width: 980px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-badges { justify-content: flex-start; }
  .cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .mf-header { position: static; align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; justify-content: stretch; }
  .link-pill { width: 100%; }
  .page-shell { width: min(100% - 24px, 1260px); margin-top: 14px; }
  .hero-card { padding: 22px; border-radius: 22px; }
  .hero-badges { display: none; }
  .form-head { flex-direction: column; }
  .progress-pill { width: 100%; }
  .shipment-form { padding: 16px; gap: 18px; }
  .section-card { padding: 18px 16px; }
  .cols-2,
  .cols-3 { grid-template-columns: 1fr; }
  .sample-inline { gap: 12px; }
  .checkbox-card { width: calc(50% - 6px); }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { width: 100%; }
}
@media (max-width: 420px) {
  .mf-logo img { width: min(250px, 76vw); }
  .hero-card h1 { font-size: 28px; }
  .form-head h2 { font-size: 24px; }
  .checkbox-card { width: 100%; }
}
