    :root {
      --primary: #1772d0;
      --primary-dark: #0d5aa7;
      --best: #c62828;
      --second: #1565c0;
      --text: #212529;
      --muted: #6c757d;
      --bg: #ffffff;
      --bg-alt: #f7f8fa;
      --border: #e3e6ea;
      --card: #ffffff;
      --radius: 12px;
      --shadow: 0 2px 12px rgba(0, 0, 0, .06);
    }

    * { box-sizing: border-box; }

    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                   "Helvetica Neue", Arial, "Noto Sans", "PingFang SC",
                   "Microsoft YaHei", sans-serif;
      color: var(--text);
      background: var(--bg);
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
    }

    .container {
      max-width: 1024px;
      margin: 0 auto;
      padding: 0 20px;
    }

    /* ---------- Header ---------- */
    header.hero {
      padding: 72px 0 28px;
      text-align: center;
    }

    .venue-strip {
      display: flex;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 18px;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 14px;
      border-radius: 999px;
      font-size: .95rem;
      font-weight: 600;
      background: var(--bg-alt);
      border: 1px solid var(--border);
      color: var(--muted);
    }

    .badge.accent {
      background: linear-gradient(90deg, #e8f1fb, #f0e9fb);
      border-color: #c9dcf3;
      color: var(--primary-dark);
    }

    .badge-logo {
      width: 18px;
      height: 18px;
      object-fit: contain;
      display: block;
    }

    h1.title {
      font-size: clamp(1.6rem, 4vw, 2.6rem);
      font-weight: 700;
      line-height: 1.25;
      margin: 6px 0 22px;
    }

    .authors {
      font-size: 1.12rem;
      margin: 0 auto 8px;
      max-width: 860px;
    }

    .authors span.author { white-space: nowrap; }
    .authors sup { font-size: .72em; }
    .authors a {
      color: var(--primary);
      text-decoration: none;
    }
    .authors a:hover { text-decoration: underline; }

    .affiliations {
      color: var(--muted);
      font-size: 1rem;
      margin-bottom: 4px;
    }

    .affil-logo {
      height: 15px;
      width: auto;
      vertical-align: -2px;
      margin-right: 4px;
    }

    .affil-link {
      color: inherit;
      text-decoration: none;
    }

    .affil-link:hover { color: var(--primary); }

    .correspondence {
      color: var(--muted);
      font-size: .9rem;
      margin-bottom: 24px;
    }

    .correspondence .mail-ic {
      width: 14px;
      height: 14px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      vertical-align: -2px;
      margin-right: 3px;
    }

    .authors sup .corr {
      color: var(--primary);
      font-style: normal;
      letter-spacing: 0;
    }

    .link-buttons {
      display: flex;
      justify-content: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    .button {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 20px;
      border: 1px solid var(--primary);
      border-radius: 999px;
      color: var(--primary);
      text-decoration: none;
      font-size: 1rem;
      font-weight: 500;
      transition: all .18s ease;
      background: #fff;
    }

    .button:hover {
      background: var(--primary);
      color: #fff;
      transform: translateY(-1px);
      box-shadow: var(--shadow);
    }

    .button svg { width: 18px; height: 18px; fill: currentColor; }
    .button .hf-logo {
      width: 19px;
      height: 19px;
      object-fit: contain;
      display: block;
    }

    /* ---------- Sections ---------- */
    section { padding: 44px 0; }
    section.alt { background: var(--bg-alt); }

    h2.section-title {
      text-align: center;
      font-size: 2rem;
      font-weight: 700;
      margin: 0 0 26px;
    }

    h3.sub-title {
      font-size: 1.3rem;
      font-weight: 650;
      margin: 34px 0 14px;
      text-align: center;
    }

    p.text {
      font-size: 1.05rem;
      text-align: justify;
      margin: 0 0 14px;
    }

    p.text b, .card p b { color: var(--primary-dark); }

    .figure-block { margin: 22px 0; text-align: center; }

    .figure-block img {
      width: 100%;
      height: auto;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      cursor: zoom-in;
      transition: transform .2s ease;
    }

    .figure-block img:hover { transform: scale(1.004); }

    .figure-caption {
      font-size: .95rem;
      color: var(--muted);
      margin: 12px auto 0;
      max-width: 900px;
      text-align: justify;
    }

    /* ---------- Method cards ---------- */
    .cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 16px;
      margin-top: 20px;
    }

    .card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 20px;
      box-shadow: var(--shadow);
    }

    .card h4 {
      margin: 0 0 8px;
      font-size: 1.05rem;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .card h4 .num {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--primary);
      color: #fff;
      font-size: .85rem;
      font-weight: 700;
    }

    .card p { margin: 0; font-size: .95rem; color: #444; }

    /* ---------- Tabs ---------- */
    .tabs {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 10px;
      margin: 18px 0 20px;
    }

    .tab-btn {
      padding: 7px 18px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: #fff;
      color: var(--text);
      font-size: .98rem;
      cursor: pointer;
      transition: all .15s ease;
    }

    .tab-btn:hover { border-color: var(--primary); color: var(--primary); }

    .tab-btn.active {
      background: var(--primary);
      border-color: var(--primary);
      color: #fff;
      font-weight: 600;
    }

    .tab-panel { display: none; animation: fadeIn .25s ease; }
    .tab-panel.active { display: block; }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(4px); }
      to   { opacity: 1; transform: none; }
    }

    /* ---------- Results table ---------- */
    .table-wrap {
      overflow-x: auto;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    table.results {
      border-collapse: collapse;
      width: 100%;
      font-size: .92rem;
      min-width: 600px;
    }

    table.results th, table.results td {
      padding: 8px 12px;
      text-align: center;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }

    table.results thead th {
      background: var(--bg-alt);
      font-weight: 700;
      border-bottom: 2px solid var(--border);
      position: sticky;
      top: 0;
    }

    table.results th:first-child, table.results td:first-child {
      text-align: left;
      font-weight: 600;
      min-width: 130px;
    }

    table.results tbody tr:last-child td { border-bottom: none; }
    table.results tbody tr:hover { background: #f2f7fd; }

    tr.ours td {
      background: #fffbea;
      font-weight: 600;
    }
    tr.ours:hover td { background: #fff6d6 !important; }

    td.best   { color: var(--best); font-weight: 700; }
    td.second { color: var(--second); font-weight: 700; }

    .legend {
      text-align: center;
      color: var(--muted);
      font-size: .95rem;
      margin-top: 12px;
    }

    .legend .best { color: var(--best); }
    .legend .second { color: var(--second); }

    /* ---------- Gallery (carousel viewer) ---------- */
    .carousel { position: relative; }

    .carousel .gallery-item { display: none; margin: 0; }

    .carousel .gallery-item.active {
      display: block;
      animation: fadeIn .25s ease;
    }

    .gallery-item img {
      width: 100%;
      height: auto;
      border-radius: var(--radius);
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
      cursor: zoom-in;
    }

    .car-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 46px;
      height: 46px;
      border-radius: 50%;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, .94);
      box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #444;
      z-index: 5;
      user-select: none;
      transition: background .15s ease, color .15s ease, transform .15s ease;
    }

    .car-btn svg {
      width: 22px;
      height: 22px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.6;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .car-btn:hover {
      background: var(--primary);
      border-color: var(--primary);
      color: #fff;
      transform: translateY(-50%) scale(1.07);
    }

    .car-btn.prev { left: 14px; }
    .car-btn.next { right: 14px; }

    .car-counter {
      text-align: center;
      color: var(--muted);
      font-size: .95rem;
      margin: 10px 0 0;
    }

    .car-counter b { color: var(--text); }

    /* ---------- Applications ---------- */
    .app-card {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 20px;
      box-shadow: var(--shadow);
    }

    .app-card + .app-card { margin-top: 18px; }

    .app-card h4 {
      margin: 0 0 4px;
      font-size: 1.08rem;
    }

    .app-card .desc {
      margin: 0 0 14px;
      font-size: .93rem;
      color: var(--muted);
    }

    .tile-row {
      display: flex;
      gap: 10px;
    }

    .tile { flex: 1; min-width: 0; }

    .tile .img-box {
      height: 170px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-alt);
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
    }

    .tile img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      cursor: zoom-in;
    }

    .tile-label {
      text-align: center;
      font-size: .8rem;
      color: var(--muted);
      margin-top: 6px;
    }

    /* ---------- Before / After slider ---------- */
    .ba-row {
      display: flex;
      gap: 10px;
      align-items: stretch;
    }

    .ba-slider {
      position: relative;
      flex: 1 1 0;           /* 1:1 row share with the reference tile */
      min-width: 0;
      order: 2;              /* comparison slider sits on the right */
      height: auto;          /* height derives from aspect-ratio, nothing cropped */
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
      background: var(--bg-alt);
      cursor: ew-resize;
      user-select: none;
      -webkit-user-select: none;
      touch-action: none;
    }

    .ba-slider.zoomed { cursor: grab; }
    .ba-slider.panning { cursor: grabbing; }

    .ba-slider img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      pointer-events: none;
      will-change: transform;
    }

    /* the clip (divider) lives on an untransformed wrapper, so the wipe line
       stays put while the two layers zoom & pan in sync inside it */
    .ba-before-wrap {
      position: absolute;
      inset: 0;
      clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
    }

    .ba-badge {
      position: absolute;
      top: 10px;
      z-index: 3;
      padding: 3px 10px;
      border-radius: 999px;
      background: rgba(20, 22, 26, .62);
      color: #fff;
      font-size: .78rem;
      pointer-events: none;
    }

    .ba-badge.left { left: 10px; }
    .ba-badge.right { right: 10px; }

    .ba-handle {
      position: absolute;
      top: 0;
      bottom: 0;
      left: var(--pos, 50%);
      width: 2px;
      background: #fff;
      box-shadow: 0 0 6px rgba(0, 0, 0, .45);
      transform: translateX(-1px);
      z-index: 4;
      pointer-events: none;
    }

    .ba-grip {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: #fff;
      color: #555;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
      pointer-events: auto;   /* drag the grip: move the divider */
      cursor: ew-resize;
    }

    .ba-grip svg {
      width: 16px;
      height: 16px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.4;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .ba-row .tile {
      flex: 1 1 0;
      min-width: 0;
      order: 1;
      display: flex;
      flex-direction: column;
    }
    .ba-row .img-box { flex: 1; min-height: 0; }

    @media (max-width: 600px) {
      .tile-row { flex-wrap: wrap; }
      .tile { flex: 1 1 40%; }
      .ba-row { flex-direction: column; }
      .ba-row .tile { display: block; }
      .ba-row .img-box { height: 240px; flex: none; }
    }

    /* ---------- App example carousel ---------- */
    .app-slide { display: none; }
    .app-slide.active { display: block; animation: fadeIn .25s ease; }

    /* example nav sits above the comparison area (below title & description) */
    .tab-panel.app-card.active {
      display: flex;
      flex-direction: column;
    }
    .tab-panel.app-card.active .app-nav { order: 3; margin: 0 0 14px; }
    .tab-panel.app-card.active .app-carousel { order: 4; }

    .app-nav {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 14px;
      margin-top: 14px;
    }

    .app-nav .car-btn {
      position: static;
      transform: none;
      width: 38px;
      height: 38px;
    }

    .app-nav .car-btn:hover { transform: scale(1.08); }
    .app-nav .car-counter { margin: 0; }

    .video-box { height: 420px; }

    .video-box video {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
      background: var(--bg-alt);
    }

    @media (max-width: 600px) {
      .video-box { height: 300px; }
    }

    /* ---------- BibTeX ---------- */
    .bibtex-box {
      position: relative;
      background: #f6f8fa;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 20px;
    }

    .bibtex-box pre {
      margin: 0;
      font-family: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
      font-size: .88rem;
      line-height: 1.55;
      overflow-x: auto;
      white-space: pre;
    }

    .copy-btn {
      position: absolute;
      top: 10px;
      right: 10px;
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 8px;
      padding: 4px 12px;
      font-size: .82rem;
      cursor: pointer;
      color: var(--muted);
      transition: all .15s ease;
    }

    .copy-btn:hover { color: var(--primary); border-color: var(--primary); }
    .copy-btn.copied { color: #1a7f37; border-color: #1a7f37; }

    /* ---------- Footer ---------- */
    footer {
      padding: 30px 0 44px;
      text-align: center;
      color: var(--muted);
      font-size: .92rem;
      border-top: 1px solid var(--border);
      margin-top: 30px;
    }

    footer a { color: var(--primary); text-decoration: none; }
    footer a:hover { text-decoration: underline; }

    /* ---------- Lightbox (zoom & pan) ---------- */
    .lightbox {
      position: fixed;
      inset: 0;
      background: rgba(15, 18, 22, .82);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      cursor: default;
      padding: 24px;
      touch-action: none;
    }

    .lightbox.open { display: flex; }

    .lightbox img {
      max-width: 96vw;
      max-height: 92vh;
      border-radius: 8px;
      box-shadow: 0 8px 40px rgba(0,0,0,.5);
      cursor: grab;
      will-change: transform;
    }

    .lightbox.dragging,
    .lightbox.dragging img { cursor: grabbing; }

    .lb-controls {
      position: absolute;
      top: 14px;
      right: 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      z-index: 5;
    }

    .lb-controls button {
      width: 38px;
      height: 38px;
      border: none;
      border-radius: 50%;
      background: rgba(255, 255, 255, .16);
      color: #fff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .15s ease;
    }

    .lb-controls button:hover { background: rgba(255, 255, 255, .32); }

    .lb-controls svg {
      width: 16px;
      height: 16px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .lb-hint {
      position: absolute;
      bottom: 14px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(20, 22, 26, .55);
      color: rgba(255, 255, 255, .8);
      font-size: .82rem;
      padding: 4px 14px;
      border-radius: 999px;
      pointer-events: none;
      white-space: nowrap;
    }

    @media (max-width: 600px) {
      header.hero { padding-top: 48px; }
      .authors { font-size: 1rem; }
      section { padding: 34px 0; }
    }
