/* ==========================================================================
   ACE-Data-0 research blog
   Design system extracted from "ACE-Data-0 Blog.dc.html" (values verbatim).
   Fonts are self-hosted (latin subsets) instead of loaded from Google Fonts.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --page: #f6f8fa;
  --surface: #fff;
  --surface-sunken: #f7fafc;
  --ink: #14171a;
  --ink-strong: #0f1216;
  --body: #4c5763;
  --muted: #5d6874;
  --muted-2: #68737f;
  --muted-3: #7b8794;
  --muted-4: #8c98a5;
  --muted-5: #9aa5b1;
  --line: #e5ebf1;
  --line-soft: #eef2f6;
  --line-strong: #dfe6ee;
  --rule: #dde5ed;
  --accent: #245fe8;
  --accent-hover: #12388f;
  --green: #12835d;
  --orange: #e57925;
  --red: #df3f38;
  --purple: #7c5ce6;
  --slate: #68798f;
  --stage: #0c1016;
  --stage-deep: #05070a;
  --shell: min(92vw, 1080px);
  --sans: Inter, system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --serif: "Source Serif 4", Georgia, "PingFang SC", "Microsoft YaHei", serif;
  --mono: "JetBrains Mono", ui-monospace, "PingFang SC", "Microsoft YaHei",
    monospace;
  --card-shadow: 0 1px 2px rgba(20, 30, 45, 0.04),
    0 20px 48px rgba(20, 30, 45, 0.07);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  /* The width/height attributes that reserve space for lazy images also act as
     presentational hints; this keeps the height derived from the aspect ratio. */
  height: auto;
}

/* Lazy images keep the card colour until JS swaps data-src in; the width/height
   attributes reserve the box so nothing shifts on injection. */
img[data-src] {
  background: var(--surface);
}

video {
  display: block;
  width: 100%;
  background: var(--stage);
}

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

a:hover {
  color: var(--accent-hover);
}

button {
  font-family: inherit;
}

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

/* --------------------------------------------------------------------------
   Skip link

   Parked off screen and transparent rather than display:none, so it stays in
   the accessibility tree and is the first thing a keyboard reaches.
   -------------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 60;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* --------------------------------------------------------------------------
   Reading progress
   -------------------------------------------------------------------------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100%;
  height: 2px;
  background: transparent;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 66px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

/* The bar stays full width; its contents share the article measure so the
   logo and the nav line up with the body column. */
.header-inner {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 28px);
  width: var(--shell);
  margin: 0 auto;
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-logos {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.brand-ntu {
  width: auto;
  height: 26px;
  max-width: none;
  object-fit: contain;
}

.brand-ace {
  width: auto;
  height: 22px;
  max-width: none;
  object-fit: contain;
}

.brand-divider {
  width: 1px;
  height: 20px;
  background: var(--rule);
}

.brand-name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: clamp(12px, 2vw, 26px);
}

.top-nav {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  margin-left: auto;
  gap: clamp(10px, 1.4vw, 20px);
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  white-space: nowrap;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: #3f4a55;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 160ms ease, border-bottom-color 160ms ease;
}

.top-nav a:hover {
  color: var(--accent);
}

.top-nav a.active {
  border-bottom-color: var(--accent);
  color: var(--ink);
  font-weight: 600;
}

.language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.language-switch button {
  min-width: 38px;
  height: 26px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease;
}

.language-switch button.active {
  background: var(--ink);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  width: var(--shell);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) 0 clamp(30px, 3.4vw, 44px);
}

.eyebrow {
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow-rule {
  flex: 0 0 auto;
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  margin: 0;
  max-width: 15ch;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 4.6vw, 62px);
  line-height: 1.03;
  letter-spacing: -0.025em;
  color: var(--ink-strong);
  text-wrap: pretty;
}

.dek {
  max-width: 34ch;
  margin: 26px 0 0;
  color: #3b4550;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.hero-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-link {
  color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chip-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c3cedb;
}

.chip-link .chip-dot {
  background: var(--accent);
}

.hero-media {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  background: var(--surface);
}

.hero-media figcaption {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.hero-media figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Demo video
   -------------------------------------------------------------------------- */

.demo {
  width: var(--shell);
  margin: 0 auto;
  padding: 0 0 clamp(40px, 5vw, 68px);
}

.demo-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(24px, 3.4vw, 48px);
  align-items: center;
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line);
}

.demo-copy h2 {
  margin: 0 0 14px;
  max-width: 22ch;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  text-wrap: pretty;
}

.demo-copy .section-kicker {
  margin: 0 0 14px;
}

