/* ── ORC Documentation — Custom Styles ── */

/* ── ORC Dark Theme — matches tool UI color palette ── */

/* Custom primary/accent colors (required for palette: primary: custom) */
:root > * {
  --md-primary-fg-color:        #282828;
  --md-primary-fg-color--light: #2a2a2a;
  --md-primary-fg-color--dark:  #1e1e1e;
  --md-primary-bg-color:        #EEE;
  --md-accent-fg-color:         #0078d4;
  --md-accent-fg-color--transparent: rgba(0,120,212,0.12);
}

/* Slate scheme overrides */
[data-md-color-scheme="slate"] {
  --md-default-bg-color:        #1e1e1e;
  --md-default-bg-color--light: #232323;
  --md-default-bg-color--lighter: #282828;
  --md-default-fg-color:        #EEE;
  --md-default-fg-color--light: #CCC;
  --md-default-fg-color--lighter: #AAA;
  --md-default-fg-color--lightest: #666;
  --md-code-bg-color:           #282828;
  --md-code-fg-color:           #CCC;
  --md-typeset-color:           #EEE;
  --md-typeset-a-color:         #5aacf0;
  --md-footer-bg-color:         #1a1a1a;
  --md-footer-bg-color--dark:   #161616;
}

/* Visited links — keep readable on dark bg */
[data-md-color-scheme="slate"] .md-typeset a:visited {
  color: #9a8fcf;
}

/* Header bar */
.md-header {
  background: #1e1e1e;
  border-bottom: 1px solid #333;
}

/* Tabs bar below header */
.md-tabs {
  background: #232323;
  border-bottom: 1px solid #333;
}

/* ── Sidebar separators ── */
.md-nav__item {
  border-bottom: 1px solid #2a2a2a;
}

.md-nav__item--nested > .md-nav__link {
  border-bottom: 1px solid #333;
}

/* Section labels in sidebar */
.md-nav__item--section > .md-nav__link {
  color: #AAA;
  font-weight: 600;
  border-bottom: 1px solid #444;
  padding-bottom: 4px;
  margin-bottom: 2px;
}

/* Active sidebar link accent */
.md-nav__link--active {
  border-left: 3px solid #0078d4;
  padding-left: 8px;
}

/* TOC sidebar (right) section borders */
.md-sidebar--secondary .md-nav__item {
  border-bottom: 1px solid #282828;
}

/* ── Section headers ── */
.md-content h2 {
  border-bottom: 1px solid #444;
  padding-bottom: 6px;
  margin-top: 2em;
  letter-spacing: -0.01em;
  color: #EEE;
}

.md-content h3 {
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
  margin-top: 1.5em;
  color: #CCC;
}

/* Inline widget mockups — flush with header text */
.orc-widget-inline {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 12px;
}

/* Widget bar: row of inline mockup widgets next to a header */
.orc-widget-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
  margin-left: 14px;
}

/* Full-width UI strip mockup (like the top toolbar) */
.orc-ui-strip {
  background: #282828;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: 'Inter', sans-serif;
}

/* Dark inset container for widget groups */
.orc-ui-inset {
  background: #1e1e1e;
  border-radius: 6px;
  padding: 14px 18px;
  display: inline-block;
  margin: 8px 0;
}

/* ── Annotated image badges ── */
.orc-annotated {
  position: relative;
  display: inline-block;
  margin: 12px 0;
}
.orc-annotated img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #444;
}
.orc-badge {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0078d4;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  pointer-events: none;
  z-index: 1;
}

/* ── Pricing card icons ── */
.pricing-card .card-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 10px;
  image-rendering: pixelated;
}
.pricing-card .card-emoji-icon {
  font-size: 36px;
  line-height: 48px;
  height: 48px;
  margin-bottom: 10px;
}

/* ── Video tutorial frames ── */
/* Swap-later: replace the inner <div class="video-pending"> with
   <iframe src="https://www.youtube.com/embed/VIDEO_ID" allowfullscreen></iframe>
   and drop the "video-pending" class. The .video-embed wrapper keeps 16:9. */
.video-embed {
  position: relative;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  margin: 1.2rem 0 1.8rem;
  border-radius: 8px;
  overflow: hidden;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-pending {
  background: #1a1a1a;
  border: 1px dashed #555;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-pending-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #888;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
}
.vp-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #4A9E5C;
  color: #fff;
  font-size: 1rem;
  padding-left: 2px;
}

/* Tutorials index grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin: 28px 0;
}
.video-card .video-embed { margin: 0 0 10px; max-width: none; }
.video-card h3 {
  border: none !important;
  margin: 0 0 2px !important;
  padding: 0 !important;
  font-size: 1rem;
  color: #EEE;
}
.video-card p {
  margin: 0;
  color: #999;
  font-size: 0.85rem;
}

/* ── Plain screenshot frame (house style) ────────────────────────────
   Use on any un-annotated screenshot:  ![Alt](path.png){ .orc-shot }
   Annotated shots use the inline <svg> pattern instead, whose viewBox
   must carry a >=34px margin so numbered badges never clip.          */
