/* SI LCME Hub — professional academic theme */
:root {
  --navy: #1c2b4a;
  --navy-dark: #131e35;
  --gold: #b98a2f;
  --gold-light: #f4ead2;
  --paper: #faf9f6;
  --ink: #232a35;
  --muted: #5b6472;
  --line: #e2e0d8;
  --card: #ffffff;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Source Sans 3", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
}
h1, h2, h3, .serif {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.25;
}
a { color: var(--navy); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; }

/* Header */
.site-header { background: var(--navy); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 8px; background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-weight: bold; font-size: 20px; color: var(--navy-dark);
  flex: none;
}
.brand-name { font-family: Georgia, serif; font-size: 20px; letter-spacing: 0.2px; }
.brand-sub { font-size: 12px; color: #c9d2e4; letter-spacing: 1.2px; text-transform: uppercase; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: #dbe2f0; text-decoration: none; font-size: 15px; padding: 8px 12px;
  border-radius: 6px;
}
.nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav a.active { background: rgba(255,255,255,0.14); color: #fff; font-weight: 600; }

/* Hero */
.hero { background: var(--navy-dark); color: #eef1f7; padding: 56px 0 48px; }
.hero h1 { color: #fff; font-size: clamp(30px, 4.5vw, 44px); margin: 0 0 12px; }
.hero p.lede { font-size: 19px; color: #c9d2e4; max-width: 720px; margin: 0 0 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px; font-size: 16px;
  font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: #c9973a; }
.btn-outline { border-color: #8b96ad; color: #eef1f7; background: transparent; }
.btn-outline:hover { border-color: #fff; color: #fff; }
.edition-note {
  margin-top: 26px; font-size: 14px; color: #9aa5bd; max-width: 720px;
  border-left: 3px solid var(--gold); padding-left: 14px;
}

/* Sections */
.section { padding: 48px 0; }
.section h2 { font-size: 30px; margin: 0 0 8px; }
.section .kicker { text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; color: var(--gold); font-weight: 700; margin: 0 0 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 24px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; text-decoration: none; color: inherit; display: block;
}
.card:hover { border-color: var(--gold); box-shadow: 0 4px 18px rgba(28,43,74,0.08); }
.card h3 { margin: 0 0 8px; font-size: 21px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card .go { color: var(--gold); font-weight: 700; font-size: 15px; margin-top: 12px; display: inline-block; }

/* Standards page */
.searchbar { margin: 20px 0; }
.search-wrap { position: relative; display: flex; }
.search-wrap input {
  flex: 1; min-width: 220px; padding: 12px 16px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.suggest-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 14px 30px rgba(20, 30, 60, .13); overflow: hidden;
}
.suggest-row {
  display: flex; gap: 10px; align-items: baseline; padding: 10px 14px;
  cursor: pointer; font-size: 14px;
}
.suggest-row:hover, .suggest-row.active { background: #f4f6fb; }
.suggest-tag {
  flex: none; width: 72px; font-size: 10.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
}
.suggest-text {
  color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.suggest-row.search-all { border-top: 1px solid var(--line); }
.suggest-row.search-all .suggest-text { color: var(--muted); font-style: italic; }
.suggest-row.google-row .suggest-text::after { content: " \2197"; color: var(--muted); font-style: normal; }
.std-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.std-head { padding: 20px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.std-head:hover { background: #f6f4ee; }
.std-head h3 { margin: 0; font-size: 20px; }
.std-num {
  flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--navy);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-size: 19px;
}
.std-stmt { padding: 0 24px 16px; color: var(--muted); font-size: 15.5px; font-style: italic; }
.std-elements { border-top: 1px solid var(--line); display: none; }
.std-block.open .std-elements { display: block; }
.el { padding: 16px 24px; border-bottom: 1px solid #f0ede4; }
.el:last-child { border-bottom: none; }
.el-id {
  display: inline-block; font-weight: 700; color: var(--navy); background: var(--gold-light);
  border-radius: 6px; padding: 2px 10px; font-size: 14px; margin-bottom: 6px;
}
.el-title { font-weight: 700; font-size: 16.5px; margin: 0 0 4px; color: var(--ink); }
.el-text { margin: 0; font-size: 15.5px; color: var(--ink); }
.no-results { padding: 30px; text-align: center; color: var(--muted); }
mark { background: #f9e9bd; padding: 0 2px; border-radius: 2px; }

/* Updates page */
.update-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; position: relative; transition: border-color .15s, box-shadow .15s; }
.update-item .card-link::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); cursor: pointer;
}
.update-item:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(28,43,74,.08); }
.update-item .card-source { margin: 10px 0 0; font-size: 12.5px; color: var(--gold); font-weight: 600; }
.update-item .card-link:focus-visible::after { outline: 2px solid var(--gold); outline-offset: 2px; }
/* keep any in-card links (e.g. the mailto) clickable above the stretched card link */
.update-item p a { position: relative; z-index: 1; }
.update-item .date-badge {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--navy); background: var(--gold-light);
  padding: 4px 12px; border-radius: 20px; margin-bottom: 10px;
}
.update-item .date-badge.soon { background: var(--navy); color: #fff; }
.update-item h3 { margin: 0 0 6px; font-size: 20px; }
.update-item p { margin: 6px 0; font-size: 15.5px; color: var(--muted); }
.update-item p:last-child { margin-bottom: 0; }
.tag { display: inline-block; font-size: 12.5px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 8px; color: var(--muted); margin-right: 6px; }

/* Chat */
.chat-shell { max-width: 780px; margin: 0 auto; }
/* Ask page: titles, description, and chat share one aligned column */
.ask-col { max-width: 920px; }
.ask-col .chat-shell { max-width: none; }
.chat-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  height: 480px; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px;
  resize: both; min-height: 300px; min-width: 300px; max-width: calc(100vw - 56px);
}
.msg { max-width: 85%; padding: 12px 16px; border-radius: 12px; font-size: 15.5px; line-height: 1.55; }
.msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #f1efe8; color: var(--ink); border-bottom-left-radius: 4px; }
.msg.bot .cite { font-size: 13px; color: var(--muted); }
.msg.bot h3 { font-size: 16.5px; margin: 14px 0 6px; }
.msg.bot h3:first-child { margin-top: 0; }
.msg.bot h4 { font-size: 15.5px; margin: 12px 0 4px; }
.msg.bot p { margin: 0 0 10px; }
.msg.bot p:last-child { margin-bottom: 0; }
.msg.bot ul, .msg.bot ol { margin: 0 0 10px; padding-left: 22px; }
.msg.bot li { margin-bottom: 5px; }
.msg.bot li:last-child { margin-bottom: 0; }
.msg.bot hr { border: 0; border-top: 1px solid #d8d4c8; margin: 12px 0; }
.msg.bot .tbl-wrap { overflow-x: auto; margin: 0 0 12px; }
.msg.bot table { border-collapse: collapse; width: 100%; font-size: 14px; }
.msg.bot th, .msg.bot td { border: 1px solid #d8d4c8; padding: 7px 10px; text-align: left; vertical-align: top; }
.msg.bot th { background: var(--navy); color: #fff; font-weight: 600; }
.msg.bot td { background: #fff; }
.export-bar { display: flex; gap: 8px; margin-top: 10px; }
.export-bar button {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 5px 12px; font-size: 12.5px; cursor: pointer; color: var(--navy);
}
.export-bar button:hover { border-color: var(--gold); }
.chat-input-row { display: flex; gap: 10px; margin-top: 14px; align-items: flex-end; }
.chat-input-row textarea {
  flex: 1; padding: 13px 16px; font-size: 16px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; resize: both; overflow-y: auto;
  min-height: 52px; max-height: 320px; font-family: inherit; line-height: 1.45;
}
.chat-input-row button {
  padding: 13px 26px; background: var(--navy); color: #fff; border: none;
  border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.chat-input-row button:disabled { opacity: 0.5; cursor: default; }
#chat-attach {
  padding: 13px 14px; background: #fff; color: var(--navy);
  border: 1px solid var(--line); font-size: 18px; line-height: 1;
}
#chat-attach:hover { border-color: var(--gold); }
.typing { color: var(--muted); font-style: italic; }
.suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.suggestions button {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 8px 16px;
  font-size: 14px; cursor: pointer; color: var(--navy);
}
.suggestions button:hover { border-color: var(--gold); }
.pop-searches { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 6px; }
.pop-searches .pop-label { font-size: 13.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.pop-searches .pop-chips { margin: 0; }
.pop-searches .pop-chips button { padding: 6px 13px; font-size: 13px; }
.chat-soon {
  background: var(--gold-light); border: 1px solid var(--gold); border-radius: var(--radius);
  padding: 28px; text-align: center; color: var(--navy);
}
.disclaimer {
  margin-top: 26px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* Footer */
.site-footer { background: var(--navy-dark); color: #9aa5bd; padding: 36px 0; font-size: 14px; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #c9d2e4; }
.site-footer strong { color: #fff; }

@media (max-width: 640px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
  .chat-box { height: 380px; }
  .section { padding: 34px 0; }
}

/* Accreditation toolkit (standards page) */
.toolkit { margin: 0; }
.resource-tabs { margin: 28px 0 8px; }
.tab-bar { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 18px; }
.tab-btn {
  appearance: none; border: none; background: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 17px; color: var(--muted);
  padding: 10px 18px; margin-bottom: -2px; border-bottom: 3px solid transparent;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.on { color: var(--navy); border-bottom-color: var(--gold); }
.tab-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tab-panel h3 { margin: 0 0 4px; font-size: 21px; }
.toolkit h3 { margin: 0 0 4px; font-size: 21px; }
.toolkit-sub { color: var(--muted); margin: 0 0 16px; max-width: 760px; }
.toolkit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tool-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; text-decoration: none;
  color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tool-card:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(28,43,74,.08); transform: translateY(-1px); }
.tool-card .tool-kicker {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}
.tool-card strong { display: block; font-size: 16.5px; margin-bottom: 6px; }
.tool-card span:last-child { font-size: 14px; color: var(--muted); line-height: 1.5; }
.tool-card--primary { background: var(--navy); border-color: var(--navy); }
.tool-card--primary:hover { border-color: var(--gold); }
.tool-card--primary strong { color: #fff; }
.tool-card--primary .tool-kicker { color: var(--gold); }
.tool-card--primary span:last-child { color: rgba(255,255,255,.82); }

/* Ask page: left toolbar layout */
.ask-wide { max-width: 1280px; }
.ask-layout { display: flex; gap: 36px; align-items: flex-start; }
.ask-main { flex: 1 1 auto; min-width: 0; }
.chat-sidebar {
  flex: 0 0 250px; width: 250px;
  position: sticky; top: 24px;
  max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.sidebar-new {
  width: 100%; padding: 10px 14px; border: none; border-radius: 10px;
  background: var(--navy); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.sidebar-new:hover { filter: brightness(1.12); }
.sidebar-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 18px 0 8px;
}
.history-list { display: flex; flex-direction: column; gap: 4px; }
.history-empty { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.history-item { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.history-item.active { background: #eef2f7; }
.history-label {
  flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column;
  align-items: flex-start; gap: 2px;
  background: none; border: none; padding: 8px 10px; cursor: pointer;
  text-align: left; border-radius: 8px; font-family: inherit;
}
.history-label:hover { background: #f2f5f9; }
.history-item.active .history-label:hover { background: transparent; }
.history-label .t {
  font-size: 14px; color: var(--ink); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.history-label .d { font-size: 12px; color: var(--muted); }
.history-del {
  flex: 0 0 auto; background: none; border: none; color: var(--muted);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 6px 8px;
  border-radius: 6px; opacity: 0;
}
.history-item:hover .history-del, .history-item:focus-within .history-del { opacity: 1; }
.history-del:hover { color: #b00; background: #fbe9e9; }
.sidebar-div { border: none; border-top: 1px solid var(--line); margin: 18px 0 0; }
.sidebar-links a {
  display: block; padding: 8px 10px; border-radius: 8px;
  color: var(--navy); text-decoration: none; font-size: 14.5px;
}
.sidebar-links a:hover { background: #f2f5f9; }
.sidebar-note {
  margin-top: 18px; font-size: 13px; line-height: 1.5; color: var(--muted);
  background: #f7f4ec; border: 1px solid #e8e0cd; border-radius: 10px; padding: 10px 12px;
}
@media (max-width: 1250px) {
  .chat-sidebar { display: none; }
  .ask-main { max-width: 920px; }
}

/* Ask page: sign-in / user chip */
.auth-block { margin-bottom: 14px; }
.sidebar-signin {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 15px; font-weight: 600; font-family: inherit; color: var(--ink);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.sidebar-signin:hover:not(:disabled) { background: #f7f9fc; }
.sidebar-signin:disabled { opacity: .65; cursor: default; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
  flex: 0 0 auto;
}
.user-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.user-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signout-btn {
  flex: 0 0 auto; background: none; border: none; color: var(--muted);
  font-size: 13px; cursor: pointer; text-decoration: underline; padding: 4px;
  font-family: inherit;
}
.signout-btn:hover { color: var(--ink); }
.auth-note { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }

/* Feedback button + modal */
.sidebar-feedback {
  width: 100%;
  margin: 10px 0 2px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px dashed #c9b458;
  background: #fffdf4;
  color: #6b5d1e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.sidebar-feedback:hover { background: #fdf6dd; }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal h3 { margin: 0 0 6px; font-size: 18px; }
.modal p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.modal textarea, .modal input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7dce3;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 10px;
}
.modal textarea { resize: vertical; min-height: 110px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.modal-cancel {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid #d7dce3;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}
.modal-submit {
  padding: 9px 18px;
  border-radius: 10px;
  border: none;
  background: #1a2b4a;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.modal-submit:disabled { opacity: 0.6; cursor: default; }
.modal-status { font-size: 13px; min-height: 18px; margin: 10px 0 0; }
.modal-status.ok { color: #1a7a3a; }
.modal-status.err { color: #b3261e; }

/* Primer (LCME 101) page */
.primer-h { margin: 36px 0 10px; font-size: 23px; }
.primer-list { max-width: 760px; }
.primer-list li { margin-bottom: 10px; }
.primer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-top: 16px; }
.primer-card {
  display: flex; gap: 12px; align-items: flex-start; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  text-decoration: none; color: inherit;
}
.primer-card:hover { border-color: var(--gold); }
.primer-card strong {
  flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--navy);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.primer-card span { font-size: 14.5px; color: var(--muted); }
.primer-steps { max-width: 760px; }
.primer-steps li { margin-bottom: 12px; }
.primer-terms { max-width: 880px; }
.primer-terms > div {
  display: grid; grid-template-columns: 150px 1fr; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.primer-terms.wide > div { grid-template-columns: 230px 1fr; }
.primer-terms dt { font-weight: 700; color: var(--navy); }
.primer-terms dd { margin: 0; color: var(--muted); }
.faq { max-width: 880px; margin-top: 8px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: #fff; }
.faq-item summary {
  cursor: pointer; padding: 15px 20px; font-weight: 700; color: var(--navy); font-size: 16.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--gold); font-size: 22px; font-weight: 400; flex: none; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item summary:hover { background: #faf8f2; }
.faq-item > p { padding: 0 20px 18px; margin: 0; color: var(--muted); max-width: 760px; }
.faq-item > ul, .faq-item > ol { margin: 0; padding: 2px 20px 18px 40px; color: var(--muted); }
.faq-item li { margin-bottom: 6px; }
@media (max-width: 640px) {
  .primer-terms > div, .primer-terms.wide > div { grid-template-columns: 1fr; gap: 4px; }
}

/* Role explorer (LCME 101) */
.role-filter { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 14px 0 18px; }
.role-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.role-group:last-of-type { margin-bottom: 6px; }
.role-group-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); width: 150px; flex: none; }
.role-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px;
  font-size: 14px; cursor: pointer; color: var(--ink); font-family: inherit;
}
.role-chip:hover { border-color: var(--gold); }
.role-chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.role-filter-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
#roleCount { font-size: 13.5px; color: var(--muted); }
.role-reset { background: none; border: none; color: var(--gold); font-size: 14px; cursor: pointer; text-decoration: underline; font-family: inherit; }
.role-cards { display: grid; gap: 10px; }
.role-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.role-card summary {
  cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--navy); font-size: 16.5px;
  list-style: none; display: flex; align-items: center; gap: 10px;
}
.role-card summary::-webkit-details-marker { display: none; }
.role-card summary::after { content: "+"; color: var(--gold); font-size: 20px; margin-left: auto; flex: none; }
.role-card[open] summary::after { content: "\2013"; }
.role-tag {
  font-size: 12px; font-weight: 600; background: #fdf6e3; border: 1px solid var(--gold);
  color: #8a6d1b; border-radius: 999px; padding: 2px 10px;
}
.role-card > *:not(summary) { margin-left: 18px; margin-right: 18px; }
.role-card > h4 { margin: 14px 18px 6px; font-size: 14.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.role-card ul { margin: 0 18px 0 36px; padding: 0; color: var(--muted); }
.role-card li { margin-bottom: 7px; }
.role-card li strong { color: var(--ink); }
.role-why { color: var(--muted); }
.role-why strong { color: var(--navy); }
.role-card > p:last-child { padding-bottom: 16px; }
.role-card > p em { color: var(--ink); }
/* paper trail role highlighting */
.faq-item.role-hit { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.faq-item.role-hit > summary::before {
  content: "\2605  Your role"; font-size: 12px; font-weight: 700; color: #8a6d1b;
  background: #fdf6e3; border: 1px solid var(--gold); border-radius: 999px; padding: 2px 10px;
  order: -1; white-space: nowrap;
}
@media (max-width: 640px) {
  .role-group-label { width: 100%; margin-bottom: 2px; }
}

/* ---------- Homepage: hero ask box, stats strip, try-Elsie chips ---------- */
.hero-ask { display: flex; gap: 10px; max-width: 640px; margin: 0 0 18px; }
.hero-ask input {
  flex: 1; padding: 13px 16px; font-size: 16px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.97);
  color: var(--navy);
}
.hero-ask input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.hero-ask .btn { padding: 13px 22px; font-size: 16px; border-radius: 10px; white-space: nowrap; }
@media (max-width: 520px) {
  .hero-ask { flex-direction: column; }
  .hero-ask .btn { width: 100%; }
  /* Let autocomplete rows wrap instead of truncating mid-word on phones */
  .suggest-text { white-space: normal; }
  .suggest-row { align-items: flex-start; }
}
.stats-strip { background: #fff; border-bottom: 1px solid var(--line); }
.stats-grid {
  display: flex; flex-wrap: wrap; gap: 8px 36px; padding-top: 22px; padding-bottom: 22px;
}
.stat { display: flex; align-items: baseline; gap: 8px; }
.stat-num { font-size: 30px; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-label { font-size: 14px; color: var(--muted); }
.try-elsie { background: var(--navy-dark); }
.try-elsie h2 { color: #fff; }
.try-elsie .kicker { color: var(--gold); }
.try-elsie p { color: #c9d2e4 !important; }
.try-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.try-chip {
  display: inline-block; padding: 10px 16px; border-radius: 999px;
  border: 1px solid rgba(185,138,47,.55); color: #f4ead2; font-size: 15px;
  background: rgba(185,138,47,.08); text-decoration: none;
}
.try-chip:hover { background: rgba(185,138,47,.22); color: #fff; }
