@import url("/theme.css");

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f7f7f7;
  color: #1f242b;
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, Aptos, ui-sans-serif, system-ui, sans-serif;
}

.shell {
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 22px 16px 42px;
}

.brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 18px;
  text-align: center;
}

.brand-logo {
  display: block;
  width: 148px;
  height: auto;
  background: #f7f7f7;
}

.brand-copy {
  display: grid;
  gap: 6px;
  justify-items: center;
}

h1 {
  margin: 0;
  font-family: "Segoe UI Variable Display", "Segoe UI", Inter, Aptos, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.75rem, 5.5vw, 2.3rem);
  line-height: 1.08;
  color: #20242b;
  font-weight: 740;
  overflow-wrap: anywhere;
}

p {
  margin: 6px 0 0;
  color: #667085;
  line-height: 1.45;
}

.notice,
form,
.success {
  background: #ffffff;
  border: 1px solid #e7e9ef;
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(31, 36, 43, 0.07);
}

.notice {
  padding: 11px 13px;
  margin-bottom: 10px;
  background: #f7f8ff;
  color: #343a43;
  font-size: 0.88rem;
  font-weight: 620;
}

form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

label,
.field-block {
  display: grid;
  gap: 7px;
  color: #252a32;
  font-size: 0.9rem;
  font-weight: 720;
}

label span,
.label-row span {
  color: #7a828e;
  font-size: 0.74rem;
  font-weight: 650;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

input[type="email"],
input:not([type]) {
  width: 100%;
  min-height: 44px;
}

input[type="email"],
input:not([type]) {
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7f7f7;
  color: #1f242b;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(31, 36, 43, 0.035);
}

input:focus,
button:focus,
canvas:focus {
  outline: 3px solid rgba(18, 38, 169, 0.15);
  outline-offset: 2px;
}

.preview {
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: #f7f7f7;
}

canvas {
  width: 100%;
  aspect-ratio: 17 / 6.2;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: #f7f7f7;
  touch-action: none;
}

.terms {
  grid-template-columns: 22px 1fr;
  align-items: start;
  padding: 12px;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: #f7f7f7;
  font-size: 0.9rem;
  font-weight: 700;
}

.terms-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: #f7f7f7;
}

.terms-card h2 {
  margin: 0;
  color: #20242b;
  font-family: "Segoe UI Variable Display", "Segoe UI", Inter, Aptos, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 760;
  text-transform: uppercase;
}

.terms-card ol {
  margin: 0;
  padding-left: 22px;
  color: #343a43;
  line-height: 1.48;
  font-size: 0.86rem;
}

.terms-card li + li {
  margin-top: 5px;
}

.terms-card strong {
  color: #20242b;
  font-weight: 760;
}

.terms input {
  width: 20px;
  height: 20px;
  accent-color: #1226a9;
}

button {
  min-height: 42px;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  padding: 0 15px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 720;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.secondary {
  min-height: 38px;
  padding: 0 12px;
  border-color: #dfe3ea;
  background: #ffffff;
  color: #252a32;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(31, 36, 43, 0.045);
}

.secondary:hover {
  border-color: #c7cede;
  background: #f7f7f7;
}

.secondary:active {
  transform: translateY(1px);
}

.sr-only-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.primary {
  background: #1226a9;
  color: #ffffff;
  border-color: #1226a9;
  box-shadow: 0 12px 26px rgba(18, 38, 169, 0.16);
}

.primary:hover:not(:disabled) {
  border-color: #1226a9;
  box-shadow: 0 14px 28px rgba(18, 38, 169, 0.2);
}

.primary:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.ghost {
  min-height: 32px;
  border-color: #dfe3ea;
  background: #ffffff;
  color: #20242b;
  font-size: 0.82rem;
  font-weight: 700;
}

.ghost:hover {
  border-color: #c7cede;
  background: #f7f7f7;
}

.error {
  min-height: 17px;
  color: #b42318;
  font-size: 0.78rem;
  font-weight: 760;
}

.message {
  margin: 0;
  color: #b42318;
  font-weight: 760;
}

.success {
  width: min(100% - 32px, 560px);
  margin: 12vh auto 0;
  padding: 30px 24px;
  text-align: center;
}

.success .brand-logo {
  margin: 0 auto 16px;
  width: 148px;
}

.success h1 {
  margin-bottom: 8px;
}

.success-status {
  margin: 18px 0;
  padding: 13px;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: #f7f7f7;
  color: #252a32;
  font-weight: 760;
}

.success-status:empty {
  display: none;
}

@media (min-width: 760px) {
  form {
    grid-template-columns: 1fr 1fr;
  }

  .field-block,
  .terms-card,
  .terms,
  .primary,
  .message {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  .shell {
    padding: 18px 12px 34px;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 132px;
  }

  form {
    padding: 14px;
  }
}

@media (max-width: 420px) {
  .upload-actions {
    grid-template-columns: 1fr;
  }
}
