.resource-panel:not([hidden]) { display: flex; flex: 1; min-height: 0; min-width: 0; }
.resource-search-toolbar { grid-template-columns: minmax(220px, 480px) auto; justify-content: space-between; }
.resource-table-wrap { flex: 1; min-height: 0; border: 0; border-radius: 10px 10px 0 0; scrollbar-width: thin; scrollbar-color: #d8d5f0 transparent; }
.resource-table-wrap table { width: 100%; font-size: 12px; }
.resource-table-wrap th { position: sticky; top: 0; z-index: 1; padding: 12px; background: #f5f6fb; color: #6f7c98; font-size: 12px; font-weight: 500; white-space: nowrap; }
.resource-table-wrap td { height: 68px; padding: 12px; border-color: #edf0f8; color: #566586; font-size: 12px; }
.resource-table-wrap tbody tr:hover { background: #fcfbff; }
.resource-table-wrap .resource-metric-table { min-width: 760px; table-layout: fixed; }
.resource-metric-table th:nth-child(1) { width: 6%; }
.resource-metric-table th:nth-child(2) { width: 23%; }
.resource-metric-table th:nth-child(3) { width: 10%; }
.resource-metric-table th:nth-child(4) { width: 41%; }
.resource-metric-table th:nth-child(5) { width: 20%; }
.resource-metric-table td { white-space: normal; overflow-wrap: anywhere; line-height: 1.8; }
.resource-metric-table td:nth-child(2) { color: #343d60; font-weight: 500; }
.resource-metric-table td:last-child { white-space: nowrap; }
.resource-metric-table .metric-name-button { padding: 0; border: 0; background: transparent; color: #6245ed; font: inherit; text-align: left; line-height: inherit; cursor: pointer; }
.metric-name-button:hover { text-decoration: underline; }
.metric-name-button:focus-visible, .metric-detail-tabs button:focus-visible { outline: 2px solid #9c8bed; outline-offset: 4px; }
.ask-dialog.metric-detail-dialog { width: min(1420px, calc(100vw - 64px)); height: min(880px, calc(100dvh - 64px)); max-width: none; max-height: calc(100dvh - 64px); padding: 0; overflow: hidden; }
.metric-detail-dialog > form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.metric-detail-dialog .ask-dialog-header { flex: none; padding: 22px 28px; background: linear-gradient(115deg, #fff, #f9f7ff); border-bottom: 1px solid #eeedf5; }
.metric-detail-dialog .ask-dialog-header h2 { font-size: 19px; }
.metric-detail-dialog .ask-dialog-body { display: flex; flex: 1; min-height: 0; max-height: none; padding: 0; overflow: hidden; }
.metric-detail-dialog #askEditorError:empty { display: none; }
.metric-detail-workspace { display: grid; grid-template-columns: 350px minmax(0, 1fr); flex: 1; min-width: 0; min-height: 0; }
.metric-metadata { padding: 24px; overflow: auto; border-right: 1px solid #ebeef6; background: #fafbfe; }
.metric-metadata-title { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; color: #343d60; font-size: 14px; font-weight: 600; }
.metric-metadata-title svg { width: 18px; height: 18px; color: #7960e5; }
.metric-metadata dl { margin: 0; font-size: 12px; line-height: 1.8; }
.metric-metadata dl > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid #ebedf5; }
.metric-metadata dt { color: #8b94a8; }
.metric-metadata dd { margin: 0; color: #45516e; overflow-wrap: anywhere; }
.metric-detail-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.metric-detail-tabs { display: flex; flex: none; gap: 30px; padding: 0 28px; border-bottom: 1px solid #ebeef6; }
.metric-detail-tabs button { position: relative; padding: 22px 2px 18px; border: 0; background: transparent; color: #8b94a8; font: inherit; font-size: 14px; cursor: pointer; }
.metric-detail-tabs button[aria-selected="true"] { color: #684be0; font-weight: 600; }
.metric-detail-tabs button[aria-selected="true"]::after { position: absolute; content: ""; height: 3px; bottom: -1px; left: 0; right: 0; border-radius: 3px; background: #795de6; }
.metric-detail-panel:not([hidden]) { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; padding: 24px 28px; overflow: auto; }
.metric-record-summary { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 20px; color: #8b94a8; font-size: 12px; }
.metric-record-summary strong { color: #795de6; font-size: 16px; font-weight: 600; }
.metric-record-toolbar { display: flex; flex: none; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; color: #7a88a1; font-size: 12px; }
.metric-record-toolbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.metric-record-toolbar button, .metric-region-records .metric-name-button { padding: 0; border: 0; background: transparent; color: #795de6; font: inherit; cursor: pointer; text-align: left; }
.metric-record-toolbar button:disabled { color: #45516c; cursor: default; font-weight: 600; }
.metric-record-toolbar select { padding: 6px 9px; border: 1px solid #e2e7f1; border-radius: 6px; background: #fff; color: #566586; font: inherit; }
.metric-region-records { min-width: 660px; }
.metric-detail-panel .ask-table-scroll { flex: 1; min-height: 180px; border: 1px solid #edf0f8; border-radius: 8px; }
.metric-detail-panel .resource-detail-table { width: 100%; }
.metric-detail-panel .resource-detail-table th { position: sticky; top: 0; background: #f5f6fb; color: #6f7c98; font-weight: 500; white-space: nowrap; }
.metric-detail-panel .resource-detail-table td { height: 55px; color: #566586; }
.metric-detail-note { flex: none; margin: 18px 0 0; color: #929bad; font-size: 11px; line-height: 1.8; }
.metric-map-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.metric-map-heading h3 { margin: 0; color: #343d60; font-size: 14px; font-weight: 600; }
.metric-map-heading p { margin: 8px 0 0; color: #8b94a8; font-size: 12px; }
.metric-detail-badge { flex: none; padding: 5px 9px; border-radius: 5px; color: #5c83b0; background: #edf5ff; font-size: 11px; }
.metric-real-map-workspace { display: flex; flex: 1; flex-direction: column; gap: 8px; min-height: 0; min-width: 0; }
.metric-real-map-workspace .metric-map-heading { margin-bottom: 0; }
.metric-map-toolbar, .metric-map-bottom { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #7a88a1; font-size: 11px; }
.metric-map-toolbar nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.metric-map-toolbar button { padding: 4px 0; border: 0; background: transparent; color: #795de6; font: inherit; cursor: pointer; }
.metric-map-toolbar button:disabled { color: #45516c; cursor: default; font-weight: 600; }
.metric-map-toolbar label, .metric-map-bottom label { display: flex; align-items: center; gap: 8px; }
.metric-map-toolbar select, .metric-map-bottom select { max-width: 250px; padding: 6px 9px; border: 1px solid #e2e7f1; border-radius: 6px; background: #fff; color: #566586; font: inherit; }
.metric-real-map-chart { position: relative; flex: 1; min-height: 240px; min-width: 0; border: 1px solid #e4ecf6; border-radius: 10px; background: radial-gradient(ellipse at center, #fff, #f1f6fb); overflow: hidden; }
.metric-map-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #6e8092; font-size: 11px; }
.metric-map-legend i { width: 23px; height: 10px; }
.metric-map-no-data { background: #e5edf5; border: 1px solid #cbd7e6; }
.metric-map-county-value { color: #345d9a; font-size: 13px; }
.metric-real-map-workspace > .metric-detail-note { margin-top: 0; }
.metric-detail-dialog .ask-dialog-footer { flex: none; padding: 14px 28px; border-top: 1px solid #ebeef6; }
@media (max-width: 1000px) {
  .metric-detail-workspace { grid-template-columns: 290px minmax(0, 1fr); }
  .metric-metadata { padding: 20px; }
}
@media (max-width: 700px) {
  .ask-dialog.metric-detail-dialog { width: calc(100vw - 16px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
  .metric-detail-dialog .ask-dialog-header, .metric-detail-dialog .ask-dialog-footer { padding: 16px; }
  .metric-detail-dialog .ask-dialog-body { overflow: auto; display: block; }
  .metric-detail-workspace { display: flex; flex-direction: column; }
  .metric-metadata { max-height: 300px; flex: none; padding: 16px; border-right: 0; border-bottom: 1px solid #ebeef6; }
  .metric-detail-tabs { padding: 0 16px; }
  .metric-detail-panel:not([hidden]) { padding: 18px 16px; overflow: visible; }
  .metric-detail-panel .ask-table-scroll { flex: none; max-height: 330px; }
  .metric-real-map-workspace { min-height: 620px; }
  .metric-map-bottom { align-items: flex-start; flex-direction: column; }
  .metric-map-toolbar select, .metric-map-bottom select { max-width: 225px; }
  .metric-detail-dialog .ask-dialog-footer > span { display: none; }
}
.resource-demo-note { flex: none; margin: 14px 0 0; color: #8b95a9; font-size: 11px; line-height: 1.7; }
.resource-list-hint { color: #8b95a9; font-size: 11px; }
.ontology-workspace { display: grid; flex: 1; grid-template-columns: 230px minmax(0, 1fr); min-height: 0; min-width: 0; border: 1px solid #ffffffc9; border-radius: 16px; background: #ffffffed; box-shadow: 0 12px 36px #838ad509; overflow: hidden; }
.ontology-model-sidebar { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 22px 16px; border-right: 1px solid #edf0f8; background: #fbfbfe; }
.ontology-sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 18px; }
.ontology-sidebar-heading h2 { margin: 0; color: #343d60; font-size: 13px; font-weight: 600; }
.ontology-sidebar-heading > span { color: #8b95a9; font-size: 12px; }
.ontology-model-search { display: flex; flex: none; align-items: center; gap: 7px; padding: 0 9px; height: 32px; border: 1px solid #e2e5f3; border-radius: 8px; background: #fff; }
.ontology-model-search svg { width: 14px; height: 14px; color: #8b95a9; }
.ontology-model-search input { width: 100%; min-width: 0; border: 0; background: transparent; color: #566586; font: inherit; font-size: 12px; }
.ontology-model-search:focus-within { outline: 2px solid #b6a7fa; outline-offset: 2px; }
.ontology-model-search input:focus { outline: 0; }
.ontology-model-list { display: flex; flex-direction: column; gap: 6px; margin: 16px -4px; min-height: 0; overflow: auto; }
.ontology-model-button { display: flex; flex: none; align-items: center; gap: 9px; width: 100%; padding: 12px 9px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #687796; text-align: left; font: inherit; font-size: 12px; }
.ontology-model-button:hover { background: #f3f1fc; }
.ontology-model-button.active { border-color: #e8e0ff; background: #eee9ff; color: #6245ed; }
.ontology-model-button > svg { flex: none; width: 17px; height: 17px; }
.ontology-model-button > span { min-width: 0; }
.ontology-model-button strong { display: block; overflow-wrap: anywhere; font-size: 12px; font-weight: 500; }
.ontology-model-button small { display: block; margin-top: 6px; color: #8b95a9; font-size: 11px; }
.ontology-import { display: flex; flex: none; justify-content: center; align-items: center; gap: 6px; margin-top: auto; min-height: 32px; font-size: 12px; }
.ontology-import svg { width: 14px; height: 14px; }
.ontology-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 24px; }
.ontology-main .page-primary { min-height: 32px; padding: 7px 14px; font-size: 12px; }
.ontology-detail:not([hidden]) { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; }
.ontology-overview { flex: none; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #edf0f8; }
.ontology-model-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ontology-model-title h2 { margin: 0; color: #343d60; font-size: 16px; font-weight: 600; }
.ontology-authorize { margin-left: auto; min-height: 32px; padding: 7px 14px; font-size: 12px; }
.ontology-authorization { display: grid; gap: 5px; font-size: 11px; }
.resource-table-wrap .ontology-entity-table { min-width: 1000px; }
.ontology-entity-table th:first-child, .ontology-entity-table td:first-child { min-width: 120px; }
.ontology-entity-table th:nth-child(2) { width: 24%; }
.ontology-entity-table td { white-space: nowrap; }
.ontology-entity-table td:nth-child(2) { min-width: 180px; max-width: 280px; white-space: normal; line-height: 1.7; }
.ontology-entity-table td button { padding: 0; border: 0; background: transparent; color: #6245ed; font: inherit; font-size: 12px; text-align: left; }
.ontology-entity-table td:last-child > div { display: flex; gap: 12px; }
.ontology-entity-table th:last-child, .ontology-entity-table td:last-child { position: sticky; right: 0; min-width: 80px; background: #fff; box-shadow: -8px 0 16px #6675a008; }
.ontology-entity-table th:last-child { z-index: 2; background: #f5f6fb; }
.ontology-state { display: inline-flex; align-items: center; gap: 5px; color: #8b95a9; font-size: 11px; }
.ontology-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ontology-state.enabled { color: #4e9a87; }
.resource-detail-heading { margin: 20px 0 10px; font-size: 13px; color: #566586; }
.resource-detail-table { min-width: 450px; }
.resource-detail-table th, .resource-detail-table td { padding: 10px; font-size: 12px; }
.resource-role-options { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0; font-size: 12px; color: #566586; }
.resource-role-options label { display: flex; align-items: center; gap: 7px; }
#ontologyMessage:empty { display: none; }
@media (max-width: 1000px) {
  .ontology-workspace { grid-template-columns: 195px minmax(0, 1fr); }
  .ontology-main { padding: 18px; }
  .resource-search-toolbar { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 650px) {
  .resource-panel:not([hidden]) { flex: none; min-height: 0; }
  .resource-panel .dataset-main { padding: 16px; }
  .resource-table-wrap { flex: none; max-height: 65vh; overflow: auto; }
  .ontology-workspace { grid-template-columns: minmax(0, 1fr); }
  .ontology-model-sidebar { padding: 16px; border-right: 0; border-bottom: 1px solid #edf0f8; }
  .ontology-model-list { max-height: 180px; }
  .ontology-main { padding: 16px; }
  .ontology-overview { margin-bottom: 16px; padding-bottom: 16px; }
  .ontology-detail:not([hidden]) { flex: none; }
  .ontology-entity-table th:last-child, .ontology-entity-table td:last-child { position: static; box-shadow: none; }
  .resource-search-toolbar .dataset-search-group { grid-template-columns: 1fr; gap: 7px; }
}
