/* Boltz-2 MLX technical report overrides on top of assets/site.css.
   Full-width Alpine Cobalt & Liquid Glass dark mountain reading layout with a top single-row
   section jump strip, full-width benchmark tables, softened inline code pills, an optional
   light-paper toggle for long-form comfort, and clean @media print support. */

.report-wrap {
  max-width: calc(76rem + 2 * var(--gutter));
}

/* ------------------------------------------------------------ twilight header refinements */
.report-head {
  padding: calc(var(--bar) + clamp(2.25rem, 1.5rem + 3vw, 3.75rem)) 0 clamp(2rem, 1.4rem + 2vw, 3rem);
}
.report-head .chip {
  margin-bottom: 0;
}
.report-head h1.long {
  max-width: 44ch;
  margin: 1.05rem 0 1.05rem;
  color: #ffffff;
}
.report-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.55rem;
  margin: 0 0 1.65rem;
  font: 440 0.9rem/1.6 var(--sans);
  color: rgba(244, 249, 255, 0.90);
}
.report-meta .sep {
  color: rgba(186, 230, 253, 0.58);
}
.report-meta :not(pre) > code,
.paper-abstract :not(pre) > code,
.paper-body :not(pre) > code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: rgba(147, 197, 253, 0.12);
  border: 1px solid rgba(147, 197, 253, 0.24);
  border-radius: 5px;
  padding: 0.06em 0.36em;
  color: #e0f2fe;
}
button.btn {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.report-stage {
  padding-bottom: clamp(4.5rem, 3rem + 4vw, 6.5rem);
}

/* ------------------------------------------------------------ single-row top section jump bar */
.paper-jump {
  margin: 0 0 1.25rem;
}
.paper-jump ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.paper-jump ul ul {
  display: none;
}
.paper-jump li {
  margin: 0;
}
.paper-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.35rem 0.85rem;
  border-radius: var(--r-pill);
  background: rgba(18, 30, 48, 0.72);
  border: 1px solid rgba(147, 197, 253, 0.26);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font: 480 0.83rem/1.2 var(--sans);
  color: rgba(241, 245, 249, 0.94);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease), transform 0.16s var(--ease);
}
.paper-jump a:hover {
  color: #ffffff;
  background: rgba(43, 127, 255, 0.28);
  border-color: rgba(191, 219, 254, 0.56);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------ frosted alpine glass Abstract card */
.paper-abstract {
  position: relative;
  overflow: hidden;
  margin: 0 0 clamp(1.5rem, 2.2vw, 2.15rem);
  padding: clamp(1.45rem, 2.4vw, 2rem) clamp(1.45rem, 3vw, 2.5rem);
  background: rgba(13, 23, 40, 0.88);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(147, 197, 253, 0.26);
  border-left: 3px solid #60a5fa;
  border-radius: var(--r-stage);
  box-shadow: var(--shadow-stage);
}
.paper-abstract::before {
  content: "";
  position: absolute;
  right: -8%;
  top: -12%;
  width: 48%;
  height: 120%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at 70% 45%, rgba(59, 130, 246, 0.14) 0%, transparent 68%);
  filter: blur(20px);
}
.paper-abstract > * {
  position: relative;
  z-index: 1;
}
.paper-abstract-label {
  margin: 0 0 0.75rem;
  font: 600 0.76rem/1.3 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #93c5fd;
}
.paper-abstract p {
  margin: 0 0 0.9rem;
  max-width: 76ch;
  font: 400 1.03rem/1.76 "Inter", var(--sans);
  color: #f1f5f9;
  text-wrap: pretty;
}
.paper-abstract p:last-child {
  margin-bottom: 0;
}
.paper-abstract strong,
.paper-abstract b {
  color: #ffffff;
  font-weight: 600;
}