.demo-copy p:last-child {
  margin: 0;
  color: #54606c;
  font-size: 15.5px;
  line-height: 1.68;
}

.demo-media {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.demo-media video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.demo-media figcaption {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Article shell and section typography
   -------------------------------------------------------------------------- */

.article-shell {
  width: var(--shell);
  margin: 0 auto;
  padding: 0 0 88px;
}

.article {
  width: 100%;
  min-width: 0;
}

.section {
  scroll-margin-top: 88px;
  padding: clamp(42px, 4.4vw, 58px) 0;
  border-top: 1px solid var(--line);
}

.section-lead {
  padding: 8px 0 clamp(56px, 6vw, 76px);
  border-top: 0;
}

.conclusion-section {
  padding: clamp(56px, 6vw, 76px) 0 0;
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 2.9vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--ink-strong);
  text-wrap: pretty;
}

.section > p {
  margin: 0 0 18px;
  color: var(--body);
  font-size: 17px;
  line-height: 1.75;
  text-wrap: pretty;
}

.section > p.last {
  margin: 0;
}

.section strong {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Key-takeaway grid / stat cards
   -------------------------------------------------------------------------- */

.statement-grid,
.task-grid,
.annotation-type-grid {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  overflow: hidden;
}

.statement-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 36px;
}

.statement-grid > div {
  padding: 22px;
  background: var(--surface);
}

.statement-grid span {
  display: block;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.statement-grid h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.statement-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.task-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.task-grid > section {
  padding: 22px;
  background: var(--surface);
}

.task-grid h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.22;
  color: var(--ink);
}

.task-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Figures
   -------------------------------------------------------------------------- */

.setup-figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 36px 0 0;
}

