/* app/static/css/app-brand.css  */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-alt: #fbfdff;
  --border: #d9e0ea;
  --text: #1c2838;
  --muted: #5a6b82;
  --primary: #1e5aa6;
  --primary-hover: #174882;
  --topbar-bg: #12233a;
  --topbar-border: #2a3f5d;
  --focus-ring: #0f62fe;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Inter, Arial, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; }

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
}

.topbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.brand-logo {
  width: auto;
  height: 34px;
  object-fit: contain;
  display: block;
}

.topbar .topbar-talk-cta,
.topbar .topbar-talk-cta:visited,
.topbar .topbar-talk-cta:active {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #CF0058;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.topbar .topbar-talk-cta:hover {
  background: #b8004e;
  color: #fff;
  text-decoration: none;
}

.page-main {
  flex: 1;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(18, 35, 58, 0.08);
}

h1 { margin-top: 0; margin-bottom: 0.5rem; }
h2 { margin-top: 0.25rem; margin-bottom: 0.5rem; }
.subtext { color: var(--muted); margin-bottom: 1.25rem; }
.required-legend { margin: 0 0 0.7rem; font-size: 0.9rem; color: var(--muted); }
.required-marker { color: #b42318; font-weight: 700; }
.section-title { margin-top: 0.3rem; font-size: 1.05rem; }
.info-block { border: 1px solid var(--border); border-radius: 12px; padding: 0.85rem 1rem; background: var(--panel-alt); margin-bottom: 1rem; }
.info-block ol { margin: 0.25rem 0 0 1.1rem; padding: 0; color: var(--text); }
.info-block li { margin: 0.35rem 0; }

.intake-form label { display: block; font-weight: 600; color: var(--text); }
.intake-form input {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.intake-form input:focus-visible,
.choice input:focus-visible + span,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem; margin: 0 0 1rem; }
legend { padding: 0 0.4rem; font-weight: 600; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; }
.choice-grid.two-col { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: block;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  background: #fff;
}
.choice input:checked + span {
  border-color: var(--primary);
  background: #eaf1fb;
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--primary);
}

.vendor-card { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; background: var(--panel-alt); }
.deck-helper { color: var(--muted); margin: 0 0 1rem; }
.vendor-card h2 { margin-top: 0; }
.vendor-card p { margin: 0.4rem 0; }
.vendor-bullets { margin: 0.55rem 0 0; padding-left: 1.15rem; }
.vendor-bullets li { margin: 0.35rem 0; }
.result-description, .result-description-preview, .result-description-full { margin-top: 0.55rem; }
.result-read-more-btn {
  margin-top: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
  color: #194569;
  font-weight: 600;
  cursor: pointer;
}

.vendor-card.swipe-intent-pass { box-shadow: -10px 10px 22px rgba(154, 42, 42, 0.12); border-color: #e5b9b9; }
.vendor-card.swipe-intent-keep { box-shadow: 10px 10px 22px rgba(23, 105, 62, 0.12); border-color: #b8ddc8; }
.progress-text { margin-bottom: 0.7rem; color: var(--muted); font-weight: 600; }
.action-row { display: flex; gap: 0.75rem; }
.pending-text { min-height: 1.2rem; color: var(--muted); font-weight: 600; margin: 0.25rem 0 0.8rem; }

.finalizing-panel { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; background: var(--panel-alt); }
.finalizing-panel h2 { margin-top: 0; margin-bottom: 0.45rem; }
.finalizing-panel p { margin: 0; color: var(--muted); }


#card {
  border-color: #c7d1df;
  box-shadow: 0 12px 28px rgba(18, 35, 58, 0.12);
  touch-action: pan-y;
  user-select: none;
  will-change: transform;
  cursor: grab;
}
#card:active { cursor: grabbing; }

.btn,
button { border: 0; border-radius: 10px; padding: 0.72rem 1rem; font-size: 0.95rem; cursor: pointer; font-weight: 600; text-decoration: none; line-height: 1.1; }
.primary-btn { background: var(--primary); color: #fff; }
.primary-btn:hover { background: var(--primary-hover); }
.secondary-btn { background: #e8edf5; color: #25344b; }
button:disabled { opacity: 0.65; cursor: not-allowed; }

.status-pill { background: #eef4ff; border: 1px solid #cadaf7; border-radius: 10px; padding: 0.65rem 0.8rem; }
.status-ok { color: #17693e; margin-left: 0.5rem; font-weight: 700; }
.status-bad { color: #9a2a2a; margin-left: 0.5rem; font-weight: 700; }
.error-text { color: #a62525; border-left: 4px solid #d84a4a; padding-left: 0.6rem; }
.helper-text { color: var(--muted); font-size: 0.92rem; margin: 0.45rem 0 0.7rem; }
.result-grid { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 1rem; }
.result-card { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; background: var(--panel-alt); width: 100%; }
.result-card h3 { margin-top: 0; margin-bottom: 0.6rem; }
.result-card p { margin: 0.35rem 0; }
.empty-state { border: 1px dashed var(--border); border-radius: 12px; padding: 1rem; margin-top: 1rem; background: var(--panel-alt); }
.status-subsection { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 0.9rem; }
.results-cta-panel { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 0.9rem; }
.results-cta-panel p { margin: 0 0 0.55rem; }
.results-cta-actions { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.6rem; max-width: 280px; }
.results-cta-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; }

@media (max-width: 640px) {
  .brand-logo { height: 28px; }
  .container { padding-top: 1.25rem; }
  .panel { padding: 1rem; }
  .action-row { flex-direction: column; }
}

.profile-pill-list {
  margin: 0.55rem 0 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  --pill-bg: #eef4ff;
  --pill-border: #b8cdf4;
  --pill-text: #193f73;
  --pill-dot: #193f73;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 0.24rem 0.62rem;
  font-size: 0.85rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--pill-text);
  background: var(--pill-bg);
}
.profile-pill::before {
  content: "";
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  background: var(--pill-dot);
  flex: 0 0 auto;
}
.profile-pill--blue { --pill-bg: #eef4ff; --pill-border: #b8cdf4; --pill-text: #193f73; --pill-dot: #1e5aa6; }
.profile-pill--green { --pill-bg: #eefaf3; --pill-border: #b7e1c6; --pill-text: #24543a; --pill-dot: #248a4b; }
.profile-pill--orange { --pill-bg: #fff4e6; --pill-border: #f1c78f; --pill-text: #6d4516; --pill-dot: #d46f00; }
.profile-pill--purple { --pill-bg: #f5efff; --pill-border: #d4c2f2; --pill-text: #4a347a; --pill-dot: #6f46b8; }
.profile-pill--pink { --pill-bg: #fff0f6; --pill-border: #e8b6ca; --pill-text: #78324f; --pill-dot: #c03a73; }
.profile-pill--teal { --pill-bg: #eaf8fb; --pill-border: #acdbe4; --pill-text: #23545d; --pill-dot: #168092; }
.profile-pill--navy { --pill-bg: #edf2f7; --pill-border: #9fb0c3; --pill-text: #0d1e3d; --pill-dot: #0d1e3d; }
.profile-pill--gray { --pill-bg: #f3f5f7; --pill-border: #ccd4dd; --pill-text: #344052; --pill-dot: #667085; }
.profile-pill--default { --pill-bg: #eef4ff; --pill-border: #b8cdf4; --pill-text: #193f73; --pill-dot: #1e5aa6; }