:root {
  color-scheme: light;
  --ink: #242927;
  --muted: #69716d;
  --line: #d9ded9;
  --paper: #fbfbf8;
  --surface: #ffffff;
  font-family: Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Helvetica, Arial, sans-serif;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 36px 28px 52px;
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.paper-title {
  width: 90%;
  margin: 0;
  font-size: clamp(28px, 2.6vw, 42px);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 700;
}

.demo-video-section {
  width: min(1120px, 100%);
  margin: 8px auto 4px;
}

.demo-highlight {
  width: 80%;
  margin: 0 auto 18px;
  color: #2f66df;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0;
  text-align: center;
}

.demo-video-frame {
  width: 80%;
  margin: 0 auto;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(47, 102, 223, 0.14);
  border-radius: 8px;
  background: rgba(47, 102, 223, 0.055);
  box-shadow: 0 18px 44px rgba(47, 102, 223, 0.08);
}

.demo-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #2b2c2b;
}

.abstract-block {
  max-width: 756px;
  margin: 2px auto 0;
  text-align: left;
}

.abstract-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 700;
  text-align: center;
}

.paper-abstract {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.paper-abstract:last-child {
  margin-bottom: 0;
}

.paper-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.paper-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(36, 41, 39, 0.1);
  border-radius: 999px;
  color: var(--muted);
  background: #f2f3f2;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.paper-action:disabled {
  cursor: default;
}

.paper-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.paper-action-arxiv {
  border-color: rgba(178, 36, 36, 0.16);
  color: #a33939;
  background: rgba(178, 36, 36, 0.055);
}

.paper-action-arxiv .paper-action-icon {
  color: #fff;
  background: #b63b3b;
}

.paper-action-researchgate {
  border-color: rgba(0, 128, 118, 0.16);
  color: #14756d;
  background: rgba(0, 128, 118, 0.06);
}

.paper-action-researchgate .paper-action-icon {
  color: #ffffff;
  background: #16857b;
}

.framework-figure {
  width: min(1120px, 100%);
  margin: 14px auto 0;
  text-align: left;
}

.framework-title {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 700;
  text-align: center;
}

.framework-board,
.framework-image {
  display: block;
  width: 100%;
}

.framework-board {
  position: relative;
  width: 80%;
  margin: 0 auto;
  padding: 14px;
  border: 1px solid rgba(78, 124, 102, 0.14);
  border-radius: 8px;
  background: rgba(78, 124, 102, 0.055);
  box-shadow: 0 16px 34px rgba(78, 124, 102, 0.08);
  overflow: hidden;
}

.framework-image {
  height: auto;
  border-radius: 6px;
}

.framework-pdf-link {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  padding: 7px 10px;
  border: 1px solid rgba(36, 41, 39, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(36, 41, 39, 0.08);
}

.framework-hotspot {
  position: absolute;
  z-index: 3;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(44, 104, 226, 0);
  cursor: pointer;
  font: inherit;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.framework-hotspot:hover,
.framework-hotspot:focus-visible,
.framework-hotspot.is-active {
  border-color: rgba(44, 104, 226, 0.78);
  background: rgba(44, 104, 226, 0.1);
  box-shadow: 0 0 0 9999px rgba(255, 255, 255, 0.04), 0 14px 32px rgba(36, 41, 39, 0.12);
  outline: none;
}

.framework-figure figcaption {
  max-width: 920px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: justify;
  text-align-last: left;
}

.framework-detail {
  max-width: 920px;
  margin: 16px auto 0;
  padding: 22px 26px;
  border: 1px solid rgba(44, 104, 226, 0.24);
  border-radius: 8px;
  background: rgba(44, 104, 226, 0.055);
  box-shadow: 0 14px 32px rgba(44, 104, 226, 0.08);
  text-align: center;
}

.framework-detail-kicker {
  margin: 0 0 8px;
  color: #2f66df;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.3;
  text-transform: uppercase;
}

.framework-detail h4 {
  margin: 0 0 8px;
  color: #2f66df;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.framework-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}

.framework-detail .framework-detail-kicker {
  text-align: center;
}

.timelines {
  display: grid;
  gap: 20px;
  padding-top: 38px;
}

.case-study {
  display: grid;
  gap: 16px;
}

.case-study-title {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: capitalize;
  text-align: center;
}

.case-study-intro {
  max-width: 920px;
  margin: -4px auto 4px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.58;
  text-align: center;
}

.user-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: min(860px, 100%);
  margin: 0 auto;
}

.user-tab {
  flex: 0 0 148px;
  min-height: 48px;
  border: 1px solid color-mix(in srgb, var(--tab-accent), white 76%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tab-bg), white 28%);
  color: color-mix(in srgb, var(--tab-accent), var(--ink) 24%);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.user-tab:hover {
  border-color: color-mix(in srgb, var(--tab-accent), white 46%);
  box-shadow: 0 12px 24px rgba(36, 41, 39, 0.08);
}

.user-tab[aria-selected="true"] {
  border-color: var(--tab-accent);
  background: var(--tab-accent);
  color: #ffffff;
  box-shadow: 0 16px 30px color-mix(in srgb, var(--tab-accent), transparent 72%);
}

.case-study-panel {
  min-width: 0;
}

.case-headline {
  margin: 4px 0 14px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
}

.timeline-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 214px;
  gap: 22px;
  min-height: 456px;
  padding: 22px;
  background: var(--row-bg);
  border: 1px solid rgba(36, 41, 39, 0.08);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(36, 41, 39, 0.06);
}

.user-header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  padding: 2px 0;
}

