:root {
  --ink: #1a1a1a;
  --navy: #02314e;
  --teal: #0b6b7d;
  --accent: #d44336;
  --orange: #e07b20;
  --paper: #ffffff;
  --soft: #f8f9fa;
  --line: #e5e5e5;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans', sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.publication-title,
.title,
.subtitle,
.navbar-item,
.navbar-brand,
h1, h2, h3, h4 {
  font-family: 'Figtree', 'Noto Sans', sans-serif;
}

section[id],
div[id] {
  scroll-margin-top: 4.5rem;
}

/* ---------- Navbar ---------- */
.navbar.is-fixed-top {
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.navbar-brand .brand-text {
  font-weight: 800;
  color: var(--navy);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.navbar-item {
  color: var(--navy);
  font-weight: 500;
}

.navbar-item:hover {
  color: var(--teal);
  background: transparent;
}

/* ---------- Hero ---------- */
.hero.publication-hero {
  background: var(--paper);
  padding-top: 2.5rem;
}

.publication-title {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
}

.seal-logo {
  height: 1.35em;
  vertical-align: -0.3em;
}

.seal-logo-title {
  height: 1em;
  vertical-align: -0.1em;
}

.publication-title .ul {
  border-bottom: 3px solid var(--orange);
  padding-bottom: 1px;
}

.venue-tag {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.35em 1.1em;
  display: inline-block;
  margin: 0.75rem 0 1rem;
}

.publication-authors {
  font-size: 1.1rem;
}

.publication-authors .author-block {
  white-space: nowrap;
  display: inline-block;
  margin: 0 0.35em;
}

.publication-authors a {
  color: var(--teal) !important;
}

.affiliation-line {
  color: #555;
  margin-top: 0.25rem;
}

.publication-links {
  margin-top: 1.25rem;
}

.publication-links .button {
  margin: 0.2rem;
}

.link-soon {
  cursor: help;
}

.tldr {
  max-width: 46rem;
  margin: 1.5rem auto 0;
  font-size: 1.08rem;
  line-height: 1.6;
  color: #333;
}

.tldr .big-claim {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Stat band ---------- */
.stat-band {
  margin-top: 2rem;
}

.stat-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 0.75rem;
  height: 100%;
  text-align: center;
}

.stat-value {
  font-family: 'Figtree', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.15;
  white-space: nowrap;
}

.stat-value .arrow {
  color: #999;
  font-weight: 400;
  font-size: 1.3rem;
  padding: 0 0.1em;
}

.stat-value .from {
  color: #9a9a9a;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  font-size: 1.45rem;
}

.stat-label {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.4rem;
  line-height: 1.35;
}

/* ---------- Sections ---------- */
.section.paper-section {
  padding: 2.4rem 1.5rem;
}

.section-heading {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 0.35rem;
}

.finding-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.6rem 0 0.6rem;
}

.paper-section p {
  text-align: justify;
  line-height: 1.65;
}

figure.paper-figure {
  margin: 1.5rem auto;
  text-align: center;
}

figure.paper-figure img {
  max-width: 100%;
  height: auto;
}

figure.paper-figure figcaption {
  font-size: 0.88rem;
  color: #666;
  margin-top: 0.6rem;
  text-align: left;
  line-height: 1.5;
}

figure.paper-figure figcaption .figtag {
  font-weight: 700;
  color: var(--navy);
}

/* ---------- Adversary cards ---------- */
.adversary-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  height: 100%;
}

.adversary-card .adv-icon {
  color: var(--navy);
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.adversary-card .adv-name {
  font-weight: 700;
  color: var(--navy);
}

.adversary-card p {
  font-size: 0.92rem;
  margin-top: 0.45rem;
  text-align: left !important;
}

/* ---------- Method cards ---------- */
.method-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.35rem 1.4rem;
  height: 100%;
  background: #fff;
}

.method-card.sealpp {
  border-top: 4px solid var(--teal);
}

.method-card.seal {
  border-top: 4px solid var(--orange);
}

.method-card .method-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}

.method-card ul {
  margin-top: 0.65rem;
  margin-left: 1.1rem;
  list-style: disc;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ---------- Formula boxes ---------- */
.formula-box {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1.25rem;
  margin: 1rem 0;
  overflow-x: auto;
}

.formula-box .formula-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
}

table.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.results-table th,
table.results-table td {
  padding: 0.45em 0.7em;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
}

table.results-table th {
  border-bottom: 2px solid var(--navy);
  color: var(--navy);
  text-align: right;
}

table.results-table th:first-child,
table.results-table td:first-child,
table.results-table th.left,
table.results-table td.left {
  text-align: left;
}

table.results-table td.model-cell {
  font-style: italic;
  font-weight: 600;
  color: var(--navy);
  border-right: 1px solid var(--line);
}

table.results-table tr.group-end td {
  border-bottom: 2px solid #cfcfcf;
}

table.results-table td.best {
  font-weight: 700;
  color: var(--accent);
}

.asr-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5em;
  min-width: 6.4em;
}

.asr-bar {
  display: inline-block;
  height: 0.55em;
  width: 3.2em;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  flex: none;
}

.asr-bar > i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: block;
  border-radius: 3px;
  background: var(--bar-color, #999);
}

