:root {
  --bg: #f3efe7;
  --ink: #1a2240;
  --muted: #667085;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-border: rgba(26, 34, 64, 0.12);
  --accent: #c58c47;
  --accent-deep: #915b24;
  --success: #157347;
  --danger: #b42318;
  --shadow: 0 20px 50px rgba(18, 28, 45, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(197, 140, 71, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(26, 34, 64, 0.16), transparent 34%),
    linear-gradient(180deg, #f8f5ef 0%, #f1ebe0 100%);
}

img {
  display: block;
  max-width: 100%;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.narrow-shell {
  width: min(860px, calc(100% - 32px));
}

.hero-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
}

.hero-card {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.5fr 1fr;
  padding: 32px;
  margin-bottom: 24px;
}

.hero-copy h1,
.panel-header h1,
.panel-header h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  line-height: 1.05;
  margin: 0;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  max-width: 11ch;
}

.lede,
.mini-note,
.status-line,
.warning-list,
.product-copy p,
.summary-row-soft,
.field span,
.toggle span {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.merchant-badge {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: rgba(26, 34, 64, 0.04);
}

.merchant-badge img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
}

.meta-label {
  margin: 0 0 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.mode-banner,
.status-chip {
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(197, 140, 71, 0.14);
  color: var(--accent-deep);
  font-weight: 700;
}

.status-chip {
  display: inline-flex;
  width: fit-content;
}

.hidden {
  display: none;
}

.warning-list {
  margin: 14px 0 0;
  padding-left: 18px;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.panel {
  padding: 28px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.stack-lg > * + * {
  margin-top: 22px;
}

.stack-md > * + * {
  margin-top: 16px;
}

.stack-sm > * + * {
  margin-top: 10px;
}

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

.field,
.qty-field {
  display: grid;
  gap: 8px;
}

.field-span {
  grid-column: 1 / -1;
}

.field input,
.qty-input {
  width: 100%;
  border: 1px solid rgba(26, 34, 64, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
}

.field input:focus,
.qty-input:focus {
  outline: 2px solid rgba(197, 140, 71, 0.28);
  border-color: var(--accent);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(26, 34, 64, 0.04);
  padding: 12px 14px;
  border-radius: 999px;
}

.catalog {
  display: grid;
}

.product-card {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(26, 34, 64, 0.08);
  background: rgba(255, 255, 255, 0.6);
}

.product-thumb img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 18px;
}

.product-copy h3,
.verification-card h3 {
  margin: 0 0 6px;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 1.35rem;
}

.product-copy p {
  margin: 0 0 10px;
}

.qty-field {
  min-width: 88px;
}

.qty-input {
  text-align: center;
}

.checkout-summary {
  border-radius: 24px;
  background: rgba(26, 34, 64, 0.04);
  padding: 18px 20px;
}

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

.summary-row + .summary-row {
  margin-top: 10px;
}

.summary-row strong {
  font-size: 1.15rem;
}

.primary-button,
.secondary-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 999px;
  padding: 15px 22px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: white;
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.62;
  cursor: progress;
}

.secondary-button {
  background: rgba(26, 34, 64, 0.08);
  color: var(--ink);
}

.ghost-link {
  background: transparent;
  border: 1px solid rgba(26, 34, 64, 0.12);
  color: var(--ink);
}

#checkout {
  min-height: 220px;
}

.mock-checkout {
  border: 1px solid rgba(26, 34, 64, 0.08);
  border-radius: 28px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(197, 140, 71, 0.18), transparent 30%),
    rgba(255, 255, 255, 0.94);
}

.mock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.mock-order {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(26, 34, 64, 0.04);
}

.verification-card {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(26, 34, 64, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.pill {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.pill-success {
  background: rgba(21, 115, 71, 0.12);
  color: var(--success);
}

.pill-fail {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.payload-box {
  margin: 0;
  overflow-x: auto;
  padding: 14px;
  border-radius: 16px;
  background: #131726;
  color: #edf2ff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .hero-card,
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .panel-header {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 20px;
  }

  .hero-card,
  .panel {
    padding: 20px;
    border-radius: 24px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 1fr;
  }
}
