:root {
  color-scheme: light;
  --ink: #18313f;
  --muted: #546773;
  --line: #d7e2df;
  --paper: #f4f8f7;
  --card: #fff;
  --accent: #0b7168;
  --accent-hover: #075a53;
  --soft: #e7f3f0;
  --teal: #0b7168;
  --focus: #168b80;
  --control-border: #7b918d;
  --placeholder: #667a77;
  --chart-reference: #657786;
  --warning: #855813;
  --warning-soft: #fff2dc;
  --danger: #a3342b;
  --danger-soft: #fff0ed;
  --radius: 18px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; top: -100px; left: 20px; z-index: 20; padding: 12px; background: white; }
.skip:focus { top: 12px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 232px; padding: 29px 18px 20px; display: flex; flex-direction: column; background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; font-size: 23px; font-weight: 730; letter-spacing: -.04em; }
.logo { display: block; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .01em; margin-top: 1px; }
.nav-label { display: block; margin: 32px 13px 10px; color: var(--muted); font-size: 12px; font-weight: 550; }
.nav-divider { margin-top: 20px; margin-bottom: 5px; }
nav { display: flex; flex-direction: column; gap: 5px; }
nav a { display: flex; align-items: center; gap: 11px; min-height: 45px; padding: 10px 12px; color: var(--muted); text-decoration: none; border-radius: 10px; font-weight: 520; }
nav a:hover { background: var(--paper); }
nav a[aria-current] { background: var(--soft); color: var(--accent); font-weight: 650; }
.nav-icon { flex: 0 0 19px; width: 19px; height: 19px; }
.sidebar-bottom { margin-top: auto; padding: 32px 12px 0; font-size: 12px; color: var(--muted); }
.sidebar-bottom a { display: inline-block; margin-bottom: 4px; text-decoration: none; font-weight: 600; }
.sidebar-bottom p { margin: 8px 0; }
.sidebar-bottom small { font-size: 11px; }
.workspace { margin-left: 232px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 73px; padding: 15px 36px; border-bottom: 1px solid var(--line); background: var(--card); }
#breadcrumb { font-weight: 550; }
.top-actions { display: flex; gap: 12px; align-items: center; }
.mobile-brand { display: none; }
main { max-width: 1500px; padding: 24px 36px 44px; margin: auto; }
.notice { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--soft); margin: 0 0 26px; font-size: 12px; line-height: 1.65; }
.notice.error { border-color: #e4bcb7; background: var(--danger-soft); color: var(--danger); }
h1 { margin: 3px 0 8px; font-size: 29px; line-height: 1.25; font-weight: 680; letter-spacing: -.035em; }
h2 { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 650; letter-spacing: -.015em; }
p { margin: 10px 0; }
.muted, .fine { color: var(--muted); }
.fine { font-size: 12px; line-height: 1.75; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 550; color: var(--muted); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-heading p:last-child { margin-bottom: 0; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
.metrics article { padding: 19px 17px; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.metrics .metric-total { background: var(--soft); border-color: #bfd9d2; }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.metrics span { font-weight: 550; }
.metrics strong { display: block; font-size: clamp(23px, 2vw, 30px); font-weight: 650; letter-spacing: -.045em; font-variant-numeric: tabular-nums; line-height: 1.3; margin: 9px 0; overflow-wrap: anywhere; }
#overview-metrics strong { white-space: nowrap; overflow-wrap: normal; }
.metrics.stale { opacity: .55; }
#resource-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 24px; margin-bottom: 22px; box-shadow: 0 2px 4px #182f4603; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.panel-heading a, .panel-heading p { font-size: 12px; }
.panel-heading a { text-decoration: none; font-weight: 600; }
.panel-heading p { margin-bottom: 0; color: var(--muted); }
button, .button { display: inline-block; padding: 10px 15px; min-height: 42px; border: 1px solid var(--accent); border-radius: 12px; color: white; background: var(--accent); text-decoration: none; font-weight: 600; font-size: 13px; white-space: nowrap; }
button:hover:not(:disabled), .button:hover { filter: brightness(.96); }
button:not(.secondary):not(.chart-latest):focus-visible, .button:focus-visible { outline-color: var(--focus); }
.secondary { background: white; color: var(--ink); border-color: var(--line); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 8px; color: var(--accent); background: var(--soft); font-size: 11px; font-weight: 650; white-space: nowrap; }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.neutral { color: var(--muted); background: var(--soft); }
.task-list { display: grid; gap: 0; }
.task-list button { position: relative; padding: 13px 25px 13px 0; background: transparent; color: var(--ink); border: 0; border-top: 1px solid var(--line); border-radius: 0; text-align: left; white-space: normal; }
.task-list button:first-child { border-top: 0; }
.task-list button::after { position: absolute; right: 3px; top: 28px; content: ''; width: 7px; height: 7px; border-top: 1.5px solid #8b98a6; border-right: 1.5px solid #8b98a6; transform: rotate(45deg); }
.task-list button:hover strong { color: var(--accent); }
.task-list strong, .task-list span { display: block; }
.task-list strong { font-size: 13px; font-weight: 600; }
.task-list span { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; }
.source-chips, .key-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.source-chips button, .key-list button { min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 11px; font-weight: 550; white-space: normal; overflow-wrap: anywhere; }
.source-chips button::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 6px 2px 0; border-radius: 50%; background: var(--teal); }
.source-chips button[data-warning=true]::before { background: #b57c23; }
#freshness-summary { font-size: 13px; }
.examples-label { font-size: 12px; color: var(--muted); font-weight: 550; margin-bottom: 9px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.quick-actions button { padding: 8px 13px; min-height: 38px; background: white; border-color: var(--line); color: var(--muted); font-size: 12px; font-weight: 500; }
.quick-actions button:hover, .quick-actions button[aria-pressed=true] { border-color: #a4c7bd; color: var(--accent); background: var(--soft); }
label { display: block; margin-bottom: 7px; font-size: 12px; color: var(--muted); font-weight: 600; }
input, select, textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--control-border); border-radius: 10px; background: white; color: var(--ink); font-size: 13px; }
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
select:disabled { background: var(--paper); color: var(--muted); }
textarea { font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; resize: vertical; }
.form-row { display: flex; align-items: end; gap: 14px; }
.grow { flex: 1; min-width: 0; }
.form-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; align-items: end; gap: 16px; margin-top: 18px; }
.form-grid > div { min-width: 0; }
.form-row button, .form-grid > button { min-height: 44px; }
.query-help { margin: 13px 0 0; }
.inline-command { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; margin-top: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.inline-command > div { min-width: 0; flex: 1; }
.inline-command .eyebrow { font-size: 11px; }
.inline-command pre { margin: 6px 0 0; }
pre { font: 12px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; margin: 10px 0; }
.result { padding: 18px; min-height: 160px; max-height: 520px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--ink); }
.result.compact { min-height: 60px; }
.count-tag { font-size: 12px; color: var(--muted); margin-left: 5px; font-weight: 400; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
thead th { color: var(--muted); font-weight: 550; background: var(--paper); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfa; }
tbody th button { min-height: 32px; border: 0; padding: 0; border-radius: 4px; background: none; color: var(--accent); font: inherit; font-weight: 650; }
td { font-variant-numeric: tabular-nums; }
#source-search { max-width: 260px; }
#source-detail { max-width: 220px; }
.class-grid, .mini-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 20px 0; }
.class-grid > div, .mini-metrics > div { padding: 12px 14px; background: var(--paper); border-radius: 10px; min-width: 0; }
.class-grid span, .mini-metrics span { display: block; color: var(--muted); font-size: 12px; }
.class-grid strong, .mini-metrics strong { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
details { border-top: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-size: 13px; font-weight: 600; }
details a { overflow-wrap: anywhere; font-size: 13px; }
.command-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 22px; }
.command-card { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: white; }
.command-card h2 { font-size: 15px; }
.command-card p { color: var(--muted); font-size: 12px; }
.command-card pre { padding: 14px; background: var(--paper); border-radius: 9px; }
.command-card button { margin-top: 5px; }
#graphql-form button { margin-top: 12px; }
#router-commands { margin-top: 22px; }
.history-section { margin-top: 8px; }
.history-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.history-controls label { min-width: 0; margin: 0; font-size: 11px; font-weight: 500; }
.history-controls select { display: block; margin-top: 4px; max-width: 100%; padding: 7px 10px; font-size: 12px; }
.history-section > .panel-heading { align-items: end; }
.chart { min-width: 0; width: 100%; margin-top: 14px; overflow: hidden; }
.chart svg { display: block; width: 100%; height: auto; min-width: 0; overflow: hidden; }
.chart-label { fill: var(--muted); font: 12px system-ui, sans-serif; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-line { stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart-dot, .chart-bar { fill: var(--accent); }
.chart-bar.reference { fill: var(--chart-reference); }
.chart-readout, .chart-empty { color: var(--muted); font-size: 12px; min-height: 20px; }
.chart-controls { display: flex; gap: 10px; align-items: center; }
.chart-slider { flex: 1; min-width: 0; padding: 0; height: 18px; border: 0; accent-color: var(--accent); }
.chart-latest { min-height: 32px; padding: 5px 10px; font-size: 11px; background: white; border-color: var(--line); color: var(--ink); }
.chart-maintenance { fill: #f0c375; opacity: .22; }
#resource-history > article { min-width: 0; }
.resource-accounting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; font-size: 13px; }
.resource-accounting dt { color: var(--muted); }
.resource-accounting dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
footer { padding: 22px 36px; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
@media (max-width: 1360px) {
  .sidebar { width: 210px; padding-left: 13px; padding-right: 13px; }
  .workspace { margin-left: 210px; }
  main { padding-left: 25px; padding-right: 25px; }
  .topbar { padding-left: 25px; padding-right: 25px; }
  .metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .metrics article { grid-column: span 2; }
  .metrics article:nth-last-child(-n+2) { grid-column: span 3; }
  #resource-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #resource-metrics article { grid-column: auto; }
  .two-column, .command-grid { gap: 16px; }
  .panel { padding: 20px; }
  .panel-heading { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 1000px) {
  .metrics article { grid-column: span 3; }
  .metrics .metric-total { grid-column: 1 / -1; }
  .two-column { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #resource-history { gap: 24px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid > div:first-child { grid-column: 1 / -1; }
  .command-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .sidebar { position: static; width: auto; padding: 18px 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .brand { font-size: 22px; }
  .brand small { font-size: 10px; }
  .logo { width: 34px; height: 34px; flex-basis: 34px; }
  .nav-label, .sidebar-bottom { display: none; }
  nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 17px; }
  nav a { justify-content: center; min-height: 38px; padding: 8px 3px; font-size: 11px; gap: 5px; }
  .nav-icon { width: 15px; height: 15px; flex-basis: 15px; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 58px; padding: 10px 18px; font-size: 12px; }
  .top-actions { gap: 7px; }
  .top-actions .secondary { min-height: 34px; padding: 6px 10px; font-size: 11px; }
  main { padding: 18px 16px 30px; }
  .notice { margin-bottom: 22px; font-size: 11px; }
  h1 { font-size: 26px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
  .page-heading .muted { font-size: 13px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metrics article, .metrics article:nth-last-child(-n+2) { grid-column: auto; padding: 16px; }
  .metrics .metric-total { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 12px; }
  .metric-total strong { grid-column: 2; grid-row: 1 / 3; margin: 0; }
  .metric-total small { grid-column: 1; }
  .metrics strong { font-size: clamp(21px, 5.5vw, 27px); }
  .metrics span, .metrics small { font-size: 11px; }
  .panel { padding: 18px; border-radius: 14px; margin-bottom: 18px; }
  .form-row { align-items: stretch; flex-direction: column; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .inline-command { align-items: flex-start; flex-direction: column; gap: 10px; padding: 13px; }
  .quick-actions { gap: 7px; }
  .quick-actions button { padding: 8px 10px; font-size: 11px; }
  .history-controls { width: 100%; }
  .history-controls label { flex: 1 1 130px; }
  .resource-accounting { gap: 10px; font-size: 12px; }
  .command-card { padding: 18px; }
  footer { padding: 20px 18px; }
}
@media (max-width: 380px) {
  .nav-icon { display: none; }
  .metrics .metric-total { display: block; }
  .metric-total strong { margin: 8px 0; }
  .metrics article { padding: 13px; }
  .badge { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

.community-node-context{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 18px;padding:12px 16px;margin-bottom:16px;border:1px solid var(--line);border-radius:12px;background:var(--card);font-size:13px;line-height:1.7;overflow-wrap:anywhere}.community-node-context a{font-weight:650}
