/* ===================== CodeWithBrain theme ===================== */
:root {
  --bg: #eef3f6;
  --panel: #ffffff;
  --panel-2: #f3f7fa;
  --line: #dde5ec;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #0ea5a4;      /* teal (logo start) */
  --brand-2: #2563eb;    /* blue (logo end)   */
  --accent: #22c55e;     /* pulse green       */
  --red: #e11d48;
  --amber: #e08a1e;
  --radius: 14px;
  --btn-bg: #ffffff;
  --row-hover: #eef6f6;
  --shadow: rgba(20,40,90,.06);
  --grad: linear-gradient(135deg, var(--brand), var(--brand-2));
  --grad-pulse: linear-gradient(90deg, var(--accent), var(--brand));
}

* { box-sizing: border-box; }
/* min-height (not height:100%) so the page grows with content and the sticky
   top bar pins to the viewport across the whole scroll. */
html { height: auto; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px;
}

/* ---------- Top navigation ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: 10px 26px;
  box-shadow: 0 2px 14px var(--shadow);
}
.brand { flex-shrink: 0; display: flex; align-items: center; }
.brand-logo { height: 60px; width: auto; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--muted);
  border: none; border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: 14px; white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.nav-btn .ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn:hover { background: var(--panel-2); color: var(--text); }
.nav-btn.active { background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(14,165,164,.28); }

/* Hamburger toggle — hidden on desktop, shown on narrow screens */
.nav-toggle {
  display: none; margin-left: auto; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
}
.nav-toggle:hover { background: var(--panel-2); }
.nav-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle .nav-toggle-close { display: none; }
.nav-toggle.is-open .nav-toggle-open { display: none; }
.nav-toggle.is-open .nav-toggle-close { display: block; }

/* ---------- Mobile: collapse the nav behind the hamburger ---------- */
@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; gap: 12px; padding: 10px 18px; }
  .brand-logo { height: 46px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    flex-basis: 100%; flex-direction: column; gap: 4px;
    display: none; padding-bottom: 6px;
  }
  .nav.open { display: flex; }
  .nav-btn { width: 100%; justify-content: flex-start; padding: 12px 14px; font-size: 15px; }
}

/* ---------- Main ---------- */
.main { padding: 28px 34px; max-width: 1200px; margin: 0 auto; width: 100%; }
.view-head { margin-bottom: 20px; }
.view-head h1 { margin: 0 0 4px; font-size: 26px; font-weight: 800; }
.view-head p { margin: 0; color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: 0 2px 12px var(--shadow); }
.card h2 { margin: 0 0 14px; font-size: 17px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2,1fr); } }

/* ---------- Buttons + inputs ---------- */
.btn { background: var(--btn-bg); color: var(--brand-2); border: 1px solid var(--line); padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600; transition: all .15s; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; }
.btn.primary:hover { box-shadow: 0 6px 16px rgba(37,99,235,.28); }
.btn.ghost { background: transparent; color: var(--muted); }
input, select, textarea { background: var(--btn-bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; width: 100%; font-family: inherit; line-height: 1.4; appearance: none; -webkit-appearance: none; -moz-appearance: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,165,164,.14); }
input::placeholder, textarea::placeholder { color: #9aa7b2; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; padding-right: 34px; }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .03em; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1; min-width: 140px; }
.segmented { display: inline-flex; width: 100%; min-height: 42px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); gap: 4px; }
.segmented button { flex: 1; min-width: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; white-space: nowrap; }
/* Phones: give the Catalog (All/CPT/HCPCS) control its own full-width row so its
   buttons never get squeezed out of the card (they overflowed on ~414-540px). */
@media (max-width: 620px) { .proc-mode-wrap { flex-basis: 100%; } }
.segmented button.active { background: var(--panel); color: var(--brand-2); box-shadow: 0 3px 10px var(--shadow); }

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
/* Mobile: drop the low-value "Short description" column from CPT results so the
   table fits like the 3-column ICD table instead of needing sideways scroll */
