/*
 * CelliVerse pkgdown article stylesheet
 *
 * pkgdown-only counterpart of:
 *   vignettes/articles/celliverseVignette.css
 *
 * No wrapper is required in Introduction-to-CelliVerse.Rmd.
 *
 * Current pkgdown Bootstrap 5 article structure:
 *   .template-article main#main     -> article body (Bootstrap col-md-9)
 *   .template-article aside #toc   -> article TOC  (Bootstrap col-md-3)
 *
 * IMPORTANT:
 * The stylesheet deliberately does NOT set width, max-width, margin, padding,
 * border, border-radius, box-shadow, or overflow on main#main. Bootstrap owns
 * that grid layout, which preserves the right-hand pkgdown TOC.
 *
 * Article-specific presentation rules remain scoped to the article body/TOC,
 * so the navbar, homepage, reference pages, article index, and other pkgdown
 * page types are not restyled.
 *
 * The :root custom properties are intentionally global because all variables
 * are namespaced with --cv-.
 *
 * Install this file as:
 *   pkgdown/extra.css
 */

/* pkgdown integration safety */
.template-article main#main,
.template-article main#main *,
.template-article main#main *::before,
.template-article main#main *::after,
.template-article aside #toc,
.template-article aside #toc *,
.template-article aside #toc *::before,
.template-article aside #toc *::after {
  box-sizing: border-box;
}

/* CelliVerse vignette stylesheet
   Modernized for the CelliVerse package documentation.
   The original vignette styling was adapted in part from:
   https://github.com/nbarrowman/vtree
*/

/* -------------------------------------------------------------------------- */
/* Design tokens                                                               */
/* -------------------------------------------------------------------------- */

:root {
  --cv-page: #eef3f7;
  --cv-surface: #ffffff;
  --cv-surface-soft: #f7fafc;
  --cv-surface-blue: #f2f7fb;
  --cv-text: #1d2733;
  --cv-muted: #657282;
  --cv-border: #dbe4eb;
  --cv-border-strong: #cbd8e2;
  --cv-primary: #1769aa;
  --cv-primary-dark: #0f4f82;
  --cv-primary-soft: #eaf4fb;
  --cv-purple: #6f55c7;
  --cv-success: #237a52;
  --cv-success-soft: #eef9f3;
  --cv-warning: #a96713;
  --cv-warning-soft: #fff8ea;
  --cv-danger: #9f3f3f;
  --cv-code: #f4f7f9;
  --cv-shadow-sm: 0 3px 12px rgba(31, 50, 67, 0.06);
  --cv-shadow-md: 0 18px 48px rgba(31, 50, 67, 0.12);
  --cv-radius-sm: 8px;
  --cv-radius: 13px;
  --cv-radius-lg: 20px;
}

/* -------------------------------------------------------------------------- */
/* Main article layout                                                         */
/* -------------------------------------------------------------------------- */

.template-article main#main {
  /* Bootstrap owns this element's col-md-9 width and spacing. */
  min-width: 0;
  color: var(--cv-text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 15px;
  line-height: 1.68;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.template-article main#main ::selection {
  background: #dceeff;
  color: #17314a;
}

@media screen and (max-width: 768px) {
  .template-article main#main {
    font-size: 14px;
  }
}

/* -------------------------------------------------------------------------- */
/* Article-local header selectors                                              */
/* -------------------------------------------------------------------------- */

.template-article main#main .page-header {
  position: relative;
  overflow: hidden;
  margin: -12px 0 34px;
  padding: 34px 38px 31px;
  text-align: left;
  color: #ffffff;
  background:
    radial-gradient(circle at 92% -20%, rgba(255,255,255,0.18), transparent 230px),
    linear-gradient(135deg, #16283a 0%, #24587c 53%, #6755c7 100%);
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(28, 62, 91, 0.18);
}

.template-article main#main .page-header::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -88px;
  bottom: -118px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
}

.template-article main#main .page-header h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  padding: 0;
  color: #ffffff;
  border: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.template-article main#main .page-header .subtitle {
  position: relative;
  z-index: 1;
  max-width: 790px;
  margin: 0.25em 0 0;
  color: rgba(255,255,255,0.88);
  font-size: 112%;
  line-height: 1.5;
}

