:root {
  --navy: #031f41;
  --navy-dark: #02132a;
  --blue: #69afff;
  --cyan: #08c2e1;
  --green: #22c55e;
  --ink: #0b1f33;
  --muted: #6b7a90;
  --line: rgba(105, 175, 255, 0.18);
  --surface: #f7f9fc;
  --white: #ffffff;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(105, 175, 255, 0.16), transparent 28rem),
    linear-gradient(180deg, #f8fbff 0%, var(--surface) 45%, #edf3fb 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: var(--navy-dark);
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.97);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(105, 175, 255, 0.65);
  outline-offset: 3px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d7e0ec;
  border-radius: 12px;
  padding: 0 14px;
  background: var(--white);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 10px 12px;
  background: var(--blue);
  color: var(--navy-dark);
  border-radius: 10px;
  font-weight: 800;
}

.skip-link:focus {
  top: 16px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(3, 31, 65, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.brand,
.header-actions,
.token-row,
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
}

.brand span,
.status-badge,
.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand span {
  color: #b9c7da;
  font-size: 0.74rem;
}

.status-badge {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 9px 12px;
  color: #d9e5f6;
  font-size: 0.72rem;
  font-weight: 800;
}

.status-badge.ok {
  border-color: rgba(34, 197, 94, 0.45);
  color: #9cf1bc;
}

.status-badge.error {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.ghost-button {
  border: 1px solid rgba(105, 175, 255, 0.32);
  background: rgba(105, 175, 255, 0.08);
  color: inherit;
  padding: 0 16px;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

.hero-panel,
.view,
.evidence-panel {
  border: 1px solid #dde6f1;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 70px rgba(3, 31, 65, 0.1);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  padding: clamp(24px, 5vw, 48px);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--navy-dark);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.12;
  color: var(--navy);
}

h3 {
  margin-bottom: 8px;
  color: var(--navy);
}

.hero-copy {
  max-width: 760px;
  color: #44556c;
  font-size: 1.08rem;
  line-height: 1.65;
}

.token-card {
  align-self: center;
  border: 1px solid rgba(105, 175, 255, 0.28);
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
}

.token-card label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.token-card p {
  margin: 12px 0 0;
  color: #b9c7da;
  font-size: 0.92rem;
  line-height: 1.45;
}

.tabs {
  display: flex;
  gap: 10px;
  padding: 18px 0;
  overflow-x: auto;
}

.tab {
  flex: 0 0 auto;
  border: 1px solid #dbe5f1;
  background: var(--white);
  color: #35445b;
  padding: 0 18px;
}

.tab.is-active {
  background: var(--navy);
  color: var(--white);
}

.view {
  display: none;
  padding: clamp(20px, 4vw, 34px);
}

.view.is-visible {
  display: block;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.item-card,
.code-panel {
  border: 1px solid #dce5ef;
  border-radius: 18px;
  background: #fff;
}

.metric-card {
  padding: 18px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 8px 0;
  color: var(--navy);
  font-size: 2rem;
}

.evidence-panel {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  margin-top: 18px;
  padding: 20px;
  align-items: center;
}

.evidence-panel img {
  width: 100%;
  object-fit: contain;
}

.evidence-panel p,
.item-card p {
  color: #52627a;
  line-height: 1.55;
}

.list-panel {
  display: grid;
  gap: 12px;
}

.item-card {
  padding: 18px;
}

.item-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.item-card strong {
  color: var(--navy);
  font-size: 1.05rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #e7f1ff;
  color: #095192;
  font-size: 0.82rem;
  font-weight: 800;
}

.pill.ok {
  background: #dcfce7;
  color: #166534;
}

.pill.error {
  background: #fee2e2;
  color: #991b1b;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.item-actions button {
  padding: 0 12px;
  min-height: 38px;
}

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

.form-grid label {
  display: grid;
  gap: 8px;
  color: #27384f;
  font-weight: 800;
}

.checkbox-label {
  align-content: center;
  grid-template-columns: 22px 1fr;
}

.checkbox-label input {
  width: 20px;
  min-height: 20px;
}

.form-actions {
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

.form-actions button {
  padding: 0 18px;
}

.code-panel {
  overflow: auto;
  max-height: 480px;
  padding: 18px;
  color: #dce8f8;
  background: var(--navy-dark);
  line-height: 1.6;
}

.empty-state {
  border: 1px dashed #cbd8e8;
  border-radius: 18px;
  padding: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 900px) {
  .app-header,
  .section-heading,
  .token-row {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero-panel,
  .metric-grid,
  .form-grid,
  .evidence-panel {
    grid-template-columns: 1fr;
  }

  .evidence-panel img {
    width: 96px;
  }
}

@media (max-width: 520px) {
  .brand img {
    width: 44px;
    height: 44px;
  }

  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .hero-panel,
  .view {
    border-radius: 20px;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }
}
