:root {
  color: #161814;
  background: #f5f7f8;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, #f5f7f8 0%, #eef3f1 42%, #f8f9fb 100%);
}

a {
  color: inherit;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  background: #1d2b24;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button[disabled] {
  cursor: not-allowed;
  color: #6a7472;
  background: #eef2f1;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #0078a6;
  outline-offset: 3px;
}

.user-primary-action:focus-visible {
  outline: 3px solid #0078a6;
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
}

.hero-flow,
.band {
  padding: 28px clamp(18px, 4vw, 56px);
}

.hero-flow {
  display: grid;
  min-height: 88vh;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid #d7dedc;
  background: #f7faf9;
}

.partner-hero {
  min-height: 76vh;
}

.live-hero {
  min-height: 100vh;
}

.user-action-hero,
.user-help-hero {
  min-height: 92vh;
}

.receipt-hero,
.demo-hero {
  min-height: 72vh;
}

.hero-copy {
  max-width: 920px;
}

.hero-flow h1 {
  margin: 10px 0 14px;
  max-width: 900px;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 700px;
  margin: 0;
  color: #45504e;
  font-size: 20px;
}

.hero-actions,
.panel-heading,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions {
  justify-content: flex-start;
  margin-top: 28px;
}

.hero-status,
.panel {
  border: 1px solid #d7dedc;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgb(22 24 20 / 8%);
}

.hero-status {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.status-pill {
  width: max-content;
  border: 1px solid #22a06b;
  border-radius: 999px;
  padding: 7px 12px;
  color: #0d6544;
  background: #e8f8f1;
  font-weight: 700;
  font-size: 13px;
}

.status-pill.blocked,
.status-pill.stale {
  border-color: #c28a00;
  color: #7a5200;
  background: #fff7df;
}

.status-pill.ready {
  border-color: #22a06b;
  color: #0d6544;
  background: #e8f8f1;
}

.hash-xl {
  font-size: 24px;
  word-break: break-all;
}

.eyebrow {
  margin: 0;
  color: #606b68;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel {
  padding: 20px;
}

.panel h2,
.section-heading h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0;
}

.summary-grid,
.action-grid,
.address-grid,
.metric-grid,
.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.metric-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 16px;
}

.proof-grid {
  margin-top: 16px;
}

.address-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.metric-panel {
  min-height: 150px;
  padding: 18px;
  border: 1px solid #d7dedc;
  border-radius: 8px;
  background: #ffffff;
}

.metric-panel strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 28px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.field {
  display: grid;
  grid-template-columns: minmax(100px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid #edf1f0;
}

.field:first-of-type {
  margin-top: 12px;
}

.field-label {
  color: #6a7472;
  font-size: 13px;
}

.field-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hash-wrap {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.muted {
  color: #58635f;
}

.primary-link,
.secondary-link,
.disabled-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 800;
  text-decoration: none;
}

.primary-link {
  background: #1d2b24;
  color: #ffffff;
}

.secondary-link {
  border: 1px solid #b8c3c0;
  background: #ffffff;
}

.disabled-link {
  color: #6a7472;
  background: #eef2f1;
}

.status-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 18px 0;
  list-style: none;
}

.status-step {
  min-height: 172px;
  padding: 14px;
  border: 1px solid #d7dedc;
  border-radius: 8px;
  background: #ffffff;
}

.status-step.complete {
  border-color: #22a06b;
}

.status-step.blocked {
  border-color: #c28a00;
  background: #fff7df;
}

.status-step.active {
  border-color: #0078a6;
  background: #eef9fc;
}

.status-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #1d2b24;
  color: #ffffff;
  font-weight: 800;
}