/* ------------------------------------------------------------ full-width calm low-glare reading body */
.paper-body {
  width: 100%;
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.75rem) clamp(1.25rem, 3vw, 2.5rem);
  background: rgba(11, 20, 35, 0.92);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  backdrop-filter: blur(22px) saturate(135%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-stage);
  box-shadow: var(--shadow-stage);
  color: #f1f5f9;
  font: 400 1.05rem/1.78 "Inter", var(--sans);
  letter-spacing: -0.002em;
}
.paper-body h2 {
  margin: 2.85rem 0 1rem;
  padding-top: 1.55rem;
  border-top: 1px solid rgba(224, 242, 254, 0.14);
  font-family: var(--sans);
  font-size: clamp(1.42rem, 1.18rem + 0.65vw, 1.78rem);
  font-weight: 540;
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: #ffffff;
  scroll-margin-top: calc(var(--bar) + 1.5rem);
}
.paper-body > h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.paper-body h3 {
  margin: 2.1rem 0 0.8rem;
  font-family: var(--sans);
  font-size: clamp(1.14rem, 1.04rem + 0.32vw, 1.3rem);
  font-weight: 540;
  line-height: 1.3;
  letter-spacing: -0.014em;
  color: #ffffff;
  scroll-margin-top: calc(var(--bar) + 1.5rem);
}
.paper-body h4 {
  margin: 1.5rem 0 0.55rem;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  color: #ffffff;
}
.paper-body p {
  margin: 0 0 1.15rem;
  max-width: 76ch;
  color: #f1f5f9;
  text-wrap: pretty;
}
.paper-body strong,
.paper-body b {
  color: #ffffff;
  font-weight: 600;
}
.paper-body em {
  color: #f8fafc;
}
.paper-body ul,
.paper-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
  max-width: 76ch;
}
.paper-body li {
  margin: 0.5rem 0;
  color: #f1f5f9;
}
.paper-body li::marker {
  color: #7dd3fc;
}

.paper-body a:not(.btn):not(.link-cta),
.paper-abstract a {
  color: #93c5fd;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(147, 197, 253, 0.48);
}
.paper-body a:not(.btn):not(.link-cta):hover,
.paper-abstract a:hover {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

/* ------------------------------------------------------------ full-width frosted tables inside report */
.paper-body .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 1.4rem 0 1.95rem;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  background: rgba(15, 26, 44, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 30px -20px rgba(5, 11, 22, 0.65);
  scrollbar-color: rgba(224, 242, 254, 0.28) transparent;
}
.paper-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Inter", var(--sans);
  font-size: 0.83rem;
  line-height: 1.48;
  font-variant-numeric: tabular-nums;
}
.paper-body th,
.paper-body td {
  padding: 0.52rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(224, 242, 254, 0.11);
}
.paper-body thead th {
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(224, 242, 254, 0.22);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.77rem;
  line-height: 1.32;
  white-space: normal;
  vertical-align: bottom;
  padding: 0.58rem 0.65rem;
}
.paper-body tbody th {
  color: #ffffff;
  font-weight: 520;
  vertical-align: top;
}
.paper-body tbody td {
  color: #f1f5f9;
  vertical-align: top;
}
.paper-body tbody td:first-child {
  color: #ffffff;
  font-weight: 500;
}
.paper-body tbody tr:hover td,
.paper-body tbody tr:hover th {
  background: rgba(59, 130, 246, 0.16);
}
.paper-body tbody tr:last-child td,
.paper-body tbody tr:last-child th {
  border-bottom: 0;
}
.paper-body th.num,
.paper-body td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.paper-body td.num {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #ffffff;
}

/* ------------------------------------------------------------ frosted glass code blocks & quotes */
.paper-body pre {
  width: 100%;
  max-width: 100%;
  margin: 1.3rem 0 1.75rem;
  padding: 1.1rem 1.25rem;
  background: rgba(9, 16, 29, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 12px 28px -20px rgba(5, 11, 22, 0.68);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.64;
  color: #f4f9ff;
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 242, 254, 0.26) transparent;
}
.paper-body pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.paper-body blockquote {
  margin: 1.35rem 0;
  padding: 0.85rem 1.2rem;
  max-width: 76ch;
  border-left: 3px solid #60a5fa;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}
.paper-body blockquote p {
  margin: 0;
}

/* ------------------------------------------------------------ hanging-indent references & footer bar */
.paper-body h2#references + ol {
  list-style: none;
  padding-left: 0;
  max-width: 76ch;
  font-size: 0.94rem;
  line-height: 1.65;
}
.paper-body h2#references + ol li {
  padding-left: 2.25rem;
  text-indent: -2.25rem;
  margin: 0.65rem 0;
  color: #f1f5f9;
  overflow-wrap: anywhere;
}
.paper-body h2#references + ol li strong:first-child {
  color: #93c5fd;
  font-family: var(--mono);
  font-size: 0.86em;
  margin-right: 0.25rem;
}

