:root {
  --bg: #0f1115;
  --surface: #1a1d24;
  --text: #e8e9ec;
  --muted: #9aa0ac;
  --accent: #4f8cff;
  --border: #2a2e37;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

header nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.cart-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  margin-left: 0.3rem;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.lot-info {
  font-size: 0.85rem;
  color: var(--muted);
  margin: -0.5rem 0 1rem;
}

.lot-info a {
  color: var(--accent);
}

button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

select, input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  width: 100%;
  margin-bottom: 1rem;
}

.muted { color: var(--muted); }

main a { color: var(--accent); }

.field-error {
  color: #e0a03a;
  font-size: 0.85rem;
  margin-top: -0.75rem;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
}

.catalog-table {
  width: 100%;
  min-width: 1300px;
  border-collapse: collapse;
}

.catalog-table th, .catalog-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.catalog-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  white-space: nowrap;
}

.catalog-table input {
  margin-bottom: 0;
}

.catalog-table td.doc-cell {
  min-width: 12rem;
  max-width: 13rem;
}

.address-status {
  font-size: 0.85rem;
  margin: 0.5rem 0 1rem;
  min-height: 1.2em;
}

.address-status.is-verified { color: #35c98f; }
.address-status.is-unverified { color: #e0a03a; }
.address-status.is-checking,
.address-status.is-error { color: var(--muted); }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  font-size: 1.05rem;
}

.center-note {
  text-align: center;
  font-size: 0.85rem;
  margin: 0.5rem 0 1.25rem;
}

.qr-wrap {
  display: flex;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.25rem;
}

.field-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.copy-row code {
  flex: 1;
  margin: 0;
  font-size: 0.85rem;
}

.summary-divider {
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 0.6rem;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
}

.status-line.is-paid {
  border-color: #35c98f;
  color: #35c98f;
}

.status-line.is-warning {
  border-color: #e0a03a;
  color: #e0a03a;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  flex: none;
  animation: spin 0.9s linear infinite;
}

.status-line.is-paid .spinner,
.status-line.is-warning .spinner {
  display: none;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}

.help-block {
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
  margin-bottom: 0.5rem;
}

.help-block summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.help-block p {
  font-size: 0.9rem;
}

.order-ref {
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
  font-size: 0.85rem;
}

.order-ref code {
  display: inline;
  padding: 0.1rem 0.35rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0.15rem 0 0;
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: var(--border);
}

.btn-small {
  padding: 0.3rem 0.6rem;
  font-size: 0.9rem;
}

.btn-danger {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.qty-input {
  width: 4.5rem;
  margin-bottom: 0;
  display: inline-block;
}

.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-line:last-child { border-bottom: none; }

.cart-line-info h4 {
  margin: 0 0 0.2rem;
}

.cart-line-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
}

code {
  word-break: break-all;
  background: var(--bg);
  padding: 0.5rem;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--border);
}

footer.site-footer {
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 1.5rem 2rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

footer.site-footer a {
  color: var(--accent);
}

footer.site-footer .research-disclaimer {
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.order-warning {
  border-color: #e0a03a;
}

.order-warning-banner {
  background: color-mix(in srgb, #e0a03a 15%, var(--surface));
  border: 1px solid #e0a03a;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin: 0 0 0.9rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.checkout-disclaimer {
  background: color-mix(in srgb, #e0a03a 12%, var(--surface));
  border: 1px solid #e0a03a;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  text-align: center;
}