.template-article main#main .page-header .author,
.template-article main#main .page-header .date,
.template-article main#main .page-header h4 {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: rgba(255,255,255,0.72);
  font-size: 90%;
  font-weight: 500;
}

/* -------------------------------------------------------------------------- */
/* Table of contents                                                           */
/* -------------------------------------------------------------------------- */

.template-article aside #toc {
  clear: both;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0 0 34px;
  padding: 18px 22px;
  color: var(--cv-text);
  background:
    linear-gradient(180deg, #fbfdff 0%, #f3f8fb 100%);
  border: 1px solid var(--cv-border);
  border-radius: 15px;
  box-shadow: var(--cv-shadow-sm);
  font-size: 13px;
  line-height: 1.45;
}

.template-article aside #toc h2 {
  margin: 0 0 8px;
  color: #203140;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.template-article aside #toc ul {
  margin: 5px 0;
  padding-left: 22px;
}

.template-article aside #toc ul ul {
  margin: 3px 0;
}

.template-article aside #toc li {
  margin-bottom: 3px;
  line-height: 1.45;
}

.template-article aside #toc a {
  color: var(--cv-primary-dark);
  text-decoration: none;
}

.template-article aside #toc a:hover {
  color: var(--cv-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* Headings                                                                    */
/* -------------------------------------------------------------------------- */

.template-article main#main h1,
.template-article main#main h2,
.template-article main#main h3,
.template-article main#main h4,
.template-article main#main h5,
.template-article main#main h6 {
  color: #1b2b38;
  font-weight: 720;
}

.template-article main#main h1 {
  position: relative;
  margin: 46px 0 20px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--cv-border);
  font-size: 205%;
  line-height: 1.23;
  letter-spacing: -0.018em;
}

.template-article main#main h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 86px;
  height: 4px;
  background: linear-gradient(90deg, var(--cv-primary), var(--cv-purple));
  border-radius: 99px;
}

.template-article main#main .page-header h1::after {
  display: none;
}

.template-article main#main h2 {
  margin: 36px 0 15px;
  padding: 10px 14px;
  color: #1b3448;
  background: linear-gradient(90deg, #f1f7fb 0%, rgba(241,247,251,0) 88%);
  border-left: 4px solid #6aa5cc;
  border-bottom: 0;
  border-radius: 0 9px 9px 0;
  font-size: 158%;
  line-height: 1.3;
}

.template-article main#main h3 {
  margin: 28px 0 10px;
  padding-top: 4px;
  color: #243a49;
  font-size: 130%;
  line-height: 1.35;
}

.template-article main#main h4 {
  margin: 22px 0 8px;
  color: #314756;
  font-size: 114%;
}

.template-article main#main h5,
.template-article main#main h6 {
  margin-bottom: 5px;
  color: #394a56;
  font-size: 100%;
}

/* -------------------------------------------------------------------------- */
/* Text elements                                                               */
/* -------------------------------------------------------------------------- */

.template-article main#main p {
  margin: 0.72em 0;
}

.template-article main#main strong {
  color: #172b3a;
  font-weight: 720;
}

.template-article main#main em {
  color: #394957;
}

.template-article main#main blockquote {
  margin: 1.2em 0;
  padding: 0.85em 1.05em;
  color: #344754;
  background: #f6fafc;
  border-left: 4px solid #7fb3d5;
  border-radius: 0 8px 8px 0;
}

.template-article main#main hr {
  margin: 36px 0;
  border: 0;
  border-top: 1px solid var(--cv-border);
}

.template-article main#main dl {
  margin-left: 0;
}

.template-article main#main dl dt {
  color: #1f3545;
  font-weight: 700;
}

.template-article main#main dl dd {
  margin: 0 0 13px 18px;
}

.template-article main#main ul,
.template-article main#main ol {
  margin-top: 0.45em;
  margin-bottom: 1em;
  padding-left: 1.55em;
}

.template-article main#main ul li,
.template-article main#main ol li {
  margin-bottom: 5px;
}