.bar-orig > i { background: #b0b0b0; }
.bar-seal > i { background: var(--orange); }
.bar-sealpp > i { background: var(--teal); }

.results-note {
  font-size: 0.86rem;
  color: #666;
  line-height: 1.5;
}

/* ---------- Tabs ---------- */
.tabs.result-tabs {
  margin-bottom: 0.75rem;
}

.tabs.result-tabs a {
  color: #555;
  font-weight: 500;
  font-size: 0.92rem;
}

.tabs.result-tabs li.is-active a {
  color: var(--navy);
  border-bottom-color: var(--orange);
  font-weight: 700;
}

/* ---------- Attack cards ---------- */
.attack-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.15rem 1.2rem;
  height: 100%;
}

.attack-card .attack-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
}

.attack-card .attack-figures {
  font-family: 'Figtree', sans-serif;
  font-size: 1.05rem;
  margin: 0.55rem 0;
  line-height: 1.7;
}

.attack-card .attack-figures .worse {
  color: var(--accent);
  font-weight: 700;
}

.attack-card .attack-figures .held {
  color: var(--teal);
  font-weight: 700;
}

.attack-card p {
  font-size: 0.88rem;
  color: #555;
  text-align: left !important;
}

/* ---------- Theory cards ---------- */
.theory-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  height: 100%;
}

.theory-card .theory-title {
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.97rem;
  line-height: 1.35;
}

.theory-card .theory-meta {
  font-size: 0.82rem;
  color: #666;
  margin: 0.3rem 0 0.65rem;
}

.theory-card .theory-meta a {
  color: var(--teal);
}

.theory-card ul {
  margin-left: 1.05rem;
  list-style: disc;
  font-size: 0.9rem;
  line-height: 1.55;
}

.theory-card li {
  margin: 0.35rem 0;
}

.theory-card em {
  color: #2f3438;
}

table.results-table td.rate-const {
  background: #eef6f2;
  color: var(--teal);
  font-weight: 700;
}

.scope-note {
  border: 1px dashed #d5d5d5;
  border-radius: 8px;
  background: #fcfcfc;
  padding: 0.9rem 1.15rem;
  font-size: 0.88rem;
  color: #666;
  line-height: 1.55;
}

.scope-note .scope-label {
  display: block;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  margin-bottom: 0.3rem;
}

/* ---------- Highlight box ---------- */
.highlight-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  color: #fff;
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  margin: 1.8rem 0;
}

.highlight-box .hl-number {
  font-family: 'Figtree', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
}

.highlight-box p {
  color: #f4f9fb;
  text-align: left !important;
  margin-top: 0.4rem;
}

.highlight-box strong {
  color: #fff;
}

/* ---------- Stat grid (analysis) ---------- */
.mini-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  text-align: center;
  height: 100%;
  background: var(--soft);
}

.mini-stat .ms-value {
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--navy);
}

.mini-stat .ms-label {
  font-size: 0.78rem;
  color: #666;
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* ---------- Limitations ---------- */
.limitations-box {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fdf7f6;
  padding: 1.1rem 1.3rem;
  margin-top: 1.5rem;
}

.limitations-box .lim-title {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.limitations-box ul {
  margin-left: 1.1rem;
  list-style: disc;
  font-size: 0.93rem;
  line-height: 1.55;
}

/* ---------- BibTeX ---------- */
#bibtex pre {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
}

/* ---------- Footer ---------- */
.footer.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  color: #666;
}

.footer.site-footer a {
  color: var(--teal);
}

/* ---------- Visual polish ---------- */
::selection {
  background: var(--teal);
  color: #fff;
}

.hero.publication-hero {
  background: linear-gradient(180deg, #f2f8f9 0%, #ffffff 78%);
}

.section.alt-bg {
  background: #fafbfc;
}

.paper-figure img {
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 1px 10px rgba(2, 49, 78, 0.06);
}

.stat-card {
  border-top: 3px solid var(--orange);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(2, 49, 78, 0.1);
}

.adversary-card,
.method-card,
.attack-card,
.mini-stat,
.vendor-card,
.theory-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.adversary-card:hover,
.method-card:hover,
.attack-card:hover,
.mini-stat:hover,
.vendor-card:hover,
.theory-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(2, 49, 78, 0.09);
}

.publication-links .button {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.publication-links .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.tabs.is-toggle.result-tabs a {
  border-color: #d8d8d8;
  padding: 0.45em 1.1em;
}

.tabs.is-toggle.result-tabs li.is-active a {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 600;
}

table.results-table tbody tr:hover td {
  background: #f5f9fa;
}

.navbar-item.is-current {
  color: var(--teal);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--orange);
}

/* Scroll-reveal (elements tagged by JS) */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---------- Landscape (shared-expert models) ---------- */
.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 0.8rem;
  margin: 1.3rem 0;
}

.vendor-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.95rem 1.05rem;
}

.vendor-card .vendor-name {
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.98rem;
}

.vendor-card .vendor-models {
  font-size: 0.86rem;
  color: #444;
  margin: 0.3rem 0 0.55rem;
  line-height: 1.45;
}

.se-chip {
  display: inline-block;
  background: #e8f3f0;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2em 0.75em;
  letter-spacing: 0.02em;
}

@media screen and (max-width: 768px) {
  .stat-value {
    font-size: 1.5rem;
    white-space: normal;
  }

  .stat-value .from {
    font-size: 1.15rem;
  }

  .publication-title {
    font-size: 1.5rem !important;
  }
}
