
/* =============================================================================
   Parseff Shell — Starlight-inspired documentation layout
   Flexoki colour palette, three-column layout, full dark mode support
   ============================================================================= */

/* ---------------------------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------------------------- */

:root {
  /* Light mode — Flexoki */
  --color-bg:          #fffcf0;
  --color-sidebar-bg:  #fffcf0;
  --color-content-bg:  #fffcf0;
  --color-text:        #100f0f;
  --color-text-muted:  #6f6e69;
  --color-link:        #205ea6;
  --color-link-hover:  #1a4d88;
  --color-border:      #e6e4d9;
  --color-code-bg:     #f2f0e5;
  --color-inline-code-bg: #e6e4d9;
  --color-active-bg:   #dde7f5;
  --color-active-text: #528fc3;
  --color-logo:        #528fc3;

  /* Layout */
  --sidebar-width:     300px;
  --toc-width:         200px;
  --content-max:       56rem;
  --header-height:     48px;

  /* Syntax highlighting — light */
  --color-kw:          #5b2d8e;
  --color-string:      #66800b;
  --color-comment:     #878580;
  --color-typevar:     #bc5215;
  --color-constructor: #24837b;
  --color-arrow:       #6f6e69;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo,
               Consolas, 'DejaVu Sans Mono', monospace;
  --font-size-base: 16px;
  --line-height:    1.7;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Borders */
  --radius-sm: 3px;
  --radius-md: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:          #100f0f;
    --color-sidebar-bg:  #100f0f;
    --color-content-bg:  #100f0f;
    --color-text:        #cecdc3;
    --color-text-muted:  #878580;
    --color-link:        #7cacf8;
    --color-link-hover:  #9dbffa;
    --color-border:      #343331;
    --color-code-bg:     #1c1b1a;
    --color-inline-code-bg: #282726;
    --color-active-bg:   #1e2d45;
    --color-active-text: #7cacf8;
    --color-logo:        #7cacf8;

    /* Syntax highlighting — dark */
    --color-kw:          #ce85f8;
    --color-string:      #8ea94e;
    --color-comment:     #878580;
    --color-typevar:     #da8b45;
    --color-constructor: #3aa99f;
    --color-arrow:       #878580;
  }
}

/* ---------------------------------------------------------------------------
   2. Reset & base
   --------------------------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body.parseff-shell {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-height);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------------------
   3. Header
   --------------------------------------------------------------------------- */

.parseff-shell .site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-bg);
  border-bottom: none;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  align-items: center;
  padding: 0;
  flex-shrink: 0;
}

.parseff-shell .menu-toggle {
  display: none; /* hidden on desktop */
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  line-height: 1;
}

.parseff-shell .menu-toggle:hover {
  background: var(--color-border);
}

.parseff-shell .site-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-logo);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  padding-left: 24px;
}

.parseff-shell .site-title:hover {
  text-decoration: none;
  opacity: 0.8;
}

.parseff-shell .breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.parseff-shell .breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.parseff-shell .breadcrumbs a:hover {
  color: var(--color-link);
  text-decoration: underline;
}

/* --- Search --- */

.parseff-shell .search-container {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  padding-left: 24px;
}

.parseff-shell .search-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.parseff-shell .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.parseff-shell .search-input {
  width: 100%;
  padding: 6px 12px 6px 34px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-content-bg);
  color: var(--color-text);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s;
}

.parseff-shell .search-input:focus {
  border-color: var(--color-link);
  box-shadow: 0 0 0 2px rgba(32, 94, 166, 0.15);
}

.parseff-shell .search-shortcut {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 1px 5px;
  pointer-events: none;
  font-family: var(--font-mono);
}

