/* LeadDock Demo Showroom styles. Phone-first, single stylesheet, no build step. */

:root {
  --bg: #0B1929;
  --surface: #12233A;
  --text: #EAF1F8;
  --muted: #8FA3B8;
  --accent: #FF6B35;
  --accent-hover: #FF8A5F;
  --success: #46D48F;
  --rule: #22384F;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  line-height: 1.5;
}

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

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

a:hover,
a:focus-visible {
  color: var(--accent-hover);
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 8px;
}

p {
  margin: 0 0 8px;
}

button {
  font-family: inherit;
}

/* ---------- header ---------- */

.header {
  padding: 16px 0 12px;
}

.header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.wordmark {
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.header-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pill {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.status-pill-neutral {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--rule);
}

.status-pill-orange {
  background: rgba(255, 107, 53, 0.15);
  color: var(--accent-hover);
  border: 1px solid rgba(255, 107, 53, 0.4);
}

.status-pill-green {
  background: rgba(70, 212, 143, 0.15);
  color: var(--success);
  border: 1px solid rgba(70, 212, 143, 0.4);
}

.status-pill-muted {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--rule);
}

/* ---------- hero ---------- */

.hero {
  padding: 20px 0 24px;
}

.hero h1 {
  font-size: 1.7rem;
}

.hero-sub {
  color: var(--muted);
  font-size: 1rem;
}

/* ---------- search form ---------- */

.search-section {
  padding-bottom: 28px;
}

/* The hidden attribute must win over any display rule on the same element. */
[hidden] { display: none !important; }

.code-prompt {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.code-prompt label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.code-row {
  display: flex;
  gap: 8px;
}

.code-error {
  color: var(--accent-hover);
  font-size: 0.85rem;
  margin: 8px 0 0;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  color: var(--muted);
}

input[type="text"],
input:not([type]) {
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  min-height: 48px;
  width: 100%;
}

input::placeholder {
  color: var(--muted);
}

input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.link-toggle {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.9rem;
  padding: 10px 0;
  cursor: pointer;
  min-height: 44px;
  text-align: left;
}

.business-field {
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #12100D;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--rule);
  padding: 12px 16px;
}

form#search {
  margin-top: 4px;
}

form#search .btn-block {
  margin-top: 4px;
}

@media (min-width: 480px) {
  .field-row {
    flex-direction: row;
  }
  .field {
    flex: 1;
  }
}

/* ---------- notices ---------- */

.notice {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.notice-error {
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.4);
  color: var(--accent-hover);
}

.notice-muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.notice-muted.center {
  text-align: center;
}

/* ---------- results ---------- */

#results {
  padding: 8px 0 32px;
}

.verdict {
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  text-align: center;
}

.verdict-orange {
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.4);
}

.verdict-green {
  background: rgba(70, 212, 143, 0.15);
  border: 1px solid rgba(70, 212, 143, 0.4);
}

.verdict-neutral {
  background: var(--surface);
  border: 1px solid var(--rule);
}

.verdict-big {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.verdict-small {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.multi-match {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 16px;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.card {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-label {
  font-weight: 800;
}

.status-chip {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.status-chip-loading {
  background: var(--rule);
  color: var(--muted);
}

.status-chip-ok {
  background: rgba(70, 212, 143, 0.15);
  color: var(--success);
}

.status-chip-muted {
  background: var(--rule);
  color: var(--muted);
}

.status-chip-error {
  background: rgba(255, 107, 53, 0.15);
  color: var(--accent-hover);
}

.pulsing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-bar {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--rule) 25%, #2f4a67 37%, var(--rule) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

.skeleton-bar:nth-child(2) { width: 85%; }
.skeleton-bar:nth-child(3) { width: 65%; }

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.card-empty,
.card-message {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.business-list {
  list-style: none;
  counter-reset: biz;
  margin: 0;
  padding: 0;
}

.business-item {
  counter-increment: biz;
  padding: 8px 0 8px 28px;
  position: relative;
  border-bottom: 1px solid var(--rule);
}

.business-item:last-child {
  border-bottom: none;
}

.business-item::before {
  content: counter(biz) ".";
  position: absolute;
  left: 0;
  color: var(--muted);
  font-weight: 700;
}

.business-item-match {
  border-left: 3px solid var(--success);
  padding-left: 25px;
  margin-left: -14px;
  padding-right: 14px;
  background: rgba(70, 212, 143, 0.08);
}

.business-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.business-name {
  font-weight: 700;
}

.you-tag {
  background: var(--success);
  color: #0B1929;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.business-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.answer-details {
  margin-top: 12px;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}

.answer-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.answer-text {
  color: var(--text);
  font-size: 0.9rem;
  margin-top: 8px;
}

.sources {
  margin-top: 8px;
}

.sources-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 4px;
}

.sources-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sources-list a {
  font-size: 0.85rem;
  word-break: break-all;
}

.cta-score {
  margin-top: 4px;
}

/* ---------- example builds ---------- */

#builds,
#script {
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}

.section-sub {
  color: var(--muted);
  margin-bottom: 16px;
}

.builds-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.build-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  min-height: 48px;
}

.build-card:hover,
.build-card:focus-visible {
  border-color: var(--accent);
}

.build-name {
  font-weight: 800;
}

.build-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.build-proof {
  font-size: 0.9rem;
}

.build-host {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

/* ---------- script section ---------- */

.moves {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.move-card {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface);
}

.move-card h3 {
  font-size: 1rem;
}

.move-card blockquote {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
}

.objections {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.objection {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 4px 14px;
  background: var(--surface);
}

.objection summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.objection p {
  color: var(--muted);
  padding-bottom: 10px;
}

.rules-strip {
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-line a {
  color: var(--muted);
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-top: 6px;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .pulsing-dot,
  .skeleton-bar {
    animation: none !important;
  }
  * {
    scroll-behavior: auto !important;
  }
}