.template-article main#main ul li::marker {
  color: #5c91b5;
}

.template-article main#main ol li::marker {
  color: var(--cv-primary-dark);
  font-weight: 700;
}

.template-article main#main ul ul,
.template-article main#main ol ol,
.template-article main#main ul ol,
.template-article main#main ol ul {
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------- */
/* Links and buttons                                                           */
/* -------------------------------------------------------------------------- */

.template-article main#main a {
  color: var(--cv-primary);
  text-decoration: none;
}

.template-article main#main a:visited {
  color: var(--cv-primary);
}

.template-article main#main a:hover,
.template-article main#main a:visited:hover {
  color: var(--cv-primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.template-article main#main a[href^="http:"]:not(.celliverse-button),
.template-article main#main a[href^="https:"]:not(.celliverse-button) {
  text-decoration-thickness: 1px;
}

.template-article main#main a[href="#top"] {
  display: inline-flex;
  align-items: center;
  margin: 12px 0 4px;
  padding: 5px 10px;
  color: #5f6d78;
  background: #f7f9fb;
  border: 1px solid var(--cv-border);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: none;
}

.template-article main#main a[href="#top"]::before {
  content: "↑";
  margin-right: 5px;
}

.template-article main#main a[href="#top"]:hover {
  color: var(--cv-primary-dark);
  background: #eef5fa;
  text-decoration: none;
}

.template-article main#main .celliverse-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  padding: 9px 16px;
  color: #ffffff !important;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(31, 61, 90, 0.12);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.template-article main#main .celliverse-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(31, 61, 90, 0.17);
}

.template-article main#main .celliverse-button-primary {
  background: linear-gradient(135deg, #2b7fc1, #765bd0);
}

.template-article main#main .celliverse-button-warm {
  color: #33260a !important;
  background: linear-gradient(135deg, #ffd95a, #f6a21a);
}

/* -------------------------------------------------------------------------- */
/* Tables                                                                      */
/* -------------------------------------------------------------------------- */

.template-article main#main table {
  width: 100%;
  max-width: 100%;
  margin: 1.35em auto;
  overflow: hidden;
  color: var(--cv-text);
  background: var(--cv-surface);
  border: 1px solid var(--cv-border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 11px;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(31, 50, 67, 0.035);
}

.template-article main#main table th {
  padding: 9px 11px;
  color: #203444;
  background: #edf4f8;
  border: 0;
  border-bottom: 1px solid var(--cv-border-strong);
  font-weight: 720;
  text-align: left;
}

.template-article main#main table td {
  padding: 8px 11px;
  border: 0;
  border-bottom: 1px solid #e8edf1;
  line-height: 1.45;
  vertical-align: top;
}

.template-article main#main tbody tr:last-child td {
  border-bottom: 0;
}

.template-article main#main tbody tr:nth-child(even) {
  background: #fbfcfd;
}

.template-article main#main tbody tr:hover {
  background: #f5f9fc;
}

.template-article main#main .table,
.template-article main#main .pagedtable-wrapper {
  max-width: 100%;
  overflow-x: auto;
}

/* -------------------------------------------------------------------------- */
/* Code blocks                                                                 */
/* -------------------------------------------------------------------------- */

.template-article main#main pre,
.template-article main#main code {
  color: #15212a;
  background: var(--cv-code);
  border-radius: 5px;
}

.template-article main#main pre {
  margin: 12px 0 19px;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid #dce5eb;
  border-left: 4px solid #78a9c8;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  line-height: 1.5;
  text-align: left;
}

.template-article main#main pre code {
  padding: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  background: transparent;
}

.template-article main#main .sourceCode,
.template-article main#main div.sourceCode {
  max-width: 100%;
  overflow-x: auto;
}

.template-article main#main pre.sourceCode,
.template-article main#main div.sourceCode pre,
.template-article main#main pre > code.sourceCode {
  max-width: 100%;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

.template-article main#main pre > code.sourceCode > span {
  display: block !important;
  max-width: 100%;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

.template-article main#main pre:not([class]) {
  background: var(--cv-code);
}