.mob-shortdesc { display: none; }
@media (max-width: 700px) {
  .col-shortdesc { display: none; }
  /* Short column is hidden on mobile, so show the short description as a small
     line above the long description inside the same cell — both stay visible. */
  .mob-shortdesc { display: block; font-size: 12px; margin-bottom: 3px; }
}
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--panel-2); color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; position: sticky; top: 0; }
tbody tr:hover { background: var(--row-hover); }
td.code, .mono { font-family: "Cascadia Code", Consolas, monospace; font-weight: 600; }

/* ---------- Tags / badges ---------- */
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.tag.green { background: rgba(34,197,94,.12); color: #16a34a; border-color: rgba(34,197,94,.25); }
.tag.amber { background: rgba(224,138,30,.12); color: var(--amber); border-color: rgba(224,138,30,.28); }
.tag.red { background: rgba(225,29,72,.12); color: var(--red); border-color: rgba(225,29,72,.28); }
.tag.blue { background: rgba(37,99,235,.10); color: var(--brand-2); border-color: rgba(37,99,235,.25); }
.tag.teal { background: rgba(14,165,164,.12); color: var(--brand); border-color: rgba(14,165,164,.28); }

/* ---------- Home hero ---------- */
.hero { border-radius: 18px; padding: 40px 34px; color: #fff; margin-bottom: 22px; position: relative; overflow: hidden; background: var(--grad); }
.hero::after { content: ""; position: absolute; inset: 0; opacity: .18; background: repeating-linear-gradient(115deg, transparent 0 26px, rgba(255,255,255,.6) 26px 27px); }
.hero h1 { margin: 0 0 8px; font-size: 30px; position: relative; }
.hero p { margin: 0; font-size: 15px; opacity: .92; position: relative; max-width: 640px; }
.hero .pulse { height: 4px; width: 220px; border-radius: 2px; background: var(--grad-pulse); margin-top: 18px; position: relative; }

.searchbar { position: relative; margin-bottom: 22px; }
.searchbar input { padding: 14px 18px; font-size: 16px; border-radius: 12px; }
.search-results { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin-top: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px var(--shadow); max-height: 380px; overflow: auto; }
.search-group-title { padding: 8px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); background: var(--panel-2); }
.search-item { padding: 10px 14px; cursor: pointer; display: flex; gap: 10px; border-bottom: 1px solid var(--line); }
.search-item:hover { background: var(--row-hover); }

/* ---------- Tool tiles / stats ---------- */
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 26px var(--shadow); border-color: var(--brand); }
.tile .tile-ico { width: 30px; height: 30px; margin-bottom: 10px; fill: none; stroke: url(#tileGrad); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--brand); }
.tile .tile-ico { stroke: var(--brand); }
.tile h3 { margin: 0 0 6px; font-size: 16px; }
.tile p { margin: 0; color: var(--muted); font-size: 13px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 16px 20px; }
.stat .n { font-size: 28px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- Scrubber ---------- */
.verdict { font-size: 22px; font-weight: 800; padding: 14px 20px; border-radius: 12px; text-align: center; margin-bottom: 16px; }
.verdict.PASS { background: rgba(34,197,94,.14); color: #16a34a; }
.verdict.REVIEW { background: rgba(224,138,30,.14); color: var(--amber); }
.verdict.FAIL { background: rgba(225,29,72,.14); color: var(--red); }
.finding { border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--panel-2); }
.finding.fail { border-left-color: var(--red); }
.finding.warn { border-left-color: var(--amber); }
.finding.info { border-left-color: var(--brand-2); }
.finding .f-head { font-weight: 700; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.finding .suggest { margin-top: 8px; padding: 8px 10px; background: rgba(14,165,164,.09); border: 1px dashed rgba(14,165,164,.4); border-radius: 8px; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.finding .suggest-ico { flex: 0 0 auto; }
.finding .suggest b { color: var(--brand); }

.muted { color: var(--muted); }
.detail-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 12px; line-height: 1.6; }
.detail-box p { margin: 0; }
.proc-desc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
@media (max-width: 720px) { .proc-desc-grid { grid-template-columns: 1fr; } }
.policy-card { cursor: default; }
.policy-meta { overflow-wrap: anywhere; word-break: break-word; }
.summary { line-height: 1.65; }
/* Readable article body: spaced paragraphs + bold section headings */
.article-body p { margin: 0 0 11px; }
.article-body p:last-child { margin-bottom: 0; }
.article-h { margin: 18px 0 7px; font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: .01em; }
.article-h:first-child { margin-top: 0; }
/* Collapsed preview: clamp by height (works with block children) + soft fade */
.summary.clamped { max-height: 9.6em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); }
.summary-toggle { margin: 6px 0 0; background: none; border: none; color: var(--brand); font-weight: 600; font-size: 13px; cursor: pointer; padding: 0; }
.summary-toggle:hover { text-decoration: underline; }
.policy-card[data-expanded="1"] { border-color: var(--brand); }
.expand-hint { margin-top: 10px; font-size: 12px; user-select: none; }
.coming-soon { text-align: center; padding: 52px 24px; }
.coming-soon .cs-badge { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 8px; }
.coming-soon .cs-ico { width: 38px; height: 38px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.coming-soon h2 { margin: 12px 0 8px; }
.coming-soon p { max-width: 540px; margin: 0 auto; line-height: 1.6; }
.policy-card .pill-row { max-height: 240px; overflow: auto; }
.policy-card[data-expanded="1"] .pill-row { max-height: 420px; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===================== Floating Cortex assistant ===================== */
.cortex-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 60;
  width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; box-shadow: 0 10px 28px rgba(37,99,235,.4);
  display: grid; place-items: center; transition: transform .18s, box-shadow .18s;
  animation: cortexPulse 2.6s ease-in-out infinite;
}
.cortex-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 34px rgba(37,99,235,.5); }
.cortex-fab .fab-ico { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@keyframes cortexPulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(37,99,235,.4), 0 0 0 0 rgba(14,165,164,.45); }
  50% { box-shadow: 0 10px 28px rgba(37,99,235,.4), 0 0 0 14px rgba(14,165,164,0); }
}

.cortex-panel {
  position: fixed; right: 26px; bottom: 100px; z-index: 60;
  width: 380px; max-width: calc(100vw - 40px); height: 560px; max-height: calc(100vh - 140px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15,23,42,.28); display: flex; flex-direction: column; overflow: hidden;
  animation: cortexIn .2s ease;
}
/* [hidden] must win over the display:flex above, otherwise the panel never closes */
.cortex-panel[hidden] { display: none; }
@keyframes cortexIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.cortex-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--grad); color: #fff; }
/* Persistent "AI can be wrong" notice — always visible in the Cortex panel */
.cortex-disclaimer { display: flex; align-items: flex-start; gap: 8px; padding: 9px 14px; background: rgba(224,138,30,.1); border-bottom: 1px solid var(--line); color: #9a5a12; font-size: 11.5px; line-height: 1.4; font-weight: 600; }
.cortex-disclaimer svg { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 1px; fill: none; stroke: #e08a1e; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cortex-title { display: flex; align-items: center; gap: 10px; }
.cortex-badge { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cortex-title strong { display: block; font-size: 15px; line-height: 1.1; }
.cortex-title span { font-size: 11px; opacity: .85; }
.cortex-close { background: rgba(255,255,255,.18); border: none; color: #fff; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.cortex-close:hover { background: rgba(255,255,255,.34); }

.suggestions { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 14px 4px; }
.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; font-size: 12px; cursor: pointer; color: var(--muted); }
.chip:hover { border-color: var(--brand); color: var(--text); }
.chat-log { flex: 1; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 14px; line-height: 1.5; white-space: pre-wrap; font-size: 13.5px; }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.bot strong { color: var(--brand); }
.msg.thinking { min-width: 54px; padding: 10px 12px; }
.typing-line { display: flex; align-items: center; justify-content: center; gap: 0; font-weight: 700; color: var(--text); }
.typing-note { margin-top: 6px; font-size: 12px; color: var(--muted); }
.typing-dots { display: inline-flex; gap: 4px; align-items: center; flex: 0 0 auto; }
.typing-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--brand); animation: typingDot 1s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
.typing-dots i:nth-child(4) { animation-delay: .45s; }
@keyframes typingDot {
  0%, 80%, 100% { transform: translateY(0); opacity: .35; }
  40% { transform: translateY(-4px); opacity: 1; }
}
.chat-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; }
.chat-input .btn { flex: 0 0 auto; padding: 9px 15px; }
.chat-input input:disabled { opacity: .72; cursor: wait; }
.chat-input .btn:disabled { opacity: .55; cursor: wait; transform: none; }

/* ---------- ICD browse ---------- */
.tag.purple { background: rgba(139,92,246,.12); color: #7c3aed; border-color: rgba(139,92,246,.3); }
.legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.icd-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
/* Let grid tracks shrink below content min-width so wide result tables scroll
   inside .table-wrap instead of forcing the whole page to overflow (CPT's
   4-column table was pushing the layout to ~433px on phones). */
.icd-layout > * { min-width: 0; }
@media (max-width: 900px) {
  .icd-layout { grid-template-columns: 1fr; }
  /* Mobile: show search results first, the chapter/section index below them */
  .icd-main { order: -1; }
  .icd-nav { position: static; top: auto; max-height: none; overflow: visible; }
}
.icd-nav { padding: 10px; max-height: 78vh; overflow: auto; position: sticky; top: 84px; }
.icd-nav-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; }
.icd-chap { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; width: 100%; text-align: left; background: transparent; border: none; border-radius: 8px; padding: 8px 8px; cursor: pointer; align-items: center; }
.icd-chap:hover { background: var(--panel-2); }
.icd-chap.active { background: var(--grad); color: #fff; }
.icd-chap.active .icd-count, .icd-chap.active .icd-range { color: #fff; }
.icd-range { font-family: Consolas, monospace; font-weight: 700; font-size: 12px; color: var(--brand-2); }
.icd-chtitle { font-size: 12px; grid-column: 1 / -1; line-height: 1.35; }
.icd-count { font-size: 11px; color: var(--muted); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cat-tile { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s; }
.cat-tile:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 8px 20px var(--shadow); }
.cat-code { font-family: Consolas, monospace; font-weight: 800; font-size: 18px; color: var(--brand-2); }
.cat-title { font-size: 13px; margin: 4px 0 6px; line-height: 1.35; }
.icd-link { color: var(--brand-2); font-weight: 700; cursor: pointer; text-decoration: none; }
.icd-link:hover { text-decoration: underline; }
tr.row-excl { background: rgba(139,92,246,.06); }
.excl-note { margin-top: 12px; padding: 10px 12px; background: rgba(225,29,72,.08); border: 1px dashed rgba(225,29,72,.4); border-radius: 8px; font-size: 13px; }

/* ---- ICD tabular notes (icd10data-style) ---- */
.notes-card { padding: 16px 18px; }
.backref { font-size: 12px; margin: 4px 0 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.icd-note { border-left: 4px solid var(--muted); padding: 8px 12px; margin: 8px 0; border-radius: 0 8px 8px 0; background: var(--panel-2); }
.icd-note .note-label { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.icd-note ul { margin: 0; padding-left: 18px; line-height: 1.5; font-size: 13.5px; }
.note-inc { border-left-color: #16a34a; } .note-inc .note-label { color: #16a34a; }
.note-ex1 { border-left-color: var(--red); background: rgba(225,29,72,.06); } .note-ex1 .note-label { color: var(--red); }
.note-ex2 { border-left-color: var(--amber); background: rgba(224,138,30,.06); } .note-ex2 .note-label { color: var(--amber); }
.note-cf  { border-left-color: var(--brand-2); } .note-cf .note-label { color: var(--brand-2); }
.note-7   { border-left-color: #7c3aed; } .note-7 .note-label { color: #7c3aed; }
.note-n   { border-left-color: var(--muted); }

/* ---------- Empty search hint ---------- */
.empty-hint { text-align: center; padding: 40px 20px; }
.empty-hint .empty-ico { font-size: 34px; margin-bottom: 8px; opacity: .5; }

/* ---------- Scrubber claim grid ---------- */
/* CPT, units, 4 modifiers, 4 diagnoses, delete button. */
.claim-head, .claim-row {
  display: grid;
  grid-template-columns: 1.35fr .65fr repeat(4, .7fr) repeat(4, 1fr) 32px;
  gap: 6px; align-items: center;
}
.claim-head { margin-bottom: 8px; }
.claim-head span { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; padding-left: 2px; }
.claim-row { margin-bottom: 6px; }
.claim-row input { padding: 8px 9px; font-size: 13px; }
.claim-row .c-del, .code-line .c-del {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  border-radius: 8px; height: 34px; cursor: pointer; font-size: 12px;
}
.claim-row .c-del:hover, .code-line .c-del:hover { border-color: var(--red); color: var(--red); }
.claim-head, .claim-row { min-width: 860px; }
.card > #claim-rows, .card:has(#claim-rows) { overflow-x: auto; }
.mob-cap { display: none; }

/* ---------- NCCI code list ---------- */
.code-line { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.code-line input { flex: 1; }
.code-line .c-del { width: 34px; flex: 0 0 auto; }
.ncci-textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--input);
  color: var(--text);
  font: 600 14px/1.5 "Cascadia Code", Consolas, monospace;
}
.ncci-side { flex: 0 0 230px; display: flex; flex-direction: column; gap: 10px; align-self: stretch; }
.ncci-source { display: grid; grid-template-columns: 160px 160px 1fr; gap: 14px; align-items: center; }
.ncci-source b, .ncci-metrics b { display: block; font-size: 22px; color: var(--brand-2); }
.ncci-source span, .ncci-metrics span { color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 700; letter-spacing: .03em; }
.ncci-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ncci-metrics > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel-2); }
.ncci-progress { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 10px 12px; margin: 12px 0; box-shadow: 0 10px 24px var(--shadow); }
.ncci-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.ncci-progress-track { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-top: 8px; border: 1px solid var(--line); }
.ncci-progress-track > div { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .18s ease; }
@media (max-width: 760px) {
  .ncci-side { flex-basis: 100%; }
  .ncci-source, .ncci-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel); color: var(--text); border: 1px solid var(--brand); border-left: 4px solid var(--brand); padding: 12px 20px; border-radius: 10px; box-shadow: 0 10px 30px var(--shadow); z-index: 80; }


/* ---- Scrubber claim rows: reflow to fully-visible blocks on phones ---- */
@media (max-width: 720px) {
  .claim-head { display: none; }                 /* shared header makes no sense once stacked */
  .card > #claim-rows, .card:has(#claim-rows) { overflow-x: visible; }
  .claim-row {
    display: flex; flex-wrap: wrap; gap: 8px; min-width: 0;
    padding: 12px; margin-bottom: 12px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2);
  }
  .claim-row .mob-cap {
    display: block; flex: 1 1 100%;
    font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--muted); margin: 2px 0 -2px;
  }
  .claim-row .c-cpt   { flex: 1 1 60%; }
  .claim-row .c-units { flex: 1 1 25%; }
  .claim-row .c-mod   { flex: 1 1 60px; min-width: 56px; text-align: center; }
  .claim-row .c-dx    { flex: 1 1 46%; }
  .claim-row .c-del {
    flex: 1 1 100%; height: 38px; margin-top: 2px;
    color: var(--red); border-color: rgba(225,29,72,.4);
  }
}

/* LCD billing & coding article chips */
.article-link.active { outline: 2px solid var(--brand); outline-offset: 1px; }
