:root {
  color-scheme: light;
  --paper: #f6f7f1;
  --surface: #fffefa;
  --side: #e9efe4;
  --rule: #dbe4d8;
  --ink: #173b31;
  --muted: #4e6459;
  --green: #e6efdf;
  --lime: #e0edb6;
  --peach: #f6e7db;
  --rust: #79513c;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.55 var(--sans); }
a { color: inherit; text-underline-offset: .18em; }
button, input, select { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #9f5437; outline-offset: 3px; }
h1, h2, h3, p, ul, ol { margin: 0; }
h1 { font: 400 clamp(40px, 4.5vw, 62px)/1.04 var(--serif); letter-spacing: -.057em; }
h2, h3 { font-weight: 660; line-height: 1.18; letter-spacing: -.025em; }
h2 { font-size: clamp(24px, 2.5vw, 32px); }
h3 { font-size: 18px; }
small { font-size: 14px; }
[hidden] { display: none !important; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 3; padding: 10px 14px; color: white; background: var(--ink); transform: translateY(-150%); }
.skip:focus { transform: none; }
.shell { display: grid; grid-template-columns: 206px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; min-height: 0; overflow-y: auto; padding: 24px 14px 18px; background: var(--side); border-right: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 9px; padding: 0 6px; text-decoration: none; width: fit-content; font-size: 30px; font-weight: 690; letter-spacing: -.075em; line-height: 1; }
.brand-mark { display: grid; place-items: center; background: var(--ink); color: var(--lime); width: 38px; height: 38px; border-radius: 10px; }
.brand-mark .icon { width: 26px; height: 26px; }
.brand small { font-size: 11px; letter-spacing: .09em; font-weight: 740; margin-left: 3px; }
.workspace-label, .eyebrow { color: var(--muted); font-size: 12px; font-weight: 730; letter-spacing: .12em; }
.workspace-label { margin: 39px 9px 11px; }
.navigation { display: grid; gap: 5px; }
.navigation button, .secondary-nav { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-decoration: none; text-align: left; font-size: 15px; font-weight: 620; }
.navigation .icon, .secondary-nav .icon { width: 18px; height: 18px; }
.navigation button:hover, .secondary-nav:hover { background: #dfeadd; }
.navigation button[aria-current="page"] { color: #fffef8; background: var(--ink); }
.navigation button[aria-current="page"] .icon { color: var(--lime); }
.sidebar-bottom { display: grid; margin-top: auto; padding-top: 25px; }
.secondary-nav { color: var(--muted); font-size: 14px; }
.workspace { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 62px; padding: 8px clamp(20px, 3vw, 45px); border-bottom: 1px solid var(--rule); background: #fbfcf6; }
.top-practice { font-size: 15px; font-weight: 670; }
.top-practice > span { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 9px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.tool-link { width: auto; min-height: 40px; }
.tool-link[aria-current="page"] { background: var(--green); color: var(--ink); }
.demo-pill, .badge { display: inline-flex; width: fit-content; align-items: center; gap: 6px; border-radius: 30px; line-height: 1.25; }
.demo-pill { padding: 5px 9px; background: #e8efd8; color: #3c5136; font-size: 12px; font-weight: 700; white-space: nowrap; }
.demo-pill i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #5b754d; }
main { padding: clamp(22px, 3vw, 40px) clamp(20px, 3vw, 45px) 44px; width: min(100%, 1460px); margin-inline: auto; outline: none; }
.workspace-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding: 14px clamp(20px, 3vw, 45px); border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.page-title { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 25px; }
.page-title .eyebrow { margin-bottom: 6px; }
.page-title .lead { margin-top: 7px; color: var(--muted); max-width: 710px; }
.page-label { color: var(--muted); font-size: 13px; font-weight: 650; text-align: right; }
.referral-grid { display: grid; grid-template-columns: minmax(265px, .7fr) minmax(0, 1.55fr); align-items: start; gap: clamp(14px, 2vw, 24px); }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 13px; }
.queue-head { padding: 18px 16px 14px; display: grid; gap: 12px; }
.queue-head h2 { font-size: 21px; }
.filters { display: flex; flex-wrap: wrap; gap: 5px; }
.filter { padding: 4px 6px; min-height: 36px; border: 1px solid transparent; border-radius: 6px; background: #f4f6ef; font-size: 13px; font-weight: 630; }
.filter:hover, .filter[aria-pressed="true"] { border-color: #a7baaa; background: var(--green); }
.search { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 7px; background: #fcfdf8; }
.search .icon { width: 18px; height: 18px; color: var(--muted); }
.search input { width: 100%; min-width: 0; min-height: 42px; padding: 4px 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.search:focus-within { border-color: #6c8b78; box-shadow: 0 0 0 2px #dae8d9; }
.search input::placeholder { color: #617369; }
.queue-items { display: grid; }
.queue-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-height: 82px; width: 100%; padding: 12px 13px; border: 0; border-top: 1px solid #e8ece3; border-left: 3px solid transparent; background: transparent; text-align: left; }
.queue-item:last-child { border-radius: 0 0 12px 12px; }
.queue-item:hover { background: #f5f7f0; }
.queue-item[aria-pressed="true"] { background: #eef4e9; border-left-color: #3e735b; }
.queue-item .icon { width: 16px; height: 16px; color: var(--muted); }
.queue-item strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.queue-item small { display: block; margin-top: 1px; color: var(--muted); font-size: 13px; }
.initials { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 9px; color: #31503e; background: #dfeadb; font-size: 13px; font-weight: 730; }
.initials.peach { background: #f3e4da; color: var(--rust); }
.initials.lilac { background: #ebe9f5; color: #564e75; }
.initials.blue { background: #e4edf1; color: #365864; }
.initials.large { width: 48px; height: 48px; border-radius: 11px; font-size: 16px; }
.queue-item .queue-meta { min-width: 0; }
.queue-item .badge { margin-top: 3px; }
.badge { background: #e7efe3; color: #315744; padding: 4px 8px; font-size: 13px; font-weight: 670; }
.badge.peach { color: #71412d; background: #f7e7d8; }
.badge.blue { color: #345260; background: #e4edf0; }
.badge.lilac { color: #54496e; background: #eeeaf5; }
.badge.neutral { color: #465b50; background: #edf0e8; }
.case-header { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: clamp(15px, 2vw, 24px) clamp(16px, 2vw, 26px) 13px; }
.case-title { display: flex; align-items: center; gap: 11px; }
.case-title p { margin-top: 2px; font-size: 14px; color: var(--muted); }
.progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 4px clamp(16px, 2vw, 26px) 3px; }
.progress li { display: flex; align-items: center; gap: 4px; padding: 7px 1px; border-top: 2px solid #e3e9df; color: var(--muted); font-size: 13px; font-weight: 620; }
.progress li[aria-current="step"] { border-color: #48785f; color: #255440; }
.progress li.done { border-color: #a5bea8; color: #3e654e; }
.progress li .icon { width: 14px; height: 14px; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px clamp(12px, 2vw, 25px); padding: 0 clamp(16px, 2vw, 26px); border-bottom: 1px solid var(--rule); }
.tab { border: 0; border-bottom: 2px solid transparent; min-height: 44px; padding: 8px 0; background: transparent; font-size: 15px; font-weight: 630; color: var(--muted); }
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: #3e735b; }
.case-body { padding: clamp(16px, 2vw, 26px); }
.case-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-bottom: 20px; }
.fact small, .fact strong { display: block; }
.fact small { color: var(--muted); }
.fact strong { font-size: 16px; margin-top: 2px; }
.intake { margin-bottom: 20px; }
.intake h3, .subheading { margin-bottom: 8px; }
.check-list { list-style: none; padding: 0; }
.check-list li { display: flex; align-items: center; gap: 7px; min-height: 25px; color: var(--muted); font-size: 15px; }
.check-list .icon { width: 16px; height: 16px; color: #37644b; }
.check-list .missing .icon { color: #9b5838; }
.next { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 15px; background: #eaf2e5; border: 1px solid #dce8da; border-radius: 9px; }
.next > div:first-child { min-width: 0; flex: 1 1 190px; }
.next strong { display: block; font-size: 16px; }
.next p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.next-controls, .actions-row { display: flex; align-items: start; flex-wrap: wrap; gap: 8px; }
.actions-row { margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--ink); border-radius: 7px; background: var(--ink); color: #fffef8; font-size: 14px; font-weight: 670; text-decoration: none; text-align: center; }
.btn:hover { background: #2a5949; }
.btn .icon { width: 16px; height: 16px; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: #bacbbd; }
.btn-secondary:hover { background: var(--green); }
.mobile-queue { display: none; }
.empty, .notice { padding: 18px; color: var(--muted); }
.empty strong { color: var(--ink); display: block; margin-bottom: 3px; }
.detail-block { display: grid; gap: 6px; padding: 13px 14px; background: #f0f4ea; border-radius: 8px; font-size: 15px; color: var(--muted); }
.detail-block strong { color: var(--ink); }
.detail-block + .detail-block { margin-top: 10px; }
.timeline { list-style: none; padding: 0; }
.timeline li { display: grid; grid-template-columns: auto 1fr; gap: 10px; border-bottom: 1px solid var(--rule); padding: 10px 0; }
.timeline li:last-child { border-bottom: 0; }
.timeline .icon { width: 17px; height: 17px; margin-top: 3px; color: #4f7860; }
.timeline strong { display: block; font-size: 15px; }
.timeline small { color: var(--muted); font-size: 14px; }
.board { padding: clamp(16px, 2.5vw, 25px); }
.board > h2 { font-size: 23px; margin-bottom: 7px; }
.board > p { color: var(--muted); margin-bottom: 12px; }
.board-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--rule); }
.board-row strong { display: block; font-size: 16px; }
.board-row p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.note-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 8px; background: var(--green); }
.note-icon.peach { background: var(--peach); color: var(--rust); }
.note-icon.lime { background: var(--lime); }
.board-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 15px; align-items: start; }
.board-grid .board-aside { background: #eaf1e4; }
.board + .board { margin-top: 15px; }
.board-grid .board + .board { margin-top: 0; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.icon-button { display: grid; place-items: center; width: 41px; height: 41px; border: 1px solid var(--rule); background: transparent; border-radius: 7px; }
.icon-button:hover { background: var(--green); }
dialog { width: min(640px, calc(100% - 30px)); max-height: calc(100dvh - 30px); margin: auto; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); color: var(--ink); padding: clamp(17px, 4vw, 27px); box-shadow: 0 18px 65px #173b3144; }
dialog::backdrop { background: #172f2985; }
dialog h2 { margin: 4px 0 11px; }
dialog p { color: var(--muted); }
#dialog-body > p { margin-bottom: 12px; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; flex-wrap: wrap; padding-top: 16px; }
.slot-options { border: 0; display: grid; gap: 7px; padding: 0; margin: 0; }
.slot-options legend { margin-bottom: 7px; font-weight: 670; }
.slot-option { display: flex; gap: 7px; align-items: center; min-height: 44px; border: 1px solid var(--rule); padding: 6px 9px; border-radius: 7px; }
.slot-option:has(input:checked) { background: #e9f1e4; border-color: #9bb6a2; }
.slot-option input { accent-color: #3e735b; }
.field { display: grid; gap: 5px; margin: 10px 0; }
.field select { width: 100%; min-height: 45px; border-radius: 7px; padding: 5px 8px; background: var(--surface); border: 1px solid #aebfb0; }
.plan-kicker { margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 710; }
@media (max-width: 1090px) {
  .shell { grid-template-columns: 170px minmax(0, 1fr); }
  .sidebar { padding-inline: 8px; }
  .referral-grid { grid-template-columns: minmax(225px, .7fr) minmax(0, 1.45fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; overflow: visible; padding: 9px 14px; border-right: 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 7px; align-items: center; }
  .brand { font-size: 26px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .brand-mark .icon { width: 23px; height: 23px; }
  .workspace-label { display: none; }
  .navigation { grid-row: 2; grid-column: 1 / -1; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .navigation button { justify-content: center; padding: 6px 4px; gap: 5px; font-size: 14px; line-height: 1.15; }
  .navigation button .icon { width: 16px; height: 16px; }
  .sidebar-bottom { grid-column: 2; grid-row: 1; padding: 0; }
  .sidebar-bottom a { display: none; }
  .workspace { min-height: calc(100vh - 105px); }
  .topbar { min-height: 49px; padding: 4px 14px; }
  .top-practice span, .page-label { display: none; }
  main { padding: 20px 14px 32px; }
  .page-title { margin-bottom: 17px; align-items: start; }
  .referral-grid { grid-template-columns: minmax(0, 1fr); }
  .referral-grid[data-pane="queue"] .case { display: none; }
  .referral-grid[data-pane="case"] .queue { display: none; }
  .mobile-queue { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
  .board-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .navigation button { font-size: 13px; }
  .navigation button .icon { display: none; }
}
@media (max-width: 430px) {
  .navigation { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar-right { gap: 4px; }
  .top-practice { font-size: 14px; }
  .tool-link { padding-inline: 5px; }
  .tool-link .icon { display: none; }
  .demo-pill { font-size: 11px; }
  .workspace-footer { font-size: 12px; padding-inline: 14px; }
  .board-row { grid-template-columns: auto minmax(0, 1fr); }
  .board-row > .btn, .board-row > .badge { grid-column: 2; justify-self: start; }
  .tabs { gap: 0 13px; }
  .progress .step-num { display: none; }
}
.overview-facts { margin-top: 20px; }
.case-body .intake { margin-bottom: 0; }
.evidence { margin: 0 0 12px; }
.evidence summary { cursor: pointer; font-weight: 650; }
.evidence .detail-block { margin-top: 7px; }
#dialog-body .source-link { margin: 12px 0 0; font-size: 14px; }

.demo-callout { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 18px; margin-bottom: 16px; padding: 13px 16px; }
.demo-callout p, .demo-footnote { color: var(--muted); font-size: 14px; }
.demo-choices { margin-top: 16px; }
.demo-confirmation { margin-top: 12px; padding: 9px 12px; background: var(--green); border-radius: 7px; }
.demo-list { padding-left: 18px; margin-top: 6px; }
.demo-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; margin: 0 0 16px; list-style: none; gap: 12px; }
.demo-flow li { padding: 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.demo-flow span { margin-right: 8px; font-size: 12px; font-weight: 740; color: var(--muted); }
.demo-flow p { color: var(--muted); margin-top: 4px; font-size: 14px; }
#sample-intake .btn:disabled { opacity: .55; cursor: default; }
@media (max-width: 860px) {
  .navigation { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .navigation { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .demo-flow { grid-template-columns: 1fr; gap: 7px; }
}