.figure-panel {
  margin: 36px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.setup-card {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.setup-title {
  margin: 0;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.setup-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 10px;
  background: var(--surface);
}

.setup-card figcaption {
  margin-top: auto;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.tight-figure img {
  width: calc(100% - 24px);
  margin: 12px auto 0;
  background: var(--surface);
}

.tight-figure figcaption {
  padding: 14px 18px 16px;
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.tight-figure.stacked {
  margin: 16px 0 0;
}

/* --------------------------------------------------------------------------
   Modality stack
   -------------------------------------------------------------------------- */

.modality-panel {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.inline-kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modality-panel h3,
.video-showcase h3 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(22px, 2.1vw, 27px);
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--ink-strong);
}

.modality-panel > p,
.video-showcase > p {
  margin: 0 0 16px;
  color: var(--body);
  font-size: 16.5px;
  line-height: 1.75;
}

.modality-panel > p.lead-out {
  margin: 0 0 24px;
}

.video-showcase > p.last {
  margin: 0;
}

.video-showcase strong,
.modality-panel strong {
  color: var(--ink);
  font-weight: 600;
}

.modality-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.modality-card {
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.modality-code {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.modality-card.ego .modality-code {
  background: #245fe814;
  color: var(--accent);
}

.modality-card.exo .modality-code {
  background: #e5792514;
  color: var(--orange);
}

.modality-card.motion .modality-code {
  background: #12835d14;
  color: var(--green);
}

.modality-card.touch .modality-code {
  background: #7c5ce614;
  color: var(--purple);
}

.modality-card.audio .modality-code {
  background: #68798f14;
  color: var(--slate);
}

.modality-card h4 {
  margin: 16px 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: var(--ink);
}

.modality-card p {
  margin: 0 0 10px;
  color: var(--body);
  font-size: 13px;
  line-height: 1.55;
}

.modality-card small {
  margin-top: auto;
  color: var(--muted-3);
  font-size: 12px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Example carousels (video + annotation)
   -------------------------------------------------------------------------- */

.video-showcase {
  scroll-margin-top: 88px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.carousel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.example-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.example-tab {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.example-tab.active {
  border-color: var(--accent);
  background: #f2f6ff;
  box-shadow: 0 1px 2px rgba(36, 95, 232, 0.12);
}

.example-tab-index {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted-5);
}

.example-tab.active .example-tab-index {
  color: var(--accent);
}

.example-tab-label {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted);
}

.example-tab.active .example-tab-label {
  font-weight: 600;
  color: var(--ink);
}

.carousel-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.example-count {
  min-width: 52px;
  text-align: center;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

.carousel-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.carousel-button:hover {
  border-color: var(--accent);
  background: #f2f6ff;
  color: var(--accent);
}

.example-carousel {
  margin-top: 14px;
}

.video-example-card {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.video-example-card.active {
  display: block;
}

.video-example-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.video-example-top strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.video-example-top span {
  color: var(--muted-4);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.case-video-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 2fr);
  gap: 10px;
  padding: 12px;
  background: var(--stage);
}

.ego-tile,
.camera-tile {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--stage-deep);
  overflow: hidden;
}

.ego-tile {
  aspect-ratio: 1;
  border-radius: 8px;
}

.camera-tile {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
}

.ego-tile video,
.camera-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ego-tile span,
.camera-tile span {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  background: rgba(5, 8, 12, 0.72);
  color: #fff;
  font-weight: 600;
  line-height: 1;
}

.ego-tile span {
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  font-size: 10.5px;
}

.camera-tile span {
  top: 6px;
  left: 6px;
  padding: 3px 7px;
  font-size: 10px;
}

.exo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.example-caption {
  margin: 0;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.annotation-type-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 26px;
}

.annotation-type-grid > section {
  padding: 18px 16px;
  background: var(--surface);
}

.annotation-type-grid h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.22;
  letter-spacing: normal;
  color: var(--ink);
}

.annotation-type-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.58;
}

.annotation-figure-frame {
  padding: 16px;
  background: var(--surface-sunken);
}

.annotation-figure-frame img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  /* Figures are cropped flush to their content, so keep the radius tight
     enough that it does not clip their own panel corners. */
  border-radius: 4px;
  background: var(--surface);
}

/* --------------------------------------------------------------------------
   Dataset taxonomy
   -------------------------------------------------------------------------- */

.taxonomy-map {
  margin: 36px 0 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.taxonomy-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.taxonomy-core {
  width: min(100%, 420px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-sunken);
  text-align: center;
}

.taxonomy-core span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.taxonomy-core strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.taxonomy-connector {
  width: 1px;
  height: 16px;
  background: var(--rule);
}

.taxonomy-branches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.taxonomy-branch {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.taxonomy-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.taxonomy-branch.simple .taxonomy-tag {
  color: var(--accent);
}

.taxonomy-branch.complex .taxonomy-tag {
  color: var(--green);
}

.taxonomy-branch.hsi .taxonomy-tag {
  color: var(--orange);
}

.taxonomy-branch > strong {
  display: block;
  min-height: 42px;
  margin-top: 10px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}

.taxonomy-items {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: flex-start;
  margin-top: 14px;
}

.taxonomy-items em {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #55616d;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Callouts
   -------------------------------------------------------------------------- */

.callout {
  margin-top: 36px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 12px;
  background: var(--surface);
}

.callout h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.callout p {
  margin: 0 0 14px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.68;
}

.callout p.last {
  margin: 0;
}

.conclusion-callout {
  margin-top: 32px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}

.conclusion-callout > strong {
  display: block;
  margin-bottom: 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.conclusion-callout p {
  margin: 0;
  color: var(--body);
  font-size: 15.5px;
  line-height: 1.68;
}

/* --------------------------------------------------------------------------
   Benchmark levels
   -------------------------------------------------------------------------- */

.benchmark-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.benchmark-list > section {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.level {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.level.blue {
  background: var(--accent);
}

.level.orange {
  background: var(--orange);
}

.level.red {
  background: var(--red);
}

.benchmark-list h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.benchmark-list p {
  margin: 0 0 14px;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.65;
}

.benchmark-list p.last {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  display: flex;
  min-height: 76px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: var(--shell);
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13.5px;
}

.footer-brand img {
  width: auto;
  height: 18px;
  max-width: none;
  object-fit: contain;
}

.site-footer a {
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */

.lightbox-trigger {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 4vh 4vw;
  background: rgba(0, 0, 0, 0.85);
}

.lightbox.open {
  display: flex;
  animation: lightbox-fade 150ms ease;
}

@keyframes lightbox-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.lightbox-frame {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.lightbox-frame img {
  width: auto;
  max-width: 92vw;
  max-height: 100%;
  border-radius: 8px;
  background: var(--surface);
  object-fit: contain;
}

.lightbox-caption {
  flex: 0 0 auto;
  max-width: min(92vw, 900px);
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.lightbox-caption:empty {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.lightbox-close::before {
  content: "\00d7";
}

.lightbox-close:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lightbox.open .lightbox-frame img {
  animation: lightbox-zoom 150ms ease;
}

@keyframes lightbox-zoom {
  from {
    transform: scale(0.98);
  }

  to {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Motion

   Everything below is transition-only: it moves elements *into* the resting
   layout defined above and never changes it. The scroll-reveal start state is
   scoped to `.js-anim`, a class only added by the inline boot script, so a page
   without working JS renders every block fully visible.
   -------------------------------------------------------------------------- */

.js-anim .reveal {
  transition: opacity 450ms ease-out, transform 450ms ease-out;
  transition-delay: var(--reveal-delay, 0ms);
}

.js-anim .reveal:not(.in) {
  opacity: 0;
  transform: translateY(14px);
}

/* Running text travels a shorter distance than the cards it sits between. */
.js-anim .reveal-tight:not(.in) {
  transform: translateY(10px);
}

/* Kicker first, heading a beat behind it. */
.js-anim .section > h2.reveal,
.js-anim .modality-panel > h3.reveal,
.js-anim .video-showcase > h3.reveal {
  --reveal-delay: 70ms;
}

/* Sibling cards cascade instead of snapping in as one block. */
.js-anim [data-reveal-stagger] > .reveal:nth-child(2) {
  --reveal-delay: 70ms;
}

.js-anim [data-reveal-stagger] > .reveal:nth-child(3) {
  --reveal-delay: 140ms;
}

.js-anim [data-reveal-stagger] > .reveal:nth-child(4) {
  --reveal-delay: 210ms;
}

.js-anim [data-reveal-stagger] > .reveal:nth-child(n + 5) {
  --reveal-delay: 280ms;
}

.figure-panel,
.modality-card {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

/* Seamless grids clip at their rounded border, so their cells warm up instead
   of lifting; a translate would expose the 1px separator behind them. */
.statement-grid > div,
.task-grid > section,
.annotation-type-grid > section {
  transition: background 160ms ease;
}

@media (hover: hover) {
  .figure-panel:hover,
  .modality-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
  }

  .statement-grid > div:hover,
  .task-grid > section:hover,
  .annotation-type-grid > section:hover {
    background: var(--surface-sunken);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .lightbox.open,
  .lightbox.open .lightbox-frame img {
    animation: none;
  }

  .js-anim .reveal,
  .js-anim .reveal:not(.in) {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .top-nav a,
  .language-switch button,
  .example-tab,
  .carousel-button,
  .figure-panel,
  .modality-card,
  .statement-grid > div,
  .task-grid > section,
  .annotation-type-grid > section {
    transition: none;
  }

  .figure-panel:hover,
  .modality-card:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive: below the 1080px design width the two-column grids collapse.
   -------------------------------------------------------------------------- */

@media (max-width: 1079px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .hero h1,
  .dek {
    max-width: none;
  }

  .demo-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .demo-copy h2 {
    max-width: none;
  }

  .modality-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .annotation-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .case-video-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ego-tile {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 860px) {
  html {
    scroll-padding-top: 88px;
  }

  .statement-grid,
  .task-grid,
  .setup-figure-grid,
  .taxonomy-branches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modality-grid,
  .annotation-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .carousel-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .carousel-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  .hero,
  .demo,
  .article-shell {
    width: min(100% - 32px, 680px);
  }

  .site-header {
    min-height: 60px;
  }

  .header-inner {
    gap: 12px;
    width: min(100% - 32px, 680px);
  }

  .top-nav {
    display: none;
  }

  .brand {
    flex: 0 1 auto;
    gap: 10px;
    overflow: hidden;
  }

  .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-ntu {
    height: 22px;
  }

  .brand-ace {
    height: 19px;
  }

  .section > p {
    font-size: 16px;
  }

  .hero-chips {
    flex-wrap: wrap;
  }

  .statement-grid,
  .task-grid,
  .setup-figure-grid,
  .taxonomy-branches,
  .modality-grid,
  .annotation-type-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .taxonomy-map {
    padding: 18px;
  }

  .taxonomy-branch > strong {
    min-height: 0;
  }

  .exo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .case-video-layout {
    padding: 8px;
  }

  .video-example-top {
    display: block;
  }

  .video-example-top span {
    display: block;
    margin-top: 8px;
  }

  .example-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .benchmark-list > section {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 20px;
  }

  .callout,
  .conclusion-callout {
    padding: 22px 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: min(100% - 32px, 680px);
    padding: 22px 0;
  }
}

@media (max-width: 520px) {
  /* The two logos already carry the wordmark; drop the text lockup so the
     language switch always stays on screen. */
  .brand-name {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Footer note
   -------------------------------------------------------------------------- */

/* The note sits under the brand row, so the footer stacks rather than lining
   its children up side by side. */
.site-footer {
  flex-direction: column;
  justify-content: center;
  padding: 16px 0;
}

.footer-note {
  width: var(--shell);
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .footer-note {
    width: min(100% - 32px, 680px);
    margin-top: 0;
  }
}