.parseff-shell .search-results {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 400px;
  overflow-y: auto;
  background: var(--color-content-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 300;
}

.parseff-shell .search-results.active {
  display: block;
}

.parseff-shell .search-result {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8125rem;
  transition: background 0.1s;
}

.parseff-shell .search-result:last-child {
  border-bottom: none;
}

.parseff-shell .search-result:hover {
  background: var(--color-active-bg);
}

.parseff-shell .search-result code,
.parseff-shell .search-result .entry-name {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.parseff-shell .search-result .entry-kind {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.parseff-shell .search-result .entry-comment {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.parseff-shell .search-no-result {
  padding: 12px;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  text-align: center;
}

@media (max-width: 768px) {
  .parseff-shell .search-container {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
   4. Site layout: sidebar + main-area
   --------------------------------------------------------------------------- */

.parseff-shell .site-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ---------------------------------------------------------------------------
   5. Sidebar
   --------------------------------------------------------------------------- */

.parseff-shell .site-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-sidebar-bg);
  border-right: none;
  overflow-y: auto;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  padding: var(--space-4) 0;
}

.parseff-shell .sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.parseff-shell .sidebar-nav li {
  margin: 0;
}

.parseff-shell .sidebar-nav li > a,
.parseff-shell .sidebar-nav li > span {
  display: block;
  padding: var(--space-1) var(--space-4) var(--space-1) 24px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 0;
  transition: color 0.1s;
  line-height: 1.5;
}

.parseff-shell .sidebar-nav li > a:hover {
  background: var(--color-border);
  color: var(--color-link);
}

/* Active page */
.parseff-shell .sidebar-nav li.sidebar-active > a,
.parseff-shell .sidebar-nav li.sidebar-active > span {
  background: transparent;
  color: var(--color-active-text);
  font-weight: 600;
}

/* Children indentation */
.parseff-shell .sidebar-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.parseff-shell .sidebar-children li > a,
.parseff-shell .sidebar-children li > span {
  padding-left: 36px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.parseff-shell .sidebar-children li > a:hover {
  color: var(--color-link);
  background: var(--color-border);
}

.parseff-shell .sidebar-children li.sidebar-active > a {
  background: transparent;
  color: var(--color-active-text);
  font-weight: 600;
}

/* Third-level sidebar indentation */
.parseff-shell .sidebar-children .sidebar-children li > a,
.parseff-shell .sidebar-children .sidebar-children li > span {
  padding-left: 48px;
}

/* Section headings (non-link entries with children) */
.parseff-shell .sidebar-has-children > span {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  padding-top: var(--space-4);
  margin-top: var(--space-3);
  cursor: default;
}

/* ---------------------------------------------------------------------------
   6. Main area
   --------------------------------------------------------------------------- */

.parseff-shell .main-area {
  flex: 1;
  display: flex;
  min-width: 0;
  overflow: hidden;
}

/* ---------------------------------------------------------------------------
   7. Content
   --------------------------------------------------------------------------- */

.parseff-shell .odoc-content {
  flex: 1;
  min-width: 0;
  padding: var(--space-8) 24px var(--space-12);
  max-width: var(--content-max);
  overflow-x: auto;
}

/* ---------------------------------------------------------------------------
   8. TOC sidebar
   --------------------------------------------------------------------------- */

.parseff-shell .toc-sidebar {
  width: var(--toc-width);
  flex-shrink: 0;
  display: none; /* hidden by default, shown on wide screens */
  padding: var(--space-8) var(--space-4);
}

@media (min-width: 1200px) {
  .parseff-shell .toc-sidebar {
    display: block;
  }
}

.parseff-shell .on-this-page {
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
}

.parseff-shell .toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.parseff-shell .on-this-page ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.parseff-shell .on-this-page li {
  margin: 0;
}

.parseff-shell .on-this-page a {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 2px 0;
  line-height: 1.5;
  border-left: 2px solid transparent;
  padding-left: var(--space-3);
  transition: color 0.1s, border-color 0.1s;
}

.parseff-shell .on-this-page a:hover {
  color: var(--color-link);
  border-left-color: var(--color-link);
}

/* Nested TOC */
.parseff-shell .on-this-page ul ul a {
  padding-left: calc(var(--space-3) + var(--space-4));
  font-size: 0.75rem;
}

/* ---------------------------------------------------------------------------
   9. Prev/Next navigation
   --------------------------------------------------------------------------- */

.parseff-shell .page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.parseff-shell .prev-link,
.parseff-shell .next-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, background 0.15s;
}

.parseff-shell .prev-link:hover,
.parseff-shell .next-link:hover {
  border-color: var(--color-link);
  background: var(--color-active-bg);
}

.parseff-shell .next-link {
  grid-column: 2;
  text-align: right;
  align-items: flex-end;
}

/* When only one link exists and it's prev-link alone */
.parseff-shell .page-nav .prev-link:only-child {
  grid-column: 1;
}

/* When only next-link exists */
.parseff-shell .page-nav .next-link:only-child {
  grid-column: 2;
}

.parseff-shell .nav-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.parseff-shell .nav-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-link);
}

/* ---------------------------------------------------------------------------
   10. Footer
   --------------------------------------------------------------------------- */

.parseff-shell .site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-8);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   11. Responsive — mobile sidebar
   --------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .parseff-shell .menu-toggle {
    display: flex;
  }

  .parseff-shell .site-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 2px 0 16px rgba(0,0,0,0.18);
  }

  .parseff-shell.sidebar-open .site-sidebar {
    transform: translateX(0);
  }

  /* Overlay when sidebar open */
  .parseff-shell.sidebar-open::after {
    content: '';
    position: fixed;
    inset: 0;
    top: var(--header-height);
    background: rgba(0,0,0,0.4);
    z-index: 199;
  }

  .parseff-shell .odoc-content {
    padding: var(--space-6) var(--space-4) var(--space-10);
  }

  .parseff-shell .page-nav {
    grid-template-columns: 1fr;
  }

  .parseff-shell .next-link {
    grid-column: 1;
    text-align: left;
    align-items: flex-start;
  }
}