.user-header h2 {
  margin: 0;
  color: var(--accent);
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0;
}

.profile-label {
  margin: 0;
  color: var(--accent);
  border-top: 2px solid var(--accent);
  padding-top: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.profile-chips {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-chip {
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--accent), white 72%);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.profile-chip dt {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.profile-chip dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.timeline-content {
  min-width: 0;
}

.pinned-video {
  align-self: start;
  padding-top: 38px;
  min-width: 0;
}

.pinned-video .timeline-card.video {
  width: 100%;
}

.stage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 8px;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--accent), white 70%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--accent);
  cursor: default;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.stage-pill.timeline,
.stage-pill.signal {
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stage-pill.timeline:hover,
.stage-pill.timeline:focus-visible,
.stage-pill.timeline.is-active,
.stage-pill.signal:hover,
.stage-pill.signal:focus-visible,
.stage-pill.signal.is-active {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(36, 41, 39, 0.08);
  outline: none;
}

.timeline-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 4px 12px;
  scrollbar-color: var(--accent) transparent;
}

.timeline-scroller:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.timeline-scroller::-webkit-scrollbar {
  height: 10px;
}

.timeline-scroller::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
}

.timeline-scroller::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}

.timeline-rail {
  --timeline-center: 44px;
  --timeline-padding-top: 28px;
  --node-size: 14px;
  --node-border: 3px;
  --node-offset: 10px;
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, 196px);
  gap: 22px;
  align-items: start;
  min-width: max-content;
  padding: var(--timeline-padding-top) 8px 2px;
}

.timeline-rail::before {
  content: "";
  position: absolute;
  top: calc(var(--timeline-center) - 1px);
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--rail);
}

.timeline-card {
  position: relative;
  min-width: 0;
  color: var(--ink);
  transition: opacity 180ms ease, transform 180ms ease;
}

.timeline-card::before {
  content: "";
  position: absolute;
  top: calc(var(--timeline-center) - var(--timeline-padding-top) - var(--node-offset));
  left: 19px;
  z-index: 1;
  width: var(--node-size);
  height: var(--node-size);
  border: var(--node-border) solid var(--row-bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(36, 41, 39, 0.12);
}

.step {
  display: block;
  height: 28px;
  padding-left: 42px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(36, 41, 39, 0.1);
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(36, 41, 39, 0.08);
}

.media-wrap img,
.media-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.interest-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  margin: 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent), #111111 28%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.timeline-content.mode-signal .timeline-card.image .interest-caption {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.image-stack {
  position: relative;
  opacity: 1;
  align-self: start;
  padding-top: 24px;
}

.image-stack::before {
  opacity: 0.55;
}

.stack-preview {
  position: relative;
  width: 112px;
  margin: 0 auto 28px;
  aspect-ratio: 9 / 16;
}

.stack-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(36, 41, 39, 0.14);
  opacity: 1;
  transform: translate(calc(var(--stack-index) * 5px), calc(var(--stack-index) * 5px)) rotate(calc((var(--stack-index) - 2) * 1.6deg));
}

.stack-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-stack .type-badge {
  position: relative;
  z-index: 2;
  display: block;
  width: fit-content;
  margin: 10px auto 0;
  color: var(--accent);
  text-align: center;
}

.image-stack .asset-name {
  position: relative;
  z-index: 2;
  text-align: center;
  white-space: normal;
}

.type-badge {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.asset-name {
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-card.image .media-wrap {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(36, 41, 39, 0.1);
}

.timeline-card.image .type-badge {
  color: var(--accent);
}

.timeline-card.video {
  padding: 10px;
  border: 2px solid color-mix(in srgb, var(--accent), white 54%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent), white 88%);
  box-shadow: 0 18px 36px rgba(36, 41, 39, 0.12);
}

.timeline-card.video::before {
  left: 29px;
  border-color: color-mix(in srgb, var(--accent), white 88%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent), white 36%);
}

