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

:root {
  --topnav-height: 50px;
  --sidebar-width: 300px;
}

/* ── Base ── */
* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  color: #000000;
}

/* ── Hide dark-mode toggle ── */
.darkmode { display: none; }

/* ── Base link reset ── */
a {
  text-decoration: none;
  position: relative;
}

a:hover {
  background: transparent !important;
}

/* ── Top navigation bar ── */
#topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topnav-height);
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 200;
  gap: 1rem;
}

#topnav-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-shrink: 0;
}

#topnav-title {
  display: inline-block;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
  text-decoration: none;
}

#topnav-title:hover { font-weight: 700; opacity: 0.85; }
#topnav-title::after { display: none; }


/* ── Fixed left sidebar ── */
#sidebar {
  position: fixed;
  top: var(--topnav-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: #000000;
  overflow-y: auto;
  z-index: 100;
  padding: 1.2rem 0 2rem 0;
}


/* ── Sidebar metadata block ── */
#sidebar-meta {
  border-top: 1px solid #222222;
  padding: 1rem 1.2rem;
  margin-top: 1.5rem;
}

.sidebar-meta-row { margin-bottom: 0.65rem; }

.sidebar-meta-label {
  display: block;
  color: #555555;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 0.18rem;
}

.sidebar-meta-value {
  display: block;
  color: #cccccc;
  font-size: 0.74rem;
  line-height: 1.4;
}

.sidebar-meta-value a { color: #cccccc; font-size: 0.74rem; }
.sidebar-meta-value a:hover { color: #ffffff; font-weight: 700; }
.sidebar-meta-value a::after { background: #cccccc; }

.sidebar-meta-cite {
  display: block;
  color: #cccccc;
  font-size: 0.72rem;
  line-height: 1.5;
  padding: 0.3rem 0;
  border-bottom: 1px solid #1e1e1e;
}

.sidebar-meta-cite:last-child { border-bottom: none; }
.sidebar-meta-cite em { font-style: italic; color: #aaaaaa; }

.sidebar-meta-cite-heading {
  display: block;
  color: #666666;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 0.5rem;
  margin-bottom: 0.1rem;
}

.sidebar-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.1rem;
}

.sidebar-meta-badges a {
  display: inline-block;
  background: #1a1a1a;
  color: #aaaaaa !important;
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid #333333;
  text-decoration: none !important;
}

.sidebar-meta-badges a::after { display: none !important; }

.sidebar-meta-badges a:hover {
  background: #2a2a2a;
  color: #ffffff !important;
  font-weight: 600;
}

.sidebar-meta-prov {
  display: inline-block;
  color: #555555 !important;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  text-decoration: none;
}

.sidebar-meta-prov:hover { color: #aaaaaa !important; font-weight: 700; }
.sidebar-meta-prov::after { background: #555555; }

#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-track { background: #000000; }
#sidebar::-webkit-scrollbar-thumb { background: #333333; border-radius: 2px; }

/* ── Top nav right links (Home, GitHub) ── */
#topnav-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

#topnav-right a {
  display: inline-block;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 400;
  white-space: nowrap;
}

#topnav-right a:hover { font-weight: 400; }

#topnav-right a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: #ffffff;
  transition: width 0.22s ease;
}

#topnav-right a:hover::after { width: 100%; }


#sidebar-toc h2 {
  color: #aaaaaa;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0 1.2rem;
  margin: 1.2rem 0 0.6rem 0;
}

#sidebar-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* li is the block — <a> is inline-block so ::after spans text width only */
#sidebar-toc > ul > li {
  margin: 0;
  display: block;
  padding: 0 0 0 1.2rem;
}

#sidebar-toc > ul > li > a {
  display: inline-block;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 400;
  padding: 0.45rem 0;
  line-height: 1.4;
}

#sidebar-toc > ul > li > a:hover {
  font-weight: 700;
}

/* animated underline: text width only */
#sidebar-toc > ul > li > a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 1px;
  background: #ffffff;
  transition: width 0.22s ease;
}

#sidebar-toc > ul > li > a:hover::after {
  width: 100%;
}

/* Nested sidebar links */
#sidebar-toc ul ul { padding: 0; margin: 0; }

#sidebar-toc ul ul li {
  display: block;
  padding: 0 0 0 2.2rem;
}

#sidebar-toc ul ul a {
  display: inline-block;
  color: #999999;
  font-size: 0.79rem;
  font-weight: 400;
  padding: 0.3rem 0;
  line-height: 1.4;
}

#sidebar-toc ul ul a:hover {
  font-weight: 700;
  color: #ffffff;
}

#sidebar-toc ul ul a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 1px;
  background: #ffffff;
  transition: width 0.22s ease;
}

#sidebar-toc ul ul a:hover::after {
  width: 100%;
}

/* ── Main content ── */
#main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topnav-height);
  padding: 2rem 0 4rem 0;
  min-height: calc(100vh - var(--topnav-height));
  background: #ffffff;
  color: #000000;
}

#main-content > div.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* ── WebVOWL iframe ── */
#webvowl-frame {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-top: 1rem;
  display: block;
}

/* ── Page title ── */
#page-title {
  padding: 2.5rem 0 1.5rem 0;
  border-bottom: 2px solid #000000;
  margin-bottom: 2rem;
}

#page-title h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #000000;
  line-height: 1.3;
  margin: 0 0 1rem 0;
  text-align: left;
}

#page-subtitle {
  font-size: 0.95rem;
  color: #777777;
  line-height: 1.6;
  margin: 0;
  font-weight: 400;
}

/* ── Hide inline TOC ── */
#toc { display: none !important; }

