/* Self-hosted Iosevka (no runtime CDN). Hybrid: UI + headings + code in mono,
   body prose stays proportional for long-read comfort. */

@font-face {
  font-family: 'Iosevka';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/branding/fonts/iosevka-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Iosevka';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/branding/fonts/iosevka-700.woff2') format('woff2');
}

/* Excalidraw's own faces, so inline diagram SVGs render in the real hand-drawn
   (Virgil) / code (Cascadia) / normal (Assistant) fonts on the read view. */
@font-face { font-family: 'Virgil'; font-display: swap; src: url('/branding/excalidraw/vendor/excalidraw-assets/Virgil.woff2') format('woff2'); }
@font-face { font-family: 'Cascadia'; font-display: swap; src: url('/branding/excalidraw/vendor/excalidraw-assets/Cascadia.woff2') format('woff'); }
@font-face { font-family: 'Assistant'; font-display: swap; src: url('/branding/excalidraw/vendor/excalidraw-assets/Assistant-Regular.woff2') format('woff2'); }

/* Headings */
.mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6,
.mw-page-title-main, .firstHeading {
  font-family: 'Iosevka', ui-monospace, monospace;
  letter-spacing: 0.01em;
}

/* Chrome / UI: header, menus, tabs, sidebar, footer, personal links */
.vector-header, .vector-page-titlebar, .vector-menu, .vector-pinnable-header,
.mw-portlet, #p-personal, .vector-tab, .mw-footer, .vector-dropdown,
.mw-list-item, .vector-page-toolbar {
  font-family: 'Iosevka', ui-monospace, monospace;
}

/* Code stays exact mono */
code, pre, kbd, samp, tt, .mw-code, .mw-highlight {
  font-family: 'Iosevka', ui-monospace, monospace;
}

/* Full Iosevka: body prose too (whole site in mono, one consistent typeface). */
body.mediawiki, .mw-body, .mw-body-content, .mw-parser-output {
  font-family: 'Iosevka', ui-monospace, monospace;
}

/* Hovercards (Wikipedia-style link previews). Colors use Vector's design tokens
   so the card follows the site theme (incl. the manual Light/Dark toggle); fonts
   inherit the page, title uses the heading font. */
.sc-hovercard { position:absolute; z-index:100; width:320px; max-width:92vw;
  background: var(--background-color-base, #fff);
  color: var(--color-base, #202122);
  border: 1px solid var(--border-color-base, #c8ccd1);
  border-radius:12px; box-shadow:0 8px 28px rgba(0,0,0,.20); overflow:hidden;
  font-family: inherit; }
.sc-hc-img { height:150px; background-size:cover; background-position:center; }
.sc-hc-body { padding:12px 15px; }
.sc-hc-title { font-family:'Iosevka', ui-monospace, monospace; font-weight:700; font-size:15px; margin-bottom:5px; }
.sc-hc-extract { font-size:13px; line-height:1.5; color: var(--color-subtle, #54595d); }

/* Subpage breadcrumb (back-arrow + trail) in the content subtitle */
.subpages .sc-bc-back { text-decoration:none; font-weight:700; margin-right:.5em; }
.subpages .sc-bc-current { font-weight:700; }

/* Note footer: "In this folder" + "Linked from" side by side (2 columns),
   stacking on narrow screens. auto-fit means a lone box spans the full width. */
.sc-related { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:1.2em 2.5em; margin-top:2.2em; padding-top:1em;
  border-top:1px solid var(--border-color-base, #c8ccd1); font-size:.9em; }
.sc-backlinks, .sc-subpages { margin:0; }
.sc-bl-title, .sc-sub-title { font-family:'Iosevka', ui-monospace, monospace; font-weight:700; margin-bottom:.4em; color: var(--color-subtle, #54595d); }
.sc-backlinks ul, .sc-subpages ul { margin:0 0 0 1.4em; }
.sc-showmore { margin-top:.4em; padding:0; font:inherit; background:none; border:0;
  color: var(--color-progressive, #3366cc); cursor:pointer; }
.sc-showmore:hover { text-decoration:underline; }

/* Home notes tree (folder view of subpages) */
.sc-tree, .sc-tree ul { list-style:none; margin:0; padding-left:1.1em; }
.sc-tree { padding-left:0; }
.sc-tree li { margin:.15em 0; }
/* Lay the top level out as a GRID (not CSS multicolumn): each top-level note/
   folder is a fixed cell, so expanding a folder grows only its own cell instead
   of re-balancing every item across columns (which made things jump on click). */
/* Independent flex columns: each is its own vertical list, so expanding a folder
   grows only that column (no shared row heights → no empty rows) and items never
   jump columns. Top-level items are split across the columns in JS. */
#sc-notes-tree .sc-tree-cols { display:flex; gap:2.5em; align-items:flex-start; }
#sc-notes-tree .sc-tree-col { flex:1 1 0; min-width:0; max-width:24em; }
.sc-tree summary { cursor:pointer; }
.sc-tree summary::-webkit-details-marker { color: var(--color-subtle, #72777d); }
.sc-tree-folder { font-weight:700; color: var(--color-subtle, #54595d); }
.sc-tree-more { margin-top:.5em; font-size:.85em; color: var(--color-subtle, #72777d); }

/* Solo wiki: strip multi-user edit clutter — Watch (tab + edit checkbox) and the
   copyright/legal warning. The edit-summary field is kept. */
/* Elements only useful to the logged-in owner (e.g. the home "New note" button). */
.sc-anon .sc-adminonly { display:none !important; }
.sc-newnote-btn { font:inherit; font-weight:600; padding:.4em 1em; border:0; border-radius:6px;
  background: var(--color-progressive, #3366cc); color:#fff; cursor:pointer; }
.sc-newnote-btn:hover { filter:brightness(1.08); }

#ca-watch, #ca-unwatch { display:none !important; }
#wpWatchthisWidget { display:none !important; }
#editpage-copywarn, .ve-ui-mwSaveDialog-license { display:none !important; }
.ve-ui-mwSaveDialog-checkboxes { display:none !important; }

/* Hidden for EVERYONE (admin included) — useless on a single-author wiki with no
   discussions: Talk tab + user talk, page Protection, Page information, Related
   changes, external "Help about MediaWiki" link, leftover Signature prefs. */
#ca-talk, #pt-mytalk,
#pt-userpage, #pt-userpage-2,
#pt-mycontris, #pt-mycontris-2,
#ca-protect, #ca-more-protect,
#t-info,
#t-recentchangeslinked,
#n-help-mediawiki,
#mw-prefsection-personal-signature,
#mw-prefsection-personal-i18n,
#vector-main-menu li:has(a[href*="wprov=vctw1"]),
.mw-userlogin-help {
  display: none !important;
}

/* Public (logged-out) view: hide editing/meta chrome + footer legal links.
   Logged-in admin sees everything. Anon actions are also hard-blocked server-side. */
.sc-anon .sc-excalidraw-edit,
.sc-anon #ca-history,
.sc-anon #ca-viewsource,
.sc-anon #t-whatlinkshere,
.sc-anon #t-specialpages,
.sc-anon #n-recentchanges,
.sc-anon #footer-places-privacy,
.sc-anon #footer-places-about,
.sc-anon #footer-places-disclaimers {
  display: none !important;
}