/* ---------------------------------------------------------------------------
   12. odoc content styles
   --------------------------------------------------------------------------- */

/* --- Links --- */

.parseff-shell .odoc-content a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.parseff-shell .odoc-content a:hover {
  color: var(--color-link-hover);
}

/* --- Headings --- */

.parseff-shell .odoc-content h1,
.parseff-shell .odoc-content h2,
.parseff-shell .odoc-content h3,
.parseff-shell .odoc-content h4,
.parseff-shell .odoc-content h5,
.parseff-shell .odoc-content h6 {
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1.3;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  color: var(--color-text);
  scroll-margin-top: calc(var(--header-height) + var(--space-4));
}

.parseff-shell .odoc-content h1 {
  font-size: 2.5rem;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: var(--space-6);
}

.parseff-shell .odoc-content h2 {
  font-size: 1.5rem;
}

.parseff-shell .odoc-content h3 { font-size: 1.2rem; }
.parseff-shell .odoc-content h4 { font-size: 1.05rem; }
.parseff-shell .odoc-content h5 { font-size: 0.95rem; }
.parseff-shell .odoc-content h6 { font-size: 0.875rem; color: var(--color-text-muted); }

/* --- Paragraphs & text --- */

.parseff-shell .odoc-content p {
  margin: 0 0 var(--space-4);
}

.parseff-shell .odoc-content p:last-child {
  margin-bottom: 0;
}

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

.parseff-shell .odoc-content pre {
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: var(--space-4) 0;
  tab-size: 2;
}

.parseff-shell .odoc-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  border-radius: 0;
}

/* Inline code */
.parseff-shell .odoc-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-inline-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  color: var(--color-text);
}


/* Strong / bold text */
.parseff-shell .odoc-content strong,
.parseff-shell .odoc-content b {
  font-weight: 700;
  color: var(--color-text);
}

/* --- Type / spec declarations --- */

.parseff-shell .odoc-content .spec {
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-link);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  overflow-x: auto;
}

/* --- Syntax highlighting (all code: pre and .spec) --- */

.parseff-shell .odoc-content .keyword {
  color: var(--color-kw);
  font-weight: 600;
}

.parseff-shell .odoc-content .type-var {
  color: var(--color-typevar);
  font-style: italic;
}

.parseff-shell .odoc-content .arrow {
  color: var(--color-arrow);
}

.parseff-shell .odoc-content .label,
.parseff-shell .odoc-content .optlabel {
  color: var(--color-string);
}

.parseff-shell .odoc-content .constructor {
  color: var(--color-constructor);
}