.status-body {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.status-body span,
.status-body em {
  color: #58635f;
  font-size: 13px;
  font-style: normal;
}

.receipt-panel {
  margin-top: 16px;
  border-color: #b8c3c0;
}

.route-focus {
  border-color: #22a06b;
}

.event-list {
  border: 1px solid #d7dedc;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.log-list {
  margin-top: 12px;
  border: 1px solid #edf1f0;
  border-radius: 8px;
  overflow: hidden;
}

.proof-row {
  margin-top: 16px;
}

.packet-band {
  border-bottom: 1px solid #d7dedc;
}

.action-reasons {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

details.panel summary {
  cursor: pointer;
  font-weight: 800;
}

.event-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid #edf1f0;
}

.event-row:first-child {
  border-top: 0;
}

.notice {
  color: #46504d;
  font-weight: 700;
}

.loading-panel {
  padding: 40px;
}

.user-shell .hero-flow {
  min-height: 88vh;
}

.user-action-hero,
.user-receipt-page,
.user-help-hero {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  align-items: start;
  padding-top: clamp(32px, 6vw, 72px);
}

.user-shell .hero-copy {
  max-width: 760px;
}

.user-shell .hero-flow h1 {
  max-width: 760px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1;
}

.user-cta-cluster,
.user-receipt-actions {
  align-items: stretch;
  gap: 10px;
}

.user-primary-action {
  min-width: 180px;
}

.user-primary-action.is-pending {
  position: relative;
  padding-right: 42px;
}

.user-primary-action.is-pending::after {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 14px;
  height: 14px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-top-color: #ffffff;
  border-radius: 999px;
  content: "";
  transform: translateY(-50%);
  animation: user-spin 0.8s linear infinite;
}

.user-state {
  width: fit-content;
  max-width: 100%;
  margin: 16px 0 0;
  border-left: 4px solid #0078a6;
  border-radius: 4px;
  padding: 10px 12px;
  background: #eef9fc;
  color: #304b55;
  font-weight: 700;
}

.user-state.blocked {
  border-left-color: #c28a00;
  background: #fff7df;
  color: #694900;
}

.user-state.complete {
  border-left-color: #22a06b;
  background: #e8f8f1;
  color: #0d6544;
}

.user-safety-notice {
  margin: 18px 0 0;
  border-top: 1px solid #edf1f0;
  padding-top: 16px;
}

@keyframes user-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.user-cta-cluster > *,
.user-receipt-actions > * {
  min-width: max-content;
}

.user-action-summary,
.user-intent-panel {
  margin-bottom: 16px;
}

.user-gate-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.user-gate-card {
  display: grid;
  gap: 4px;
  border: 1px solid #d7dedc;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfa;
}

.user-gate-card strong {
  overflow-wrap: anywhere;
}

.user-progress-panel {
  margin-top: 24px;
}

.user-progress-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.user-progress-heading h2 {
  margin: 0;
  font-size: 18px;
}

.user-status-rail {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}

.user-status-rail .status-step {
  min-height: 142px;
}

.user-step-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.user-step-list li,
.user-receipt-card,
.user-help-panel {
  border: 1px solid #d7dedc;
  border-radius: 8px;
  background: #ffffff;
}

.user-step-list li {
  padding: 12px;
}

.user-receipt-card,
.user-help-panel {
  padding: 20px;
}

.user-receipt-card {
  min-width: 0;
  align-self: start;
}

.user-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.user-technical-details {
  margin-top: 16px;
  box-shadow: none;
}

.user-input {
  width: 100%;
  min-height: 44px;
  margin: 10px 0 16px;
  border: 1px solid #b8c3c0;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.user-support-summary {
  overflow-x: auto;
  border: 1px solid #edf1f0;
  border-radius: 8px;
  padding: 12px;
  background: #f8f9fb;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .hero-flow,
  .summary-grid,
  .action-grid,
  .address-grid,
  .metric-grid,
  .proof-grid,
  .status-rail {
    grid-template-columns: 1fr;
  }

  .hero-flow {
    min-height: auto;
  }

  .user-action-hero,
  .user-receipt-page,
  .user-help-hero {
    grid-template-columns: 1fr;
  }

  .status-step {
    min-height: 0;
  }
}

@media (min-width: 981px) and (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .status-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .field,
  .event-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-flow h1 {
    font-size: 42px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions > * {
    width: 100%;
  }

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

@media (max-width: 430px) {
  .hero-flow,
  .band {
    padding: 22px 14px;
  }

  .user-shell .hero-flow h1 {
    font-size: 36px;
  }

  .user-cta-cluster > *,
  .user-receipt-actions > *,
  .user-filter-row > * {
    width: 100%;
    min-width: 0;
  }

  .user-status-rail {
    grid-template-columns: 1fr;
  }

  .field-value,
  .hash-wrap,
  .user-support-summary {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
