@scope (.arim-paper) {

  :scope {
    --navy-950: #0a1830;
    --navy-900: #0c1d34;
    --navy-800: #112a4d;
    --navy-700: #173963;
    --navy-hero1: #0b1e3a;
    --blue: #2f6bff;
    --blue-bright: #4d86ff;
    --blue-soft: #8fb4ff;
    --cyan: #38bdf8;
    --ink: #152238;
    --slate: #54627a;
    --slate-light: #7c8aa3;
    --line: #e2e8f4;
    --line-dark: rgba(255, 255, 255, .12);
    --bg: #eef2fb;
    --bg-2: #f4f7fe;
    --white: #ffffff;
    --wrap: 1180px;
    --shadow-card: 0 30px 70px -40px rgba(13, 35, 71, .5);
  }

  * {
    box-sizing: border-box;
  }

  :scope {
    scroll-behavior: smooth;
  }

  :scope {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    font-size: 17px;
  }

  h1, h2, h3, h4, h5 {
    font-family: 'Inter', sans-serif;
    color: var(--navy-900);
    line-height: 1.15;
    letter-spacing: -.02em;
    font-weight: 800;
  }

  a {
    color: var(--blue);
    text-decoration: none;
  }

  a:hover {
    text-decoration: underline;
  }

  .wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 32px;
  }

  /* ---------- scroll progress bar ---------- */
  #prog {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #3b83e8;
    z-index: 9999;
    width: 0%;
    transition: width 0.1s ease-out;
  }

  /* ---------- top nav bar ---------- */
  header.nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(10, 24, 48, .92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-dark);
  }

  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
  }

  .brand:hover {
    text-decoration: none;
  }

  .logo-mark {
    display: flex;
    align-items: center;
    gap: 1px;
    font-weight: 900;
    font-size: 20px;
    color: #fff;
    letter-spacing: -.03em;
  }

  .logo-mark span {
    color: var(--cyan);
    font-size: 13px;
  }

  .brand .bt b {
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.01em;
  }

  .brand .bt b i {
    color: var(--cyan);
    font-style: normal;
  }

  .brand .bt span {
    display: block;
    font-size: 10.5px;
    letter-spacing: .06em;
    color: var(--slate-light);
    font-weight: 500;
  }

  .nav-links {
    display: flex;
    gap: 26px;
    align-items: center;
  }

  .nav-links a {
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .nav-links a.on {
    color: #fff;
    background: rgba(255, 255, 255, .10);
    padding: 7px 14px;
    border-radius: 8px;
  }

  .nav-cta {
    background: var(--blue);
    color: #fff !important;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 12.5px !important;
    letter-spacing: .06em;
    display: inline-flex;
    gap: 7px;
    align-items: center;
  }

  .nav-cta:hover {
    background: var(--blue-bright);
    text-decoration: none;
  }

  @media (max-width: 900px) {
    .nav-links a:not(.nav-cta) {
      display: none;
    }
  }

  /* ---------- hero section ---------- */
  .hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 0 0 40px 0;
    background:
      radial-gradient(900px 460px at 88% 18%, rgba(47, 124, 246, .18), transparent 62%),
      radial-gradient(600px 420px at 6% 92%, rgba(47, 124, 246, .09), transparent 60%),
      linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 100%);
  }

  .hero:after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: .34;
    pointer-events: none;
    z-index: 2;
  }

  .hero canvas#research-constellation {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.70;
    pointer-events: none;
    z-index: 1;
    display: block;
  }

  .hero .w-full,
  .hero img {
    background: transparent !important;
    background-color: transparent !important;
  }

  .back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--blue-soft);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 26px;
  }

  .back:hover {
    color: #fff;
    text-decoration: none;
  }

  .byline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    align-items: center;
    margin-top: 28px;
    font-size: 13.5px;
    color: rgba(226, 235, 250, .7);
    border-top: 1px solid rgba(255, 255, 255, .14);
    padding-top: 20px;
  }

  .byline b {
    color: #fff;
    font-weight: 600;
  }

  .meta-sep {
    width: 1px;
    height: 13px;
    background: rgba(255, 255, 255, .22);
  }

  .keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    padding: 0;
    list-style: none;
  }

  .keywords li {
    font-size: 12.5px;
    font-weight: 500;
    color: #dbe6fb;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    padding: 6px 13px;
    border-radius: 999px;
  }

  /* ---------- intro card ---------- */
  .intro {
    padding: 48px 0 10px;
  }

  .intro-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    padding: 34px 38px;
    box-shadow: var(--shadow-card);
    max-width: 900px;
    margin: 0 auto;
  }

  .intro-card p {
    margin: 0;
    font-size: 18px;
    color: #2c3a52;
    line-height: 1.7;
  }

  /* ---------- :scope grid & sticky sidebar ---------- */
  .body-wrap {
    background: var(--bg);
    position: relative;
  }

  .body-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 56px;
    padding: 40px 0 10px;
    max-width: var(--wrap);
    margin: 0 auto;
  }

  @media (max-width: 980px) {
    .body-grid {
      grid-template-columns: 1fr;
      gap: 0;
      padding: 0 15px;
    }

    .toc {
      position: static;
      display: block;
      order: 3;
      margin-top: 40px;
    }

    .toc ol {
      display: none;
    }
  }

  article {
    max-width: 740px;
  }

  .toc {
    position: sticky;
    top: 92px;
    align-self: start;
    height: max-content;
    order: 2;
  }

  .toc h5 {
    font-size: 10.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--slate-light);
    font-weight: 700;
    margin: 0 0 14px;
  }

  .toc ol {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
  }

  .toc li {
    margin: 0 0 2px;
  }

  .toc a {
    display: flex;
    gap: 11px;
    padding: 7px 12px;
    border-radius: 8px;
    color: var(--slate);
    font-size: 13.5px;
    font-weight: 500;
    border-left: 2px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }

  .toc a:hover {
    background: #e6edfb;
    color: var(--navy-900);
    text-decoration: none;
  }

  .toc a.active {
    color: var(--navy-900);
    background: #e6edfb;
    border-left-color: var(--blue);
    font-weight: 600;
  }

  .toc a .n {
    color: var(--blue);
    font-weight: 700;
    font-size: 12px;
    min-width: 18px;
  }

  section.blk {
    margin: 46px 0;
  }

  .snum {
    font-size: 12px;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: .14em;
    margin-bottom: 6px;
  }

  section.blk h2 {
    font-size: clamp(23px, 3.2vw, 31px);
    margin: 0 0 18px;
  }

  article p {
    margin: 0 0 20px;
    color: #2c3a52;
  }

  article strong {
    color: var(--navy-900);
  }

  .pull {
    border-left: 3px solid var(--blue);
    background: linear-gradient(90deg, #eaf0fe, transparent);
    padding: 16px 22px;
    margin: 30px 0;
    font-size: 21px;
    font-weight: 600;
    color: var(--navy-800);
    line-height: 1.4;
  }

  .dims {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 28px 0;
  }

  @media (max-width: 600px) {
    .dims {
      grid-template-columns: 1fr;
    }
  }

  .dim {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
    transition: .25s;
  }

  .dim:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px -26px rgba(20, 42, 90, .45);
    border-color: var(--blue-soft);
  }

  .dim .ic {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #e8f0ff;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
  }

  .dim .ic svg {
    width: 20px;
    height: 20px;
    stroke: var(--blue);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .dim h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-900);
    margin: 0 0 6px;
  }

  .dim p {
    font-size: 13.5px;
    color: var(--slate);
    margin: 0;
    line-height: 1.5;
  }

  .sources-sidebar {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }

  .sources-sidebar h5 {
    font-size: 10.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--slate-light);
    font-weight: 700;
    margin: 0 0 14px;
  }

  .source-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    transition: border-color 0.2s, transform 0.2s;
    display: block;
  }

  .source-card:hover {
    border-color: var(--blue-soft);
    transform: translateX(2px);
    text-decoration: none;
  }

  .source-card .st {
    font-weight: 600;
    color: var(--blue);
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 4px;
    display: block;
  }

  .source-card .sd {
    font-size: 11px;
    color: var(--slate);
    line-height: 1.4;
    display: block;
  }

  .sources-sidebar .kw-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
  }

  .sources-sidebar .kw-tags span {
    font-size: 10px;
    color: var(--navy-800);
    background: #e9eefb;
    border: 1px solid var(--line);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
  }

  /* ---------- section 7: dark band ---------- */
  .band {
    background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
    color: #fff;
    margin-top: 20px;
  }

  .band-in {
    padding-block: 56px;
  }

  .band .snum {
    color: var(--cyan);
  }

  .band h2 {
    color: #fff;
    font-size: clamp(24px, 3.4vw, 32px);
    margin: 0 0 20px;
    max-width: 24ch;
  }

  .band .tagline {
    font-size: 17px;
    font-weight: 700;
    color: var(--cyan);
    margin: 0 0 30px;
    letter-spacing: .01em;
  }

  .pillars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 940px;
  }

  @media (max-width: 700px) {
    .pillars {
      grid-template-columns: 1fr;
    }
  }

  .pillar {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .12);
    border-left: 3px solid var(--blue);
    border-radius: 12px;
    padding: 22px 24px;
  }

  .pillar h4 {
    color: #fff;
    font-size: 16px;
    margin: 0 0 8px;
    font-weight: 700;
  }

  .pillar p {
    color: rgba(219, 230, 251, .75);
    font-size: 14px;
    margin: 0;
    line-height: 1.55;
  }

  /* ---------- collaboration cta ---------- */
  .cta-bottom-wrap {
    padding: 60px 0;
    background: var(--bg);
  }

  .cta {
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-950) 100%);
    border-radius: 20px;
    padding: 48px;
    color: #fff;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
  }

  .cta .cta__eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--blue-soft);
    font-weight: 700;
    margin-bottom: 12px;
  }

  .cta h3 {
    color: #fff;
    font-size: clamp(22px, 3vw, 28px);
    margin: 0 0 14px;
    font-weight: 700;
    letter-spacing: -.015em;
  }

  .cta p {
    margin: 0 0 26px;
    color: #d3e3f8;
    max-width: 66ch;
    font-size: 15.5px;
  }

  .cta .btn {
    display: inline-block;
    background: #fff;
    color: var(--blue);
    font-weight: 600;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 100px;
    border: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
  }

  .cta .btn:hover {
    background: #f4f7fd;
    text-decoration: none;
    color: var(--blue);
  }

  /* ---------- footer ---------- */
  footer {
    background: var(--navy-950);
    color: rgba(219, 230, 251, .55);
    font-size: 13px;
    border-top: 1px solid var(--line-dark);
  }

  .foot-in {
    padding: 28px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: space-between;
    align-items: center;
  }

  .foot-in b {
    color: #fff;
  }

  .foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
  }

  .foot-links a {
    color: rgba(219, 230, 251, .65);
    font-size: 13px;
  }

  .foot-links a:hover {
    color: #fff;
  }

  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s ease, transform .7s ease;
  }

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

  /* ---------- animated hero illustration (inline SVG) ---------- */
  .hero-art { width: 65%; height: auto; display: block; overflow: visible; }
  @media (max-width: 900px) { .hero-art { width: 94%; } }
  .hero-art text { font-family: 'Inter', system-ui, sans-serif; }
  .ha-flow { stroke-dasharray: 5 9; animation: haFlow 2.4s linear infinite; }
  .ha-ring { stroke-dasharray: 3 10; animation: haFlow 9s linear infinite reverse; }
  .ha-spin { transform-box: fill-box; transform-origin: center; animation: haSpin 28s linear infinite; }
  .ha-spin.r { animation-duration: 40s; animation-direction: reverse; }
  .ha-node { animation: haFloat 5.5s ease-in-out infinite; }
  .ha-node rect { animation: haGlow 4s ease-in-out infinite; }
  .ha-core { transform-box: fill-box; transform-origin: center; animation: haBeat 3.2s ease-in-out infinite; }
  .ha-stop { opacity: .35; animation: haStop 9s linear infinite; }
  @keyframes haFlow { to { stroke-dashoffset: -56; } }
  @keyframes haSpin { to { transform: rotate(360deg); } }
  @keyframes haFloat { 50% { transform: translateY(-5px); } }
  @keyframes haGlow { 50% { stroke: #8fb4ff; fill: rgba(47,107,255,.34); } }
  @keyframes haBeat { 50% { transform: scale(1.07); } }
  @keyframes haStop { 0%, 4% { opacity: .35; } 8%, 16% { opacity: 1; } 22%, 100% { opacity: .35; } }
  @media (prefers-reduced-motion: reduce) { .hero-art * { animation: none !important; } }

  /* ---------- hero split: left text, right animated art ---------- */
  .hero-split { display: flex; align-items: center; gap: 36px; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
  .hs-text { flex: 0 0 44%; max-width: 44%; }
  .hs-art { flex: 1; min-width: 0; }
  .hero-split .hero-art { width: 100%; }
    .hs-eyebrow {
    color: var(--blue-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-weight: 600;
    font-size: clamp(10.5px, 1.1vw, 13px);
    letter-spacing: clamp(0.04em, 0.08vw, 0.10em);
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 1.7;
    word-break: normal;
    overflow-wrap: break-word;
  }
  .hs-eyebrow .hs-sep {
    color: rgba(143, 180, 255, .45);
    margin: 0 4px;
    font-weight: 400;
  }
  .hs-nowrap {
    white-space: nowrap;
    display: inline-block;
  }
  .hs-paper-badge-row {
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .hs-paper-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    background: rgba(47, 107, 255, .18);
    border: 1px solid rgba(56, 189, 248, .38);
    border-radius: 999px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11.5px;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: 0 0 14px rgba(56, 189, 248, .15);
  }
  .hs-paper-badge .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
    animation: hsPulse 2.5s infinite ease-in-out;
  }
  @keyframes hsPulse {
    0%, 100% { opacity: .6; transform: scale(.9); }
    50% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 10px #38bdf8; }
  }
  .hero-split h1 { color: #fff; font-size: clamp(34px, 4.3vw, 54px); line-height: 1.08; margin: 0 0 14px; }
  .hs-sub { color: var(--cyan); font-weight: 600; font-size: clamp(20px, 2.2vw, 27px); margin-bottom: 24px; }
  .hs-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
  .hs-pills li { font-size: 15px; color: #dbe6fb; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.18); padding: 9px 20px; border-radius: 999px; }
  .hs-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; font-weight: 500; }
  .hs-chain .st { color: rgba(143,180,255,.55); animation: hsStep 9s linear infinite; }
  .hs-chain .sep { color: rgba(143,180,255,.5); }
  @keyframes hsStep { 0%, 4% { color: rgba(143,180,255,.55); text-shadow: none; } 8%, 16% { color: #fff; text-shadow: 0 0 12px #38bdf8; } 22%, 100% { color: rgba(143,180,255,.55); text-shadow: none; } }
  @media (max-width: 900px) { .hero-split { flex-direction: column; padding: 0 20px; } .hs-text { flex: none; max-width: 100%; } }
  @media (prefers-reduced-motion: reduce) { .hs-chain .st { animation: none; } }
  .sa-bar { transform-box: fill-box; transform-origin: left center; animation: saBar 4.5s ease-in-out infinite; }
  .sa-pulse { animation: saPulse 2.4s ease-in-out infinite; }
  @keyframes saBar { 0% { transform: scaleX(0); } 35%, 85% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
  @keyframes saPulse { 50% { opacity: .25; } }
  @media (prefers-reduced-motion: reduce) { .sa-bar { animation: none; } }
  /* desktop: wider text column, chain stays on one line */
  @media (min-width: 901px) {
    .hs-text { flex: 0 0 55%; max-width: 55%; }
    .hs-chain { flex-wrap: nowrap; white-space: nowrap; gap: 4px 6px; font-size: clamp(11px, 1vw, 14.5px); }
    .hero-split h1 { font-size: clamp(32px, 3.9vw, 50px); }
  }

  :scope { overflow-x: clip; }
  section[id] { scroll-margin-top: 100px; }
  .toc { max-height: calc(100dvh - 112px); overflow-y: auto; scrollbar-width: thin; padding-right: 6px; }
  .toc .source-card { display: block; }
  @media (max-width: 980px) {
    .toc { position: static; max-height: none; overflow: visible; padding-right: 0; }
    .toc ol { display: block; }
  }

}
.arim-paper {font-family:Inter,system-ui,sans-serif;}

.arim-paper .sources-sidebar div.source-card { cursor: default; }
.arim-paper .sources-sidebar div.source-card:hover { transform: none; border-color: var(--line); }
.arim-paper .sources-sidebar div.source-card .st { color: var(--ink); }