.parseff-shell .odoc-content .comment-delim {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Bold val/type names in spec */
.parseff-shell .odoc-content .spec .def > a:first-child,
.parseff-shell .odoc-content .spec .def > :not(.keyword):not(.type-var):not(.arrow):not(.label):not(.optlabel):not(.constructor):not(.comment-delim) > a:first-child {
  font-weight: 700;
}

.parseff-shell .odoc-content .spec .def {
  margin: 0;
  text-indent: -2ex;
  padding-left: 2ex;
}

.parseff-shell .odoc-content li:not(:last-child) > .def-doc {
  margin-bottom: 15px;
}

.parseff-shell .odoc-content .spec.type > ol {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
}

.parseff-shell .odoc-content .spec.type .variant,
.parseff-shell .odoc-content .spec.type .record {
  margin-left: 2ch;
}

.parseff-shell .odoc-content .spec.type li.variant,
.parseff-shell .odoc-content .spec.type li.record {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  text-indent: 0;
  padding-left: 0;
}

.parseff-shell .odoc-content .spec.type .variant p,
.parseff-shell .odoc-content .spec.type .record p {
  margin: 0;
  display: inline;
}

/* Nested ol (inline records inside variants) takes full width to stack vertically */
.parseff-shell .odoc-content .spec.type li.variant > ol {
  flex-basis: 100%;
  margin: 0;
  padding-left: 0;
}


.parseff-shell .odoc-content .spec.type .record > .def-doc,
.parseff-shell .odoc-content .spec.type .variant > .def-doc {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-style: italic;
  margin-left: 2ch;
}

.parseff-shell .odoc-content .spec.type .record > .def-doc::before,
.parseff-shell .odoc-content .spec.type .variant > .def-doc::before {
  content: "— ";
  font-style: normal;
}

.parseff-shell .odoc-content .doc {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-4) var(--space-2) var(--space-6);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--color-text);
}

.parseff-shell .odoc-content .odoc-include {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
  overflow: hidden;
}

.parseff-shell .odoc-content .odoc-include summary,
.parseff-shell .odoc-content .odoc-include > .spec {
  background: var(--color-code-bg);
  padding: var(--space-3) var(--space-4);
  margin: 0;
  border: none;
  border-radius: 0;
}

/* --- Lists --- */

.parseff-shell .odoc-content ul,
.parseff-shell .odoc-content ol {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-6);
}

.parseff-shell .odoc-content li {
  margin: var(--space-1) 0;
}

.parseff-shell .odoc-content li > ul,
.parseff-shell .odoc-content li > ol {
  margin-top: var(--space-1);
  margin-bottom: 0;
}

/* --- Definition lists (dl/dt/dd) --- */

.parseff-shell .odoc-content dl {
  margin: 0 0 var(--space-4);
}

.parseff-shell .odoc-content dt {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text);
  margin-top: var(--space-3);
}

.parseff-shell .odoc-content dd {
  margin-left: var(--space-6);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* --- Tables --- */

.parseff-shell .odoc-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: var(--space-4) 0;
  overflow-x: auto;
  display: block;
}

.parseff-shell .odoc-content th,
.parseff-shell .odoc-content td {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  text-align: left;
}

.parseff-shell .odoc-content th {
  background: var(--color-sidebar-bg);
  font-weight: 700;
  font-size: 0.875rem;
}

.parseff-shell .odoc-content tr:nth-child(even) td {
  background: var(--color-code-bg);
}

/* --- Blockquotes --- */

.parseff-shell .odoc-content blockquote {
  border-left: 3px solid var(--color-border);
  margin: var(--space-4) 0;
  padding: var(--space-2) var(--space-4);
  color: var(--color-text-muted);
  font-style: italic;
}

/* --- Horizontal rules --- */

.parseff-shell .odoc-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

/* --- Anchor links on headings --- */

.parseff-shell .odoc-content a.anchor {
  text-decoration: none;
  opacity: 0;
  margin-left: 0;
  color: var(--color-text-muted);
  font-size: 0.875em;
  transition: opacity 0.15s;
}

.parseff-shell .odoc-content *:hover > a.anchor,
.parseff-shell .odoc-content a.anchor:focus {
  opacity: 1;
}

/* --- Source links --- */

