/* Platform shell adapted from mcp.vstg.com.ua; VS Market brand palette. */
:root {
  --bg: #f4f4f4;
  --surface: #fff;
  --surface-soft: #f7f7f7;
  --line: #e4e4e4;
  --line-strong: #d3d3d3;
  --text: #292929;
  --muted: #737373;
  --muted-readable: #666666;
  --accent: #cb3b43;
  --link: #b51c25;
  --brand-red: #ff0000;
  --brand-red-soft: #fff0f0;
  --brand-charcoal: #3d3d3d;
  --sidebar: #303030;
  --box-radius: 3px;
  --sidebar-expanded-width: 280px;
  --sidebar-collapsed-width: 72px;
  --shadow: 0 8px 24px rgba(42, 48, 43, .055);
  color-scheme: light;
  font: 15px/1.5 Lato, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 96px; }
body { margin: 0; letter-spacing: -.006em; background: var(--bg); }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; left: 12px; top: -70px; z-index: 50; padding: 10px 16px; color: #fff; background: var(--brand-charcoal); }
.skip-link:focus { top: 12px; }
.workspace { display: grid; grid-template-columns: var(--sidebar-expanded-width) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; padding: 22px 12px 16px; color: #dce2dc; background: var(--sidebar); }
.sidebar-brand-panel { display: flex; align-items: center; gap: 8px; padding: 0 6px 26px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.brand img { flex: 0 0 38px; }
.brand-copy b, .brand-copy small { display: block; }
.brand-copy b { color: #fff; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.brand-copy small { margin-top: 3px; color: #bfc4c1; font-size: 8px; letter-spacing: .08em; white-space: nowrap; }
.sidebar-toggle { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 34px; margin-left: auto; padding: 5px; border: 0; border-radius: var(--box-radius); color: #bfc4c1; background: transparent; }
.sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,.09); }
.sidebar-toggle svg { width: 19px; height: 19px; }
.sidebar-menu { display: grid; align-content: start; gap: 4px; padding-top: 20px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 11px 14px; border-radius: var(--box-radius); color: #c7ccc8; font-size: 14.5px; font-weight: 500; text-decoration: none; }
.nav-link svg { flex: 0 0 20px; width: 20px; height: 20px; }
.nav-link.active { box-shadow: inset 3px 0 0 var(--brand-red); background: rgba(255,0,0,.17); color: #fff; }
.nav-link:hover { background: rgba(255,255,255,.07); }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 16px 12px 0; border-top: 1px solid rgba(255,255,255,.1); color: #bfc4c1; font-size: 12px; }
.state-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #d58a2c; }
.workspace-main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 14px 26px; border-bottom: 1px solid rgba(212,217,208,.85); background: var(--surface); box-shadow: 0 5px 22px rgba(42,48,43,.045); }
.eyebrow { margin: 0 0 3px; color: var(--muted-readable); font-size: 11.5px; font-weight: 600; letter-spacing: .07em; }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.source-state { display: flex; align-items: center; gap: 9px; padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--box-radius); color: #86591f; background: var(--surface-soft); font-size: 12px; white-space: nowrap; }
.page-section { max-width: 1240px; padding: 32px 26px; }
.page-section:focus { outline: none; }
.page-heading { margin-bottom: 22px; }
.page-heading h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.3; font-weight: 600; }
.page-heading p { margin: 0; color: var(--muted-readable); }
.card { border: 1px solid var(--line); border-radius: var(--box-radius); background: var(--surface); box-shadow: var(--shadow); }
.setup-card { display: flex; align-items: flex-start; gap: 20px; padding: 28px; border-top: 3px solid var(--brand-red); }
.setup-icon { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border: 1px solid #f3c7c7; border-radius: var(--box-radius); color: var(--brand-charcoal); background: var(--brand-red-soft); }
.setup-icon svg { width: 25px; height: 25px; }
.setup-card h3 { margin: 3px 0 8px; font-size: 22px; line-height: 1.35; font-weight: 600; }
.setup-card p:last-child { max-width: 620px; margin: 0; color: var(--muted-readable); }
.connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.connection-card { padding: 24px 26px 26px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.service-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #f0d6d6; border-radius: var(--box-radius); color: var(--link); background: #fff3f3; }
.badge { padding: 3px 8px; border: 1px solid var(--line); border-radius: var(--box-radius); color: var(--muted-readable); background: var(--surface-soft); font-size: 11px; }
.connection-card h3 { margin: 0 0 3px; font-size: 20px; font-weight: 600; }
.connection-card .card-subtitle { margin: 0 0 12px; color: var(--link); font-size: 13px; }
.connection-card p:last-child { max-width: 440px; margin: 0; color: var(--muted-readable); font-size: 14px; }
.page-note { margin: 22px 0 0; color: var(--muted-readable); font-size: 13px; }
.workspace.is-collapsed { grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr); }
.is-collapsed .sidebar { padding-inline: 10px; }
.is-collapsed .sidebar-brand-panel { flex-direction: column; gap: 16px; padding-inline: 0; }
.is-collapsed .brand-copy, .is-collapsed .nav-label, .is-collapsed .sidebar-footer-label { display: none; }
.is-collapsed .sidebar-toggle { margin-left: 0; }
.is-collapsed .nav-link { justify-content: center; padding-inline: 0; }
.is-collapsed .sidebar-footer { justify-content: center; padding-inline: 0; }

@media (max-width: 620px) {
  .workspace, .workspace.is-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; padding: 14px 16px; }
  .sidebar-brand-panel, .is-collapsed .sidebar-brand-panel { flex-direction: row; gap: 12px; padding: 0; border: 0; }
  .brand-copy, .is-collapsed .brand-copy { display: block; }
  .brand img { width: 32px; height: 32px; flex-basis: 32px; }
  .brand-copy b { font-size: 16px; }
  .sidebar-toggle, .sidebar-menu, .sidebar-footer { display: none; }
  .topbar { min-height: 70px; padding: 12px 18px; }
  .topbar .eyebrow { max-width: 170px; font-size: 9px; }
  .source-state { padding: 6px 8px; font-size: 11px; }
  .page-section { padding: 24px 18px; }
  .page-heading h2 { font-size: 22px; }
  .page-heading p { font-size: 14px; }
  .setup-card { gap: 12px; padding: 20px 17px; }
  .setup-icon { flex-basis: 36px; height: 36px; }
  .setup-icon svg { width: 22px; height: 22px; }
  .setup-card h3 { font-size: 19px; }
  .setup-card p:last-child { font-size: 14px; }
  .connection-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .connection-card { padding: 21px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.source-state.is-ready { color: #45641d; background: #f2f5e8; border-color: #dce4ca; }
.is-ready .state-dot { background: #698c32; }
.source-state.is-unavailable { color: #9a3934; background: #fcf2f1; }
.is-unavailable .state-dot { background: #b84942; }
.endpoint { display: block; margin: 16px 0 12px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface-soft); font-size: 12px; overflow-wrap: anywhere; }
.connection-card .auth-note { margin: 10px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.action-link { display: inline-flex; gap: 14px; padding: 8px 12px; border: 1px solid #cf171f; border-radius: var(--box-radius); color: #fff; background: #cf171f; font-size: 13px; font-weight: 600; text-decoration: none; }
.action-link:hover { background: #b7141b; }
.secondary-link { color: var(--link); font-size: 12px; text-underline-offset: 3px; }
.tools-card { margin-top: 20px; padding: 22px 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading h3 { margin: 0; font-size: 17px; font-weight: 600; }
.tool-list { margin: 16px 0 0; }
.tool-list > div { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.tool-list dt { color: var(--link); font-size: 12px; overflow-wrap: anywhere; }
.tool-list dd { margin: 0; color: var(--muted-readable); font-size: 13px; }
@media (max-width: 620px) {
  .tools-card { padding: 20px 21px; }
  .tool-list > div { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}


@font-face { font-family: Lato; src: url('/assets/fonts/lato-regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Lato; src: url('/assets/fonts/lato-bold.ttf') format('truetype'); font-weight: 600 900; font-style: normal; font-display: swap; }
:root { --panel: var(--surface); --soft: var(--surface-soft); --border: var(--line); --muted: var(--muted-readable); }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181818; --surface: #242424; --surface-soft: #2b2b2b;
  --line: #414141; --line-strong: #555; --text: #f1f1f1;
  --muted-readable: #bcbcbc; --accent: #ff858b; --link: #ff9298;
  --brand-red-soft: #41292b; --brand-charcoal: #ededed; --sidebar: #202020;
  --shadow: 0 8px 24px rgba(0,0,0,.12);
}
.brand .brand-logo { display: block; flex: 0 0 86px; width: 86px; height: 48px; padding: 5px; background: #f00; border-radius: var(--box-radius); object-fit: contain; }
.brand .brand-mark { display: none; }
.brand { gap: 9px; }
.brand-copy b { font-size: 16px; }
.brand-copy small { max-width: 106px; white-space: normal; line-height: 1.5; font-size: 8px; }
.is-collapsed .brand-logo { display: none; }
.is-collapsed .brand .brand-mark { display: block; width: 42px; height: 30px; flex-basis: 42px; padding: 4px; background: #f00; border-radius: var(--box-radius); }
.topbar { border-color: var(--line); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--box-radius); color: var(--text); background: var(--surface); font-size: 12px; white-space: nowrap; }
.theme-toggle:hover { background: var(--surface-soft); }
.setup-icon, .service-icon { color: var(--link); border-color: var(--line); background: var(--brand-red-soft); }
.empty-note { margin-bottom: 0; color: var(--muted-readable); font-size: 14px; }
.swagger-card { min-height: 320px; padding: 24px 28px; }
.guide-section { margin-bottom: 20px; padding: 24px 28px; scroll-margin-top: 100px; }
.guide-section h3 { margin: 6px 0 12px; font-size: 21px; }
.guide-section p { max-width: 740px; color: var(--muted-readable); }
.guide-section .endpoint { max-width: 740px; }
.response-list { margin-bottom: 0; }
.response-list > div { display: flex; gap: 18px; padding: 10px 0; border-top: 1px solid var(--line); }
.response-list dt { color: var(--link); font-family: monospace; }
.response-list dd { margin: 0; color: var(--muted-readable); }
[data-theme="dark"] .source-state.is-ready { color: #b6d597; background: #293124; border-color: #45513b; }
[data-theme="dark"] .source-state.is-unavailable { color: #ffacac; background: #3e2828; border-color: #674343; }
[data-theme="dark"] .source-state:not(.is-ready):not(.is-unavailable) { color: #e3bc88; }
@media (max-width: 1100px) and (min-width: 621px) {
  .topbar-actions { gap: 6px; }
  .topbar { padding-inline: 22px; }
  .page-section { padding-inline: 22px; }
  .connection-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .sidebar-toggle { display: grid; width: 38px; height: 38px; flex-basis: 38px; }
  .workspace.is-menu-open .sidebar-menu { display: grid; padding-top: 16px; }
  .topbar { align-items: flex-start; }
  .topbar h1 { font-size: 18px; }
  .topbar-actions { flex-direction: column; align-items: flex-end; gap: 5px; }
  .theme-toggle { font-size: 11px; padding: 4px 8px; }
  .brand-copy b { font-size: 17px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .swagger-card, .guide-section { padding: 18px; }
  .swagger-card { min-height: 280px; }
  .sidebar .nav-label { display: inline; }
}
@media (max-width: 620px) {
  .workspace { grid-template-rows: auto 1fr; }
}
