:root {
    --ink: #182c37;
    --muted: #506675;
    --accent: #056875;
    --accent-hover: #07525d;
    --canvas: #f5f7f8;
    --line: #dce5e9;
    --white: #fff;
    --night: #132935;
    --radius: 17px;
    --shadow: 0 2px 4px #152a3510;
    font: 16px/1.5 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--accent-hover); text-decoration-thickness: .08em; text-underline-offset: .17em; }
a:hover { color: var(--accent); }
a, button, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #168a9e; outline-offset: 3px; }
h1,h2,h3,p,dl,dd,blockquote { margin: 0; }
h1 { font-size: clamp(1.85rem, 4.2vw, 3rem); line-height: 1.1; letter-spacing: -.048em; overflow-wrap: anywhere; }
h2 { font-size: 1.12rem; letter-spacing: -.028em; line-height: 1.3; }
h3 { font-size: .98rem; }
small, time { color: var(--muted); }
.sr-only,.skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 1rem; left: 1rem; z-index: 10; background: white; padding: .5rem 1rem; border-radius: .5rem; }
.workspace { display: grid; grid-template-columns: 234px minmax(0,1fr); }
.sidebar { background: #142b36; color: #eaf7f9; position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 19px; padding: 26px 15px 18px; overflow-y: auto; }
.brand { display: inline-flex; align-items: center; align-self: flex-start; gap: 10px; color: #fff; margin: 0 7px; font-weight: 760; letter-spacing: -.045em; font-size: 1.34rem; text-decoration: none; white-space: nowrap; }
.brand:hover { color: white; }
.brand-mark { display: grid; place-content: center; width: 35px; height: 35px; background: #58d6c4; color: #0c333b; border-radius: 10px 10px 10px 3px; font-weight: 880; }
.brand small { font-size: .53rem; letter-spacing: .065em; color: #9fe2d8; margin-left: .2rem; vertical-align: .35rem; }
.organization { display: flex; align-items: center; gap: 10px; border: 1px solid #ffffff25; border-radius: 12px; padding: 10px; margin-top: 12px; min-width: 0; }
form.organization { display: grid; gap: .35rem; }
.organization label { color: #bfd4dc; font-size: .72rem; }
.organization select { background: #203d4a; border-color: #ffffff36; color: white; min-height: 41px; font-size: .82rem; }
.organization strong,.profile strong { display: block; font-size: .83rem; overflow-wrap: anywhere; }
.organization small,.profile small { display: block; font-size: .72rem; color: #b2c8d3; }
.org-mark,.avatar { display: grid; place-content: center; flex: 0 0 33px; width: 33px; height: 33px; background: #27505a; color: #aef2e1; border-radius: 9px; font-weight: 750; }
.sidebar nav { display: grid; gap: 3px; }
.nav-heading { margin: 11px 9px 4px; font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; color: #a9c0cd; font-weight: 720; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 43px; color: #d3e1e7; text-decoration: none; padding: 7px 10px; font-size: .87rem; border-radius: 9px; }
.nav-link span { font-size: 1.1rem; width: 20px; text-align: center; color: #a2ccd6; }
.nav-link:hover,.nav-link.selected { color: #edffff; background: #25505a; }
.nav-link.selected span { color: #82ead6; }
.profile { margin-top: auto; border-top: 1px solid #ffffff27; padding-top: 12px; }
.profile summary { display: flex; align-items: center; gap: 9px; list-style: none; padding: 5px; cursor: pointer; }
.profile summary span:nth-child(2) { flex: 1; }
.profile-actions { padding: .4rem .5rem; font-size: .8rem; display: grid; gap: .35rem; }
.profile-actions a,.profile-actions button { color: #d3e1e7; }
.profile-actions button { background: none; border: 0; padding: .3rem 0; font: inherit; text-decoration: underline; cursor: pointer; }
.canvas { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; min-height: 67px; border-bottom: 1px solid var(--line); background: white; padding: 9px clamp(16px,3vw,44px); }
.crumb { font-weight: 640; font-size: .86rem; }
.global-search { margin-left: auto; display: flex; gap: 7px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; color: var(--muted); background: #f7f9fa; width: min(260px,46%); }
.global-search input { border: 0; padding: 0; min-height: 40px; background: transparent; font-size: .83rem; }
.global-search kbd { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: .76rem; }
.topbar .menu-button { display: none; }
.content { max-width: 1500px; margin: auto; padding: clamp(19px,3vw,44px); }
.hero { background: radial-gradient(ellipse at 100% 0%,#2a787d85,transparent 68%),linear-gradient(115deg,#133643,#124c56); color: #fff; padding: clamp(22px,3.4vw,42px); border-radius: var(--radius); display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; }
.hero h1 { margin: 8px 0; }
.hero p { color: #daebef; }
.eyebrow { text-transform: uppercase; font-size: .72rem; color: var(--accent-hover); font-weight: 740; letter-spacing: .095em; overflow-wrap: anywhere; }
.hero .eyebrow { color: #b5e7e2; }
.button { min-height: 44px; min-width: 42px; background: white; border: 1px solid #bfcfd7; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--ink); font-family: inherit; font-size: .85rem; font-weight: 650; padding: 9px 14px; text-decoration: none; cursor: pointer; text-align: center; }
.button:hover { border-color: #84a4ad; background: #f2f8f8; }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-hover); }
.button.hero-button { background: #bdf7ea; border-color: #bdf7ea; color: #10393e; }
.button.hero-button:hover { background: #d8fcf3; }
.button.plain { background: transparent; border-color: transparent; }
.card { border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); border-radius: var(--radius); min-width: 0; }
.card-pad { padding: clamp(16px,2.4vw,26px); }
.metrics { margin: 20px 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,185px),1fr)); gap: 13px; }
.metric { display: grid; gap: .3rem; min-width: 0; color: var(--ink); padding: 16px; text-decoration: none; align-content: start; }
.metric:hover { color: var(--ink); border-color: #91b8c1; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); margin-bottom: .48rem; }
.metric h2 { font-size: .81rem; color: var(--muted); letter-spacing: 0; }
.metric strong { font-size: clamp(1.2rem,2.7vw,2rem); letter-spacing: -.045em; line-height: 1.15; overflow-wrap: anywhere; }
.metric small { font-size: .73rem; }
.symbol { display: inline-grid; place-content: center; width: 36px; height: 36px; font-size: 1.13rem; border-radius: 10px; flex-shrink: 0; }
.blue { background: #dff1f6; color: #155b72; }
.amber { background: #fff0d8; color: #774311; }
.purple { background: #eee8fb; color: #624294; }
.green { background: #d9f4e9; color: #1b674f; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 15px; }
.dashboard-grid:has(> section:only-child) { grid-template-columns: 1fr; }
.card-heading,.section-heading,.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.card-heading { padding: 17px 17px 14px; border-bottom: 1px solid var(--line); }
.card-heading a { font-size: .78rem; font-weight: 680; white-space: nowrap; min-height: 44px; display: inline-flex; gap: 5px; align-items: center; }
.card-heading p,.section-heading p,.page-heading p,.card-pad p,.auth-form p { color: var(--muted); margin-top: .35rem; }
.card-heading p { font-size: .8rem; }
.page-heading { margin-bottom: 19px; min-height: 64px; }
.page-heading .eyebrow { margin-bottom: 7px; }
.case-row,.line,.event { display: flex; align-items: center; gap: 10px; min-height: 55px; padding: 10px 0; min-width: 0; overflow-wrap: anywhere; }
.case-row { padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; min-height: 70px; }
.case-row:last-child { border-bottom: 0; }
.case-row:hover,.event:hover,a.line:hover { background: #f4f9fa; }
.case-name { flex: 1 1 0; min-width: 0; }
.case-name strong,.event strong,.line strong { display: block; font-size: .9rem; line-height: 1.34; }
.case-name small,.line small,.event small { display: block; font-size: .76rem; margin-top: 3px; }
.row-arrow { color: #567583; font-size: 1.4rem; }
.badge { display: inline-flex; align-items: center; align-self: center; width: fit-content; border-radius: 100px; background: #e9eff2; color: #374f5d; padding: 4px 8px; font-size: .69rem; font-weight: 710; line-height: 1.35; }
.badge.active { background: #e1f2f7; color: #175567; }
.badge.waiting { background: #fff0d6; color: #704410; }
.badge.review { background: #eee7fb; color: #60428a; }
.badge.completed { background: #dff5e9; color: #195d48; }
.event { margin: 0 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.event:last-child { border-bottom: 0; }
.date-tile { min-width: 47px; border-radius: 8px; padding: 5px; background: #edf4f7; text-align: center; font-size: .69rem; text-transform: uppercase; }
.date-tile b { display: block; line-height: 1.15; font-size: 1.14rem; color: var(--ink); }
.empty { min-height: 165px; display: grid; place-items: center; align-content: center; gap: .42rem; padding: 19px; text-align: center; }
.empty span { color: var(--accent); font-size: 1.55rem; }
.empty p,.empty-inline { color: var(--muted); font-size: .87rem; }
.empty-inline { padding: 12px 0; }
.stack { display: grid; gap: 15px; min-width: 0; align-content: start; }
.form-grid,.facts,.editor-grid,.integration-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.editor-grid { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
.integration-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,235px),1fr)); }
label { font-size: .84rem; font-weight: 660; display: grid; gap: 5px; min-width: 0; }
input,select,textarea { min-width: 0; width: 100%; min-height: 44px; border: 1px solid #bacbd4; background: white; border-radius: 8px; padding: 8px 10px; font-family: inherit; font-size: 1rem; color: var(--ink); }
input[readonly] { background: #f3f6f8; }
input[type=checkbox] { min-height: auto; min-width: auto; width: 18px; height: 18px; flex: 0 0 18px; margin: 3px 0; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 9px; min-height: 40px; }
textarea { resize: vertical; line-height: 1.65; }
textarea.editor { min-height: 330px; }
.actions,.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters { align-items: end; }
.filters label { flex: 1 1 160px; }
.card > .filters:first-child { padding: 16px; }
.card-pad > .filters:first-child { padding: 0; }
.tabs { display: flex; align-items: stretch; overflow-x: auto; margin: 0 0 17px; border-bottom: 1px solid #c9d9e0; gap: 3px; padding: 3px; }
.tabs a { white-space: nowrap; display: flex; align-items: center; min-height: 44px; border-radius: 7px; padding: 5px 12px; text-decoration: none; font-size: .86rem; color: var(--muted); }
.tabs a:hover,.tabs a[aria-current] { background: #d9edf0; color: #15515b; font-weight: 680; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 3px; font-size: .83rem; }
.form-box { background: #f6f9fa; border: 1px solid var(--line); padding: 13px; border-radius: 11px; }
summary { cursor: pointer; font-weight: 680; padding: 5px 0; }
details[open] > form { margin-top: 12px; }
.line { justify-content: space-between; color: var(--ink); text-decoration: none; }
.rows > * + * { border-top: 1px solid var(--line); }
.item { padding: 12px 0; }
.item .line { padding: 0; min-height: 28px; }
.facts { grid-template-columns: repeat(auto-fit,minmax(min(100%,165px),1fr)); }
.facts div { border-radius: 9px; padding: 10px 12px; background: #f2f7f8; }
.facts dt { color: var(--muted); font-size: .75rem; }
.facts dd { font-size: .92rem; font-weight: 680; overflow-wrap: anywhere; }
.preserve,.finding blockquote { white-space: pre-wrap; overflow-wrap: anywhere; }
.finding { padding: 12px 14px; border-left: 4px solid #7cbbc2; background: #f5f9fa; border-radius: 4px 9px 9px 4px; }
.finding a { display: inline-flex; align-items: center; min-height: 44px; font-size: .82rem; overflow-wrap: anywhere; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 8px; color: var(--muted); font-size: .78rem; }
.notice { display: block; border: 1px solid #c2dce2; border-radius: 10px; padding: 12px 14px; margin-bottom: 13px; background: #eaf6f8; color: #1e5260; font-size: .87rem; overflow-wrap: anywhere; }
.notice input { margin-top: 6px; }
.notice ul { margin: 4px 0 0; padding-left: 18px; }
.notice.success { background: #def4e9; border-color: #b6dfcb; color: #195a46; }
.notice.error { background: #fff1ed; border-color: #efc4b7; color: #782e20; }
.monospace { font-family: ui-monospace,monospace; }
.standalone-main { display: grid; min-height: 100vh; padding: clamp(14px,3vw,35px); align-content: center; }
.standalone-main > .notice { width: min(100%,1050px); margin-left: auto; margin-right: auto; }
.auth-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); width: min(100%,1050px); margin: auto; border: 1px solid var(--line); border-radius: 23px; overflow: hidden; box-shadow: 0 14px 70px #163b4c17; }
.auth-brand { min-height: 535px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: clamp(22px,5vw,51px); color: white; background: radial-gradient(ellipse at 110% 10%,#2a828b99,transparent 70%),linear-gradient(130deg,#122c39,#174e57); }
.auth-brand .brand { margin: 0; }
.auth-brand h2 { font-size: clamp(2rem,4.6vw,3.5rem); line-height: 1.04; letter-spacing: -.055em; }
.auth-brand p { margin-top: 14px; color: #d3e8eb; max-width: 30ch; }
.auth-signature { font-size: .7rem; letter-spacing: .16em; font-weight: 750; color: #c2dfdf; }
.auth-panel { display: grid; place-content: center; padding: clamp(22px,5vw,51px); background: #fff; }
.auth-form { display: grid; gap: 15px; min-width: 0; }
.auth-form h1 { font-size: clamp(1.65rem,4.2vw,2.6rem); }
.auth-form p { margin-top: 0; }
.auth-form a { font-size: .86rem; }
.admin-page { width: min(100%, 950px); margin: auto; }
@media (max-width:1120px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width:800px) {
    .workspace { display: block; }
    .topbar .menu-button { display: inline-flex; }
    .sidebar { display: none; }
    .sidebar.menu-open { display: flex; position: fixed; z-index: 5; inset: 62px auto 0 0; width: min(84vw,290px); height: auto; box-shadow: 0 15px 35px #142b3660; }
    .topbar { min-height: 62px; gap: 5px; }
    .profile { margin-top: 10px; }
    .global-search { width: min(50%,210px); }
    .global-search kbd { display: none; }
    .content { padding: 16px; }
    .editor-grid { grid-template-columns: 1fr; }
}
@media (max-width:560px) {
    .auth-grid,.form-grid { grid-template-columns: 1fr; }
    .auth-brand { min-height: 0; gap: .7rem; padding: 18px; }
    .auth-brand h2,.auth-brand p,.auth-signature { display: none; }
    .auth-panel { place-content: stretch; }
    .hero,.page-heading { align-items: flex-start; flex-direction: column; }
    .hero { gap: 14px; }
    .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 12px 0; }
    .metric { padding: 11px; }
    .metric h2 { line-height: 1.2; }
    .case-row { padding: 9px 11px; gap: 6px; }
    .case-name small { font-size: .71rem; }
    .row-arrow { display: none; }
    .case-row .symbol { width: 28px; height: 31px; }
    .profile-actions a { display: inline-flex; min-height: 44px; align-items: center; }
    .crumb { font-size: .73rem; }
}
@media (max-width:350px) {
    .case-row .symbol { display: none; }
    .global-search { width: 42%; }
}