.paper-back {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin: 2.75rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(224, 242, 254, 0.16);
}

@media (max-width: 640px) {
  .paper-abstract {
    padding: 1.25rem 1.15rem;
    border-radius: var(--r-card);
  }
  .paper-body {
    padding: 1.35rem 1.1rem;
    border-radius: var(--r-card);
    font-size: 1rem;
  }
}

/* ------------------------------------------------------------ optional Light-paper reader mode */
html[data-reader="light"] .paper-jump a {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(203, 213, 225, 0.9);
  color: #1e293b;
  box-shadow: 0 4px 12px -6px rgba(15, 23, 42, 0.18);
}
html[data-reader="light"] .paper-jump a:hover {
  background: #ffffff;
  border-color: #2563eb;
  color: #1d4ed8;
}
html[data-reader="light"] .paper-abstract {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #2563eb;
  color: #1e293b;
  box-shadow: 0 22px 54px -26px rgba(15, 23, 42, 0.36);
}
html[data-reader="light"] .paper-abstract::before {
  display: none;
}
html[data-reader="light"] .paper-abstract-label {
  color: #1d4ed8;
}
html[data-reader="light"] .paper-abstract p,
html[data-reader="light"] .paper-body p,
html[data-reader="light"] .paper-body li,
html[data-reader="light"] .paper-body h2#references + ol li,
html[data-reader="light"] .paper-body tbody td {
  color: #1e293b;
}
html[data-reader="light"] .paper-abstract strong,
html[data-reader="light"] .paper-abstract b,
html[data-reader="light"] .paper-body h2,
html[data-reader="light"] .paper-body h3,
html[data-reader="light"] .paper-body h4,
html[data-reader="light"] .paper-body strong,
html[data-reader="light"] .paper-body b,
html[data-reader="light"] .paper-body em,
html[data-reader="light"] .paper-body thead th,
html[data-reader="light"] .paper-body tbody th,
html[data-reader="light"] .paper-body tbody td:first-child,
html[data-reader="light"] .paper-body td.num {
  color: #0f172a;
}
html[data-reader="light"] .paper-body {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  box-shadow: 0 24px 60px -28px rgba(15, 23, 42, 0.40);
}
html[data-reader="light"] .paper-body h2 {
  border-top-color: #e2e8f0;
}
html[data-reader="light"] .paper-body li::marker,
html[data-reader="light"] .paper-body h2#references + ol li strong:first-child {
  color: #1d4ed8;
}
html[data-reader="light"] .paper-body a:not(.btn):not(.link-cta),
html[data-reader="light"] .paper-abstract a {
  color: #1d4ed8;
  text-decoration-color: rgba(29, 78, 216, 0.36);
}
html[data-reader="light"] .paper-body a:not(.btn):not(.link-cta):hover,
html[data-reader="light"] .paper-abstract a:hover {
  color: #0f172a;
  text-decoration-color: #0f172a;
}
html[data-reader="light"] .paper-abstract :not(pre) > code,
html[data-reader="light"] .paper-body :not(pre) > code {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}
html[data-reader="light"] .paper-body .table-wrap {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: none;
}
html[data-reader="light"] .paper-body thead th {
  background: #f8fafc;
  border-bottom-color: #cbd5e1;
}
html[data-reader="light"] .paper-body th,
html[data-reader="light"] .paper-body td {
  border-bottom-color: #e2e8f0;
}
html[data-reader="light"] .paper-body tbody tr:hover td,
html[data-reader="light"] .paper-body tbody tr:hover th {
  background: #eff6ff;
}
html[data-reader="light"] .paper-body pre {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: none;
}
html[data-reader="light"] .paper-body blockquote {
  background: #f8fafc;
  border-left-color: #2563eb;
  color: #1e293b;
}
html[data-reader="light"] .paper-back {
  border-top-color: #e2e8f0;
}
html[data-reader="light"] .paper-back .btn.glass,
html[data-reader="light"] .paper-back .link-cta {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #f8fafc;
  text-decoration-color: rgba(15, 23, 42, 0.36);
}

