/* SoundBridge styles. Dark theme, mobile first.
   Uniformity: buttons, inputs and selects share one height (44px), one
   corner radius (12px), one font size (15px) and one gap rhythm (10px). */

:root {
  --bg: #0f141b;
  --card: #16222f;
  --card-2: #1b2a3a;
  --line: #26374a;
  --ink: #e8ecf1;
  --muted: #9fb0c3;
  --accent: #e8a33d;
  --accent-ink: #1a1206;
  --green: #1db954;
  --red: #ff6b6b;
  --radius: 12px;
  --row-h: 44px;
  --gap: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

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

.hidden { display: none !important; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

.site-head {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 20, 27, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
}

.head-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}

.head-nav { display: flex; gap: 18px; }
.head-nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.head-nav a:hover { color: var(--ink); }

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
h2 { font-size: 21px; margin: 0 0 8px; }
h3.subhead { font-size: 16px; margin: 22px 0 10px; }
.lede { color: var(--muted); margin: 0 0 24px; font-size: 17px; }

.step {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.connector-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  margin-top: 14px;
}

/* Cards are flex columns so the Connect row sits at the bottom of every
   card, aligned across cards even when one card has an extra field. */
.connector-card {
  display: flex;
  flex-direction: column;
}

.connector-card .row:last-child {
  margin-top: auto;
  padding-top: 14px;
}

@media (min-width: 640px) {
  .connector-grid { grid-template-columns: 1fr 1fr; }
}

.connector-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.connector-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.connector-name { font-weight: 700; font-size: 17px; }

.pill {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill-ok { background: rgba(29, 185, 84, 0.18); color: #7fe3a8; }
.pill-off { background: rgba(159, 176, 195, 0.14); color: var(--muted); }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 14px 0 6px;
}

.text-input,
.select {
  width: 100%;
  height: var(--row-h);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  padding: 0 12px;
  outline: none;
}

.text-input:focus,
.select:focus { border-color: var(--accent); }

.text-input.short { max-width: 120px; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239fb0c3' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap);
  margin-top: 14px;
}

.row-between { justify-content: space-between; }
.row-between h3 { margin: 0; }

.btn {
  height: var(--row-h);
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  padding: 0 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.5; cursor: default; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { background: var(--card-2); color: var(--ink); border-color: var(--line); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); height: 36px; font-size: 14px; padding: 0 14px; }

.link { font-size: 14px; }

.alert {
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 15px;
}

.alert-error { background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.4); color: #ffb3b3; }
.alert-ok { background: rgba(29, 185, 84, 0.12); border: 1px solid rgba(29, 185, 84, 0.4); color: #a9ecbf; }

.resume { border-color: var(--accent); }
.resume p { margin: 0; }

.direction {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--gap);
  align-items: start;
  margin-top: 14px;
}

.direction-arrow {
  font-size: 22px;
  color: var(--muted);
  padding-top: 34px;
}

@media (max-width: 520px) {
  .direction { grid-template-columns: 1fr; }
  .direction-arrow { display: none; }
}

.check-list { margin-top: 8px; }

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--row-h);
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
}

.check-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.check-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.check-count { color: var(--muted); font-size: 13px; white-space: nowrap; }

.progress {
  height: 8px;
  background: var(--card-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 14px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.progress-text { color: var(--muted); font-size: 13px; margin: 8px 0 0; min-height: 20px; }

.report-counts { font-weight: 600; margin: 12px 0 0; }

.ambiguous-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.ambiguous-source { margin: 0 0 8px; }

.radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 0;
  cursor: pointer;
}

.radio-row input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.radio-row span:first-of-type { flex: 1; min-width: 0; }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li {
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.transfer-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 12px;
}

.transfer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.site-foot {
  border-top: 1px solid var(--line);
  padding: 20px 16px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.site-foot p { margin: 0; }
.site-foot a { color: var(--muted); }
