:root {
  --color-primary: #ff7500;
  --color-primary-dark: #e06000;
  --color-secondary: #35156a;
  --color-navy: #3f444b;
  --color-dark: #111111;
  --color-text: #404040;
  --color-gray: #6b7280;
  --color-gray-light: #f3f4f6;
  --color-page-bg: #ebebeb;
  --color-white: #ffffff;
  --color-accent-green: #22c55e;
  --color-accent-red: #ef4444;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-text);
  background: var(--color-page-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

.brand-wordmark {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-primary);
  text-transform: lowercase;
}

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

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.hero-card {
  margin-bottom: 16px;
}

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

.charge-title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-dark);
}

.charge-desc {
  margin: 0 0 20px;
  color: var(--color-gray);
  font-size: 0.95rem;
  line-height: 1.55;
}

.amount-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #faf9f6 0%, var(--color-gray-light) 100%);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.amount-main {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.amount-rate {
  padding-top: 2px;
}

.amount-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gray);
  margin-bottom: 4px;
}

.amount-value {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-primary);
}

.amount-value.sm {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
}

.amount-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.88rem;
  color: var(--color-gray);
}

.section-title {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark);
}

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

.method-option {
  position: relative;
}

.method-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.method-option label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--color-white);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.method-option input:checked + label {
  border-color: var(--color-primary);
  background: #fff8f2;
  box-shadow: 0 0 0 3px rgba(255, 117, 0, 0.12);
}

.method-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-dark);
}

.method-amount {
  font-size: 0.8rem;
  color: var(--color-gray);
}

.instructions {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-gray-light);
  border-left: 4px solid var(--color-primary);
  font-size: 0.88rem;
  line-height: 1.6;
}

.instructions-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.instructions-row span:first-child {
  color: var(--color-gray);
  font-weight: 500;
}

.instructions-row span:last-child {
  color: var(--color-dark);
  font-weight: 600;
  text-align: right;
}

.fields {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-dark);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--color-dark);
  background: var(--color-white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 117, 0, 0.14);
}

.file-hint {
  font-size: 0.76rem;
  color: var(--color-gray);
  line-height: 1.45;
}

.proof-mark {
  color: var(--color-primary);
  font-weight: 700;
}

.dropzone {
  position: relative;
  border: 2px dashed #d1d5db;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fafafa 0%, var(--color-white) 100%);
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--color-primary);
  background: #fffaf5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 117, 0, 0.1);
}

.dropzone.is-dragover {
  border-color: var(--color-primary);
  background: #fff3e8;
  box-shadow: 0 0 0 4px rgba(255, 117, 0, 0.16);
  transform: scale(1.01);
}

.dropzone.has-file {
  border-style: solid;
  border-color: #e5e7eb;
  cursor: default;
}

.dropzone.has-file:hover {
  box-shadow: none;
  transform: none;
}

.dropzone-empty {
  padding: 28px 20px;
  text-align: center;
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff3e8;
  color: var(--color-primary);
  display: grid;
  place-items: center;
}

.dropzone-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark);
}

.dropzone-sub {
  margin: 0 0 10px;
  font-size: 0.84rem;
  color: var(--color-gray);
}

.dropzone-formats {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-gray-light);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-gray);
  letter-spacing: 0.03em;
}

.dropzone-preview {
  display: flex;
  flex-direction: column;
}

.dropzone-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.dropzone-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--color-white);
}

.dropzone-filename {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropzone-change,
.dropzone-remove {
  flex-shrink: 0;
  border: 0;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropzone-change {
  padding: 6px 12px;
  background: #fff3e8;
  color: var(--color-primary-dark);
}

.dropzone-change:hover {
  background: #ffe4cc;
}

.dropzone-remove {
  width: 30px;
  height: 30px;
  padding: 0;
  background: var(--color-gray-light);
  color: var(--color-gray);
}

.dropzone-remove:hover {
  background: #fee2e2;
  color: var(--color-accent-red);
}

.btn-primary {
  width: 100%;
  border: 0;
  border-radius: var(--radius-full);
  padding: 15px 22px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-white);
  background: var(--color-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  color: var(--color-accent-red);
  font-size: 0.88rem;
}

.state-view {
  text-align: center;
  padding: 40px 24px;
}

.state-title {
  margin: 16px 0 8px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-dark);
}

.state-text {
  margin: 0;
  color: var(--color-gray);
  line-height: 1.55;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid #fde8d4;
  border-top-color: var(--color-primary);
  animation: spin 0.8s linear infinite;
}

.icon-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.icon-badge.error {
  background: #fef2f2;
  color: var(--color-accent-red);
}

.success-anim {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto;
}

.checkmark-circle {
  width: 96px;
  height: 96px;
}

.checkmark {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: var(--color-accent-green);
  stroke-miterlimit: 10;
}

.checkmark-circle-bg {
  stroke: #bbf7d0;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: stroke 0.55s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  stroke: var(--color-accent-green);
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.45s forwards;
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.confetti span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti 1.1s ease-out forwards;
}

.summary-pill {
  margin-top: 18px;
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: #fff3e8;
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.92rem;
}

.footer {
  text-align: center;
  padding: 8px 16px 28px;
  color: var(--color-gray);
  font-size: 0.82rem;
}

.footer a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 700;
}

.footer a:hover {
  color: var(--color-primary);
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes stroke {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes confetti {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(320deg);
  }
}

@media (max-width: 520px) {
  .method-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px 16px;
  }

  .shell {
    width: calc(100% - 24px);
    margin-top: 16px;
  }
}
