/* OpenVLC shared responsive style */
:root {
  --text: #27313a;
  --text-strong: #172029;
  --muted: #68737d;
  --accent: #167c67;
  --accent-dark: #0f6655;
  --accent-soft: #eef8f5;
  --surface: #ffffff;
  --surface-soft: #f7f9fa;
  --border: #dde3e7;
  --shadow: 0 10px 28px rgba(24, 39, 52, .08);
  --radius: 10px;
  --content-max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.68;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, video, svg { max-width: 100%; height: auto; }
a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
a:hover { color: var(--accent); text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid rgba(22,124,103,.35); outline-offset: 3px; border-radius: 2px; }

.site-header {
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--border);
}
.header-inner,
main,
footer {
  width: min(calc(100% - 48px), var(--content-max));
  margin-inline: auto;
}
.header-inner {
  padding-top: 22px;
}
.site-logo {
  margin: 0 0 18px;
}
.site-logo img {
  display: block;
  width: 248px;
  max-width: 70vw;
  height: auto;
}
.site-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  border-top: 1px solid var(--border);
}
.site-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 11px 24px;
  color: #424d56;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px 8px 0 0;
  transition: background .16s ease, color .16s ease;
}
.site-nav a:hover {
  background: var(--surface-soft);
  color: var(--accent-dark);
}
.site-nav a.active {
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}

main {
  padding: 42px 0 64px;
  min-height: 60vh;
}
main > :first-child { margin-top: 0; }
main p, main li {
  text-align: justify;
  text-justify: inter-word;
}
p { margin: 0 0 1.05rem; }
ul, ol { margin: .55rem 0 1.5rem; padding-left: 1.55rem; }
li { margin: .55rem 0; }
li > ul, li > ol { margin-top: .6rem; }
strong { color: var(--text-strong); }

h1, h2, h3, h4 {
  color: var(--text-strong);
  text-align: left;
  line-height: 1.22;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
h1 {
  margin: 0 0 1.2rem;
  font-size: clamp(2rem, 3.4vw, 2.65rem);
  font-weight: 720;
}
h2 {
  margin: 2.6rem 0 1rem;
  padding-left: .75rem;
  border-left: 4px solid var(--accent);
  font-size: clamp(1.4rem, 2.3vw, 1.75rem);
  font-weight: 700;
}
h3 {
  margin: 2rem 0 .8rem;
  font-size: clamp(1.15rem, 1.8vw, 1.3rem);
  font-weight: 700;
}
.content-section { margin-bottom: 2.6rem; }
.lead { font-size: 1.08rem; color: #3d4852; }

/* Long technical commands / citations */
code, pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .92em;
}
code {
  padding: .12em .34em;
  background: var(--surface-soft);
  border: 1px solid #e7ebee;
  border-radius: 4px;
}
pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  background: #f5f7f8;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px;
}
.bibtex-block {
  margin: 18px 0 4px;
  text-align: left;
}
.bibtex-title {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.bibtex-block pre { margin: 0; line-height: 1.5; }
.bibtex-block code { padding: 0; background: transparent; border: 0; }

/* Figures */
.content-figure {
  margin: 30px auto 40px;
  padding: 14px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 5px 18px rgba(24,39,52,.05);
  clear: both;
}
.content-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 620px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}
.content-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: .88rem;
}
.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
  margin: 30px 0 40px;
}
.figure-grid .content-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-width: 0;
  clear: none;
}
.figure-grid .content-figure img {
  width: 100%;
  max-height: 410px;
}

/* Publications */
.publications-list {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}
.publications-list li {
  position: relative;
  margin: 0 0 12px;
  padding: 15px 18px 15px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(24,39,52,.025);
}
.publications-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.publications-list li:hover {
  border-color: #cbd6d3;
  box-shadow: 0 6px 18px rgba(24,39,52,.06);
}
.publications-list li a {
  display: inline-block;
  padding: 1px 5px;
  background: var(--accent-soft);
  border-radius: 4px;
  font-weight: 650;
  text-decoration: none;
}

/* FAQ */
body.page-faq main > div > ul {
  list-style: none;
  padding: 0;
  margin: 1.35rem 0 2rem;
}
body.page-faq main > div > ul > li {
  margin: 0 0 14px;
  padding: 18px 20px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  text-align: left;
}

/* Instructions */
body.page-instructions main > h1 + p,
body.page-instructions main > h1 + p + p {
  max-width: none;
}
body.page-instructions ol > li,
body.page-instructions ul > li {
  padding-left: .15rem;
}
body.page-instructions p strong:first-child,
body.page-instructions p > span > strong:first-child {
  color: var(--text-strong);
}

footer {
  padding: 24px 0 34px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
}

@media (min-width: 1180px) {
  .header-inner, main, footer { width: min(calc(100% - 72px), var(--content-max)); }
  main { padding-top: 48px; }
}

@media (max-width: 900px) {
  .header-inner, main, footer { width: min(calc(100% - 32px), 100%); }
  .site-nav a { padding-inline: 18px; }
  .figure-grid { gap: 16px; }
  .figure-grid .content-figure img { max-height: 340px; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .header-inner, main, footer { width: calc(100% - 28px); }
  .header-inner { padding-top: 16px; }
  .site-logo { margin-bottom: 13px; }
  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-bottom: 0;
  }
  .site-nav a {
    min-height: 46px;
    padding: 10px 8px;
    background: #fff;
    border-radius: 0;
  }
  .site-nav a.active { background: var(--accent-soft); }
  .site-nav a.active::after { left: 20%; right: 20%; }
  main { padding: 30px 0 44px; }
  main p, main li { text-align: left; }
  h1 { font-size: 2rem; }
  h2 { margin-top: 2.2rem; }
  .figure-grid { grid-template-columns: 1fr; gap: 18px; margin: 24px 0 30px; }
  .figure-grid .content-figure img { width: auto; max-height: none; }
  .content-figure { margin: 24px auto 30px; padding: 10px; }
  .publications-list li { padding: 14px 15px 14px 18px; }
  pre { padding: 13px 14px; }
}

@media (max-width: 400px) {
  .header-inner, main, footer { width: calc(100% - 20px); }
  .site-nav { grid-template-columns: 1fr; }
  .site-nav a.active::after { left: 30%; right: 30%; }
}
