:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #647089;
  --border: #dfe5ef;
  --accent: #2458f2;
  --accent-dark: #173cb0;
  --danger: #c83d37;
  --success: #177b4d;
  --warning-bg: #fff7e1;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(36, 88, 242, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
}

code {
  background: #eef2ff;
  border-radius: 6px;
  color: #1e3a8a;
  padding: 0.1rem 0.35rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 2rem;
  max-width: 1220px;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
}

.eyebrow,
.step {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 0.55rem;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  line-height: 0.98;
}

h2 {
  font-size: 1.35rem;
}

.lede {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 760px;
}

.wallet-card,
.panel,
.notes {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.wallet-card {
  align-self: start;
  display: grid;
  gap: 0.9rem;
  padding: 1.2rem;
}

.status-line {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.status-line strong {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.layout {
  display: grid;
  gap: 1.2rem;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.25rem 1.5rem;
}

.panel {
  padding: 1.25rem;
}

.panel-header {
  align-items: start;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-header p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  max-width: 560px;
}

label {
  color: #35405a;
  display: block;
  font-size: 0.9rem;
  font-weight: 750;
  margin: 1rem 0 0.45rem;
}

textarea {
  background: #fbfcff;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #101828;
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.55;
  min-height: 160px;
  outline: none;
  padding: 0.9rem;
  resize: vertical;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
  width: 100%;
}

textarea:focus {
  border-color: rgba(36, 88, 242, 0.6);
  box-shadow: 0 0 0 4px rgba(36, 88, 242, 0.12);
}

button,
input,
select {
  font: inherit;
}

input[type="text"],
select {
  background: #fbfcff;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #101828;
  display: block;
  font-size: 0.94rem;
  outline: none;
  padding: 0.78rem 0.9rem;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
  width: 100%;
}

input[type="text"]:focus,
select:focus {
  border-color: rgba(36, 88, 242, 0.6);
  box-shadow: 0 0 0 4px rgba(36, 88, 242, 0.12);
}

button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 760;
  padding: 0.72rem 1rem;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 25px rgba(36, 88, 242, 0.22);
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  background: #edf2ff;
  color: #1e3a8a;
}

.danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 10px 25px rgba(200, 61, 55, 0.2);
}

.compact {
  margin-bottom: 0.5rem;
  padding: 0.55rem 0.8rem;
}

.row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.75rem;
}

input[type="file"] {
  color: var(--muted);
  max-width: 100%;
}

.field-group {
  background: #f9fbff;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 1rem;
  padding: 1rem;
}

.optional-record {
  background: #f9fbff;
  border: 1px dashed #cbd6ea;
  border-radius: 16px;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
}

.optional-record summary {
  color: #35405a;
  cursor: pointer;
  font-weight: 760;
}

.hidden {
  display: none;
}

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

.summary {
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-top: 0.9rem;
  overflow-wrap: anywhere;
  padding: 0.9rem;
}

.summary.ok {
  background: #edf8f2;
  border: 1px solid #bfe8d2;
}

.summary.error {
  background: #fff0ee;
  border: 1px solid #ffc6c0;
  color: #9d2d29;
}

.summary.muted {
  background: #f7f9fd;
  border: 1px solid var(--border);
  color: var(--muted);
}

.summary dl {
  display: grid;
  gap: 0.35rem 0.75rem;
  grid-template-columns: 150px minmax(0, 1fr);
  margin: 0;
}

.summary dt {
  color: var(--muted);
  font-weight: 700;
}

.summary dd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0;
}

.success {
  color: var(--success);
  font-weight: 800;
  margin-bottom: 0;
}

.notes {
  max-width: 1220px;
  margin: 0 auto 3rem;
  padding: 1.25rem;
}

.notes ul {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 0;
}

.toast {
  bottom: 1rem;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 1rem);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  z-index: 20;
}

.toast.show {
  background: #172033;
  border-radius: 999px;
  box-shadow: var(--shadow);
  color: #fff;
  opacity: 1;
  padding: 0.75rem 1rem;
  transform: translate(-50%, 0);
}

.toast.show.error {
  background: var(--danger);
}

.toast.show.ok {
  background: var(--success);
}

@media (max-width: 860px) {
  .hero,
  .grid-two,
  .panel-header {
    grid-template-columns: 1fr;
  }

  .hero,
  .panel-header {
    display: grid;
  }

  .summary dl {
    grid-template-columns: 1fr;
  }
}
