:root{
    --ink:#17213a;
    --ink-2:#24304c;
    --navy:#10182b;
    --paper:#f5f2ea;
    --paper-2:#ece7dd;
    --surface:#fffdf8;
    --line:#ddd7cc;
    --muted:#77756f;
    --burgundy:#7a2637;
    --burgundy-soft:#f2e4e6;
    --gold:#b28a49;
    --green:#2e715c;
    --green-soft:#e5f1ec;
    --amber:#9a682a;
    --amber-soft:#f7eedf;
    --shadow:0 18px 55px rgba(27,31,42,.09);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
    margin:0;
    min-width:320px;
    background:var(--paper);
    color:var(--ink);
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
button,input{font:inherit}
button{color:inherit}
.app-shell{min-height:100vh;display:grid;grid-template-columns:278px minmax(0,1fr)}
.sidebar{
    position:sticky;top:0;height:100vh;padding:26px 20px 22px;
    display:flex;flex-direction:column;
    background:var(--navy);color:#f6f3ea;border-right:1px solid rgba(255,255,255,.06);z-index:30
}
.brand-block{display:flex;align-items:center;gap:12px;padding:0 8px 22px}
.brand-mark{
    width:42px;height:42px;display:grid;place-items:center;
    border:1px solid rgba(255,255,255,.18);border-radius:12px;
    background:linear-gradient(145deg,rgba(178,138,73,.22),rgba(122,38,55,.2));
    font-family:Georgia,serif;font-size:18px;font-weight:800;color:#f4e4c7
}
.brand-block>div:last-child{display:grid}
.brand-block strong{font-size:14px}
.brand-block span{font-size:11px;letter-spacing:.21em;color:#c8ad7e;margin-top:2px}
.workspace-badge{
    margin:0 4px 22px;padding:15px 14px;border:1px solid rgba(255,255,255,.09);
    border-radius:14px;background:rgba(255,255,255,.035);display:grid;gap:3px
}
.workspace-badge small{font-size:9px;letter-spacing:.14em;color:#c8ad7e}
.workspace-badge strong{font-size:13px}
.workspace-badge span{font-size:11px;color:#9da5b7}
.main-nav{display:grid;gap:5px}
.nav-item{
    width:100%;min-height:46px;padding:0 12px;border:0;border-radius:10px;background:transparent;
    display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:8px;
    text-align:left;color:#aeb5c4;cursor:pointer;transition:.18s
}
.nav-item:hover{background:rgba(255,255,255,.055);color:#fff}
.nav-item.active{background:#f7f2e8;color:var(--ink);box-shadow:0 8px 24px rgba(0,0,0,.18)}
.nav-item small{font-size:9px;letter-spacing:.09em;text-transform:uppercase;opacity:.55}
.nav-icon{width:22px;text-align:center;font-size:15px}
.nav-ai{margin-top:7px;border-top:1px solid rgba(255,255,255,.07);border-radius:0;padding-top:8px}
.sidebar-footer{margin-top:auto;border-top:1px solid rgba(255,255,255,.08);padding-top:16px;display:grid;gap:13px}
.security-state{display:flex;gap:10px;align-items:flex-start;padding:0 8px}
.status-dot{width:8px;height:8px;margin-top:5px;border-radius:50%;background:#6fd4a7;box-shadow:0 0 14px rgba(111,212,167,.55)}
.security-state div{display:grid;gap:2px}
.security-state strong{font-size:11px}
.security-state small{font-size:10px;color:#8d95a5}
.plain-button{border:0;background:transparent;color:#8d95a5;text-align:left;padding:6px 8px;cursor:pointer;font-size:11px}
.content-shell{min-width:0}
.topbar{
    position:sticky;top:0;z-index:20;min-height:76px;padding:0 34px;
    display:flex;align-items:center;justify-content:space-between;gap:22px;
    background:rgba(245,242,234,.92);backdrop-filter:blur(14px);
    border-bottom:1px solid rgba(178,171,157,.46)
}
.menu-toggle{display:none;width:42px;height:42px;border:1px solid var(--line);border-radius:11px;background:var(--surface);padding:10px;cursor:pointer}
.menu-toggle span{height:2px;background:var(--ink);display:block;margin:4px 0}
.topbar-copy{display:grid;gap:4px}
.breadcrumb{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.topbar-copy strong{font-family:Georgia,"Times New Roman",serif;font-size:18px;font-weight:600}
.topbar-actions{display:flex;align-items:center;gap:10px}
.search-button{
    min-height:40px;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:rgba(255,253,248,.72);
    display:flex;align-items:center;gap:9px;color:#686865;cursor:pointer
}
.search-button kbd{margin-left:12px;padding:3px 6px;border:1px solid #ddd7cc;border-bottom-width:2px;border-radius:5px;background:#f1ede5;font-size:10px;color:#838078}
.notification-button,.profile-button{
    position:relative;width:40px;height:40px;border:1px solid var(--line);border-radius:11px;background:var(--surface);cursor:pointer
}
.notification-button b{
    position:absolute;right:-4px;top:-4px;width:17px;height:17px;display:grid;place-items:center;
    border-radius:50%;background:var(--burgundy);color:#fff;font-size:9px
}
.profile-button{border-radius:50%;background:var(--ink);color:#fff;font-size:11px;font-weight:800}
main{padding:44px 34px 70px;max-width:1540px;margin:0 auto}
.view{display:none}.view.active{display:block}
.hero-row,.matter-page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:34px;margin-bottom:34px}
.eyebrow,.panel-kicker,.dialog-kicker{
    display:block;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--burgundy);font-weight:800
}
.hero-row h1,.matter-page-heading h1{
    margin:12px 0 14px;font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(42px,4.5vw,72px);line-height:.98;letter-spacing:-.045em;font-weight:500;color:var(--ink)
}
.hero-row h1 em,.matter-page-heading h1 em{color:var(--burgundy);font-weight:500}
.hero-row p,.matter-page-heading p{max-width:720px;margin:0;color:var(--muted);font-size:15px;line-height:1.7}
.hero-actions{display:flex;gap:10px;flex:0 0 auto}
.primary-button,.secondary-button{
    min-height:44px;padding:0 17px;border-radius:10px;cursor:pointer;font-weight:750;font-size:12px
}
.primary-button{border:1px solid var(--ink);background:var(--ink);color:#fff}
.primary-button:hover{background:var(--ink-2)}
.secondary-button{border:1px solid var(--line);background:var(--surface)}
.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}
.metric-card{
    min-height:156px;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:0 10px 35px rgba(41,43,49,.045);
    display:flex;flex-direction:column
}
.metric-card.urgent{border-top:3px solid var(--burgundy)}
.metric-label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.metric-card strong{margin-top:auto;font-family:Georgia,serif;font-size:44px;font-weight:500}
.metric-card small{margin-top:5px;color:var(--muted);font-size:11px}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(320px,.7fr);gap:18px;margin-bottom:18px}
.panel{border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow);overflow:hidden}
.panel-heading{padding:20px 22px 17px;display:flex;justify-content:space-between;align-items:end;gap:20px;border-bottom:1px solid #ebe6dc}
.panel-heading.compact{align-items:center}
.panel-heading h2{margin:5px 0 0;font-family:Georgia,serif;font-size:24px;font-weight:600}
.text-button{border:0;background:transparent;color:var(--burgundy);cursor:pointer;font-size:11px;font-weight:800}
.priority-list{padding:5px 22px 14px}
.priority-item{
    min-height:96px;padding:16px 0;display:grid;grid-template-columns:72px 1fr auto;align-items:center;gap:16px;border-bottom:1px solid #eee9e0
}
.priority-item:last-child{border-bottom:0}
.priority-item.high{position:relative}
.priority-item.high:before{content:"";position:absolute;left:-22px;width:3px;height:44px;background:var(--burgundy);border-radius:0 2px 2px 0}
.priority-time{display:grid;gap:3px}
.priority-time strong{font-family:Georgia,serif;font-size:22px}
.priority-time span{font-size:9px;letter-spacing:.11em;color:var(--muted)}
.priority-copy{display:grid;gap:3px}
.priority-copy small{font-size:9px;letter-spacing:.11em;color:var(--burgundy);font-weight:800}
.priority-copy strong{font-size:13px}
.priority-copy span{font-size:11px;color:var(--muted)}
.priority-badge{padding:6px 9px;border-radius:999px;background:var(--burgundy-soft);color:var(--burgundy);font-size:9px;font-weight:800}
.priority-badge.neutral{background:#eeeae2;color:#6a6760}
.focus-count{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:var(--ink);color:#fff;font-family:Georgia,serif}
.focus-panel{padding-bottom:8px}
.task-check{display:grid;grid-template-columns:20px 1fr;gap:10px;padding:16px 20px;border-bottom:1px solid #eee9e0;cursor:pointer}
.task-check input{margin-top:3px;accent-color:var(--burgundy)}
.task-check span{display:grid;gap:3px}
.task-check strong{font-size:12px}
.task-check small{font-size:10px;color:var(--muted)}
.task-check:has(input:checked) strong{text-decoration:line-through;color:#999}
.ai-note{margin:16px;padding:14px;border:1px solid #decaa8;border-radius:13px;background:#fbf6eb;display:grid;grid-template-columns:22px 1fr;gap:8px}
.ai-note>span{color:var(--gold);font-size:18px}
.ai-note small{font-size:8px;letter-spacing:.1em;color:var(--gold);font-weight:900}
.ai-note p{margin:5px 0 0;color:#776e5f;font-size:10px;line-height:1.55}
.recent-panel{box-shadow:none}
.matter-table{padding:0 18px 16px}
.matter-row{
    width:100%;min-height:62px;padding:0 10px;border:0;border-bottom:1px solid #eee9e0;background:transparent;
    display:grid;grid-template-columns:1.5fr 1fr .9fr 1fr .55fr;align-items:center;gap:14px;text-align:left;font-size:11px
}
button.matter-row{cursor:pointer}
button.matter-row:hover{background:#faf7f1}
.matter-row>span:first-child{display:grid;gap:3px}
.matter-row small{color:var(--muted)}
.matter-head{min-height:42px;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em}
.deadline-danger{color:var(--burgundy)}
.state-pill{display:inline-flex;width:max-content;padding:5px 8px;border-radius:999px;font-style:normal;font-size:9px;font-weight:800}
.state-pill.active{background:var(--green-soft);color:var(--green)}
.state-pill.review{background:var(--amber-soft);color:var(--amber)}
.state-pill.waiting{background:#ecebf1;color:#6d687a}
.matter-page-heading{margin-bottom:28px}
.toolbar{margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.filter-search{
    min-width:300px;max-width:490px;flex:1;min-height:44px;padding:0 13px;border:1px solid var(--line);border-radius:11px;background:var(--surface);
    display:flex;align-items:center;gap:9px
}
.filter-search input{width:100%;border:0;outline:0;background:transparent;color:var(--ink);font-size:12px}
.filter-search input::placeholder{color:#aaa69d}
.filter-group{display:flex;gap:7px;flex-wrap:wrap}
.filter-button{
    min-height:38px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);cursor:pointer;font-size:10px;color:var(--muted)
}
.filter-button b{margin-left:4px;color:inherit}
.filter-button.active{background:var(--ink);border-color:var(--ink);color:#fff}
.matter-board{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}
.matter-card{min-height:290px;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:0 10px 35px rgba(41,43,49,.04);display:flex;flex-direction:column}
.matter-card.hidden{display:none}
.matter-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.matter-code{font-family:"SFMono-Regular",Consolas,monospace;font-size:10px;color:var(--burgundy)}
.matter-card h2{margin:23px 0 7px;font-family:Georgia,serif;font-size:21px;line-height:1.18}
.matter-card>p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}
.matter-card dl{margin:24px 0 20px;display:grid;gap:9px}
.matter-card dl div{display:flex;justify-content:space-between;gap:18px}
.matter-card dt{font-size:10px;color:var(--muted)}
.matter-card dd{margin:0;font-size:10px;font-weight:750;text-align:right}
.matter-card-footer{margin-top:auto;padding-top:13px;border-top:1px solid #eee9e0;display:grid;grid-template-columns:auto auto 1fr;gap:11px;align-items:center}
.matter-card-footer>span{font-size:9px;color:var(--muted)}
.matter-card-footer button{justify-self:end;border:0;background:transparent;color:var(--burgundy);font-size:9px;font-weight:850;cursor:pointer}
.empty-state{padding:60px 20px;text-align:center;border:1px dashed var(--line);border-radius:16px;color:var(--muted);display:grid;gap:7px}
.empty-state strong{color:var(--ink)}
.hidden{display:none!important}
.app-dialog{border:0;padding:0;background:transparent}
.app-dialog::backdrop{background:rgba(12,18,33,.58);backdrop-filter:blur(5px)}
.dialog-card{position:relative;width:min(470px,calc(100vw - 32px));padding:31px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 35px 95px rgba(0,0,0,.25)}
.dialog-card h2{margin:10px 0 10px;font-family:Georgia,serif;font-size:28px}
.dialog-card p{margin:0;color:var(--muted);font-size:12px;line-height:1.65}
.dialog-close{position:absolute;right:13px;top:11px;width:32px;height:32px;border:0;border-radius:50%;background:#f0ece3;cursor:pointer;font-size:20px}
.dialog-confirm{margin-top:22px}
@media(max-width:1180px){
    .metric-grid{grid-template-columns:repeat(2,1fr)}
    .dashboard-grid{grid-template-columns:1fr}
    .matter-board{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:900px){
    .app-shell{grid-template-columns:1fr}
    .sidebar{position:fixed;left:0;top:0;width:280px;transform:translateX(-102%);transition:transform .22s ease;box-shadow:18px 0 50px rgba(0,0,0,.22)}
    .sidebar.open{transform:translateX(0)}
    .menu-toggle{display:block}
    .topbar{padding:0 20px}
    main{padding:34px 20px 60px}
    .search-button span:nth-child(2),.search-button kbd{display:none}
}
@media(max-width:690px){
    .topbar-copy strong{display:none}
    .hero-row,.matter-page-heading{display:grid;align-items:start}
    .hero-actions{justify-self:start;flex-wrap:wrap}
    .hero-row h1,.matter-page-heading h1{font-size:clamp(40px,12vw,58px)}
    .metric-grid{grid-template-columns:1fr 1fr}
    .metric-card{min-height:132px}
    .priority-item{grid-template-columns:58px 1fr}
    .priority-badge{display:none}
    .matter-table-dashboard .matter-row{grid-template-columns:1.4fr .8fr .6fr}
    .matter-table-dashboard .matter-row>span:nth-child(2),
    .matter-table-dashboard .matter-row>span:nth-child(3){display:none}
    .toolbar{display:grid}
    .filter-search{min-width:0;max-width:none;width:100%}
    .matter-board{grid-template-columns:1fr}
}
@media(max-width:460px){
    .topbar{min-height:66px;padding:0 14px}
    .topbar-actions{gap:6px}
    main{padding:28px 14px 50px}
    .metric-grid{grid-template-columns:1fr}
    .metric-card{min-height:112px}
    .metric-card strong{font-size:38px}
    .panel-heading{padding:18px 16px}
    .priority-list{padding-inline:16px}
    .priority-item.high:before{left:-16px}
    .matter-table{padding-inline:10px}
    .matter-row{grid-template-columns:1.5fr .8fr}
    .matter-row>span:nth-child(2),
    .matter-row>span:nth-child(3),
    .matter-row>span:nth-child(4){display:none}
    .matter-card{padding:17px}
    .matter-card-footer{grid-template-columns:1fr 1fr}
    .matter-card-footer button{grid-column:1/-1;justify-self:start;margin-top:4px}
}
/* Legal matter detail foundation - FAS-2026-014 */
.matter-detail-view{padding-bottom:10px}
.detail-topline{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px}
.detail-back{border:0;background:transparent;padding:0;color:var(--burgundy);cursor:pointer;font-size:11px;font-weight:850}
.detail-demo-label{font-size:9px;letter-spacing:.12em;color:var(--muted);font-weight:800}
.detail-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:34px;margin-bottom:26px}
.detail-identity{display:flex;align-items:center;gap:10px;margin-bottom:13px}
.detail-hero h1{margin:10px 0 14px;font-family:Georgia,"Times New Roman",serif;font-size:clamp(40px,4.2vw,66px);line-height:.98;letter-spacing:-.045em;font-weight:500}
.detail-hero h1 em{color:var(--burgundy);font-weight:500}
.detail-hero p{max-width:760px;margin:0;color:var(--muted);font-size:14px;line-height:1.7}
.detail-hero-actions{display:flex;gap:10px;flex:0 0 auto}
.detail-facts{display:grid;grid-template-columns:repeat(5,1fr);margin-bottom:18px;border:1px solid var(--line);border-radius:15px;background:var(--surface);overflow:hidden}
.detail-facts>div{min-height:78px;padding:16px 18px;border-right:1px solid #ebe6dc;display:grid;align-content:center;gap:5px}
.detail-facts>div:last-child{border-right:0}
.detail-facts span,.detail-label{font-size:9px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);font-weight:800}
.detail-facts strong{font-size:11px}
.detail-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.62fr);gap:18px;align-items:start}
.detail-main-column,.detail-side-column{display:grid;gap:18px}
.detail-section-count{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;font-family:Georgia,serif;font-size:13px;color:var(--muted)}
.detail-overview-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0}
.detail-overview-copy{min-height:155px;padding:22px;border-right:1px solid #eee9e0}
.detail-overview-copy:last-child{border-right:0}
.detail-overview-copy p{margin:10px 0 0;color:#5f5d58;font-size:12px;line-height:1.7}
.detail-event-list{padding:0 22px}
.detail-event{min-height:98px;padding:15px 0;display:grid;grid-template-columns:54px 1fr auto;align-items:center;gap:16px;border-bottom:1px solid #eee9e0}
.detail-event:last-child{border-bottom:0}
.detail-event.urgent{position:relative}
.detail-event.urgent:before{content:"";position:absolute;left:-22px;width:3px;height:46px;background:var(--burgundy);border-radius:0 2px 2px 0}
.detail-event-date{width:50px;height:58px;border:1px solid var(--line);border-radius:11px;display:grid;place-items:center;align-content:center;background:#faf7f1}
.detail-event-date strong{font-family:Georgia,serif;font-size:20px;line-height:1}
.detail-event-date span{margin-top:4px;font-size:8px;letter-spacing:.1em;color:var(--muted)}
.detail-event>div:nth-child(2){display:grid;gap:3px}
.detail-event>div:nth-child(2) small{font-size:8px;letter-spacing:.1em;color:var(--burgundy);font-weight:850}
.detail-event>div:nth-child(2) strong{font-size:12px}
.detail-event>div:nth-child(2) span{font-size:10px;color:var(--muted)}
.detail-event>i{padding:6px 9px;border-radius:999px;background:#eeeae2;color:#6a6760;font-style:normal;font-size:8px;font-weight:800}
.detail-event.urgent>i{background:var(--burgundy-soft);color:var(--burgundy)}
.detail-document-list{padding:0 18px 12px}
.detail-document{min-height:72px;padding:10px 4px;display:grid;grid-template-columns:48px minmax(0,1fr) auto auto;align-items:center;gap:12px;border-bottom:1px solid #eee9e0}
.detail-document:last-child{border-bottom:0}
.detail-file-icon{width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;background:#faf7f1;color:var(--burgundy);font-size:8px;font-weight:900}
.detail-document>div{display:grid;gap:4px}
.detail-document>div strong{font-size:11px}
.detail-document>div small{font-size:9px;color:var(--muted)}
.detail-doc-state{padding:5px 8px;border-radius:999px;font-size:8px;font-weight:850}
.detail-doc-state.review{background:var(--amber-soft);color:var(--amber)}
.detail-doc-state.ok{background:var(--green-soft);color:var(--green)}
.detail-doc-state.neutral{background:#ecebf1;color:#6d687a}
.detail-document button{border:0;background:transparent;color:var(--burgundy);font-size:9px;font-weight:850;cursor:pointer}
.detail-timeline{padding:7px 22px 18px}
.detail-timeline article{position:relative;display:grid;grid-template-columns:16px 1fr;gap:12px;padding:14px 0}
.detail-timeline article:not(:last-child):before{content:"";position:absolute;left:5px;top:28px;bottom:-12px;width:1px;background:var(--line)}
.detail-timeline-dot{width:11px;height:11px;margin-top:3px;border:2px solid var(--surface);border-radius:50%;background:var(--burgundy);box-shadow:0 0 0 1px var(--burgundy)}
.detail-timeline article>div{display:grid;gap:4px}
.detail-timeline small{font-size:8px;letter-spacing:.09em;color:var(--muted);font-weight:800}
.detail-timeline strong{font-size:11px}
.detail-timeline p{margin:0;color:var(--muted);font-size:10px;line-height:1.55}
.detail-party-list{padding:6px 18px}
.detail-party-list article{min-height:76px;padding:12px 2px;display:grid;grid-template-columns:42px 1fr;align-items:center;gap:11px;border-bottom:1px solid #eee9e0}
.detail-party-list article:last-child{border-bottom:0}
.detail-avatar{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:var(--ink);color:#fff;font-size:9px;font-weight:850}
.detail-avatar.counterparty{background:var(--burgundy)}
.detail-avatar.lawyer{background:#6b604e}
.detail-party-list article>div{display:grid;gap:3px}
.detail-party-list small{font-size:8px;letter-spacing:.1em;color:var(--burgundy);font-weight:850}
.detail-party-list strong{font-size:11px}
.detail-party-list article>div span{font-size:9px;color:var(--muted)}
.detail-full-button{width:calc(100% - 36px);min-height:39px;margin:4px 18px 18px;border:1px solid var(--line);border-radius:9px;background:#faf7f1;cursor:pointer;color:var(--burgundy);font-size:9px;font-weight:850}
.detail-activity-list{padding:6px 18px 12px}
.detail-activity-list label{display:grid;grid-template-columns:19px 1fr;gap:9px;padding:13px 2px;border-bottom:1px solid #eee9e0;cursor:pointer}
.detail-activity-list label:last-child{border-bottom:0}
.detail-activity-list input{margin-top:2px;accent-color:var(--burgundy)}
.detail-activity-list label>span{display:grid;gap:4px}
.detail-activity-list strong{font-size:10px}
.detail-activity-list small{font-size:9px;color:var(--muted)}
.detail-activity-list label:has(input:checked) strong{text-decoration:line-through;color:#999}
.detail-safety-note{padding:16px;border:1px solid #decaa8;border-radius:15px;background:#fbf6eb;display:grid;grid-template-columns:auto 1fr;gap:11px}
.detail-safety-note>span{height:max-content;padding:5px 7px;border-radius:7px;background:#eadbbd;color:#7f642f;font-size:8px;font-weight:900}
.detail-safety-note div{display:grid;gap:4px}
.detail-safety-note strong{font-size:10px}
.detail-safety-note p{margin:0;color:#776e5f;font-size:9px;line-height:1.5}

@media (max-width:1180px){
    .detail-facts{grid-template-columns:repeat(3,1fr)}
    .detail-facts>div:nth-child(3){border-right:0}
    .detail-facts>div:nth-child(-n+3){border-bottom:1px solid #ebe6dc}
    .detail-layout{grid-template-columns:minmax(0,1fr) 300px}
    .detail-overview-grid{grid-template-columns:1fr}
    .detail-overview-copy{min-height:0;border-right:0;border-bottom:1px solid #eee9e0}
    .detail-overview-copy:last-child{border-bottom:0}
}
@media (max-width:900px){
    .detail-hero{align-items:flex-start;flex-direction:column}
    .detail-layout{grid-template-columns:1fr}
    .detail-side-column{grid-template-columns:repeat(2,1fr)}
    .detail-safety-note{grid-column:1/-1}
}
@media (max-width:690px){
    .detail-topline{align-items:flex-start;flex-direction:column}
    .detail-hero-actions{width:100%;flex-wrap:wrap}
    .detail-hero-actions .primary-button,.detail-hero-actions .secondary-button{flex:1}
    .detail-facts{grid-template-columns:1fr 1fr}
    .detail-facts>div{border-right:1px solid #ebe6dc;border-bottom:1px solid #ebe6dc}
    .detail-facts>div:nth-child(even){border-right:0}
    .detail-facts>div:last-child{border-bottom:0}
    .detail-side-column{grid-template-columns:1fr}
    .detail-safety-note{grid-column:auto}
    .detail-document{grid-template-columns:42px minmax(0,1fr) auto}
    .detail-document button{grid-column:2/-1;justify-self:start}
}
@media (max-width:460px){
    .detail-facts{grid-template-columns:1fr}
    .detail-facts>div{border-right:0}
    .detail-event{grid-template-columns:48px 1fr}
    .detail-event>i{grid-column:2;justify-self:start}
    .detail-document{grid-template-columns:38px minmax(0,1fr)}
    .detail-doc-state{grid-column:2;justify-self:start}
    .detail-document button{grid-column:2}
}
/* Legal subjects foundation */
.subjects-page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:34px;margin-bottom:28px}
.subjects-page-heading h1{margin:12px 0 14px;font-family:Georgia,"Times New Roman",serif;font-size:clamp(42px,4.5vw,68px);line-height:.98;letter-spacing:-.045em;font-weight:500}
.subjects-page-heading h1 em{color:var(--burgundy);font-weight:500}
.subjects-page-heading p{max-width:720px;margin:0;color:var(--muted);font-size:14px;line-height:1.7}
.subject-metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}
.subject-metric-grid article{min-height:126px;padding:18px;border:1px solid var(--line);border-radius:15px;background:var(--surface);display:flex;flex-direction:column}
.subject-metric-grid article>span{font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.subject-metric-grid article>strong{margin-top:auto;font-family:Georgia,serif;font-size:34px;font-weight:500}
.subject-metric-grid article>small{margin-top:4px;color:var(--muted);font-size:9px}
.subjects-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}
.subjects-search{max-width:520px}
.subjects-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.65fr);gap:18px;align-items:start}
.subjects-panel{box-shadow:none}
.subjects-table-head{min-height:44px;padding:0 18px;display:grid;grid-template-columns:1.55fr .7fr .45fr .75fr;align-items:center;gap:12px;border-bottom:1px solid #ebe6dc;color:var(--muted);font-size:8px;letter-spacing:.08em;text-transform:uppercase}
.subject-list{padding:0 14px 12px}
.subject-row{width:100%;min-height:74px;padding:9px 5px;border:0;border-bottom:1px solid #eee9e0;background:transparent;display:grid;grid-template-columns:1.55fr .7fr .45fr .75fr;align-items:center;gap:12px;text-align:left;cursor:pointer}
.subject-row:hover{background:#faf7f1}
.subject-row.selected{background:#f7f1e8}
.subject-row.hidden{display:none}
.subject-row>span{font-size:10px}
.subject-primary{display:flex!important;align-items:center;gap:10px;min-width:0}
.subject-primary>span{display:grid;gap:3px;min-width:0}
.subject-primary strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.subject-primary small{font-size:9px;color:var(--muted)}
.subject-avatar{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;border-radius:50%;background:var(--ink);color:#fff;font-size:8px;font-style:normal;font-weight:850}
.subject-avatar.organization{border-radius:10px;background:var(--burgundy)}
.subject-avatar.other{background:#6b604e}
.subject-role{display:inline-flex;width:max-content;padding:5px 8px;border-radius:999px;font-size:8px;font-style:normal;font-weight:850}
.subject-role.client{background:var(--green-soft);color:var(--green)}
.subject-role.counterparty{background:var(--burgundy-soft);color:var(--burgundy)}
.subject-role.other{background:var(--amber-soft);color:var(--amber)}
.subjects-empty{padding:54px 20px;text-align:center;color:var(--muted);display:grid;gap:6px}
.subjects-empty.hidden{display:none}
.subjects-empty strong{color:var(--ink);font-family:Georgia,serif;font-size:20px}
.subject-context-panel{position:sticky;top:94px}
.subject-context-heading{padding:20px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #ebe6dc}
.subject-context-heading h2{margin:5px 0 0;font-family:Georgia,serif;font-size:26px;font-weight:600}
.subject-context-id{font-family:"SFMono-Regular",Consolas,monospace;font-size:9px;color:var(--burgundy)}
.subject-context-body{padding:18px}
.subject-context-role{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}
.subject-context-role>span{font-size:9px;color:var(--muted)}
.subject-context-facts{margin:0;display:grid;gap:0;border-top:1px solid #eee9e0}
.subject-context-facts div{padding:12px 0;display:grid;grid-template-columns:.8fr 1.2fr;gap:14px;border-bottom:1px solid #eee9e0}
.subject-context-facts dt{font-size:9px;color:var(--muted)}
.subject-context-facts dd{margin:0;font-size:9px;font-weight:750;text-align:right;overflow-wrap:anywhere}
.subject-linked-matter{margin-top:18px;padding:15px;border:1px solid var(--line);border-radius:12px;background:#faf7f1;display:grid;gap:5px}
.subject-linked-matter strong{margin-top:4px;font-family:"SFMono-Regular",Consolas,monospace;font-size:10px;color:var(--burgundy)}
.subject-linked-matter p{margin:0;font-size:11px;font-weight:750}
.subject-linked-matter button{justify-self:start;margin-top:7px;padding:0;border:0;background:transparent;color:var(--burgundy);cursor:pointer;font-size:9px;font-weight:850}
.subject-demo-note{margin-top:14px;padding:13px;border:1px solid #decaa8;border-radius:11px;background:#fbf6eb;display:grid;grid-template-columns:auto 1fr;gap:9px}
.subject-demo-note span{height:max-content;padding:4px 6px;border-radius:6px;background:#eadbbd;color:#7f642f;font-size:7px;font-weight:900}
.subject-demo-note p{margin:0;color:#776e5f;font-size:9px;line-height:1.5}

@media (max-width:1080px){
    .subject-metric-grid{grid-template-columns:repeat(2,1fr)}
    .subjects-layout{grid-template-columns:1fr}
    .subject-context-panel{position:static}
}
@media (max-width:760px){
    .subjects-page-heading{align-items:flex-start;flex-direction:column}
    .subjects-toolbar{align-items:stretch;flex-direction:column}
    .subjects-search{min-width:0;max-width:none}
    .subjects-table-head{display:none}
    .subject-list{padding:10px}
    .subject-row{grid-template-columns:1fr auto;gap:8px;padding:12px}
    .subject-row>span:nth-child(3),.subject-row>span:nth-child(4){font-size:9px;color:var(--muted)}
}
@media (max-width:520px){
    .subject-metric-grid{grid-template-columns:1fr 1fr}
    .subject-metric-grid article{min-height:108px}
    .subject-context-facts div{grid-template-columns:1fr;gap:4px}
    .subject-context-facts dd{text-align:left}
}
/* AGENDA FOUNDATION V1 */
.agenda-page-heading{
    display:flex;align-items:flex-end;justify-content:space-between;gap:34px;margin-bottom:28px
}
.agenda-page-heading h1{
    margin:12px 0 14px;font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(42px,4.5vw,72px);line-height:.98;letter-spacing:-.045em;font-weight:500;color:var(--ink)
}
.agenda-page-heading h1 em{color:var(--burgundy);font-weight:500}
.agenda-page-heading p{max-width:760px;margin:0;color:var(--muted);font-size:15px;line-height:1.7}
.agenda-metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
.agenda-metric-card{
    min-height:132px;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface);
    box-shadow:0 10px 35px rgba(41,43,49,.04);display:flex;flex-direction:column
}
.agenda-metric-card.urgent{border-top:3px solid var(--burgundy)}
.agenda-metric-card>span{font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}
.agenda-metric-card strong{margin-top:auto;font-family:Georgia,serif;font-size:38px;font-weight:500}
.agenda-metric-card small{margin-top:4px;color:var(--muted);font-size:9px}
.agenda-toolbar{margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.agenda-search{min-width:300px}
.agenda-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,.55fr);gap:18px;align-items:start}
.agenda-panel{box-shadow:none}
.agenda-result-count{font-size:9px;color:var(--muted)}
.agenda-result-count b{color:var(--ink)}
.agenda-list{padding:0 18px 12px}
.agenda-event{
    min-height:104px;padding:14px 8px;display:grid;
    grid-template-columns:72px minmax(0,1.5fr) minmax(118px,.55fr) auto;
    align-items:center;gap:14px;border-bottom:1px solid #eee9e0
}
.agenda-event:last-child{border-bottom:0}
.agenda-event.hidden{display:none}
.agenda-event.urgent{position:relative}
.agenda-event.urgent:before{
    content:"";position:absolute;left:-18px;width:3px;height:54px;background:var(--burgundy);border-radius:0 2px 2px 0
}
.agenda-date-block{display:grid;grid-template-columns:auto 1fr;column-gap:6px;align-items:baseline}
.agenda-date-block strong{font-family:Georgia,serif;font-size:29px;font-weight:500}
.agenda-date-block>span{font-size:8px;letter-spacing:.12em;color:var(--muted);font-weight:800}
.agenda-date-block small{grid-column:1/-1;margin-top:1px;font-size:10px;color:var(--burgundy);font-weight:800}
.agenda-event-copy{display:grid;gap:4px;min-width:0}
.agenda-event-copy>strong{font-size:12px}
.agenda-event-copy>span{font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agenda-type-pill{
    display:inline-flex;width:max-content;padding:4px 7px;border-radius:999px;
    font-size:7px;font-style:normal;font-weight:900;letter-spacing:.06em
}
.agenda-type-pill.deadline{background:var(--burgundy-soft);color:var(--burgundy)}
.agenda-type-pill.hearing{background:var(--green-soft);color:var(--green)}
.agenda-type-pill.activity{background:var(--amber-soft);color:var(--amber)}
.agenda-event-owner{display:grid;gap:3px}
.agenda-event-owner small{font-size:7px;letter-spacing:.08em;color:var(--muted)}
.agenda-event-owner strong{font-size:9px}
.agenda-priority{width:max-content;margin-top:3px;padding:4px 6px;border-radius:999px;background:#eeeae2;color:#6a6760;font-size:7px;font-weight:850}
.agenda-priority.high{background:var(--burgundy-soft);color:var(--burgundy)}
.agenda-priority.hearing{background:var(--green-soft);color:var(--green)}
.agenda-matter-link{border:0;background:transparent;color:var(--burgundy);font-size:8px;font-weight:850;cursor:pointer;white-space:nowrap}
.agenda-empty{padding:54px 20px;text-align:center;color:var(--muted);display:grid;gap:6px}
.agenda-empty.hidden{display:none}
.agenda-empty strong{color:var(--ink);font-family:Georgia,serif;font-size:20px}
.agenda-side-panel{position:sticky;top:94px;box-shadow:none}
.agenda-calendar-heading{padding:20px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid #ebe6dc}
.agenda-calendar-heading h2{margin:5px 0 0;font-family:Georgia,serif;font-size:23px;font-weight:600}
.agenda-calendar-demo{padding:5px 7px;border-radius:7px;background:#eadbbd;color:#7f642f;font-size:7px;font-weight:900}
.agenda-mini-calendar{padding:18px;display:grid;grid-template-columns:repeat(7,1fr);gap:7px;text-align:center}
.agenda-mini-calendar>span,.agenda-mini-calendar>strong{
    min-height:31px;display:grid;place-items:center;border-radius:8px;font-size:9px;font-weight:650
}
.agenda-mini-calendar .weekday{min-height:22px;color:var(--muted);font-size:7px;font-weight:850}
.agenda-mini-calendar .muted-day{color:#c4bfb5}
.agenda-mini-calendar .today{background:var(--ink);color:#fff}
.agenda-mini-calendar .has-event{position:relative;background:#f5eee4;color:var(--burgundy)}
.agenda-mini-calendar .has-event:after{
    content:"";position:absolute;bottom:4px;width:3px;height:3px;border-radius:50%;background:var(--burgundy)
}
.agenda-next-hearing{margin:0 18px;padding:15px;border:1px solid var(--line);border-radius:12px;background:#faf7f1;display:grid;gap:5px}
.agenda-next-hearing>strong{margin-top:3px;font-family:Georgia,serif;font-size:17px}
.agenda-next-hearing p{margin:0;font-size:10px;font-weight:750}
.agenda-next-hearing small{font-size:8px;color:var(--muted);line-height:1.4}
.agenda-legend{padding:16px 18px;display:flex;gap:12px;flex-wrap:wrap}
.agenda-legend span{display:flex;align-items:center;gap:5px;font-size:8px;color:var(--muted)}
.legend-dot{width:7px;height:7px;border-radius:50%}
.legend-dot.deadline{background:var(--burgundy)}
.legend-dot.hearing{background:var(--green)}
.legend-dot.activity{background:var(--amber)}
.agenda-demo-note{margin:0 18px 18px}
@media (max-width:1180px){
    .agenda-layout{grid-template-columns:1fr}
    .agenda-side-panel{position:static}
}
@media (max-width:900px){
    .agenda-metric-grid{grid-template-columns:repeat(2,1fr)}
    .agenda-event{grid-template-columns:64px 1fr auto}
    .agenda-event-owner{display:none}
}
@media (max-width:760px){
    .agenda-page-heading{align-items:flex-start;flex-direction:column}
    .agenda-toolbar{align-items:stretch;flex-direction:column}
    .agenda-search{min-width:0;max-width:none}
    .agenda-event{grid-template-columns:58px 1fr;padding:14px 4px}
    .agenda-matter-link{grid-column:2;justify-self:start;padding:0}
}
@media (max-width:520px){
    .agenda-metric-grid{grid-template-columns:1fr 1fr}
    .agenda-metric-card{min-height:108px}
    .agenda-event-copy>span{white-space:normal}
}
/* DOCUMENTI FOUNDATION V1 */
.documents-page-heading{
    display:flex;align-items:flex-end;justify-content:space-between;gap:34px;margin-bottom:28px
}
.documents-page-heading h1{
    margin:12px 0 14px;font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(42px,4.5vw,72px);line-height:.98;letter-spacing:-.045em;font-weight:500;color:var(--ink)
}
.documents-page-heading h1 em{color:var(--burgundy);font-weight:500}
.documents-page-heading p{max-width:760px;margin:0;color:var(--muted);font-size:15px;line-height:1.7}
.document-metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
.document-metric-card{
    min-height:132px;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface);
    box-shadow:0 10px 35px rgba(41,43,49,.04);display:flex;flex-direction:column
}
.document-metric-card.urgent{border-top:3px solid var(--burgundy)}
.document-metric-card>span{font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}
.document-metric-card strong{margin-top:auto;font-family:Georgia,serif;font-size:38px;font-weight:500}
.document-metric-card small{margin-top:4px;color:var(--muted);font-size:9px}
.documents-toolbar{margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.documents-search{min-width:320px}
.documents-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.55fr);gap:18px;align-items:start}
.documents-panel{box-shadow:none}
.documents-table-head{
    min-height:42px;padding:0 18px;display:grid;
    grid-template-columns:minmax(260px,1.5fr) minmax(170px,1fr) .65fr .45fr .7fr;
    align-items:center;gap:12px;border-bottom:1px solid #ebe6dc;
    color:var(--muted);font-size:8px;letter-spacing:.08em;text-transform:uppercase
}
.document-list{padding:0 12px 12px}
.document-row{
    width:100%;min-height:76px;padding:10px 6px;border:0;border-bottom:1px solid #eee9e0;background:transparent;
    display:grid;grid-template-columns:minmax(260px,1.5fr) minmax(170px,1fr) .65fr .45fr .7fr;
    align-items:center;gap:12px;text-align:left;cursor:pointer
}
.document-row:last-child{border-bottom:0}
.document-row:hover{background:#faf7f1}
.document-row.selected{background:#f8f3ea;box-shadow:inset 3px 0 0 var(--burgundy)}
.document-row.hidden{display:none}
.document-row>span{font-size:9px;min-width:0}
.document-row>span:nth-child(2){display:grid;gap:3px}
.document-row>span:nth-child(2) b{font-family:"SFMono-Regular",Consolas,monospace;font-size:8px;color:var(--burgundy)}
.document-row>span:nth-child(2) small{font-size:8px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.document-primary{display:flex!important;align-items:center;gap:10px;min-width:0}
.document-primary>span{display:grid;gap:3px;min-width:0}
.document-primary strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.document-primary small{font-size:8px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.document-file-icon{
    width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;border-radius:10px;
    background:var(--ink);color:#fff;font-size:7px;font-style:normal;font-weight:900;letter-spacing:.04em
}
.document-file-icon.doc{background:var(--burgundy)}
.document-file-icon.archive{background:#6b604e}
.document-state{
    display:inline-flex;width:max-content;padding:5px 8px;border-radius:999px;
    font-size:7px;font-style:normal;font-weight:850
}
.document-state.review{background:var(--amber-soft);color:var(--amber)}
.document-state.final{background:var(--green-soft);color:var(--green)}
.document-state.draft{background:#ecebf1;color:#6d687a}
.document-state.received{background:var(--burgundy-soft);color:var(--burgundy)}
.documents-empty{padding:54px 20px;text-align:center;color:var(--muted);display:grid;gap:6px}
.documents-empty.hidden{display:none}
.documents-empty strong{color:var(--ink);font-family:Georgia,serif;font-size:20px}
.document-context-panel{position:sticky;top:94px;box-shadow:none}
.document-context-heading{
    padding:20px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #ebe6dc
}
.document-context-heading h2{margin:5px 0 0;font-family:Georgia,serif;font-size:24px;font-weight:600;line-height:1.1}
.document-context-id{font-family:"SFMono-Regular",Consolas,monospace;font-size:9px;color:var(--burgundy)}
.document-context-body{padding:18px}
.document-context-file{display:flex;align-items:center;gap:11px;margin-bottom:14px}
.document-context-file>div{display:grid;gap:3px;min-width:0}
.document-context-file strong{font-size:9px;overflow-wrap:anywhere}
.document-context-file span{font-size:8px;color:var(--muted)}
.document-context-status{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}
.document-context-status>span{font-size:9px;color:var(--muted)}
.document-context-facts{margin:0;display:grid;gap:0;border-top:1px solid #eee9e0}
.document-context-facts div{padding:11px 0;display:grid;grid-template-columns:.8fr 1.2fr;gap:14px;border-bottom:1px solid #eee9e0}
.document-context-facts dt{font-size:8px;color:var(--muted)}
.document-context-facts dd{margin:0;font-size:8px;font-weight:750;text-align:right;overflow-wrap:anywhere}
.document-linked-matter{margin-top:16px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#faf7f1;display:grid;gap:5px}
.document-linked-matter strong{margin-top:3px;font-family:"SFMono-Regular",Consolas,monospace;font-size:9px;color:var(--burgundy)}
.document-linked-matter p{margin:0;font-size:10px;font-weight:750}
.document-linked-matter button{
    justify-self:start;margin-top:6px;padding:0;border:0;background:transparent;color:var(--burgundy);
    cursor:pointer;font-size:8px;font-weight:850
}
.document-context-actions{margin-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.document-context-actions .secondary-button{min-height:38px;padding:0 9px;font-size:9px}
.document-demo-note{margin:14px 0 0}
@media (max-width:1180px){
    .documents-layout{grid-template-columns:1fr}
    .document-context-panel{position:static}
}
@media (max-width:920px){
    .document-metric-grid{grid-template-columns:repeat(2,1fr)}
    .documents-toolbar{align-items:stretch;flex-direction:column}
    .documents-search{min-width:0;max-width:none}
    .documents-table-head{display:none}
    .document-list{padding:10px}
    .document-row{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px}
    .document-row>span:nth-child(2){grid-column:1}
    .document-row>span:nth-child(3),.document-row>span:nth-child(4){font-size:8px;color:var(--muted)}
    .document-row>span:nth-child(5){grid-column:2;grid-row:1}
}
@media (max-width:760px){
    .documents-page-heading{align-items:flex-start;flex-direction:column}
}
@media (max-width:520px){
    .document-metric-grid{grid-template-columns:1fr 1fr}
    .document-metric-card{min-height:108px}
    .document-context-facts div{grid-template-columns:1fr;gap:4px}
    .document-context-facts dd{text-align:left}
    .document-context-actions{grid-template-columns:1fr}
}
/* ATTIVITA FOUNDATION V1 */
.activities-page-heading{
    display:flex;align-items:flex-end;justify-content:space-between;gap:34px;margin-bottom:28px
}
.activities-page-heading h1{
    margin:12px 0 14px;font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(42px,4.5vw,72px);line-height:.98;letter-spacing:-.045em;font-weight:500;color:var(--ink)
}
.activities-page-heading h1 em{color:var(--burgundy);font-weight:500}
.activities-page-heading p{max-width:760px;margin:0;color:var(--muted);font-size:15px;line-height:1.7}
.activity-metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
.activity-metric-card{
    min-height:132px;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface);
    box-shadow:0 10px 35px rgba(41,43,49,.04);display:flex;flex-direction:column
}
.activity-metric-card.urgent{border-top:3px solid var(--burgundy)}
.activity-metric-card>span{font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}
.activity-metric-card strong{margin-top:auto;font-family:Georgia,serif;font-size:38px;font-weight:500}
.activity-metric-card small{margin-top:4px;color:var(--muted);font-size:9px}
.activities-toolbar{margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.activities-search{min-width:320px}
.activities-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.55fr);gap:18px;align-items:start}
.activities-panel{box-shadow:none}
.activities-table-head{
    min-height:42px;padding:0 18px;display:grid;
    grid-template-columns:minmax(250px,1.45fr) minmax(170px,1fr) .65fr .55fr .7fr;
    align-items:center;gap:12px;border-bottom:1px solid #ebe6dc;
    color:var(--muted);font-size:8px;letter-spacing:.08em;text-transform:uppercase
}
.activity-list{padding:0 12px 12px}
.activity-row{
    width:100%;min-height:76px;padding:10px 6px;border:0;border-bottom:1px solid #eee9e0;background:transparent;
    display:grid;grid-template-columns:minmax(250px,1.45fr) minmax(170px,1fr) .65fr .55fr .7fr;
    align-items:center;gap:12px;text-align:left;cursor:pointer
}
.activity-row:last-child{border-bottom:0}
.activity-row:hover{background:#faf7f1}
.activity-row.selected{background:#f8f3ea;box-shadow:inset 3px 0 0 var(--burgundy)}
.activity-row.hidden{display:none}
.activity-row>span{font-size:9px;min-width:0}
.activity-row>span:nth-child(2){display:grid;gap:3px}
.activity-row>span:nth-child(2) b{font-family:"SFMono-Regular",Consolas,monospace;font-size:8px;color:var(--burgundy)}
.activity-row>span:nth-child(2) small{font-size:8px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.activity-primary{display:flex!important;align-items:center;gap:10px;min-width:0}
.activity-primary>span{display:grid;gap:3px;min-width:0}
.activity-primary strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.activity-primary small{font-size:8px;color:var(--muted)}
.activity-type-icon{
    width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;border-radius:10px;
    background:var(--ink);color:#fff;font-size:7px;font-style:normal;font-weight:900;letter-spacing:.04em
}
.activity-type-icon.writing,.activity-type-icon.review{background:var(--burgundy)}
.activity-type-icon.followup,.activity-type-icon.communication,.activity-type-icon.contact{background:#6b604e}
.activity-type-icon.hearing{background:#564b63}
.activity-type-icon.check,.activity-type-icon.archive{background:#557064}
.activity-priority,.activity-state{
    display:inline-flex;width:max-content;padding:5px 8px;border-radius:999px;
    font-size:7px;font-style:normal;font-weight:850
}
.activity-priority.high{background:var(--burgundy-soft);color:var(--burgundy)}
.activity-priority.medium{background:var(--amber-soft);color:var(--amber)}
.activity-priority.low{background:#ecebf1;color:#6d687a}
.activity-state.todo{background:#ecebf1;color:#625f6a}
.activity-state.progress{background:var(--amber-soft);color:var(--amber)}
.activity-state.done{background:var(--green-soft);color:var(--green)}
.activity-due.urgent{color:var(--burgundy)}
.activities-empty{padding:54px 20px;text-align:center;color:var(--muted);display:grid;gap:6px}
.activities-empty.hidden{display:none}
.activities-empty strong{color:var(--ink);font-family:Georgia,serif;font-size:20px}
.activity-context-panel{position:sticky;top:94px;box-shadow:none}
.activity-context-heading{
    padding:20px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #ebe6dc
}
.activity-context-heading h2{margin:5px 0 0;font-family:Georgia,serif;font-size:24px;font-weight:600;line-height:1.1}
.activity-context-id{font-family:"SFMono-Regular",Consolas,monospace;font-size:9px;color:var(--burgundy)}
.activity-context-body{padding:18px}
.activity-context-status{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}
.activity-context-facts{margin:0;display:grid;gap:0;border-top:1px solid #eee9e0}
.activity-context-facts div{padding:11px 0;display:grid;grid-template-columns:.8fr 1.2fr;gap:14px;border-bottom:1px solid #eee9e0}
.activity-context-facts dt{font-size:8px;color:var(--muted)}
.activity-context-facts dd{margin:0;font-size:8px;font-weight:750;text-align:right;overflow-wrap:anywhere}
.activity-context-note{margin-top:16px;padding:14px;border:1px solid #eee9e0;border-radius:12px;background:#fff}
.activity-context-note p{margin:7px 0 0;font-size:9px;line-height:1.55;color:var(--muted)}
.activity-linked-matter{margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#faf7f1;display:grid;gap:5px}
.activity-linked-matter strong{margin-top:3px;font-family:"SFMono-Regular",Consolas,monospace;font-size:9px;color:var(--burgundy)}
.activity-linked-matter p{margin:0;font-size:10px;font-weight:750}
.activity-linked-matter button{
    justify-self:start;margin-top:6px;padding:0;border:0;background:transparent;color:var(--burgundy);
    cursor:pointer;font-size:8px;font-weight:850
}
.activity-context-actions{margin-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.activity-context-actions .secondary-button{min-height:38px;padding:0 9px;font-size:9px}
.activity-demo-note{margin:14px 0 0}
@media (max-width:1180px){
    .activities-layout{grid-template-columns:1fr}
    .activity-context-panel{position:static}
}
@media (max-width:920px){
    .activity-metric-grid{grid-template-columns:repeat(2,1fr)}
    .activities-toolbar{align-items:stretch;flex-direction:column}
    .activities-search{min-width:0;max-width:none}
    .activities-table-head{display:none}
    .activity-list{padding:10px}
    .activity-row{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px}
    .activity-row>span:nth-child(2){grid-column:1}
    .activity-row>span:nth-child(3),.activity-row>span:nth-child(4){font-size:8px;color:var(--muted)}
    .activity-row>span:nth-child(5){grid-column:2;grid-row:1}
}
@media (max-width:760px){
    .activities-page-heading{align-items:flex-start;flex-direction:column}
}
@media (max-width:520px){
    .activity-metric-grid{grid-template-columns:1fr 1fr}
    .activity-metric-card{min-height:108px}
    .activity-context-facts div{grid-template-columns:1fr;gap:4px}
    .activity-context-facts dd{text-align:left}
    .activity-context-actions{grid-template-columns:1fr}
}
/* AI ASSISTIVA FOUNDATION V1 */
.ai-page-heading{
    display:flex;align-items:flex-end;justify-content:space-between;gap:34px;margin-bottom:20px
}
.ai-page-heading h1{
    margin:12px 0 14px;font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(42px,4.5vw,72px);line-height:.98;letter-spacing:-.045em;font-weight:500;color:var(--ink)
}
.ai-page-heading h1 em{color:var(--burgundy);font-weight:500}
.ai-page-heading p{max-width:780px;margin:0;color:var(--muted);font-size:15px;line-height:1.7}
.ai-safety-strip{
    margin-bottom:18px;padding:14px 16px;border:1px solid #d8e3dd;border-radius:14px;background:#f4f8f5;
    display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px
}
.ai-safety-icon{
    width:38px;height:38px;border-radius:10px;background:#456658;color:#fff;display:grid;place-items:center;
    font-size:9px;font-weight:900;letter-spacing:.08em
}
.ai-safety-strip strong{font-size:10px}
.ai-safety-strip p{margin:3px 0 0;font-size:9px;line-height:1.5;color:var(--muted)}
.ai-safety-state{
    padding:6px 9px;border-radius:999px;background:var(--green-soft);color:var(--green);font-size:8px;font-weight:850;white-space:nowrap
}
.ai-metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
.ai-metric-card{
    min-height:132px;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface);
    box-shadow:0 10px 35px rgba(41,43,49,.04);display:flex;flex-direction:column
}
.ai-metric-card.urgent{border-top:3px solid var(--burgundy)}
.ai-metric-card.safe{border-top:3px solid #557064}
.ai-metric-card>span{font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}
.ai-metric-card strong{margin-top:auto;font-family:Georgia,serif;font-size:38px;font-weight:500}
.ai-metric-card small{margin-top:4px;color:var(--muted);font-size:9px}
.ai-toolbar{margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.ai-search{min-width:330px}
.ai-layout{display:grid;grid-template-columns:minmax(0,1.42fr) minmax(330px,.68fr);gap:18px;align-items:start}
.ai-scenarios-panel{box-shadow:none}
.ai-scenarios-head{
    min-height:42px;padding:0 18px;display:grid;
    grid-template-columns:minmax(280px,1.6fr) minmax(170px,1fr) .55fr .7fr;
    align-items:center;gap:12px;border-bottom:1px solid #ebe6dc;
    color:var(--muted);font-size:8px;letter-spacing:.08em;text-transform:uppercase
}
.ai-scenario-list{padding:0 12px 12px}
.ai-scenario-row{
    width:100%;min-height:78px;padding:10px 6px;border:0;border-bottom:1px solid #eee9e0;background:transparent;
    display:grid;grid-template-columns:minmax(280px,1.6fr) minmax(170px,1fr) .55fr .7fr;
    align-items:center;gap:12px;text-align:left;cursor:pointer
}
.ai-scenario-row:last-child{border-bottom:0}
.ai-scenario-row:hover{background:#faf7f1}
.ai-scenario-row.selected{background:#f8f3ea;box-shadow:inset 3px 0 0 var(--burgundy)}
.ai-scenario-row.hidden{display:none}
.ai-scenario-row>span{font-size:9px;min-width:0}
.ai-scenario-row>span:nth-child(2){display:grid;gap:3px}
.ai-scenario-row>span:nth-child(2) b{font-family:"SFMono-Regular",Consolas,monospace;font-size:8px;color:var(--burgundy)}
.ai-scenario-row>span:nth-child(2) small{font-size:8px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-scenario-primary{display:flex!important;align-items:center;gap:10px;min-width:0}
.ai-scenario-primary>span{display:grid;gap:3px;min-width:0}
.ai-scenario-primary strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-scenario-primary small{font-size:8px;color:var(--muted)}
.ai-type-icon{
    width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;border-radius:10px;
    background:var(--ink);color:#fff;font-size:7px;font-style:normal;font-weight:900;letter-spacing:.04em
}
.ai-type-icon.drafting{background:var(--burgundy)}
.ai-type-icon.check{background:#557064}
.ai-type-badge,.ai-review-badge{
    display:inline-flex;width:max-content;padding:5px 8px;border-radius:999px;
    font-size:7px;font-style:normal;font-weight:850
}
.ai-type-badge.summary{background:#ecebf1;color:#625f6a}
.ai-type-badge.drafting{background:var(--burgundy-soft);color:var(--burgundy)}
.ai-type-badge.check{background:var(--green-soft);color:var(--green)}
.ai-review-badge.required{background:var(--burgundy-soft);color:var(--burgundy)}
.ai-review-badge.draft{background:var(--amber-soft);color:var(--amber)}
.ai-review-badge.sources{background:#ecebf1;color:#625f6a}
.ai-empty{padding:54px 20px;text-align:center;color:var(--muted);display:grid;gap:6px}
.ai-empty.hidden{display:none}
.ai-empty strong{color:var(--ink);font-family:Georgia,serif;font-size:20px}
.ai-context-panel{position:sticky;top:94px;box-shadow:none}
.ai-context-heading{
    padding:20px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #ebe6dc
}
.ai-context-heading h2{margin:5px 0 0;font-family:Georgia,serif;font-size:24px;font-weight:600;line-height:1.1}
.ai-context-id{font-family:"SFMono-Regular",Consolas,monospace;font-size:9px;color:var(--burgundy)}
.ai-context-body{padding:18px}
.ai-review-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.ai-request-box{padding:13px;border:1px solid #eee9e0;border-radius:12px;background:#fff}
.ai-request-box p{margin:7px 0 0;font-size:9px;line-height:1.55;color:var(--muted)}
.ai-output-box{margin-top:12px;padding:14px;border:1px solid #e3d8cd;border-radius:12px;background:#fbf7f1}
.ai-output-label{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ai-output-label span{font-size:8px;font-weight:850;letter-spacing:.06em;color:var(--ink)}
.ai-output-label b{
    padding:4px 7px;border-radius:999px;background:var(--burgundy-soft);color:var(--burgundy);font-size:6px;letter-spacing:.05em
}
.ai-output-box p{margin:10px 0 0;font-size:9px;line-height:1.65;color:#4f4a43}
.ai-context-facts{margin:14px 0 0;display:grid;gap:0;border-top:1px solid #eee9e0}
.ai-context-facts div{padding:10px 0;display:grid;grid-template-columns:.72fr 1.28fr;gap:14px;border-bottom:1px solid #eee9e0}
.ai-context-facts dt{font-size:8px;color:var(--muted)}
.ai-context-facts dd{margin:0;font-size:8px;font-weight:750;text-align:right;overflow-wrap:anywhere}
.ai-provenance-box{margin-top:14px}
.ai-source-list{margin-top:8px;display:flex;flex-wrap:wrap;gap:6px}
.ai-source-list span{
    padding:6px 8px;border:1px solid #ddd7cd;border-radius:999px;background:#fff;font-size:7px;color:#625f6a
}
.ai-linked-matter{margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#faf7f1;display:grid;gap:5px}
.ai-linked-matter strong{margin-top:3px;font-family:"SFMono-Regular",Consolas,monospace;font-size:9px;color:var(--burgundy)}
.ai-linked-matter p{margin:0;font-size:10px;font-weight:750}
.ai-linked-matter button{
    justify-self:start;margin-top:6px;padding:0;border:0;background:transparent;color:var(--burgundy);
    cursor:pointer;font-size:8px;font-weight:850
}
.ai-human-review{margin-top:14px;padding:14px;border:1px solid #d8e3dd;border-radius:12px;background:#f4f8f5;display:grid;gap:10px}
.ai-human-review label{display:flex;align-items:flex-start;gap:8px;font-size:8px;line-height:1.45;color:#494f4b;cursor:pointer}
.ai-human-review input{margin-top:1px}
.ai-human-review .primary-button{width:100%;min-height:38px}
.ai-human-review .primary-button:disabled{opacity:.45;cursor:not-allowed}
.ai-human-review small{font-size:7px;line-height:1.4;color:var(--muted)}
.ai-human-review.confirmed{border-color:#9eb8aa;background:#edf6f0}
.ai-human-review.confirmed small{color:var(--green);font-weight:800}
.ai-context-actions{margin-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ai-context-actions .secondary-button{min-height:38px;padding:0 9px;font-size:9px}
.ai-demo-note{margin:14px 0 0}
@media (max-width:1220px){
    .ai-layout{grid-template-columns:1fr}
    .ai-context-panel{position:static}
}
@media (max-width:920px){
    .ai-metric-grid{grid-template-columns:repeat(2,1fr)}
    .ai-toolbar{align-items:stretch;flex-direction:column}
    .ai-search{min-width:0;max-width:none}
    .ai-scenarios-head{display:none}
    .ai-scenario-list{padding:10px}
    .ai-scenario-row{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px}
    .ai-scenario-row>span:nth-child(2){grid-column:1}
    .ai-scenario-row>span:nth-child(3){grid-column:1}
    .ai-scenario-row>span:nth-child(4){grid-column:2;grid-row:1}
}
@media (max-width:760px){
    .ai-page-heading{align-items:flex-start;flex-direction:column}
    .ai-safety-strip{grid-template-columns:auto 1fr}
    .ai-safety-state{grid-column:2;justify-self:start}
}
@media (max-width:520px){
    .ai-metric-grid{grid-template-columns:1fr 1fr}
    .ai-metric-card{min-height:108px}
    .ai-context-facts div{grid-template-columns:1fr;gap:4px}
    .ai-context-facts dd{text-align:left}
    .ai-context-actions{grid-template-columns:1fr}
}
/* SIDEBAR BRAND AND ICON POLISH V2 */
.brand-mark.brand-mark-logo{
    background:transparent;
    border-color:transparent;
    box-shadow:none;
    overflow:visible;
}
.brand-mark.brand-mark-logo img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
}
.nav-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:22px;
    height:22px;
    font-size:0;
    line-height:1;
}
.sidebar-icon-svg{
    display:block;
    width:18px;
    height:18px;
}
.nav-ai.active{
    border-radius:10px;
    overflow:hidden;
}
