:root {
  color-scheme: light;
  --ink: #172d40;
  --muted: #52677a;
  --quiet: #668095;
  --line: #dce5ed;
  --soft-line: #e7eef3;
  --paper: #fff;
  --bg: #f4f7fa;
  --sidebar: #10263a;
  --teal: #087a70;
  --teal-dark: #09645d;
  --mint: #b9f2e9;
  --shadow: 0 2px 5px #152f4810;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  font-synthesis: none;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--teal-dark); }
:focus-visible { outline: 2px solid #008779; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.025em; line-height: 1.2; }
h1 { margin-bottom: 9px; font-size: clamp(1.85rem, 3.6vw, 2.6rem); font-weight: 735; }
h2 { margin-bottom: 6px; font-size: 1.28rem; font-weight: 720; }
h3 { margin-bottom: 6px; font-size: 1.03rem; font-weight: 700; }
p { margin-bottom: .85rem; }
p:last-child, ul:last-child { margin-bottom: 0; }
svg { vertical-align: middle; flex: 0 0 auto; }
.skip-link { position: fixed; z-index: 5; left: 12px; top: 12px; padding: 9px 14px; background: white; border-radius: 6px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.sidebar { position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 228px; padding: 23px 15px 20px; background: var(--sidebar); color: white; }
.brand { display: flex; align-items: center; gap: 11px; padding: 1px 7px; color: #f6fbff; text-decoration: none; font-size: 1.35rem; font-weight: 750; line-height: 1.1; letter-spacing: -.05em; }
.brand-lab { color: #a1ecde; margin-left: 3px; }
.brand small { display: block; margin-top: 5px; font-size: .56rem; font-weight: 650; letter-spacing: .115em; color: #b8cbdc; white-space: nowrap; }
.side-label { margin: 37px 11px 10px; color: #a7bfd2; font-size: .66rem; font-weight: 750; letter-spacing: .13em; }
.navigation { display: grid; gap: 5px; }
.nav-link { min-height: 44px; display: flex; align-items: center; gap: 11px; padding: 9px 10px; color: #c5d6e3; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-size: .88rem; font-weight: 580; white-space: nowrap; }
.nav-mobile { display: none; }
.nav-link:hover { background: #203a4e; color: white; }
.nav-link[aria-current="page"] { color: #d9fff9; background: #203e50; border-color: #345668; }
.nav-link[aria-current="page"] svg { color: #9ceadd; }
.side-footer { margin-top: auto; padding: 15px 10px 0; border-top: 1px solid #294458; color: #a7bfd2; font-size: .76rem; }
.side-footer p { margin: 4px 0 0 15px; }
.side-status { display: flex; align-items: center; gap: 8px; color: #e4eef5; font-weight: 650; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2aab98; flex: 0 0 auto; }
.side-status .status-dot { background: #80dfce; }
.sidebar :focus-visible { outline-color: #93eddd; }

.shell { margin-left: 228px; min-height: 100vh; }
.topbar { height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 32px; background: #fff; border-bottom: 1px solid var(--line); }
.breadcrumb, .top-actions { display: flex; align-items: center; gap: 12px; }
.breadcrumb { color: var(--muted); font-size: .88rem; }
.breadcrumb strong { color: var(--ink); }
.top-actions { justify-content: flex-end; }
.workspace-mode { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 20px; color: #215d55; background: #eaf6f2; border: 1px solid #d8ece5; font-size: .72rem; font-weight: 690; white-space: nowrap; }
.workspace-mode.demo { background: #fff2d7; border-color: #f5e4bd; color: #7b5015; }
.workspace-mode.demo .status-dot { background: #aa6c20; }
main { max-width: 1500px; margin: 0 auto; padding: 28px 32px 14px; }
main:focus { outline: none; }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-top: 24px; padding: 14px 1px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.footer-dot { margin: 0 5px; }

.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 13px; background: #fff; border: 1px solid #ccd9e3; border-radius: 7px; color: var(--ink); font-size: .86rem; font-weight: 680; text-align: center; text-decoration: none; white-space: nowrap; }
.button:hover:not(:disabled) { background: #f0f6f8; border-color: #a9c2cc; }
.button.small { min-height: 34px; padding: 5px 10px; font-size: .78rem; }
.button.primary { color: white; background: var(--teal-dark); border-color: var(--teal-dark); }
.button.primary:hover:not(:disabled) { color: white; background: #084d47; border-color: #084d47; }
.button.hero-primary { background: var(--mint); border-color: var(--mint); color: #173b43; }
.button.hero-primary:hover:not(:disabled) { background: #defaf5; border-color: #defaf5; }
.button.on-dark { background: #17384a; color: #f0faff; border-color: #5a7b8a; }
.button.on-dark:hover:not(:disabled) { background: #234d60; border-color: #9ac1c6; }
.button.danger { color: #9a2e29; border-color: #efc9c7; }
.button.danger:hover:not(:disabled) { background: #fff0ef; border-color: #e0a09c; }
.button.close { height: 36px; min-height: 36px; width: 36px; padding: 0; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.button-row.end { justify-content: flex-end; }

.hero { isolation: isolate; position: relative; min-height: 234px; overflow: hidden; display: flex; align-items: center; padding: 28px 31px; border-radius: 13px; background: linear-gradient(110deg, #11293d 0%, #16374b 58%, #164b55 100%); color: #fff; }
.hero-content { position: relative; z-index: 1; max-width: 530px; }
.hero-image { position: absolute; z-index: 0; right: -17px; top: 50%; width: min(53%, 570px); height: auto; transform: translateY(-50%); pointer-events: none; }
.hero h1 { margin-bottom: 10px; }
.hero p { color: #d5e5ed; max-width: 425px; margin-bottom: 19px; font-size: .91rem; }
.hero .eyebrow { color: #a2e8dc; }
.hero :focus-visible { outline-color: #9cefe0; }
.eyebrow { display: block; margin: 0 0 9px; color: var(--teal-dark); font-size: .7rem; font-weight: 770; letter-spacing: .13em; text-transform: uppercase; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px 22px; margin: 2px 0 22px; }
.page-heading p { color: var(--muted); max-width: 650px; margin-bottom: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 3px 8px; border-radius: 20px; border: 1px solid #e0e7ed; background: #f2f5f8; color: #496174; font-size: .73rem; line-height: 1.35; font-weight: 690; white-space: nowrap; }
.badge.done, .badge.low { border-color: #ccece1; background: #e8f6ef; color: #216247; }
.badge.partial, .badge.moderate { border-color: #f4e2b9; background: #fff4d9; color: #7c520e; }
.badge.high { border-color: #f2d3d0; background: #fcece9; color: #973c32; }
.badge.info { border-color: #d2e5ed; background: #edf6fa; color: #32647b; }
.notice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid #cfdfeb; border-radius: 8px; background: #ebf4f9; color: #274e67; font-size: .86rem; }
.notice svg { margin-top: 2px; }
.notice.demo, .notice.warning { border-color: #efdfb9; background: #fff5de; color: #694a17; }
.notice.error { border-color: #f1c9c5; background: #fff0ee; color: #8b3029; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 13px; margin: 16px 0 19px; }
.stat { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 13px 16px 12px; }
.stat-label { display: flex; justify-content: space-between; align-items: center; gap: 5px; color: var(--muted); font-size: .77rem; font-weight: 680; }
.stat-icon { display: inline-flex; padding: 5px; border-radius: 6px; background: #e9f5f3; color: #14776f; }
.stat-value { display: block; margin: 2px 0; font-size: 1.58rem; font-weight: 745; letter-spacing: -.05em; line-height: 1.16; font-variant-numeric: tabular-nums; }
.stat-value small { color: var(--quiet); font-size: .85rem; font-weight: 650; letter-spacing: 0; }
.stat-meta { color: var(--muted); font-size: .72rem; }
.progress-line { height: 3px; margin: 8px 0 3px; border-radius: 3px; background: #e6eef2; overflow: hidden; }
.progress-line span { display: block; width: var(--w); height: 100%; background: #33a598; }

.card { min-width: 0; margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; padding: 17px 19px 13px; }
.card-head p { margin-bottom: 0; }
.card-body { padding: 0 19px 17px; }
.card-bottom { padding: 10px 19px; border-top: 1px solid var(--soft-line); color: var(--muted); font-size: .76rem; }
.subtitle { color: var(--muted); font-size: .85rem; }
.kicker { color: var(--quiet); font-size: .72rem; font-weight: 720; letter-spacing: .08em; text-transform: uppercase; }
.controls { display: flex; flex-wrap: wrap; align-items: end; gap: 9px 12px; padding: 0 19px 13px; }
.controls .field { flex: 1 1 125px; max-width: 260px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: #405b70; font-size: .76rem; font-weight: 680; }
.field > span { display: flex; justify-content: space-between; gap: 8px; }
.field input, .field select, .field textarea, select.standalone { width: 100%; min-height: 37px; padding: 6px 9px; border-radius: 6px; border: 1px solid #ccd9e3; background: white; color: var(--ink); font-weight: 480; font-size: .87rem; }
.field input::placeholder, .field textarea::placeholder { color: #73879a; }
.field select, select.standalone { padding-right: 24px; }
select.standalone { width: auto; max-width: 100%; }
.field textarea { min-height: 65px; resize: vertical; }
.field small { font-size: .72rem; font-weight: 480; color: var(--muted); }
.seg { display: inline-flex; max-width: 100%; gap: 3px; padding: 3px; border: 1px solid #e0e8ef; background: #edf2f6; border-radius: 8px; }
.seg button { min-height: 32px; padding: 5px 9px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: #486175; font-size: .77rem; font-weight: 690; white-space: nowrap; }
.seg button span { margin-left: 4px; font-size: .7rem; font-weight: 580; color: #526d81; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { color: var(--teal-dark); background: #fff; border-color: #dce6ed; box-shadow: 0 1px 2px #12304313; }
.table-wrap { width: 100%; overflow: auto; }
.table-wrap.limited { max-height: 505px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: .81rem; }
table.matrix { min-width: 665px; }
table.wide { min-width: 750px; }
table.medium { min-width: 540px; }
thead th { position: sticky; top: 0; z-index: 1; padding: 9px 12px; background: #edf3f7; color: #425b70; border-bottom: 1px solid #dce7ee; font-size: .7rem; font-weight: 745; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
thead th:first-child, tbody td:first-child, tbody th:first-child { padding-left: 19px; }
thead th:last-child, tbody td:last-child { padding-right: 19px; }
tbody td, tbody th { padding: 8px 12px; border-bottom: 1px solid #edf1f5; vertical-align: middle; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fbfdfe; }
tbody tr:hover { background: #f1f7f8; }
tbody th { text-align: left; }
.table-sub { display: block; margin-top: 2px; color: var(--muted); font-size: .71rem; }
.model-id, .numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
.model-id { color: #24506a; font-weight: 720; }
.right { text-align: right; }
.cell-action { min-height: 29px; font-size: .74rem; padding: 3px 8px; }
.bar-track { display: inline-block; width: 100%; min-width: 64px; height: 6px; overflow: hidden; vertical-align: middle; border-radius: 8px; background: #e5edf1; }
.bar-track span { display: block; height: 100%; width: var(--w); border-radius: 8px; background: var(--bar, #278f84); }
.bar-cell { width: 27%; }
.break-text { min-width: 120px; max-width: 240px; white-space: pre-line; overflow-wrap: anywhere; }
.empty { padding: 28px 18px 31px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); }
.empty p { max-width: 500px; margin-right: auto; margin-left: auto; }
.empty-icon { display: inline-flex; margin-bottom: 10px; padding: 9px; background: #e9f5f3; color: var(--teal-dark); border-radius: 9px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; }
.two-col > .card { align-self: start; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 15px; }
.load-note { color: var(--muted); font-size: .76rem; margin: 5px 0 0; }
.chart-wrap { padding: 0 14px 12px; }
.chart { display: block; width: 100%; height: auto; max-width: 550px; margin: 0 auto; }
.chart-key { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .72rem; }
.chart-key i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; background: #0b7b72; }
.chart-key .identity-line { width: 14px; height: 0; border-top: 1px dashed #5e768b; border-radius: 0; }
.method-copy { color: #405b70; font-size: .9rem; }
.method-copy h3 { color: var(--ink); margin-top: 15px; }
.method-copy h3:first-child { margin-top: 0; }
.method-copy li { margin-bottom: 7px; }
.method-copy code { font-size: .82rem; overflow-wrap: anywhere; color: #264b62; }
.method-copy a { text-underline-offset: 3px; }
.compact-table td, .compact-table th { padding: 7px 9px; }
.compact-table th:first-child, .compact-table td:first-child { padding-left: 12px; }
details { margin: 0; }
details > summary { cursor: pointer; color: #255467; font-size: .84rem; font-weight: 700; padding: 10px 0; }
details > summary:hover { color: var(--teal-dark); }
.model-context { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
dialog { width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 25px); padding: 0; color: var(--ink); border: 1px solid #c9d9e4; border-radius: 13px; box-shadow: 0 22px 65px #0919284b; }
dialog::backdrop { background: #0d2135a6; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px 20px 12px; border-bottom: 1px solid var(--soft-line); }
.dialog-head h2 { margin-bottom: 3px; }
.dialog-body { padding: 15px 20px 14px; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 20px; background: #f5f8fa; border-top: 1px solid var(--line); }
.dialog-actions .danger { margin-right: auto; }
.dialog-error { margin: 10px 0 0; color: #972f27; font-size: .82rem; }
.toast { position: fixed; z-index: 5; bottom: 19px; right: 20px; max-width: min(390px, calc(100vw - 40px)); padding: 11px 15px; background: #14374a; border: 1px solid #315468; color: #fff; box-shadow: 0 6px 30px #142c4250; border-radius: 8px; font-size: .86rem; }
.muted { color: var(--muted); }
.spaced { margin-top: 13px; }

@media (max-width: 1180px) {
  .hero-image { width: 48%; opacity: .77; }
  main { padding-right: 24px; padding-left: 24px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
}
@media (max-width: 1020px) {
  .sidebar { width: 193px; padding-left: 11px; padding-right: 11px; }
  .shell { margin-left: 193px; }
  .nav-link { font-size: .8rem; gap: 8px; }
  .hero-image { right: -35px; opacity: .54; }
  .hero-content { max-width: 465px; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: auto; padding: 10px 12px 5px; }
  .brand { padding: 0 4px 6px; font-size: 1.15rem; }
  .brand img { width: 33px; height: 33px; }
  .brand small { font-size: .53rem; }
  .side-label, .side-footer { display: none; }
  .navigation { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 2px 0 4px; }
  .nav-link { flex-direction: column; justify-content: center; gap: 2px; min-height: 44px; padding: 4px 2px; font-size: .68rem; }
  .nav-desktop { display: none; }
  .nav-mobile { display: inline; }
  .nav-link svg { width: 15px; height: 15px; }
  .shell { margin: 0; }
  .topbar { height: auto; min-height: 48px; padding: 7px 14px; }
  .breadcrumb { gap: 5px; font-size: .8rem; }
  .breadcrumb > span { display: none; }
  .top-actions { gap: 5px; }
  main { padding: 13px 12px 5px; }
  .hero { padding: 19px; min-height: 208px; }
  .hero-image { width: 72%; right: -50px; opacity: .23; }
  .hero p { max-width: 385px; }
  .page-heading { margin-bottom: 15px; }
  .card-head { padding: 13px 13px 10px; }
  .controls { padding: 0 13px 10px; }
  .card-body { padding: 0 13px 13px; }
  .card-bottom { padding: 9px 13px; }
  .stats { gap: 7px; margin: 11px 0 13px; }
  .stat { padding: 9px 9px 8px; }
}
@media (max-width: 490px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-label { font-size: .71rem; }
  .stat-value { font-size: 1.32rem; }
  .stat-icon { padding: 4px; }
  .stat-icon svg { width: 13px; height: 13px; }
  .field { font-size: .72rem; }
  .field input, .field select, .field textarea, select.standalone { font-size: 1rem; }
  .columns { gap: 10px; }
  .dialog-body, .dialog-actions, .dialog-head { padding-left: 13px; padding-right: 13px; }
  .card-body > details .columns { grid-template-columns: 1fr; }
  table.matrix tr > :first-child { position: sticky; left: 0; z-index: 1; }
  table.matrix tr > :last-child { position: sticky; right: 0; z-index: 1; }
  table.matrix thead tr > :first-child, table.matrix thead tr > :last-child { z-index: 2; }
  table.matrix tbody tr > :first-child, table.matrix tbody tr > :last-child { background: #fff; }
  table.matrix tbody tr:nth-child(even) > :first-child, table.matrix tbody tr:nth-child(even) > :last-child { background: #fbfdfe; }
  table.matrix tr > :first-child { box-shadow: 1px 0 0 var(--soft-line); }
  table.matrix tr > :last-child { box-shadow: -1px 0 0 var(--soft-line); }
  .button { padding-left: 9px; padding-right: 9px; }
  .workspace-mode { font-size: .65rem; padding: 4px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