.parseff-shell .odoc-content a.source_link {
  float: right;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-top: 0.2em;
}

.parseff-shell .odoc-content a.source_link:hover {
  color: var(--color-link);
}

/* --- Alerts / admonitions --- */

.parseff-shell .odoc-content .odoc-alert {
  border-left: 3px solid var(--color-link);
  background: var(--color-active-bg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
}

/* --- Type definitions --- */

.parseff-shell .odoc-content .type-def {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* --- Modules and values --- */

.parseff-shell .odoc-content .odoc-module-children,
.parseff-shell .odoc-content .odoc-val,
.parseff-shell .odoc-content .odoc-type,
.parseff-shell .odoc-content .odoc-exception,
.parseff-shell .odoc-content .odoc-class,
.parseff-shell .odoc-content .odoc-module {
  margin: var(--space-4) 0;
}

/* --- Source code pages (.odoc-src) --- */

.parseff-shell .source_container {
  display: flex;
  margin-top: 0;
}

.parseff-shell .source_line_column {
  padding-right: 0.5em;
  text-align: right;
  color: var(--color-text-muted);
  background: var(--color-code-bg);
  user-select: none;
  flex-shrink: 0;
}

.parseff-shell .source_line {
  padding: 0 1em;
}

.parseff-shell .source_line a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.parseff-shell .source_line a:hover {
  text-decoration: underline;
}

.parseff-shell .source_code {
  flex-grow: 1;
  background: var(--color-content-bg);
  padding: 0 0.3em;
}

.parseff-shell.odoc-src .odoc-content pre {
  font-size: 0.8125rem;
  line-height: 1.55;
}

/* Source syntax highlighting */
.parseff-shell .source_code .TYPE { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .LET { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .IN { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .FUN { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .FUNCTION { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .MATCH { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .WITH { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .IF { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .THEN { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .ELSE { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .BEGIN { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .END { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .STRUCT { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .SIG { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .MODULE { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .OPEN { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .REC { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .AND { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .VAL { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .EXTERNAL { color: var(--color-kw); font-weight: 600; }
.parseff-shell .source_code .OF { color: var(--color-kw); }
.parseff-shell .source_code .UIDENT { color: var(--color-constructor); }
.parseff-shell .source_code .STRING { color: var(--color-string); }
.parseff-shell .source_code .COMMENT { color: var(--color-comment); font-style: italic; }
.parseff-shell .source_code .INT { color: var(--color-typevar); }
.parseff-shell .source_code .FLOAT { color: var(--color-typevar); }

/* ---------------------------------------------------------------------------
   13. Scrollbar styling (WebKit)
   --------------------------------------------------------------------------- */

.parseff-shell .site-sidebar::-webkit-scrollbar {
  width: 6px;
}

.parseff-shell .site-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.parseff-shell .site-sidebar::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

.parseff-shell .site-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ---------------------------------------------------------------------------
   14. Highlight.js syntax theme
   --------------------------------------------------------------------------- */

.parseff-shell .hljs { color: var(--color-text); }
.parseff-shell .hljs-comment,
.parseff-shell .hljs-meta { color: var(--color-comment); font-style: italic; }
.parseff-shell .hljs-string,
.parseff-shell .hljs-literal { color: var(--color-string); }
.parseff-shell .hljs-keyword,
.parseff-shell .hljs-selector-tag { color: var(--color-kw); font-weight: 600; }
.parseff-shell .hljs-type,
.parseff-shell .hljs-title.class_ { color: var(--color-constructor); }
.parseff-shell .hljs-symbol,
.parseff-shell .hljs-bullet,
.parseff-shell .hljs-number { color: var(--color-typevar); }
.parseff-shell .hljs-variable,
.parseff-shell .hljs-template-variable { color: var(--color-text); }
.parseff-shell .hljs-section,
.parseff-shell .hljs-name { color: var(--color-kw); }
.parseff-shell .hljs-built_in { color: var(--color-constructor); }

/* ---------------------------------------------------------------------------
   15. Focus styles (accessibility)
   --------------------------------------------------------------------------- */

.parseff-shell :focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.parseff-shell .menu-toggle:focus-visible {
  outline: 2px solid var(--color-link);
}