.timeline-card.video .media-wrap {
  background: rgba(255, 255, 255, 0.74);
  border-color: color-mix(in srgb, var(--accent), white 32%);
  border-width: 2px;
  box-shadow: 0 18px 34px rgba(36, 41, 39, 0.14);
}

.timeline-card.video .type-badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
}

.timeline-card.video .asset-name {
  color: var(--accent);
  font-weight: 700;
}

.pinned-video .timeline-card.video {
  display: grid;
  gap: 10px;
  border-color: color-mix(in srgb, var(--accent), #1f2a27 16%);
  background: color-mix(in srgb, var(--accent), white 62%);
  box-shadow: none;
}

.pinned-video .timeline-card.video::before {
  display: none;
}

.pinned-video .timeline-card.video .type-badge {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.pinned-video .timeline-card.video .asset-name {
  margin-top: 0;
  text-align: center;
  white-space: normal;
}

.empty {
  padding: 48px 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
}

.empty h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef0ec;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

@media (max-width: 760px) {
  .shell {
    padding: 18px 18px 32px;
  }

  .topbar {
    gap: 12px;
    padding-bottom: 22px;
  }

  .paper-title {
    width: 100%;
    font-size: 23px;
    line-height: 1.1;
  }

  .demo-video-section,
  .framework-figure {
    padding: 0;
  }

  .demo-highlight {
    width: 100%;
    margin: 0 auto 12px;
    font-size: 16px;
    line-height: 1.28;
  }

  .demo-video-frame,
  .framework-board {
    width: 100%;
    padding: 8px;
  }

  .abstract-block {
    width: calc(100% - 18px);
    margin-top: 0;
  }

  .abstract-title {
    margin-bottom: 6px;
    font-size: 20px;
  }

  .paper-abstract {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
  }

  .paper-actions {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }

  .paper-action {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .paper-action-icon {
    min-width: 26px;
    height: 17px;
  }

  .framework-title {
    margin-bottom: 8px;
    font-size: 18px;
  }

  .framework-figure figcaption {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.48;
  }

  .framework-pdf-link {
    right: 10px;
    bottom: 10px;
    padding: 6px 8px;
    font-size: 11px;
  }

  .framework-detail {
    margin-top: 12px;
    padding: 16px 15px;
  }

  .framework-detail-kicker {
    margin-bottom: 6px;
    font-size: 11px;
    letter-spacing: 1.6px;
  }

  .framework-detail h4 {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.22;
    letter-spacing: 0.8px;
  }

  .framework-detail p {
    font-size: 13px;
    line-height: 1.48;
  }

  .timelines {
    padding-top: 26px;
  }

  .case-study {
    gap: 13px;
  }

  .case-study-title {
    font-size: 21px;
  }

  .case-study-intro {
    margin: -2px auto 2px;
    font-size: 14px;
    line-height: 1.5;
  }

  .user-tabs {
    width: 100%;
    gap: 8px;
  }

  .user-tab {
    flex-basis: calc(50% - 4px);
    min-height: 42px;
    font-size: 13px;
    letter-spacing: 1.4px;
  }

  .case-headline {
    margin: 2px 0 12px;
    font-size: 21px;
    line-height: 1.18;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: 0;
    padding: 10px;
  }

  .user-header {
    gap: 10px;
  }

  .user-header h2 {
    font-size: 22px;
  }

  .profile-label {
    padding-top: 10px;
  }

  .profile-chips {
    gap: 8px;
  }

  .profile-chip {
    padding: 8px 9px;
  }

  .profile-chip dt {
    font-size: 10.5px;
  }

  .profile-chip dd {
    font-size: 13.5px;
    line-height: 1.4;
  }

  .stage-legend {
    gap: 8px;
    margin-bottom: 7px;
  }

  .stage-pill {
    min-height: 28px;
    padding: 0 10px;
    font-size: 10.5px;
    letter-spacing: 1px;
  }

  .timeline-scroller {
    padding-bottom: 10px;
  }

  .timeline-rail {
    grid-auto-columns: minmax(142px, 54vw);
    gap: 14px;
  }

  .type-badge {
    margin-top: 10px;
    font-size: 11px;
  }

  .asset-name {
    font-size: 13px;
  }

  .pinned-video {
    padding-top: 10px;
  }

  .pinned-video .timeline-card.video {
    gap: 8px;
    max-width: 300px;
    margin: 0 auto;
    padding: 8px;
  }
}