.template-article main#main code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Monaco,
    "Courier New", monospace;
  font-size: 91%;
}

.template-article main#main p > code,
.template-article main#main li > code,
.template-article main#main td > code,
.template-article main#main h3 > code,
.template-article main#main h4 > code {
  padding: 2px 5px;
  color: #1b4e70;
  background: #edf4f8;
  border: 1px solid #e0eaf0;
  border-radius: 4px;
}

/* -------------------------------------------------------------------------- */
/* Figures and images                                                          */
/* -------------------------------------------------------------------------- */

.template-article main#main div.figure {
  margin: 1.45em auto;
  text-align: center;
}

.template-article main#main div.figure img {
  border-radius: 9px;
}

.template-article main#main img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  vertical-align: middle;
}

.template-article main#main .youtube-thumbnail {
  display: block;
  width: 80%;
  max-width: 720px;
  height: auto;
  margin: 1.35em auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.template-article main#main .youtube-thumbnail:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* -------------------------------------------------------------------------- */
/* Callout boxes                                                               */
/* -------------------------------------------------------------------------- */

.template-article main#main .celliverse-note,
.template-article main#main .celliverse-tip,
.template-article main#main .celliverse-warning {
  position: relative;
  margin: 1.35em 0;
  padding: 0.95em 1.05em 0.95em 1.15em;
  border: 1px solid var(--cv-border);
  border-radius: 11px;
  box-shadow: 0 3px 11px rgba(31, 50, 67, 0.04);
  line-height: 1.58;
}

.template-article main#main .celliverse-note {
  background: linear-gradient(135deg, #f4f9fc, #f8fbfd);
  border-left: 4px solid #5da8d5;
}

.template-article main#main .celliverse-tip {
  background: linear-gradient(135deg, #f1faf5, #f8fcfa);
  border-left: 4px solid #4fae78;
}

.template-article main#main .celliverse-warning {
  background: linear-gradient(135deg, #fff8ec, #fffdf8);
  border-left: 4px solid #e3a13c;
}

.template-article main#main .celliverse-note strong:first-child,
.template-article main#main .celliverse-tip strong:first-child,
.template-article main#main .celliverse-warning strong:first-child {
  font-weight: 760;
}

/* -------------------------------------------------------------------------- */
/* Badges                                                                      */
/* -------------------------------------------------------------------------- */

.template-article main#main .celliverse-badge {
  display: inline-block;
  margin-bottom: 7px;
  padding: 3px 8px;
  color: #145a88;
  background: #e5f2fa;
  border: 1px solid #d5e9f5;
  border-radius: 999px;
  font-size: 77%;
  font-weight: 750;
  letter-spacing: 0.015em;
  vertical-align: baseline;
}

/* -------------------------------------------------------------------------- */
/* Workflow cards                                                              */
/* -------------------------------------------------------------------------- */

.template-article main#main .workflow-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
  margin: 20px 0 28px;
}

.template-article main#main .workflow-card {
  grid-column: span 2;
}

.template-article main#main .workflow-card:nth-child(4) {
  grid-column: 2 / span 2;
}

.template-article main#main .workflow-card:nth-child(5) {
  grid-column: 4 / span 2;
}

.template-article main#main .workflow-card {
  position: relative;
  min-height: 146px;
  padding: 18px 17px 16px;
  text-align: left;
  background: linear-gradient(145deg, #ffffff, #f8fbfd);
  border: 1px solid var(--cv-border);
  border-radius: 13px;
  box-shadow: var(--cv-shadow-sm);
}

.template-article main#main .workflow-card h3 {
  margin: 4px 0 7px;
  padding: 0;
  color: #243a49;
  font-size: 15px;
}

.template-article main#main .workflow-card p {
  margin: 0;
  color: var(--cv-muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.template-article main#main .workflow-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  margin-bottom: 6px;
  color: #ffffff;
  background: linear-gradient(135deg, #397ca8, #6958c4);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

/* -------------------------------------------------------------------------- */
/* Annotation route cards                                                      */
/* -------------------------------------------------------------------------- */

.template-article main#main .annotation-route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 24px;
}

.template-article main#main .annotation-route {
  padding: 17px 18px;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--cv-border);
  border-radius: 13px;
  box-shadow: var(--cv-shadow-sm);
}

