/* ==========================================================================
   Tent Intake Tool — shared design system (mobile-first)
   Fonts: Barlow Condensed (headings), Barlow (body), IBM Plex Mono (labels).
   Colors default here but are overwritten at runtime from /api/config theme,
   so a re-skin is a config change only.
   ========================================================================== */
:root {
  /* Defaults mirror config theme (The Locker Market palette); JS overrides
     from /api/config at runtime so a re-skin is a config change only. */
  --black: #16120b;
  --charcoal: #201c17;
  --paper: #f2ead6;
  --card: #ffffff;
  --brand: #1e3a2a;
  --brand-dark: #16120b;
  --accent: #c9a24a;
  --accent-deep: #8a6a15;
  --steel: #555555;
  --rule: #ddcda2;
  --ink: #1a1a1a;
  --danger: #b3261e;
  --tap: 52px; /* min thumb target */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Barlow', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }

h1, h2, h3 { font-family: 'Barlow Condensed', sans-serif; line-height: 1.05; }

/* ---- Top bar ------------------------------------------------------------ */
.topbar {
  background: var(--black);
  color: #fff;
  padding: 14px 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .inner { max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 1.3rem; }
.brand span { color: var(--accent); } /* bright gold reads well on the dark bar */
.topbar .sub { font-family: 'IBM Plex Mono', monospace; font-size: .68rem; letter-spacing: .08em; color: #cfc7b6; }
.linkbtn { background: none; border: 1px solid #4a453c; color: #cfc7b6; font-family: 'IBM Plex Mono', monospace; font-size: .72rem; padding: 8px 10px; border-radius: 6px; cursor: pointer; }

/* ---- Labels + inputs ---------------------------------------------------- */
label, .label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--steel); margin: 0 0 6px;
}
input, select, textarea {
  width: 100%;
  font-family: 'Barlow', sans-serif;
  font-size: 1.1rem;
  padding: 13px 12px;
  border: 2px solid var(--rule);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  min-height: var(--tap);
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
.field { margin-bottom: 14px; }
.hint { font-size: .85rem; color: var(--steel); margin-top: 4px; }

/* ---- Buyer-type radio pills --------------------------------------------- */
.pills { display: grid; gap: 8px; }
.pill {
  display: flex; align-items: center; gap: 10px;
  border: 2px solid var(--rule); border-radius: 9px;
  padding: 12px 14px; cursor: pointer; background: #fff;
  min-height: var(--tap);
}
.pill input { width: auto; min-height: 0; }
.pill.sel { border-color: var(--brand); background: #fbf7ef; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  background: var(--brand); color: #fff; border: none; border-radius: 10px;
  padding: 16px; min-height: var(--tap);
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; font-size: 1.2rem;
  cursor: pointer;
}
.btn:active { background: var(--brand-dark); }
.btn[disabled] { opacity: .6; }
.btn.ghost { background: #fff; color: var(--ink); border: 2px solid var(--rule); }
.btn.accent { background: var(--accent-deep); }
.btn.danger { background: #fff; color: var(--danger); border: 2px solid var(--danger); }
.btn.sm { width: auto; font-size: .95rem; padding: 10px 14px; min-height: 44px; }

/* ---- Cards / sections --------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.section-title { font-size: 1.5rem; text-transform: uppercase; letter-spacing: .03em; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.badge { display: inline-block; min-width: 22px; text-align: center; background: var(--danger); color: #fff; font-family: 'IBM Plex Mono', monospace; font-size: .75rem; padding: 2px 7px; border-radius: 999px; }
.badge.muted { background: var(--steel); }
.tag { display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: #efe9dc; color: var(--steel); }
.tag.proven { background: #e4f0e8; color: var(--brand); }
.tag.samecat { background: #efe4c4; color: #6a4f0c; } /* deepened gold for AA on tiny text */
.tag.behavior { background: #f3ece0; color: var(--brand-dark); }

/* ---- Toast + status ----------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--black); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 1rem; z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; }
.err { color: var(--danger); font-family: 'IBM Plex Mono', monospace; font-size: .82rem; min-height: 1em; margin-bottom: 8px; }
.empty { color: var(--steel); font-style: italic; padding: 10px 2px; }
.muted { color: var(--steel); }

/* ---- Match / queue rows ------------------------------------------------- */
.person { display: flex; flex-direction: column; gap: 8px; }
.person .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.person .who { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.35rem; }
.person .meta { font-size: .95rem; color: var(--steel); }
.person .kw { font-size: 1rem; }
.person a.tel { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.built { text-align: center; color: var(--steel); font-family: 'IBM Plex Mono', monospace; font-size: .7rem; letter-spacing: .08em; padding: 24px 0 8px; }
.built a { color: var(--brand); text-decoration: none; border-bottom: 1px solid var(--rule); }
.built a:hover { border-bottom-color: var(--brand); }
