/* Phone-first wallet styling. Unlike the flat reference site, this is an app
   a non-technical person operates on a phone: one column, large tap targets,
   16px+ inputs (so iOS never zooms), generous spacing. Restrained, not
   decorative -- colour is used only where it carries meaning (status). */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: #1b1f24;
  background: #f4f4f2;
}

.app-header {
  background: #1b1f24;
  color: #fff;
  padding: 14px 16px;
  font-weight: 600;
  position: sticky;
  top: 0;
  padding-top: max(14px, env(safe-area-inset-top));
}

.nav {
  display: flex;
  gap: 4px;
  background: #2b2f35;
  padding: 6px;
  position: sticky;
  top: 0;
}
.nav a {
  flex: 1;
  text-align: center;
  color: #dfe3e8;
  text-decoration: none;
  padding: 10px 4px;
  border-radius: 6px;
  font-size: 15px;
}
.nav a:active { background: #3b4046; }

.screen {
  max-width: 34em;
  margin: 0 auto;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}

.card {
  background: #fff;
  border: 1px solid #e2e0da;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

h1 { font-size: 1.35rem; margin: 0 0 12px; }
h2 { font-size: 1.1rem; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: #5b6470; }
.small { font-size: 0.85rem; }

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 14px 0 6px;
}
label.check {
  font-weight: 400;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
label.check input { width: auto; margin-top: 3px; }

input, textarea, select {
  width: 100%;
  font-size: 16px; /* prevents iOS zoom-on-focus */
  padding: 12px;
  border: 1px solid #c6c9ce;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
}
textarea { resize: vertical; }

.btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #1b1f24;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 14px;
  text-decoration: none;
  cursor: pointer;
}
.btn:active { opacity: 0.85; }
.btn-secondary { background: #fff; color: #1b1f24; border: 1px solid #1b1f24; }
.btn-small { width: auto; display: inline-block; padding: 8px 14px; font-size: 14px; margin-top: 0; }

.row-buttons { display: flex; flex-direction: column; gap: 0; }

.backup {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  word-break: break-all;
  background: #f4f4f2;
  border: 1px solid #e2e0da;
  border-radius: 8px;
  padding: 10px;
  margin: 6px 0;
}

.warning {
  background: #fdf3d9;
  border: 1px solid #e8c368;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: #5c4310;
  margin: 12px 0;
}

.flash {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.92rem;
}
.flash.success { background: #e8f6ee; border: 1px solid #9ed3b4; color: #14562f; }
.flash.error { background: #fbe9e7; border: 1px solid #e6a49c; color: #8a251d; }

/* Records as stacked blocks (phones hate wide tables). */
.record {
  background: #fff;
  border: 1px solid #e2e0da;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.record-claim { font-weight: 600; text-transform: capitalize; }
.record-status { margin: 8px 0; }
.record-actions { display: flex; gap: 8px; margin-top: 10px; }

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge.good { background: #e8f6ee; color: #1e7d4a; }
.badge.bad { background: #fbe9e7; color: #b3261e; }
.badge.warn { background: #fdf3d9; color: #9a6400; }

.record-pick { padding: 10px 0; border-bottom: 1px solid #eee; }

table { width: 100%; border-collapse: collapse; margin: 10px 0; }
td { padding: 8px 4px; border-bottom: 1px solid #eee; }
td:last-child { text-align: right; font-weight: 600; }

/* Install prompt / iOS hint bar, pinned to the bottom. */
.install-bar {
  position: fixed;
  left: 8px; right: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  background: #1b1f24;
  color: #fff;
  border-radius: 10px;
  padding: 12px 40px 12px 14px;
  font-size: 0.9rem;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 50;
}
.btn-inline {
  background: #fff;
  color: #1b1f24;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.install-x {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #cfd3d8;
  font-size: 1.4rem;
  line-height: 1;
  width: 28px; height: 28px;
  cursor: pointer;
}