/* ------------------------------------------------------------ clean print / Save PDF stylesheet */
@media print {
  @page {
    margin: 0.8in 0.75in;
  }
  html,
  body {
    background: #ffffff !important;
    background-image: none !important;
    color: #111827 !important;
    font-size: 10.5pt;
    line-height: 1.58;
  }
  body::before,
  body::after,
  .twilight-sub::before,
  .twilight-sub::after,
  .paper-abstract::before {
    display: none !important;
    content: none !important;
  }
  .skip,
  .topbar,
  .btn-row,
  .btn,
  .paper-jump,
  .paper-back,
  .site-footer {
    display: none !important;
  }

  .report-head {
    margin-top: 0 !important;
    padding: 0 0 1rem !important;
    border-bottom: 1pt solid #cbd5e1;
    margin-bottom: 1.15rem;
  }
  .report-wrap {
    max-width: none;
    padding: 0;
  }
  .crumbs,
  .report-meta {
    color: #4b5563 !important;
  }
  .crumbs a {
    color: #4b5563 !important;
  }
  .chip {
    background: #f3f4f6 !important;
    border: 1pt solid #d1d5db !important;
    color: #111827 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .report-head h1.long {
    color: #111827 !important;
    text-shadow: none !important;
    max-width: none;
    font-size: 20pt;
    margin: 0.5rem 0 0.65rem;
  }
  .report-stage {
    padding-bottom: 0;
  }

  .paper-abstract,
  .paper-body {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    color: #111827 !important;
  }
  .paper-abstract {
    border-left: 2pt solid #1d4ed8 !important;
    padding-left: 0.9rem !important;
    margin-bottom: 1.25rem;
  }
  .paper-abstract-label {
    color: #111827 !important;
  }

  .paper-body h2,
  .paper-body h3,
  .paper-body h4,
  .paper-body strong,
  .paper-body b,
  .paper-abstract strong,
  .paper-abstract b {
    color: #111827 !important;
    border-top-color: #d1d5db !important;
  }
  .paper-body p,
  .paper-body li,
  .paper-body em,
  .paper-abstract p,
  .paper-body h2#references + ol li {
    color: #1f2937 !important;
    max-width: none;
  }
  .paper-body li::marker,
  .paper-body h2#references + ol li strong:first-child {
    color: #111827 !important;
  }
  .paper-body a:not(.btn):not(.link-cta),
  .paper-abstract a {
    color: #111827 !important;
    text-decoration: none;
  }

  .report-meta :not(pre) > code,
  .paper-abstract :not(pre) > code,
  .paper-body :not(pre) > code {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
  }
  .paper-body pre {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #111827 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    white-space: pre-wrap;
    word-break: break-word;
  }
  .paper-body blockquote {
    background: #f8fafc !important;
    border-left-color: #1d4ed8 !important;
    color: #1f2937 !important;
  }

  .paper-body .table-wrap {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    overflow: visible;
  }
  .paper-body table {
    border-top: 1.5pt solid #111827;
    border-bottom: 1.5pt solid #111827;
    font-size: 9pt;
  }
  .paper-body thead th {
    background: transparent !important;
    color: #111827 !important;
    border-bottom: 1pt solid #6b7280;
  }
  .paper-body tbody td,
  .paper-body tbody th,
  .paper-body tbody td:first-child,
  .paper-body td.num {
    background: transparent !important;
    color: #111827 !important;
    border-bottom: 0.5pt solid #d1d5db;
  }

  h2,
  h3,
  h4 {
    break-after: avoid;
    page-break-after: avoid;
  }
  table,
  pre,
  blockquote {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
