/* sirene docs: the mdBook navy theme retinted to match the landing page. Loaded via
   `additional-css`. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --cyan: #22d3ee;
  --sky: #7dd3fc;
  --sidebar-width: 280px;
  --content-max-width: 780px;
}

.navy {
  --bg: #06101f;
  --fg: #dbeafe;

  --sidebar-bg: #050d1a;
  --sidebar-fg: #9fb4d3;
  --sidebar-non-existant: #3d5273;
  --sidebar-active: #7dd3fc;
  --sidebar-spacer: #12233d;

  --scrollbar: #24406a;

  --icons: #7088ab;
  --icons-hover: #dbeafe;

  --links: #7dd3fc;

  --inline-code-color: #a5f3fc;

  --theme-popup-bg: #0a1a30;
  --theme-popup-border: #1d3557;
  --theme-hover: #10233d;

  --quote-bg: #0b1b31;
  --quote-border: #1d3557;

  --table-border-color: #1d3557;
  --table-header-bg: #10233d;
  --table-alternate-bg: #091729;

  --searchbar-border-color: #1d3557;
  --searchbar-bg: #0a1a30;
  --searchbar-fg: #dbeafe;
  --searchbar-shadow-color: #0b2a52;
  --searchresults-header-fg: #8ba3c4;
  --searchresults-border-color: #1d3557;
  --searchresults-li-bg: #0b1b31;
  --search-mark-bg: #0e7490;
}

html.navy,
.navy body {
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(34, 211, 238, 0.1), transparent 60%),
    var(--bg);
}

.navy .content { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.navy .content h1,
.navy .content h2,
.navy .content h3 { font-weight: 700; letter-spacing: -0.4px; }
.navy .content h1 {
  background: linear-gradient(180deg, #ffffff 10%, var(--sky) 60%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.navy .content h2 { border-bottom: 1px solid var(--quote-border); padding-bottom: 0.3em; }

.navy code { font-variant-ligatures: none; font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.navy .content pre { border: 1px solid var(--quote-border); border-radius: 10px; }

/* Rendered diagrams sit on their own dark background. */
.content img { max-width: 100%; border: 1px solid var(--quote-border); border-radius: 10px; }

/* A diagram block's drawing and `sirene ascii` text, added by samples.py; styled like the
   landing page's editor window. */
.sirene-sample {
  margin: -8px 0 20px;
  border: 1px solid #1d3557;
  border-radius: 10px;
  background: #1e1e1e;
  overflow: hidden;
}
.sirene-sample-bar {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  background: #10233d;
  border-bottom: 1px solid #1d3557;
}
.sirene-view {
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  color: #8ba3c4;
  font: 500 12px var(--mono-font);
  cursor: pointer;
}
.sirene-view:hover { color: #dbeafe; }
.sirene-view.is-active { color: #dbeafe; border-color: #1d3557; background: #0d1d33; }
.sirene-pane[hidden] { display: none; }
.sirene-drawing { display: flex; justify-content: center; padding: 16px; }
.content .sirene-drawing img { max-width: 100%; height: auto; border: 0; border-radius: 0; }
.navy .content pre.sirene-ascii,
.content pre.sirene-ascii {
  margin: 0;
  padding: 16px 18px;
  color: #d4d4d4;
  background: none;
  border: 0;
  border-radius: 0;
  font: 12px/1.25 var(--mono-font);
  font-variant-ligatures: none;
  overflow-x: auto;
  white-space: pre;
}

/* The editor that replaces a sample's code block, and the playground's (custom.js). */
.sirene-edit,
.sirene-lang { margin-left: auto; }
.sirene-lang {
  padding: 2px 6px;
  border: 1px solid #1d3557;
  border-radius: 7px;
  background: #0d1d33;
  color: #dbeafe;
  font: 500 12px var(--mono-font);
}
textarea.sirene-source {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--quote-border);
  border-radius: 10px;
  background: var(--code-bg, #0b1b31);
  color: var(--fg);
  font: 14px/1.45 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-ligatures: none;
  tab-size: 4;
  resize: vertical;
}
textarea.sirene-source:focus { outline: none; border-color: var(--cyan); }
.content pre.sirene-status {
  margin: 0;
  padding: 6px 12px;
  border: 0;
  border-bottom: 1px solid #1d3557;
  border-radius: 0;
  background: #0d1d33;
  color: #8ba3c4;
  font: 12px/1.4 var(--mono-font);
  white-space: pre-wrap;
}
.content pre.sirene-status[hidden] { display: none; }
.content pre.sirene-status.is-error { color: #fca5a5; }

.navy .chapter li.chapter-item a { border-radius: 7px; padding-left: 8px; }
.navy .chapter li.chapter-item a:hover { background: var(--theme-hover); }
.navy .chapter li.chapter-item a.active {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.14), transparent);
  border-left: 3px solid var(--cyan);
}

.navy blockquote { border-left: 3px solid var(--cyan); border-radius: 0 10px 10px 0; }

/* The "sirene home" link custom.js adds to the sidebar. */
.sirene-home {
  display: block;
  margin: 0 14px 14px;
  padding: 9px 12px;
  border: 1px solid var(--quote-border);
  border-radius: 9px;
  font-weight: 600;
  color: var(--sky) !important;
  background: linear-gradient(120deg, rgba(34, 211, 238, 0.12), rgba(30, 58, 138, 0.25));
}
.sirene-home:hover { border-color: var(--cyan); }
