/* The Compute Discovery API documentation in the look of www.egrit.ai (#271).
   Last updated: 2026-09-28
   Loaded after Swagger UI's own stylesheet, which it overrides. The tokens are the site's
   (site/public/index.html and talk.html): white, navy text, the muted navy, the line colour, and the
   blue darkened for text-sized use as talk.html does (5.9:1 on white, WCAG 1.4.3).
   The developer docs site (devdocs/, D79) puts this file first in its own stylesheet, so a change
   here changes docs.egrit.ai at its next build; app/tests/test_devdocs.py measures the pairings. */

:root {
  color-scheme: only light; /* white in every mode, as the site: browsers do not repaint it dark */
  --bg: #ffffff;
  --fg: #0f1b3d;
  --muted: #3b4a6b;
  --line: #c9d1e3;
  --accent: #1a5fd0;
  --tint: #eef3fc;
  --font: -apple-system, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); }

/* The header: the logo, as on www.egrit.ai (Denis, 2026-09-27: no tagline under it). */
.egrit-header { max-width: 1460px; margin: 0 auto; padding: 40px 20px 8px; box-sizing: border-box;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.egrit-header img { display: block; width: 240px; height: auto; } /* a transparent-ground copy of the site's logo */
#docs-loading { max-width: 1460px; margin: 24px auto; padding: 0 20px; color: var(--muted); font-size: 18px; }

/* Type: the site's font everywhere, monospace kept for code, paths and bodies. */
.swagger-ui, .swagger-ui .info, .swagger-ui .opblock-tag, .swagger-ui .opblock .opblock-summary-description,
.swagger-ui .btn, .swagger-ui label, .swagger-ui table, .swagger-ui .parameter__name, .swagger-ui .response-col_status,
.swagger-ui .tab li, .swagger-ui select, .swagger-ui .scheme-container .schemes > label, .swagger-ui .model-title,
.swagger-ui section.models h4, .swagger-ui .info .title, .swagger-ui .info p, .swagger-ui .info li,
.swagger-ui .markdown p, .swagger-ui .renderedMarkdown p { font-family: var(--font); color: var(--fg); }
.swagger-ui code, .swagger-ui pre, .swagger-ui .microlight, .swagger-ui .opblock .opblock-summary-path,
.swagger-ui .parameter__type, .swagger-ui .prop-format { font-family: var(--mono); }
.swagger-ui .info { margin: 24px 0 32px; }
.swagger-ui .info .title { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.swagger-ui .info p, .swagger-ui .info li { font-size: 17px; line-height: 1.55; }
.swagger-ui .info .main a { display: none; } /* the docs copy's URL; the contract is linked in the text */
.swagger-ui .info .title small { background: var(--muted); border-radius: 6px; }
.swagger-ui .info .title small.version-stamp { background: var(--accent); }
.swagger-ui .info .title small pre { color: #fff; font-family: var(--font); }
.swagger-ui .info code, .swagger-ui .markdown code, .swagger-ui .renderedMarkdown code {
  color: var(--fg); background: var(--tint); border-radius: 4px; }
.swagger-ui a, .swagger-ui .info a, .swagger-ui .markdown a { color: var(--accent); }

/* The server bar. */
.swagger-ui .scheme-container { background: var(--bg); box-shadow: none; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); padding: 20px 0; }

/* Sections and operations: the accent for GET, the site's radius and line. */
.swagger-ui .opblock-tag { border-bottom: 1px solid var(--line); font-size: 26px; font-weight: 700; }
.swagger-ui .opblock-tag small { color: var(--muted); font-size: 16px; }
.swagger-ui .opblock { border-radius: 8px; box-shadow: none; }
.swagger-ui .opblock.opblock-get { background: var(--tint); border-color: var(--accent); }
.swagger-ui .opblock.opblock-get .opblock-summary { border-color: var(--accent); }
.swagger-ui .opblock.opblock-get .opblock-summary-method { background: var(--accent); border-radius: 6px; font-family: var(--font); }
.swagger-ui .opblock.opblock-get .tab-header .tab-item.active h4 span:after { background: var(--accent); }
.swagger-ui .opblock .opblock-section-header { background: var(--bg); box-shadow: none; border-bottom: 1px solid var(--line); }
.swagger-ui .opblock .opblock-section-header h4, .swagger-ui .opblock-description-wrapper p,
.swagger-ui .responses-inner h4, .swagger-ui .responses-inner h5 { color: var(--fg); font-family: var(--font); }
.swagger-ui .parameter__in, .swagger-ui .parameter__deprecated { color: var(--muted); }
.swagger-ui .parameter__name.required:after { color: #b3261e; }

/* Controls: as the site's form (talk.html). */
.swagger-ui .btn { border: 2px solid var(--line); border-radius: 8px; box-shadow: none; color: var(--fg); font-weight: 600; }
.swagger-ui .btn.execute { background: var(--accent); border-color: var(--accent); color: #fff; }
.swagger-ui .btn.authorize { border-color: var(--accent); color: var(--accent); }
.swagger-ui .btn.authorize svg, .swagger-ui .authorization__btn svg { color: var(--accent); fill: var(--accent); } /* the icon draws in currentColor */
.swagger-ui .btn.cancel { border-color: #b3261e; color: #b3261e; }
.swagger-ui select, .swagger-ui input[type=text], .swagger-ui input[type=password], .swagger-ui textarea {
  border: 2px solid var(--line); border-radius: 8px; color: var(--fg); background-color: var(--bg); box-shadow: none; }
.swagger-ui a:focus-visible, .swagger-ui button:focus-visible, .swagger-ui select:focus-visible,
.swagger-ui input:focus-visible, .swagger-ui textarea:focus-visible, .egrit-header a:focus-visible {
  outline: 3px solid var(--fg); outline-offset: 3px; }

/* Responses and the schemas list. */
.swagger-ui .highlight-code > .microlight, .swagger-ui .microlight { border-radius: 8px; }
.swagger-ui .opblock-body pre.microlight, .swagger-ui .highlight-code > .microlight, .swagger-ui .curl-command .microlight {
  background: var(--fg) !important; }
.swagger-ui section.models { border: 1px solid var(--line); border-radius: 8px; }
.swagger-ui section.models.is-open h4 { border-bottom: 1px solid var(--line); }
.swagger-ui .model-box { background: var(--tint); border-radius: 8px; }

/* The "Connect Egrit MCP" menu (#133): a disclosure under the button, right-aligned on a wide screen,
   the full width of the page on a phone. Controls as the site's form: 2px line, 8px radius, 44px targets. */
.connect { position: relative; }
.connect-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 600 16px/1 var(--font); color: #fff; background: var(--accent); border: 2px solid var(--accent);
  border-radius: 8px; padding: 12px 16px; min-height: 44px; cursor: pointer; }
.connect-button::after { content: ""; display: inline-block;
  border: 5px solid transparent; border-top-color: currentColor; border-bottom: 0; }
.connect-button[aria-expanded="true"]::after { border-top: 0; border-bottom: 5px solid currentColor; }
.connect-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: 360px;
  max-width: calc(100vw - 40px); box-sizing: border-box; background: var(--bg); color: var(--fg);
  border: 2px solid var(--line); border-radius: 8px; padding: 12px; box-shadow: 0 8px 24px rgba(15, 27, 61, 0.12); }
.connect-panel[hidden], .connect-fallback[hidden] { display: none; }
.connect-panel ul { list-style: none; margin: 0; padding: 0; }
.connect-panel li { margin: 0; }
.connect-panel li > button, .connect-panel li > a, .connect-unavailable { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box;
  min-height: 44px; padding: 12px; text-align: left; font: 16px/1.25 var(--font); color: var(--fg);
  background: none; border: 0; border-radius: 6px; text-decoration: none; cursor: pointer; }
.connect-panel li > button:hover, .connect-panel li > a:hover { background: var(--tint); }
.connect-panel li > .connect-primary { font-weight: 700; color: var(--accent); }
.connect-unavailable { color: var(--muted); cursor: default; }
/* The icons: 20 px in a 32 px tile with the site's line and radius, drawn in the item's own colour. */
.connect-icon { flex: none; }
.connect-panel .connect-icon { box-sizing: content-box; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.connect-button .connect-icon { width: 18px; height: 18px; }
.connect-rule { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.connect-status { margin: 4px 12px 8px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.connect-status:empty { display: none; }
.connect-fallback { display: block; width: 100%; box-sizing: border-box; min-height: 160px; margin-top: 8px;
  font: 13px/1.4 var(--mono); color: var(--fg); border: 2px solid var(--line); border-radius: 8px; padding: 8px; }
.connect-button:focus-visible, .connect-panel button:focus-visible, .connect-panel a:focus-visible,
.connect-fallback:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }
@media (max-width: 600px) {
  .egrit-header { padding-top: 24px; }
  .egrit-header img { width: 180px; }
  .connect { flex: 1 1 100%; }
  .connect-button { width: 100%; }
  .connect-panel { position: static; width: 100%; max-width: none; margin-top: 8px; box-shadow: none; }
}