.template-article main#main .annotation-route h3 {
  margin: 8px 0 7px;
  padding: 0;
  font-size: 14px;
}

.template-article main#main .annotation-route p {
  margin: 0;
  color: var(--cv-muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.template-article main#main .route-label {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 780;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.template-article main#main .route-markerdb {
  color: #155f87;
  background: #e9f5fb;
}

.template-article main#main .route-llm {
  color: #5c458f;
  background: #f0ebfb;
}

.template-article main#main .route-portable {
  color: #27734e;
  background: #eaf8f0;
}

/* -------------------------------------------------------------------------- */
/* Agent section                                                               */
/* -------------------------------------------------------------------------- */

.template-article main#main .agent-capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 24px;
}

.template-article main#main .agent-capability {
  padding: 18px;
  text-align: left;
  background:
    linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid var(--cv-border);
  border-radius: 13px;
  box-shadow: var(--cv-shadow-sm);
}

.template-article main#main .agent-capability > strong {
  display: block;
  margin: 1px 0 5px;
  font-size: 14px;
}

.template-article main#main .agent-capability p {
  margin: 0;
  color: var(--cv-muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.template-article main#main .format-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.template-article main#main .format-chip-row span {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  color: #35546a;
  background: #edf5f9;
  border: 1px solid #dbe9f1;
  border-radius: 7px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 10.5px;
  line-height: 1.3;
}

.template-article main#main .agent-steps {
  margin: 18px 0 24px;
}

.template-article main#main .agent-step {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 10px;
  padding: 13px 15px;
  text-align: left;
  background: #f9fbfc;
  border: 1px solid var(--cv-border);
  border-radius: 11px;
}

.template-article main#main .agent-step > span {
  display: inline-flex;
  flex: 0 0 29px;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  color: #ffffff;
  background: linear-gradient(135deg, #287cb7, #6857c5);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.template-article main#main .agent-step strong {
  display: block;
  margin: 1px 0 2px;
}

.template-article main#main .agent-step p {
  margin: 0;
  color: var(--cv-muted);
  font-size: 12.5px;
}

.template-article main#main .prompt-examples {
  display: grid;
  gap: 8px;
  margin: 14px 0 22px;
}

.template-article main#main .prompt-examples > div {
  position: relative;
  padding: 11px 14px 11px 38px;
  text-align: left;
  background: linear-gradient(135deg, #172637, #20384d);
  border: 1px solid #2d465c;
  border-radius: 10px;
  box-shadow: 0 4px 11px rgba(17, 35, 51, 0.09);
}

.template-article main#main .prompt-examples > div::before {
  content: "›";
  position: absolute;
  left: 15px;
  top: 7px;
  color: #80c6f3;
  font-size: 20px;
  font-weight: 800;
}

.template-article main#main .prompt-examples code {
  color: #edf6fc;
  background: transparent;
  border: 0;
  font-size: 12px;
}

/* -------------------------------------------------------------------------- */
/* Embedded TypoPrompt viewer                                                  */
/* -------------------------------------------------------------------------- */

.template-article main#main .typo-prompt-shell {
  margin: 20px 0 26px;
  padding: 0;
  overflow: hidden;
  background: #f5f8fb;
  border: 1px solid var(--cv-border-strong);
  border-radius: 15px;
  box-shadow: 0 9px 26px rgba(31, 50, 67, 0.08);
}

.template-article main#main .typo-prompt-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  text-align: left;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  border-bottom: 1px solid var(--cv-border);
}

.template-article main#main .typo-prompt-shell-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.template-article main#main .typo-prompt-shell-title .celliverse-badge {
  margin-bottom: 4px;
}

.template-article main#main .typo-prompt-shell-header strong {
  font-size: 13px;
}

.template-article main#main .typo-prompt-shell-hint {
  color: var(--cv-muted);
  font-size: 10.5px;
  text-align: right;
}

