:root {
  color-scheme: dark;
  --bg: #101311;
  --panel: #171c19;
  --panel-2: #202720;
  --text: #f5f2e8;
  --muted: #b9b3a5;
  --line: #343c34;
  --peach: #f59b45;
  --green: #8abf77;
  --blue: #83a6d9;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

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

h1, h2, h3, h4, p { margin-top: 0; }

a { color: inherit; }

/* ─── Topbar ──────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(16, 19, 17, 0.94);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.97rem;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 7px 12px;
  border-radius: 7px;
  transition: color 0.1s;
}

nav a:hover { color: var(--text); background: var(--panel-2); }
nav a[aria-current="page"] { color: var(--text); }

/* ─── Shared buttons ──────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button.primary {
  background: var(--peach);
  color: #1b1208;
  border-color: var(--peach);
}

.button.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.button.large { padding: 14px 28px; font-size: 1.05rem; }

/* ─── Eyebrow label ───────────────────────────────────────── */

.eyebrow {
  display: block;
  margin: 0 0 14px;
  color: var(--green);
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* ─── Footer ──────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
  padding: 24px clamp(18px, 5vw, 56px);
  text-align: center;
  line-height: 1.65;
}

/* ─── SR only ─────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ══════════════════════════════════════════════════════════ */
/*  HOMEPAGE                                                  */
/* ══════════════════════════════════════════════════════════ */

.page-hero {
  text-align: center;
  padding: clamp(12px, 1.5vw, 20px) clamp(18px, 5vw, 56px) clamp(16px, 2vw, 28px);
  max-width: 920px;
  margin: 0 auto;
}

.hero-mark {
  margin-bottom: -28px;
}

.hero-mark img {
  width: clamp(180px, 22vw, 280px);
  height: clamp(180px, 22vw, 280px);
  object-fit: contain;
}

.page-hero h1 {
  margin: 0 auto 12px;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  line-height: 1.0;
  letter-spacing: -0.01em;
  max-width: 840px;
}

.page-hero .lead {
  color: var(--muted);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.55;
  max-width: 620px;
  margin: 0 auto 14px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.tagline {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0;
  opacity: 0.8;
}

/* BPRC brand footer band (homepage bottom) */

.bprc-band {
  border-top: 1px solid var(--line);
  padding: 64px clamp(18px, 5vw, 56px) 80px;
  text-align: center;
}

.bprc-band img {
  height: clamp(56px, 8vw, 80px);
  width: auto;
  max-width: 400px;
  object-fit: contain;
  opacity: 0.85;
  display: block;
  margin: 0 auto 24px;
}

.bprc-band .tagline {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-style: italic;
  color: var(--muted);
  opacity: 1;
  margin: 0;
}

/* Example prompts section */

.prompts-section {
  border-top: 1px solid var(--line);
  padding: 48px clamp(18px, 5vw, 56px) 72px;
}

.prompts-section-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 32px;
  align-items: start;
}

.prompts-label {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.prompts-heading {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 2rem);
  line-height: 1.1;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.prompt-grid a {
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
  min-height: 54px;
  padding: 12px 14px;
  text-decoration: none;
}

.prompt-grid a:hover { border-color: var(--peach); }


/* ══════════════════════════════════════════════════════════ */
/*  ASK PAGE                                                  */
/* ══════════════════════════════════════════════════════════ */

.ask-main {
  height: calc(100vh - 73px); /* topbar is 73px; chat fills remaining viewport */
  display: flex;
  flex-direction: column;
  padding: 24px clamp(12px, 4vw, 44px);
  overflow: hidden;
}

.ask-panel {
  flex: 1;
  min-height: 0; /* required for flex children to shrink in Chrome/FF */
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ask-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 4px;
}

.ask-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 0.98;
}

.store-picker {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Collapsible prompts */

.prompt-examples {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.prompt-examples > summary {
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prompt-examples > summary::-webkit-details-marker { display: none; }

.prompt-examples > summary::after {
  content: "▾";
  font-size: 0.72rem;
  margin-left: auto;
  opacity: 0.6;
}

.prompt-examples[open] > summary::after { content: "▴"; }

.prompt-examples .prompt-cloud {
  padding: 10px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Form controls */

select,
textarea {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  width: 100%;
}

/* Chat list */

.chat-list {
  flex: 1;
  min-height: 0; /* allow flex shrink */
  overflow-y: auto;
  list-style: none;
  padding: 0 0 6px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message {
  max-width: 880px;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  line-height: 1.55;
}

.message.user {
  align-self: flex-end;
  background: #1f2620;
  border-color: #2c3528;
  max-width: 72%;
}

.message.assistant {
  align-self: flex-start;
  width: min(880px, 100%);
}

/* Label headers ("Footwear Guru", "You") — direct children only, not markdown bold */
.message > strong,
.answer-block > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Markdown bold must stay inline — reset any inherited block/green rules */
.markdown-body strong {
  display: inline;
  color: inherit;
  font-size: inherit;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 700;
  margin: 0;
}

/* Prompt cloud buttons */

.prompt-cloud button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 7px 12px;
  min-height: 34px;
  transition: border-color 0.1s, color 0.1s;
}

.prompt-cloud button:hover {
  border-color: var(--peach);
  color: var(--text);
}

/* Summarize for Store Visit button */

.summarize-row {
  display: none; /* shown by JS when history.length >= 2 */
  justify-content: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.summarize-btn {
  font-size: 0.86rem;
  padding: 8px 18px;
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: border-color 0.1s, color 0.1s;
}

.summarize-btn:hover {
  border-color: var(--peach);
  color: var(--text);
}

/* Summary card (appears in chat thread) */

.summary-message {
  max-width: 100% !important;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
}

.summary-card {
  background: var(--panel-2);
  border: 1px solid rgba(245, 155, 69, 0.4);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}

.summary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 155, 69, 0.07);
}

.summary-title {
  color: var(--peach);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.summary-body {
  padding: 16px;
}

.copy-summary-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 10px;
  transition: border-color 0.1s, color 0.1s;
}

.copy-summary-btn:hover {
  border-color: var(--peach);
  color: var(--text);
}

/* Composer */

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.composer textarea {
  resize: vertical;
  min-height: 58px;
}

button[type="submit"] {
  background: var(--peach);
  color: #1b1208;
  border: 1px solid var(--peach);
  border-radius: 8px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}

button[type="submit"]:hover { opacity: 0.9; }
button:disabled { opacity: 0.55; cursor: not-allowed; }

/* Answer blocks */

.answer-block { display: grid; gap: 12px; }

.answer-block p,
.answer-block li { color: var(--text); line-height: 1.55; }

.answer-lead { font-size: 1.06rem; font-weight: 800; }

.answer-block section { margin-top: 16px; }
.answer-block ul { margin: 8px 0 0; padding-left: 20px; }

.staff-box,
.cta-box {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.cta-links,
.feedback-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cta-links a,
.feedback-row button {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 8px 12px;
  text-decoration: none;
}

.cta-links a:hover,
.feedback-row button:hover { border-color: var(--peach); }

/* Comparison table */

.comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.comparison-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  background: var(--panel-2);
  color: var(--blue);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-table tbody tr:last-child td { border-bottom: 0; }
.comparison-table td:first-child,
.comparison-table th:first-child { font-weight: 700; min-width: 140px; }

.sources { color: var(--muted); margin-top: 14px; font-size: 0.85rem; }
.sources summary { cursor: pointer; }
.fallback-note { font-size: 0.8rem; opacity: 0.7; font-style: italic; }

/* ─── Markdown answer rendering ───────────────────────────── */

.markdown-body p { margin: 0.4rem 0; }
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 { margin: 0.9rem 0 0.35rem; font-size: 1rem; }
.markdown-body ul,
.markdown-body ol { margin: 0.4rem 0 0.4rem 1.2rem; padding-left: 0.4rem; }
.markdown-body li { margin: 0.2rem 0; }
.markdown-body table {
  border-collapse: collapse;
  margin: 0.6rem 0;
  width: 100%;
  font-size: 0.92em;
  display: block;
  overflow-x: auto;
}
.markdown-body th,
.markdown-body td {
  border: 1px solid var(--line);
  padding: 0.4rem 0.6rem;
  text-align: left;
  vertical-align: top;
}
.markdown-body th {
  background: var(--panel-2);
  color: var(--blue);
  font-size: 0.82rem;
  text-transform: uppercase;
}
.markdown-body a { color: var(--peach); }


/* ══════════════════════════════════════════════════════════ */
/*  VISIT PAGE                                                */
/* ══════════════════════════════════════════════════════════ */

.visit-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px clamp(18px, 4vw, 56px) 84px;
}

.visit-head {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 52px;
}

.visit-head h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.97;
  margin-bottom: 18px;
}

.visit-head p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.68;
  margin: 0;
}

.store-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.store-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 36px 32px;
  display: grid;
  gap: 12px;
  align-content: start;
  text-align: center; /* center store name, address, phone */
}

/* Single BPRC horizontal logo — same for both stores */
.store-card img {
  height: 36px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
}

.store-card h2 {
  margin: 0;
  font-size: 1.22rem;
}

.store-card address {
  font-style: normal;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.phone {
  color: var(--peach);
  font-size: 1.14rem;
  font-weight: 800;
  text-decoration: none;
  display: block; /* block so it centers properly */
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.action-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  min-height: 42px;
  padding: 10px 12px;
  text-decoration: none;
  text-align: center;
}

.action-grid a:hover { border-color: var(--peach); }


/* ══════════════════════════════════════════════════════════ */
/*  RESPONSIVE                                               */
/* ══════════════════════════════════════════════════════════ */

@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; gap: 12px; }

  .prompts-section-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .store-cards { grid-template-columns: 1fr; }

  .ask-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 580px) {
  .prompt-grid { grid-template-columns: 1fr; }
  .action-grid { grid-template-columns: 1fr; }
  .composer { grid-template-columns: 1fr; }
  .store-logos-inner { gap: 20px; }

  .message.user { max-width: 90%; }
}
