:root {
  color-scheme: light;
  --canvas: #f6f6fa;
  --surface: #fff;
  --ink: #171931;
  --muted: #575b72;
  --faint: #6b6f83;
  --line: #e6e6ef;
  --violet: #533bc8;
  --violet-dark: #432cb7;
  --violet-tint: #f1edff;
  --nav: #121428;
  --shadow: 0 1px 3px #21194308, 0 7px 22px #21194303;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button, summary, select { cursor: pointer; }
button:disabled { cursor: progress; opacity: .65; }
a { color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
button, a, input, textarea, summary, select { outline-offset: 4px; }
:focus-visible { outline: 2px solid #8068ee; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
svg { width: 1.15rem; height: 1.15rem; flex: none; vertical-align: middle; }
i { display: inline-flex; font-style: normal; }
.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; z-index: 5; top: .5rem; left: .5rem; padding: .6rem; background: white; }
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 30px 17px 20px; background: var(--nav); color: #fff; }
.brand { display: flex; gap: 11px; align-items: center; align-self: flex-start; margin: 0 12px 46px; font-weight: 760; font-size: 1.2rem; line-height: .96; letter-spacing: -.055em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: #a894fe; color: #1d1443; }
.brand-mark svg { width: 27px; height: 27px; }
.brand-period { color: #b39afb; }
.navigation { display: grid; gap: 5px; }
.navigation a { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 0 12px; border-radius: 9px; text-decoration: none; color: #c3c4d6; font-size: .92rem; font-weight: 540; }
.navigation a:hover { background: #25263d; color: white; }
.navigation a[aria-current="page"] { color: #e6ddff; background: #2e2650; }
.navigation a[aria-current="page"] svg { color: #bca5ff; }
.sidebar-footer { display: flex; gap: 9px; align-items: center; margin-top: auto; padding: 13px 9px 4px; border-top: 1px solid #2e3047; color: #bdbed2; }
.footer-icon { color: #bca5ff; }
.sidebar-footer strong, .sidebar-footer div span { display: block; }
.sidebar-footer strong { color: #eae9f5; font-size: .82rem; }
.sidebar-footer div span { font-size: .73rem; margin-top: 4px; }
.shell { min-width: 0; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px clamp(20px, 3.2vw, 54px); background: var(--surface); }
#breadcrumb { font-size: .92rem; font-weight: 630; color: #4e5269; }
.workspace { max-width: 1550px; margin: 0 auto; padding: 35px clamp(20px, 3.2vw, 54px) 50px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.dataset-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 11px; color: #454960; font-size: .88rem; font-weight: 650; overflow-wrap: anywhere; }
.dataset-line > i { color: var(--violet); }
h1 { font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.05; letter-spacing: -.065em; font-weight: 790; }
.page-head p, .lead { color: var(--muted); margin-top: 10px; line-height: 1.5; }
.button, .icon-button, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: white; padding: 9px 13px; min-height: 40px; border-radius: 9px; color: var(--ink); font-size: .87rem; font-weight: 680; text-decoration: none; white-space: nowrap; }
.button:hover, .icon-button:hover { background: #f5f3fc; }
.primary { color: white; background: var(--violet); border-color: var(--violet); box-shadow: 0 2px 4px #4934bb25; }
.primary:hover { background: var(--violet-dark); }
.text-button { background: transparent; border-color: transparent; color: var(--violet); }
.text-button:hover { background: var(--violet-tint); }
.icon-button { padding: 8px; min-width: 38px; min-height: 38px; }
.badge { display: inline-flex; gap: 6px; align-items: center; width: fit-content; max-width: 100%; border-radius: 999px; padding: 4px 9px; color: #4c3b8c; background: #eeeafb; font-size: .78rem; font-weight: 640; line-height: 1.2; }
.badge.green { background: #e9f7ef; color: #1d6146; }
.badge.amber { background: #fff2dc; color: #774a05; }
.badge.slate { background: #eef0f5; color: #505772; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 22px; }
.metric { padding: 17px 18px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.metric-top { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .91rem; font-weight: 620; }
.metric-icon { display: grid; place-items: center; color: var(--metric-ink, var(--violet)); background: var(--metric-bg, var(--violet-tint)); width: 33px; height: 33px; border-radius: 9px; flex: none; }
.metric-number { display: block; margin-top: 10px; font-size: 2rem; font-weight: 760; letter-spacing: -.055em; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-sub { margin-top: 8px; display: block; color: var(--faint); font-size: .81rem; line-height: 1.4; }
.report-grid { display: grid; grid-template-columns: minmax(265px, 4fr) minmax(0, 6.3fr); gap: 18px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); min-width: 0; }
.card-heading { padding: 18px 19px 13px; display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.card h2 { font-size: 1.23rem; letter-spacing: -.035em; line-height: 1.18; }
.card-heading p { margin-top: 6px; font-size: .88rem; line-height: 1.4; color: var(--muted); }
.topic-list { display: grid; padding: 0 9px 10px; gap: 2px; }
.topic-button { display: block; width: 100%; text-align: left; color: var(--ink); padding: 11px 11px 12px; border: 1px solid transparent; background: none; border-radius: 10px; }
.topic-button:hover { background: #faf9ff; }
.topic-button[aria-pressed="true"] { border-color: #e7dfff; background: #f7f4ff; }
.topic-line, .topic-caption { display: flex; justify-content: space-between; align-items: start; gap: 7px; }
.topic-name { display: flex; align-items: start; gap: 8px; font-size: .89rem; font-weight: 690; overflow-wrap: anywhere; }
.topic-name i { color: #676b88; padding-top: 1px; }
.topic-name svg { width: .91rem; height: .91rem; }
.topic-count { color: #4f5269; font-size: .83rem; font-weight: 730; font-variant-numeric: tabular-nums; }
.topic-caption { margin: 7px 0 7px 23px; color: var(--faint); font-size: .79rem; }
.topic-rail { height: 5px; border-radius: 8px; background: #ebebf4; display: block; margin-left: 23px; overflow: hidden; }
.topic-rail > span { display: block; height: 100%; border-radius: inherit; background: var(--bar, #967beb); }
.detail { overflow: hidden; }
.detail-top { padding: 19px 21px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(115deg, #faf8ff 0%, #fff 76%); }
.detail-top h2 { margin-top: 10px; font-size: clamp(1.24rem, 2.3vw, 1.7rem); overflow-wrap: anywhere; }
.detail-top p { margin-top: 7px; color: var(--muted); line-height: 1.5; font-size: .93rem; overflow-wrap: anywhere; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-body { padding: 17px 21px 18px; }
.detail-body h3 { font-size: .94rem; letter-spacing: -.015em; }
.source-list { list-style: none; margin: 7px 0 14px; padding: 0; }
.source-list li + li { border-top: 1px solid var(--line); }
.source-link { display: flex; align-items: center; gap: 9px; padding: 10px 0; font-size: .88rem; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
a.source-link:hover, .reference-link:hover { color: var(--violet); text-decoration: underline; }
.source-link i:first-child { color: #747395; }
.source-link .source-out { color: #6c6387; margin-left: auto; }
.source-link svg { width: .98rem; height: .98rem; }
.recommendation { background: #f6f3ff; border: 1px solid #eee7ff; padding: 12px 13px; border-radius: 10px; }
.recommendation h3 { display: flex; align-items: center; gap: 7px; color: #412d9c; }
.recommendation h3 i { color: var(--violet); }
.recommendation p { margin-top: 6px; color: #4f4769; font-size: .88rem; line-height: 1.46; overflow-wrap: anywhere; }
.reference-link { display: inline-block; margin-top: 8px; color: #4f37af; font-size: .84rem; font-weight: 620; overflow-wrap: anywhere; }
.detail-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.decision-control { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .82rem; flex-wrap: wrap; }
select { appearance: none; padding: 8px 26px 8px 8px; border: 1px solid var(--line); border-radius: 7px; background: white no-repeat right 8px center; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23575b72' stroke-width='1.4'/%3E%3C/svg%3E"); color: var(--ink); font-size: .82rem; }
.export-menu { position: relative; z-index: 1; }
.export-menu > summary, .import-docs > summary { list-style: none; }
.export-menu > summary::-webkit-details-marker, .import-docs > summary::-webkit-details-marker { display: none; }
.menu-options { position: absolute; top: calc(100% + 7px); right: 0; min-width: 204px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px #24204021; padding: 4px; }
.menu-options button { border: 0; text-align: left; width: 100%; border-radius: 6px; padding: 9px; background: white; font-size: .88rem; color: var(--ink); }
.menu-options button:hover { background: var(--violet-tint); }
.table-card { overflow: hidden; }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.table-filters { display: flex; flex-wrap: wrap; gap: 8px; }
input:not([type=file]), textarea { background: white; color: var(--ink); border: 1px solid #d9d9e6; border-radius: 8px; min-width: 0; padding: 9px 11px; }
input::placeholder, textarea::placeholder { color: #666b7d; opacity: 1; }
textarea { resize: vertical; font-size: .91rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .89rem; text-align: left; }
th, td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
th { color: var(--muted); background: #fafafd; font-size: .83rem; }
td:first-child { min-width: 200px; max-width: 600px; overflow-wrap: anywhere; }
td:last-child { white-space: nowrap; }
td a { color: #4f37af; }
.no-results { text-align: center; color: var(--muted); padding: 25px; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.method-grid article { padding: 20px; }
.method-grid h2 { margin: 10px 0 8px; }
.method-grid p { color: var(--muted); line-height: 1.55; }
.method-grid a { color: var(--violet); }
dialog { width: min(540px, calc(100% - 24px)); padding: 0; max-height: calc(100dvh - 24px); color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 24px 80px #1010274a; }
dialog::backdrop { background: #141530a8; }
dialog form { display: grid; gap: 14px; padding: 20px; }
.dialog-title { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.dialog-title h2 { font-size: 1.5rem; letter-spacing: -.04em; }
.dialog-title p { margin-top: 4px; color: var(--muted); font-size: .91rem; }
.field { display: grid; gap: 6px; color: #484c65; font-size: .86rem; font-weight: 610; }
.field input, .field textarea { font-weight: 420; }
.upload { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px dashed #bca9fa; border-radius: 9px; color: #4931b3; background: #f8f5ff; cursor: pointer; overflow-wrap: anywhere; }
.upload:hover, .upload.dragging { background: #f0e9ff; }
.upload strong, .upload small { display: block; }
.upload small { margin-top: 3px; color: var(--faint); }
.import-docs > summary { color: var(--violet); font-size: .88rem; font-weight: 650; }
.import-docs > summary::before { content: '+'; margin-right: 6px; }
.import-docs[open] > summary::before { content: '−'; }
.import-docs .field { margin-top: 10px; }
.form-feedback { font-size: .84rem; color: var(--muted); min-height: 1em; line-height: 1.4; }
.form-feedback.error { color: #973826; }
.dialog-actions { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 18px; right: 18px; z-index: 5; max-width: calc(100vw - 36px); color: white; background: #262143; padding: 10px 14px; border-radius: 9px; font-size: .9rem; box-shadow: 0 8px 24px #14123024; }
@media (min-width: 1450px) { .workspace { padding-top: 42px; } }
@media (max-width: 1020px) { .layout { grid-template-columns: 184px minmax(0, 1fr); } .sidebar { padding-inline: 12px; } .report-grid { grid-template-columns: minmax(235px, 4fr) minmax(0, 6fr); } }
@media (max-width: 830px) { .layout { grid-template-columns: 58px minmax(0, 1fr); } .sidebar { padding: 15px 7px; } .brand { margin: 0 0 23px; } .brand > span:last-child, .navigation a span, .sidebar-footer div { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .navigation a { justify-content: center; padding: 4px; } .sidebar-footer { justify-content: center; padding-inline: 0; } }
@media (max-width: 620px) {
  .layout { display: block; }
  .sidebar { position: static; height: auto; display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 7px; padding: 8px 12px; }
  .brand { margin: 0; align-self: center; }
  .brand-mark { width: 35px; height: 35px; border-radius: 9px; }
  .brand-mark svg { width: 21px; height: 21px; }
  .navigation { display: flex; gap: 3px; }
  .navigation a { padding: 7px; min-height: 35px; gap: 5px; font-size: .78rem; }
  .navigation a span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .navigation a svg { width: .9rem; height: .9rem; }
  .sidebar-footer { display: none; }
  .topbar { min-height: 52px; padding: 7px 12px; }
  .workspace { padding: 23px 12px 30px; }
  .page-head { align-items: start; gap: 8px; margin-bottom: 16px; }
  .page-head p { font-size: .91rem; }
  .metrics { gap: 6px; margin-bottom: 14px; }
  .metric { padding: 10px 8px 9px; }
  .metric-top { font-size: .77rem; line-height: 1.2; gap: 5px; }
  .metric-icon { width: 22px; height: 22px; border-radius: 5px; }
  .metric-icon svg { width: 13px; height: 13px; }
  .metric-number { font-size: 1.55rem; }
  .metric-sub { font-size: .71rem; }
  .report-grid, .method-grid { grid-template-columns: 1fr; gap: 12px; }
  .card-heading, .detail-top, .detail-body { padding-inline: 14px; }
  .topic-list { padding-inline: 6px; }
  .button { padding-inline: 9px; }
}
@media (max-width: 360px) { .navigation a i { display: none; } .metric-top { display: block; } .metric-icon { margin-bottom: 4px; } .page-head { flex-wrap: wrap; } }
@media (prefers-reduced-motion: no-preference) { button, a { transition: background-color 140ms ease, color 140ms ease; } }
