:root {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f172a;
  background-color: #f8fafc;
  line-height: 1.5;
  font-size: 16px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
  background-color: #f8fafc;
}

.checkout-shell {
  width: min(1200px, 100%);
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.checkout-shell.donation-shell {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.form-card,
.help-card,
.hero {
  grid-column: 1 / -1;
}

.card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.hero {
  grid-column: 1 / -1;
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7c3aed;
  margin-bottom: 8px;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.form-card form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.field-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.input-row {
  display: flex;
  gap: 12px;
}

input[type="text"],
input[type="email"],
input[type="number"] {
  flex: 1;
  border: 1px solid #cbd5f5;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  background: #111827;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

.field-hint {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.article-preview {
  border: 1px dashed rgba(148, 163, 184, 0.7);
  border-radius: 16px;
  padding: 28px;
  background: #f1f5f9;
  width: 100%;
}

.article-details {
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) {
  .article-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-header,
  .article-meta,
  .article-abstract {
    grid-column: 1 / -1;
  }
}

.placeholder {
  color: #475569;
}

.article-details.hidden,
.placeholder.hidden {
  display: none;
}

.article-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.article-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7c3aed;
  margin: 0 0 4px;
}

.article-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.article-meta dt {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 4px;
}

.article-meta dd {
  margin: 0;
  font-weight: 600;
}

.article-abstract {
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.95rem;
  color: #0f172a;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
}

.status-row {
  min-height: 1.5em;
  font-size: 0.95rem;
}

.status-row[data-tone="success"] {
  color: #15803d;
}

.status-row[data-tone="error"] {
  color: #dc2626;
}

.status-row[data-tone="warning"] {
  color: #b45309;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  padding-top: 16px;
}

.total span {
  color: #64748b;
  font-size: 0.9rem;
}

.total strong {
  display: block;
  font-size: 1.4rem;
  margin-top: 4px;
}

.help-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.help-card ul {
  padding-left: 20px;
  line-height: 1.4;
}

.help-card li + li {
  margin-top: 8px;
}

.gradient-card {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
}

.gradient-card .hero-content p,
.gradient-card .hero-content li {
  color: rgba(255, 255, 255, 0.85);
}

.hero-highlights {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-highlights li {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 6px 14px;
}

.hero-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 12px 18px;
  text-align: center;
  font-weight: 600;
}

.card-intro {
  color: #475569;
  margin-top: 0;
}

.secure-note {
  font-size: 0.9rem;
  color: #64748b;
  margin: 12px 0 0;
}

.bright-card {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.35);
}

.bright-card .note {
  font-size: 0.9rem;
  color: #92400e;
}

.gradient-card.soothing-card {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 20px;
}

.form-grid.donation-grid {
  grid-template-columns: minmax(150px, 1fr) minmax(320px, 2.5fr) minmax(220px, 1.3fr);
}

.form-grid .span-2 {
  grid-column: span 2;
}

.input-row.compact {
  display: flex;
  gap: 8px;
}

.input-row.compact input[type="number"] {
  flex: 1;
}

.input-row.compact button {
  white-space: nowrap;
}

.amount-input {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.amount-input input {
  min-width: 0;
}

.amount-input button {
  flex-shrink: 0;
}

.ghost-btn {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 12px 16px;
}

.ghost-btn:hover {
  background: rgba(99, 102, 241, 0.2);
}

@media (max-width: 640px) {
  body {
    padding: 24px 12px;
  }

  .input-row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .form-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .total {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .checkout-shell.donation-shell .form-card,
  .checkout-shell.donation-shell .help-card,
  .checkout-shell.donation-shell .hero {
    grid-column: 1 / -1;
  }

  .form-grid .span-2,
  .form-grid.three-cols {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .form-grid.donation-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
