:root {
  --bg: #f4f7fb;
  --paper: #ffffff;
  --ink: #16202d;
  --muted: #617084;
  --line: #dce5ef;
  --clre-blue: #40568f;
  --clre-blue-strong: #314575;
  --clre-blue-soft: rgba(64, 86, 143, 0.12);
  --green: #138a4b;
  --green-strong: #0f6f3e;
  --red: #c92b2b;
  --shadow: 0 24px 70px rgba(22, 32, 45, 0.12);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(64, 86, 143, 0.08), transparent 280px),
    var(--bg);
  font-family: var(--font);
}

button,
input,
select,
textarea {
  font: inherit;
}

.report-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.report-card,
.receipt-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.report-card {
  overflow: hidden;
}

.report-header {
  padding: 28px 30px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  min-width: 62px;
  height: 38px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--clre-blue);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.recipient {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(1.85rem, 4vw, 3.15rem);
  line-height: 1.03;
}

.public-form {
  padding: 26px 30px 30px;
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 7px;
}

label span,
.email-preview span,
.receipt-meta span {
  color: #405067;
  font-size: 0.82rem;
  font-weight: 850;
}

.label-with-help {
  position: relative;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
}

.help-tip {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--clre-blue);
  background: #eef2ff;
  border: 1px solid rgba(64, 86, 143, 0.35);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: help;
}

.tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 4;
  width: min(320px, calc(100vw - 48px));
  padding: 10px 12px;
  border-radius: 8px;
  color: #ffffff;
  background: #17202d;
  box-shadow: 0 14px 30px rgba(22, 32, 45, 0.22);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.help-tip:hover + .tooltip,
.help-tip:focus + .tooltip {
  opacity: 1;
  transform: translateY(0);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--clre-blue);
  box-shadow: 0 0 0 4px rgba(64, 86, 143, 0.12);
}

.drop-zone {
  padding: 15px;
  border: 1px dashed #adc0d3;
  border-radius: 10px;
  background: #f8fbfe;
  outline: none;
}

.drop-zone small {
  color: var(--muted);
}

.drop-zone:focus-within,
.drop-zone:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(19, 138, 75, 0.12);
}

.drop-zone.is-ready {
  border-color: rgba(64, 86, 143, 0.55);
  background: #f0fbf5;
}

.drop-zone.is-ready small {
  color: var(--clre-blue-strong);
  font-weight: 800;
}

.form-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
  font-weight: 750;
}

.submit-button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.submit-button {
  padding: 14px 18px;
  color: #ffffff;
  background: var(--clre-blue);
}

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

.submit-button:hover,
.secondary-button:hover {
  filter: brightness(0.97);
}

.receipt-panel {
  position: sticky;
  top: 22px;
  padding: 24px;
}

.receipt-icon {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--green);
  font-size: 1.35rem;
  font-weight: 900;
}

.receipt-label {
  margin: 18px 0 8px;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 900;
}

.receipt-panel h2 {
  font-size: 1.35rem;
}

.receipt-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.receipt-meta {
  margin: 18px 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px 14px;
  padding: 14px;
  border-radius: 10px;
  background: #f8fbfe;
  border: 1px solid var(--line);
}

.secondary-button {
  width: 100%;
  padding: 12px;
  color: var(--ink);
  background: #eef3f8;
  border: 1px solid var(--line);
}

@media (max-width: 920px) {
  .report-shell {
    grid-template-columns: 1fr;
  }

  .receipt-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .report-shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0;
  }

  .report-header,
  .public-form {
    padding-left: 18px;
    padding-right: 18px;
  }

  .brand-row,
  .form-grid,
}