/* ── Links in main content: bold + underline on hover, no animation ── */
#main-content a {
  color: #000000;
  text-decoration: underline;
}

#main-content a:hover {
  font-weight: 700;
  text-decoration: underline;
}

/* Badge image links: no underline */
#main-content a img {
  display: inline-block;
  vertical-align: middle;
}

#main-content a:has(img) {
  text-decoration: none;
}

#main-content a:has(img):hover {
  font-weight: inherit;
}

/* ── Headings ── */
#main-content h1,
#main-content h2,
#main-content h3,
#main-content h4,
#main-content h5 {
  color: #000000;
  font-family: 'Inter', sans-serif;
  scroll-margin-top: calc(var(--topnav-height) + 1.5rem);
}

/* ── Force .head (author/metadata) box to white ── */
.head,
div.head,
.container .head,
#main-content .head {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #000000 !important;
  border: none !important;
  box-shadow: none !important;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #dddddd !important;
}

.head *,
div.head * {
  background: transparent !important;
  background-color: transparent !important;
  color: #000000 !important;
}

/* ── Status box ── */
.status,
div.status {
  background: #f5f5f5 !important;
  background-color: #f5f5f5 !important;
  border-left: 3px solid #000000 !important;
  color: #000000 !important;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.status span { color: #000000 !important; }

/* ── Override WIDOCO CSS variables ── */
:root {
  --bg-hlist: #ffffff;
  --bg-description: #ffffff;
  --owl-bg: #ffffff;
  --bg-ont: #ffffff;
  --color-owl-class: #000000;
  --color-owl-prop: #000000;
  --color-owl-dp: #000000;
  --color-owl-op: #000000;
  --color-owl-ni: #000000;
  --color-owl-ap: #000000;
}

/* ── Neutralize all WIDOCO colored boxes ── */
.hlist, .hlist dd, .hlist dt, .hlist li, .hlist ul,
.panel, .panel-default, .panel-body, .panel-heading,
.well, .entity, .entity-list,
.description, .description p, .description div,
.container {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #000000 !important;
  box-shadow: none !important;
}

.panel, .panel-default { border-color: #cccccc !important; }
.well { border: 1px solid #cccccc !important; }
.entity { border: 1px solid #dddddd !important; }

/* ── Backlinks ── */
.backlink, .backlink a, span.backlink a {
  color: #000000 !important;
  font-size: 0.8rem;
}

/* ── Code / pre ── */
pre, code {
  background: #f5f5f5 !important;
  color: #000000 !important;
  border: 1px solid #e0e0e0;
  font-size: 0.85rem;
}

/* ── Tables ── */
table { border-collapse: collapse; width: 100%; }
th {
  background: #f5f5f5 !important;
  color: #000000 !important;
  border: 1px solid #cccccc;
  padding: 0.5rem;
}
td {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #cccccc;
  padding: 0.5rem;
}

/* ── Entity type labels (c / op / dp) ── */
.label, sup.type-c, sup.type-op, sup.type-dp, sup.type-ap, sup.type-ni {
  font-size: 0.68rem;
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
  vertical-align: super;
  line-height: 1;
}

/* ── "back to ToC" / "Class ToC" backlinks → small light grey pill ── */
span.backlink,
.backlink {
  display: inline-block;
  margin-left: 0.6rem;
  font-size: 0.72rem;
  font-weight: 400;
  color: #555555 !important;
}

span.backlink a,
span.backlink a:link,
span.backlink a:visited,
span.backlink a:focus,
span.backlink a:focus-visible,
span.backlink a:active,
.backlink a,
.backlink a:link,
.backlink a:visited,
.backlink a:focus,
.backlink a:focus-visible,
.backlink a:active {
  display: inline-block;
  background: #f0f0f0 !important;
  color: #444444 !important;
  text-decoration: none !important;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  border: none !important;
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  font-size: 0.7rem;
  font-weight: 400;
  transition: background 0.15s;
}

span.backlink a:hover,
.backlink a:hover {
  background: #e0e0e0 !important;
  color: #000000 !important;
  font-weight: 600;
  text-decoration: underline !important;
}

span.backlink a::after,
.backlink a::after {
  display: none !important;
}

/* ── Cross-reference entity cards ── */
div.entity {
  background: #fafafa !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 6px !important;
  padding: 1rem 1.2rem !important;
  margin-bottom: 1.2rem !important;
}

div.entity h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 0.4rem;
}

div.entity p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

div.entity dl.description {
  margin: 0.5rem 0 0 0;
  font-size: 0.875rem;
}

div.entity dl.description dt {
  font-weight: 600;
  color: #444444;
  margin-top: 0.4rem;
}

div.entity dl.description dd {
  margin-left: 1rem;
  color: #000000;
}

/* ── hlist (overview class/property lists) ── */
ul.hlist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none !important;
  padding: 0.5rem 0 !important;
  margin: 0.3rem 0 0.8rem 0 !important;
  background: transparent !important;
}

ul.hlist li {
  background: #f0f0f0 !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px !important;
  padding: 0.15rem 0.5rem !important;
  font-size: 0.8rem !important;
  white-space: nowrap;
}

ul.hlist li a {
  color: #000000 !important;
  text-decoration: none !important;
  font-weight: 400;
}

ul.hlist li a:hover {
  font-weight: 700 !important;
  text-decoration: underline !important;
}

ul.hlist li a::after {
  display: none !important;
}

/* ── Section dividers for crossref subsections ── */
#crossref h3.list {
  font-size: 1.1rem;
  border-bottom: 2px solid #000000;
  padding-bottom: 0.4rem;
  margin: 2rem 0 1rem 0;
}