.template-article main#main .typo-prompt-frame {
  display: block;
  width: 100%;
  height: 760px;
  margin: 0;
  background: #ffffff;
  border: 0;
}

/* -------------------------------------------------------------------------- */
/* Syntax highlighting                                                         */
/* Colours adapted from https://gist.github.com/robsimmons/1172277             */
/* -------------------------------------------------------------------------- */

.template-article main#main code > span.kw {
  color: #555555;
  font-weight: bold;
}

.template-article main#main code > span.dt {
  color: #902000;
}

.template-article main#main code > span.dv {
  color: #27885b;
}

.template-article main#main code > span.bn,
.template-article main#main code > span.fl,
.template-article main#main code > span.ch,
.template-article main#main code > span.st {
  color: #b91f4b;
}

.template-article main#main code > span.co {
  color: #7b8790;
  font-style: italic;
}

.template-article main#main code > span.ot {
  color: #067038;
}

.template-article main#main code > span.al {
  color: #d31919;
  font-weight: bold;
}

.template-article main#main code > span.fu {
  color: #8d1b1b;
  font-weight: bold;
}

.template-article main#main code > span.er {
  color: #a61717;
  background: #f6dddd;
}

/* -------------------------------------------------------------------------- */
/* Responsive refinements                                                      */
/* -------------------------------------------------------------------------- */

@media screen and (max-width: 900px) and (min-width: 761px) {
  .template-article main#main .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-article main#main .workflow-card,
.template-article main#main .workflow-card:nth-child(4),
.template-article main#main .workflow-card:nth-child(5) {
    grid-column: auto;
  }
}

@media screen and (max-width: 760px) {
  .template-article main#main .page-header {
    margin-top: 0;
    padding: 27px 22px 25px;
    border-radius: 14px;
  }

  .template-article aside #toc {
    padding: 15px 16px;
  }

  .template-article main#main h1 {
    font-size: 180%;
  }

  .template-article main#main h2 {
    font-size: 145%;
  }

  .template-article main#main .annotation-route-grid,
.template-article main#main .agent-capability-grid {
    grid-template-columns: 1fr;
  }

  .template-article main#main .workflow-grid {
    grid-template-columns: 1fr;
  }

  .template-article main#main .workflow-card,
.template-article main#main .workflow-card:nth-child(4),
.template-article main#main .workflow-card:nth-child(5) {
    grid-column: auto;
  }

  .template-article main#main .typo-prompt-shell-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .template-article main#main .typo-prompt-shell-hint {
    text-align: left;
  }

  .template-article main#main .typo-prompt-frame {
    height: 650px;
  }
}

/* -------------------------------------------------------------------------- */
/* Print                                                                       */
/* -------------------------------------------------------------------------- */

@media print {
  .template-article main#main {
    color: #000000;
    background: #ffffff !important;
  }

  .template-article main#main .page-header {
    color: #000000;
    background: #ffffff;
    border: 1px solid #dddddd;
    box-shadow: none;
  }

  .template-article main#main .page-header h1,
.template-article main#main .page-header .subtitle,
.template-article main#main .page-header .author,
.template-article main#main .page-header .date,
.template-article main#main .page-header h4 {
    color: #000000 !important;
  }

  .template-article aside #toc,
.template-article main#main .workflow-card,
.template-article main#main .annotation-route,
.template-article main#main .agent-capability,
.template-article main#main .agent-step,
.template-article main#main .celliverse-note,
.template-article main#main .celliverse-tip,
.template-article main#main .celliverse-warning,
.template-article main#main .typo-prompt-shell {
    box-shadow: none;
  }

  .template-article main#main a[href="#top"] {
    display: none;
  }

  .template-article main#main .typo-prompt-frame {
    height: 600px;
  }

  .template-article main#main pre,
.template-article main#main table,
.template-article main#main .celliverse-note,
.template-article main#main .celliverse-tip,
.template-article main#main .celliverse-warning,
.template-article main#main .workflow-card,
.template-article main#main .annotation-route,
.template-article main#main .agent-capability {
    break-inside: avoid;
  }
}

/* Space between pkgdown navbar and article */
.template-article {
  padding-top: 26px;
}