/* Real2SimHub. Colours: blue #2563EB, indigo #4F46E5, violet #7C3AED, ink #1E293B, gray #64748B. */
:root {
  --blue: #2563eb;
  --indigo: #4f46e5;
  --violet: #7c3aed;
  --amber: #f59e0b;
  --grad: linear-gradient(90deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);

  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --surface: #ffffff;
  --hero: #f3f4ff;
  --hero-line: #e0e3fb;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #4f46e5;
  --accent-text: #4338ca;
  --link: #2563eb;
  --chip: #eef2ff;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --figure-bg: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 10px 28px rgba(15, 23, 42, .07);
  --focus: 0 0 0 3px rgba(79, 70, 229, .45);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --bg-soft: #0f1529;
    --surface: #121a33;
    --hero: #11183a;
    --hero-line: #1f2a55;
    --text: #e2e8f0;
    --muted: #9aa6bb;
    --line: #1e293b;
    --line-strong: #334155;
    --accent: #a5b4fc;
    --accent-text: #c7d2fe;
    --link: #93c5fd;
    --chip: #1e1b4b;
    --code-bg: #060a16;
    --code-text: #e2e8f0;
    --figure-bg: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
    --focus: 0 0 0 3px rgba(165, 180, 252, .55);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1020;
  --bg-soft: #0f1529;
  --surface: #121a33;
  --hero: #11183a;
  --hero-line: #1f2a55;
  --text: #e2e8f0;
  --muted: #9aa6bb;
  --line: #1e293b;
  --line-strong: #334155;
  --accent: #a5b4fc;
  --accent-text: #c7d2fe;
  --link: #93c5fd;
  --chip: #1e1b4b;
  --code-bg: #060a16;
  --code-text: #e2e8f0;
  --figure-bg: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
  --focus: 0 0 0 3px rgba(165, 180, 252, .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  overflow-x: hidden;
}
img, video, svg, picture { max-width: 100%; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
code, pre, kbd { font-family: "Noto Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -120px; z-index: 10; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; box-shadow: var(--shadow); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 880px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 8; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; flex: none; align-items: center; text-decoration: none; }
.brand img { display: block; height: 32px; width: auto; }
.series { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.series a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 15px; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.series a:hover { color: var(--text); background: var(--hero); }
.series a[aria-current="page"] { color: var(--text); background: var(--chip); }
.series picture { flex: none; }
.series img { width: auto; height: 22px; }
.series .short { display: none; }
.header-right { display: flex; align-items: center; gap: 14px; }
.org-link { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.org-link svg { flex: none; width: 18px; height: 18px; }
.org-link:hover { color: var(--accent); }
.divider { width: 1px; height: 22px; background: var(--line-strong); }
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; padding: 0; }
.theme-toggle:hover { border-color: var(--line-strong); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

/* Home: mission */
.mission { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.mission h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 20px; font-weight: 800; text-wrap: balance; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .grad-text { background: linear-gradient(90deg, #60a5fa, #818cf8 50%, #a78bfa); -webkit-background-clip: text; background-clip: text; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .grad-text { background: linear-gradient(90deg, #60a5fa, #818cf8 50%, #a78bfa); -webkit-background-clip: text; background-clip: text; }
}
.mission .lead { font-size: 18px; color: var(--text); margin: 0 0 14px; }
/* One button per project, each with what you can do there; the buttons share one width. */
.items { margin: 26px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 12px 20px; padding: 18px 22px; border: 1px solid var(--hero-line); background: var(--hero); border-radius: 16px; }
.items dt, .items dd { margin: 0; }
.items dt .btn { display: flex; padding: 10px 18px; font-size: 16px; }
.items dt .btn img { display: block; height: 20px; width: auto; }
.items dt .btn svg { margin-left: auto; width: 16px; height: 16px; }
.items dd { font-size: 17px; }
.mission .video-box { margin-top: 30px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; }
.btn.primary:hover { color: #fff; filter: brightness(1.08); }
.btn.soon { color: var(--muted); border-style: dashed; cursor: default; }
.btn.soon:hover { color: var(--muted); border-color: var(--line-strong); }
.btn.soon em { font-style: normal; font-weight: 500; font-size: 13px; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--accent-text); }

/* Home: project cards */
.resources { padding-top: 58px; }
.resources h2 { text-align: center; font-size: clamp(26px, 3vw, 34px); margin: 0; letter-spacing: -.015em; }
/* The two project cards, one above the other so that each README figure is shown whole and readable; the
   name sits in a dark band under the figure. */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 22px 0 8px; }
.card { position: relative; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: #0f172a; box-shadow: var(--shadow), 0 0 0 1px var(--line); color: #fff; text-decoration: none; isolation: isolate; transition: transform .25s ease, box-shadow .25s ease; }
.card .card-fig { display: grid; place-items: center; aspect-ratio: 1252 / 452; padding: 18px 22px; background: #ffffff; }
.card picture { display: contents; }
.card img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card .card-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px 20px; background: linear-gradient(90deg, #0f172a, #1e1b4b); }
.card .card-text { min-width: 0; }
.card .card-name { display: block; font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.card .card-tag { display: block; margin-top: 6px; font-size: 16px; font-weight: 500; opacity: .92; }
.card .card-go { flex: none; width: 40px; height: 40px; border-radius: 999px; background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: #1e293b; transition: transform .25s ease; }
.card .card-go svg { width: 18px; height: 18px; }
.card:hover, .card:focus-visible { transform: translateY(-2px); }
.card:hover .card-go, .card:focus-visible .card-go { transform: translateX(3px); }
.card:focus-visible { box-shadow: var(--focus), var(--shadow); }
:root[data-theme="dark"] .card .card-fig { background: #0d1117; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card .card-fig { background: #0d1117; }
}

/* Home: research list */
.research { padding: 56px 0 40px; }
.research h2 { text-align: center; font-size: clamp(26px, 3vw, 34px); margin: 0 0 22px; letter-spacing: -.015em; }
.filters { display: flex; flex-wrap: wrap; gap: 6px 4px; border-bottom: 1px solid var(--line-strong); padding-bottom: 10px; }
.filters button { font: inherit; font-size: 15px; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.filters button:hover { color: var(--text); }
.filters button[aria-pressed="true"] { color: var(--accent-text); background: var(--chip); border-color: var(--hero-line); font-weight: 600; }
.count { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--line); }
.row[hidden] { display: none; }
.row a, .row .row-inner { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; padding: 18px 12px; color: var(--text); text-decoration: none; border-radius: 10px; }
.row a:hover { background: var(--bg-soft); }
.row .meta { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.row .type { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.row .type svg { width: 18px; height: 18px; flex: none; }
.row .date { color: var(--muted); padding-left: 26px; }
.row .title { font-size: 17px; font-weight: 500; }
.row .title b { font-weight: 700; }
.row .desc { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.row .arrow { color: var(--muted); width: 18px; height: 18px; }
.row a:hover .arrow { color: var(--accent); }
.t-publication { color: #dc2626; }
.t-code { color: var(--text); }
.t-docs { color: var(--blue); }
.t-research-map { color: var(--violet); }
:root[data-theme="dark"] .t-publication { color: #f87171; }
:root[data-theme="dark"] .t-docs { color: #60a5fa; }
:root[data-theme="dark"] .t-research-map { color: #a78bfa; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-publication { color: #f87171; }
  :root:not([data-theme="light"]) .t-docs { color: #60a5fa; }
  :root:not([data-theme="light"]) .t-research-map { color: #a78bfa; }
}

/* Footer */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-size: 14px; }
.site-footer .wrap { padding-top: 28px; padding-bottom: 36px; display: grid; gap: 10px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; color: var(--text); font-weight: 600; }
.site-footer .foot-top nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 500; }

/* Project page: hero */
.hero { background: var(--hero); border-bottom: 1px solid var(--hero-line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 44px; align-items: center; padding-top: 52px; padding-bottom: 52px; }
.hero h1 { margin: 0; font-size: clamp(38px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -.03em; font-weight: 800; }
.hero h1 img { width: min(100%, 470px); height: auto; }
.hero .subtitle { margin: 10px 0 26px; font-size: clamp(19px, 2.1vw, 24px); color: var(--text); font-weight: 500; line-height: 1.35; }
.points { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 16px; }
.points li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: start; }
.points .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .25); }
.points .ico svg { width: 24px; height: 24px; }
.points b { display: block; font-size: 18px; line-height: 1.3; margin-bottom: 2px; }
.points span { color: var(--muted); font-size: 15.5px; line-height: 1.55; display: block; }
.points code { font-size: .92em; background: var(--surface); border: 1px solid var(--line); padding: 0 6px; border-radius: 6px; color: var(--text); }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-art { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: #0f172a; }
.hero-art img { width: 100%; height: auto; }
.hero-art figcaption { background: var(--surface); color: var(--muted); font-size: 13px; padding: 8px 14px; line-height: 1.45; }
/* A figure that is a card of its own (the Awesome page): no frame around it, its own rounded corners. */
.hero-art.panel-art { justify-self: center; width: min(100%, 380px); margin: 0; border-radius: 0; overflow: visible; background: none; box-shadow: none; }
.hero-art.panel-art img { display: block; filter: drop-shadow(0 12px 30px rgba(15, 23, 42, .14)); }
/* A wide figure below the text (the Lab page): the points sit side by side. */
.hero.wide .wrap { grid-template-columns: minmax(0, 1fr); gap: 34px; }
.hero.wide .points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; }
.hero.wide .hero-art { background: #f7f6fe; }

/* Project page: authors */
.authors { text-align: center; padding: 34px 0 30px; border-bottom: 1px solid var(--line); }
.author-list { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 18px; max-width: 860px; }
.author-list li { white-space: nowrap; }
.author-list sup { font-size: 12px; color: var(--accent-text); margin-left: 2px; letter-spacing: .04em; }
.author-list a { color: inherit; text-decoration: none; }
.author-list a:hover, .author-list a:focus-visible { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.legend, .affils { list-style: none; margin: 14px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; color: var(--muted); font-size: 14.5px; max-width: 900px; }
.legend sup, .affils sup { color: var(--accent-text); margin-right: 3px; }
.affils { margin-top: 6px; }
.affils li:first-child { flex-basis: 100%; } /* the first institution has a line of its own, as in the paper */

/* Project page: content */
.section { padding: 46px 0 0; }
.section h2 { font-size: clamp(24px, 2.7vw, 31px); letter-spacing: -.015em; margin: 0 0 14px; line-height: 1.2; }
.section h3 { font-size: 20px; margin: 34px 0 8px; letter-spacing: -.01em; }
.section p { margin: 0 0 14px; }
.section ul.plain { margin: 0 0 14px; padding-left: 20px; }
.section ul.plain li { margin: 4px 0; }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }
.video-box { margin: 0; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.video-box video { width: 100%; height: 100%; }
.video-note { color: var(--muted); font-size: 14px; margin-top: 10px; text-align: center; }
.fig { margin: 22px 0 30px; }
.fig .fig-img { background: var(--figure-bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px; overflow: hidden; }
.fig.flush .fig-img { padding: 0; background: transparent; border: 0; }
.fig img { width: 100%; height: auto; margin: 0 auto; }
.fig figcaption { color: var(--muted); font-size: 14.5px; margin-top: 10px; line-height: 1.55; }
.fig figcaption b { color: var(--text); }
.fig.scroll .fig-img { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fig.scroll .fig-img img { min-width: 760px; }
.scroll-hint { display: none; color: var(--muted); font-size: 13px; margin-top: 6px; }
.steps { list-style: none; margin: 10px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 12px; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.steps li b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.steps li b::before { counter-increment: step; content: counter(step) ". "; color: var(--accent-text); }

/* Code blocks */
.code { position: relative; margin: 12px 0 18px; }
.code pre.wrap-lines { white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 20px; }
.code pre { margin: 0; background: var(--code-bg); color: var(--code-text); border-radius: 14px; padding: 18px 20px; overflow-x: auto; font-size: 14.5px; line-height: 1.65; border: 1px solid var(--line); }
.code pre .c { color: #94a3b8; }
.code pre .p { color: #a5b4fc; user-select: none; }
.copy { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; color: #e2e8f0; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, .16); }
.copy svg { width: 15px; height: 15px; }
.code.has-copy pre { padding-right: 96px; }

@media (max-width: 1040px) {
  .series .long { display: none; }
  .series .short { display: inline; }
}
@media (max-width: 860px) {
  .org-link, .site-header .divider { display: none; }
}
@media (max-width: 720px) {
  .site-header .brand { display: none; }
  .site-header .wrap { min-height: 60px; }
  html { scroll-padding-top: 76px; }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-top: 36px; padding-bottom: 40px; }
  .hero.wide .points { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones: the middle box of each figure (the <source> media in scripts/build.py uses the same width). */
@media (max-width: 760px) {
  .card .card-fig { aspect-ratio: 4 / 3; padding: 14px; }
}
@media (max-width: 720px) {
  .row a, .row .row-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .row .meta { grid-column: 1 / -1; flex-direction: row; gap: 12px; }
  .row .date { padding-left: 0; }
  .row .date::before { content: "· "; }
  .scroll-hint { display: block; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { gap: 10px; }
  .series a { gap: 6px; padding: 6px 9px; font-size: 14.5px; }
  .series img { height: 20px; }
  .mission { padding-top: 36px; }
  .mission .lead { font-size: 16.5px; }
  .items { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 16px; }
  .items dt .btn { display: inline-flex; }
  .items dd + dt { margin-top: 12px; }
  .items dd { font-size: 16px; }
  .card .card-foot { padding: 14px 18px 16px; }
  .card .card-tag { font-size: 14.5px; }
  .author-list { font-size: 16.5px; gap: 4px 16px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .code pre { font-size: 13px; padding: 16px; }
  .code.has-copy pre { padding-top: 46px; padding-right: 16px; }
  .btn { padding: 8px 14px; font-size: 14.5px; }
}
@media (max-width: 350px) {
  .series img { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card .card-go { transition: none; }
}
.fig .fig-img.themed { background: var(--bg); }

/* Home: the contributors' institutions, two rows moving in opposite directions */
.orgs { margin-top: 30px; }
.orgs-h { margin: 0 0 14px; text-align: center; color: var(--muted); font-size: 15px; font-weight: 600; }
.marquee { position: relative; display: grid; gap: 12px; }
.logo-window { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60px, #000 calc(100% - 60px), transparent); mask-image: linear-gradient(90deg, transparent, #000 60px, #000 calc(100% - 60px), transparent); }
.logo-track { display: flex; width: max-content; animation: logo-travel var(--logo-time, 40s) linear infinite; }
.logo-track.reverse { animation-direction: reverse; }
.marquee:hover .logo-track, .marquee.paused .logo-track { animation-play-state: paused; }
@keyframes logo-travel { to { transform: translateX(-50%); } }
.logo-set { list-style: none; margin: 0; padding: 0 14px 0 0; display: flex; gap: 14px; }
.org { display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); white-space: nowrap; font-size: 15px; font-weight: 600; color: var(--text); }
.org-logo { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: #fff; overflow: hidden; }
.org-logo img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.org-logo.wide { width: 104px; }
.org-logo.wide img { width: 96px; border-radius: 0; }
.marquee-toggle { position: absolute; right: 0; bottom: -40px; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.marquee-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.marquee-toggle svg { width: 14px; height: 14px; }
.marquee-toggle .i-play, .marquee.paused .marquee-toggle .i-pause { display: none; }
.marquee.paused .marquee-toggle .i-play { display: block; }

/* Home: contributors */
.names-box { max-width: 900px; margin: 0 auto; padding: 22px 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.names { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; font-size: 18px; }
.names-note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.names li { white-space: nowrap; }

/* Home: blog, a row of posts that scrolls sideways */
.post-grid { list-style: none; margin: 0; padding: 4px 2px 6px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post { display: flex; }
.post a { display: flex; flex-direction: column; width: 100%; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.post a:hover { border-color: var(--accent); }
.post-img { position: relative; display: block; aspect-ratio: 16 / 9; background: #0f172a; overflow: hidden; }
.post-org { position: absolute; top: 10px; right: 10px; padding: 3px 10px 4px; border-radius: 8px; background: rgba(51, 65, 85, .88); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: .01em; box-shadow: 0 2px 8px rgba(15, 23, 42, .25); }
.post-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post a:hover .post-img img { transform: scale(1.035); }
.post-body { display: block; padding: 14px 18px 18px; }
.post-label { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.post-title { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; margin-top: 2px; }
.post-text { display: block; color: var(--muted); font-size: 15px; line-height: 1.5; margin-top: 4px; }
.post.more .post-img { display: grid; place-items: center; background: var(--hero); color: var(--accent); }
.post.more .post-img svg { width: 46px; height: 46px; }
.post.more a { border-style: dashed; box-shadow: none; }
.more-posts { margin: 26px 0 0; text-align: center; }
.blog-page { padding-top: 44px; }
.blog-page .crumb { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; }
.blog-page .crumb a { text-decoration: none; }
.blog-page h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 800; }
.blog-page .lead { margin: 0 0 18px; color: var(--muted); }
.blog-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }
.blog-chips a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px 5px 14px; border-radius: 999px; border: 1px solid var(--hero-line); background: var(--chip); color: var(--accent-text); font-size: 15px; font-weight: 600; text-decoration: none; }
.blog-chips a:hover { border-color: var(--accent); }
.blog-chips span { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13px; text-align: center; }
.blog-cat { margin-top: 30px; scroll-margin-top: 84px; }
.blog-page .blog-cat h2 { text-align: left; font-size: clamp(22px, 2.6vw, 28px); margin: 0 0 14px; }

/* Home: connect */
.contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.contact { display: flex; align-items: center; gap: 14px; padding: 14px 20px 14px 14px; min-width: 250px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.contact:hover { border-color: var(--accent); }
.contact-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--grad); color: #fff; }
.contact-ico.wechat { background: linear-gradient(135deg, #22c55e, #07c160); }
.contact-ico svg { width: 24px; height: 24px; }
.contact-text b { display: block; font-size: 16.5px; line-height: 1.3; }
.contact-text span { display: block; color: var(--muted); font-size: 14.5px; }
.contact-text a { color: inherit; text-decoration: none; }
.contact-text a:hover { color: var(--accent); }
.contact-text .addr { color: var(--text); font-size: 15px; -webkit-user-select: text; user-select: text; cursor: text; overflow-wrap: break-word; }
.mail-copy { flex: none; display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.mail-copy:hover { color: var(--accent); border-color: var(--accent); }
.mail-copy svg { width: 14px; height: 14px; }
.qr-dialog { border: 0; border-radius: 18px; padding: 18px; width: min(360px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.qr-dialog::backdrop { background: rgba(15, 23, 42, .55); }
.qr-dialog form { display: grid; gap: 12px; justify-items: center; margin: 0; }
.qr-img { display: block; width: 100%; }
.qr-dialog img { width: 100%; height: auto; border-radius: 12px; }
.qr-title { margin: 0; font-weight: 700; font-size: 17px; }

/* Blog posts */
.article { padding: 44px 0 0; }
.article .crumb { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; }
.article .crumb a { text-decoration: none; }
.article h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 18px; font-weight: 800; text-wrap: balance; }
.article h2 { font-size: clamp(21px, 2.4vw, 26px); letter-spacing: -.01em; margin: 30px 0 10px; line-height: 1.25; }
.article p { margin: 0 0 14px; }
.article .facts { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 6px; }
.article .facts li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.article .facts b { color: var(--muted); font-weight: 600; }
.article .fig .fig-img { max-width: 520px; margin: 0 auto; padding: 0; border: 0; background: transparent; }
.article .fig.full .fig-img { display: block; max-width: none; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid.featured .post:nth-child(n+5) { display: none; }
}
@media (max-width: 600px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .post-grid.featured .post:nth-child(n+4) { display: none; }
  .contact { min-width: 0; width: 100%; }
  .mail-copy { padding: 6px 8px; }
  .mail-copy span { display: none; }
  .mail-copy.done svg { color: var(--accent); }
  .names { font-size: 16.5px; gap: 6px 18px; }
  .names-box { padding: 18px 16px; }
  .org { font-size: 14px; padding: 6px 12px 6px 6px; }
  .org-logo { width: 38px; height: 38px; }
  .org-logo img { width: 34px; height: 34px; }
  .org-logo.wide { width: 90px; }
  .org-logo.wide img { width: 84px; }
  .article .facts li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; width: auto; justify-content: center; }
  .logo-set { flex-wrap: wrap; justify-content: center; padding: 0; }
  .logo-set[aria-hidden="true"], .marquee-toggle { display: none; }
  .logo-window { -webkit-mask-image: none; mask-image: none; }
  .post-img img { transition: none; }
}