img.orc-shot {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  border: 1px solid #444;
  border-radius: 4px;
  background: #151515;
}
.orc-figure { margin: 14px 0 18px; display: inline-block; max-width: 100%; }
.orc-figure img { margin: 0; }
.orc-figure figcaption {
  color: #8a8a8a;
  font-size: 0.76rem;
  font-family: 'Inter', sans-serif;
  margin-top: 6px;
}
/* Side-by-side screenshot row */
.orc-shot-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }

/* ── UI glyphs (the real outliner role balls / type glyphs) ───────────── */
.orc-g {
  width: 17px; height: 17px;
  vertical-align: -4px;
  color: #cccccc;
  margin-right: 4px;
}
.orc-g.is-warn { color: #d9a648; }
.orc-g.is-ok   { color: #8fff8f; }
.orc-g.is-bad  { color: #e05c4a; }
td .orc-g:last-child { margin-right: 0; }

/* ── Live widget demos ────────────────────────────────────────────────── */
.orc-live {
  background: #1c1c1c;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 14px 16px 12px;
  margin: 16px 0 20px;
  display: inline-block;
  max-width: 100%;
}
.orc-live-svg {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  touch-action: none;
  cursor: crosshair;
  user-select: none;
}
.orc-live-grab { cursor: default; }
.orc-live .orc-grip { cursor: pointer; }
.orc-live-readout {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.74rem;
  color: #cfcfcf;
  margin-top: 9px;
  line-height: 1.6;
}
.orc-live-readout b { color: #64c878; font-weight: 600; }
.orc-live-readout span { color: #8a8a8a; }
.orc-live-hint {
  font-size: 0.76rem;
  color: #9a9a9a;
  margin-top: 8px;
  max-width: 460px;
  line-height: 1.55;
}
.orc-live-hint b { color: #cfcfcf; font-weight: 600; }
.orc-live-hint kbd {
  background: #2a2a2a; border: 1px solid #4a4a4a; border-radius: 3px;
  padding: 1px 5px; font-size: 0.72rem; color: #ddd;
}
.orc-live-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 10px 0 4px;
  font-size: 0.76rem; color: #b5b5b5;
}
.orc-live-bar label { display: inline-flex; align-items: center; gap: 7px; }
.orc-live-bar input[type=range] { width: 130px; accent-color: #0078d4; }
.orc-live-bar input[type=checkbox] { accent-color: #0078d4; }
.orc-live-toggle {
  background: #2b2b2b; border: 1px solid #4a4a4a; color: #c8c8c8;
  border-radius: 3px; padding: 4px 12px; font-size: 0.75rem; cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.orc-live-toggle:hover { background: #343434; }
.orc-live-toggle.is-on { background: #0078d4; border-color: #2a90e8; color: #fff; }


/* Material measures nav labels without our tracking, so .md-ellipsis was
   clipping the last glyph ("Legal" -> "Lega"). Give it room and stop the
   ellipsis from eating a label that actually fits. */
.md-nav__link .md-ellipsis,
.md-tabs__link .md-ellipsis {
  overflow: visible;
  text-overflow: clip;
  padding-right: 2px;
}

/* ── ORC-style checkbox (matches the app's blue check) ────────────────── */
.orc-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  outline: none;
}
.orc-check-box {
  width: 16px; height: 16px;
  border-radius: 3px;
  border: 1px solid #8a8a8a;
  background: #2b2b2b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: background .12s ease, border-color .12s ease;
}
.orc-check-box svg { width: 13px; height: 13px; opacity: 0; transition: opacity .12s ease; }
.orc-check.is-on .orc-check-box { background: #0078d4; border-color: #0078d4; }
.orc-check.is-on .orc-check-box svg { opacity: 1; }
.orc-check:hover .orc-check-box { border-color: #b5b5b5; }
.orc-check:focus-visible .orc-check-box { box-shadow: 0 0 0 2px rgba(0,120,212,.45); }
.orc-check-label { font-size: 0.78rem; color: #c8c8c8; }

/* The readout must never widen the card (it re-wraps the row). */
.orc-live { box-sizing: border-box; }
.orc-live-readout, .orc-live-hint, .orc-live-bar { max-width: 100%; }

/* ── Glyph chip ───────────────────────────────────────────────────────
   A UI glyph shown inline as "this is that thing's icon", in a quiet
   container so it doesn't read as a bullet marker.                    */
.orc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: #232323;
  border: 1px solid #3f3f3f;
  border-radius: 4px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  margin-right: 9px;
  flex: 0 0 auto;
}
.orc-chip .orc-g { width: 17px; height: 17px; margin: 0; vertical-align: 0; }
/* inside a table cell: tighter, and centred with the label */
td .orc-chip { width: 24px; height: 24px; margin-right: 7px; }

/* A glyph chip and its label, always on one line. */
.orc-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}
.orc-item .orc-chip { margin-right: 7px; }


