:root {
  --bg: #f5f4ef;
  --text: #0f0f0f;
  --muted: #3d3d3d;
  --muted-soft: #6f6c64;
  --line: #c6c3bc;
  --warn: #f5f4ef;
  --content-max: 108ch;
  --shell-width: min(1120px, 96vw);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.42;
  letter-spacing: -0.03em;
  overflow-y: scroll;
  overflow-x: hidden;
  padding-top: 31px;
}

.site-header,
.page-main,
.site-footer {
  width: var(--shell-width);
  margin-left: calc((100vw - var(--shell-width)) / 3);
  margin-right: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 0 14px;
}

.logo,
.site-nav a {
  color: var(--text);
  text-decoration: none;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.logo-text {
  font-size: 28px;
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.06em;
  word-spacing: -0.14em;
}

.plain-at {
  display: inline-block;
  font-family: "Arial Rounded MT Bold", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 1.06em;
  line-height: 1;
  text-decoration: none;
  letter-spacing: normal;
  transform: translateY(0.01em);
}

.logo-mark {
  min-width: 34px;
  height: 22px;
  padding: 0 4px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #000;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

h1,
h2,
h3,
.article-view h1 {
  letter-spacing: -0.045em;
}

p,
time,
a,
.article-date,
.article-paper,
.timeline-content p,
.timeline-date {
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  gap: 16px;
  row-gap: 8px;
  flex-wrap: wrap;
}

.site-nav a {
  font-weight: 400;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.lang-toggle {
  position: fixed;
  top: 6px;
  right: 8px;
  z-index: 40;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  padding: 0 0 2px;
  line-height: 1;
  border-bottom: 2px solid transparent;
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  text-decoration: none;
}

.site-nav a.active {
  border-bottom-color: #000;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: none;
}

.page-main {
  padding: 32px 0 26px;
}

.intro {
  margin: 0 0 22px;
  max-width: var(--content-max);
}

.intro p {
  margin: 0;
  max-width: var(--content-max);
}

.video-section {
  width: min(var(--content-max), 100%);
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-radius: 12px;
}

.hero-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  border-radius: 12px;
}

.timeline {
  position: relative;
  margin-top: 4px;
  padding-left: 24px;
  max-width: var(--content-max);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  bottom: 18px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: block;
  padding: 10px 0 12px;
}

.timeline-item + .timeline-item {
  border-top: 1px solid var(--line);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 24px;
  width: 8px;
  height: 8px;
  border: 2px solid #000;
  background: #000;
  box-shadow: 0 0 0 1px var(--bg);
}

.scenario-timeline::before {
  display: none;
}

.scenario-item::before {
  display: none;
}

.timeline-link {
  color: inherit;
  text-decoration: none;
  display: block;
  padding: 8px 10px;
  margin: 0 -10px;
  transition: box-shadow 140ms ease, background-color 140ms ease;
}

.timeline-link:hover,
.timeline-link:focus-visible {
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  background-color: #ffffff;
}

.timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.timeline-content h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #000;
  line-height: 1.35;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.timeline-content p {
  margin: 2px 0 0;
  color: var(--muted-soft);
}

.timeline-date {
  color: var(--muted-soft);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
  margin-left: 16px;
}

.scenario-link {
  display: grid;
  grid-template-columns: 186px 1fr;
  gap: 14px;
  align-items: flex-start;
}

.scenario-video-wrap {
  background: #000;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
}

.scenario-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.tutorial-shell {
  max-width: var(--content-max);
}

.tutorial-top-nav {
  display: flex;
  gap: 8px;
  margin: 0 0 8px 24px;
  padding-bottom: 0;
}

.tutorial-filter {
  border: 2px solid #000;
  border-radius: 2px;
  background: #fefefe;
  color: #000;
  cursor: pointer;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 3px 3px 0 #000;
}

.tutorial-filter.active,
.tutorial-filter:hover,
.tutorial-filter:focus-visible {
  color: #fff;
  background: #000;
  border-color: #000;
  box-shadow: 2px 2px 0 #000;
}

.tutorial-timeline {
  margin-top: 22px;
}

.tutorial-timeline::before {
  top: 9px;
}

.tutorial-timeline .timeline-item + .timeline-item {
  border-top: 0;
}

.tutorial-roadmap-item {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 9px 0;
  margin: 0 0 16px;
  width: 100%;
}

.tutorial-roadmap-title {
  display: inline-flex;
  align-items: center;
  background: #d7d4cc;
  border: 1px solid #b8b5ad;
  color: #000;
  padding: 2px 8px;
  border-radius: 2px;
  margin: 0 0 6px;
}

.tutorial-roadmap-title h2 {
  margin: 0;
  color: #000;
  font-size: 13px;
  line-height: 1.25;
}

.tutorial-roadmap-entry {
  padding-top: 10px;
}

.tutorial-roadmap {
  --roadmap-point-height: 50px;
  --roadmap-lane-pad-top: 3px;
  --roadmap-lane-pad-bottom: 0px;
  --roadmap-first-lane-extra-top: 12px;
  margin: 0;
  padding-top: 15px;
  display: grid;
  gap: 0;
  overflow-x: hidden;
}

.tutorial-roadmap-lane {
  --lane-center-nudge: calc((var(--roadmap-lane-pad-bottom) - var(--roadmap-lane-pad-top)) / 2);
  --lane-label-nudge: var(--lane-center-nudge);
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 3ch;
  align-items: stretch;
  padding: var(--roadmap-lane-pad-top) 22px var(--roadmap-lane-pad-bottom) 2px;
  width: 100%;
}

.tutorial-roadmap-lane:first-child {
  padding-top: calc(var(--roadmap-lane-pad-top) + var(--roadmap-first-lane-extra-top));
  --lane-center-nudge: calc((var(--roadmap-lane-pad-bottom) - (var(--roadmap-lane-pad-top) + var(--roadmap-first-lane-extra-top))) / 2);
  --lane-label-nudge: var(--lane-center-nudge);
}

.tutorial-roadmap-lane::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line);
  transform: translateY(-50%);
}

.tutorial-roadmap-lane.reverse {
  direction: rtl;
}

.tutorial-roadmap-lane.reverse .tutorial-roadmap-point {
  direction: ltr;
}

.tutorial-roadmap-point {
  position: relative;
  flex: 0 0 auto;
  width: calc(var(--model-ch, 1) * 1ch);
  min-height: var(--roadmap-point-height);
}

.tutorial-roadmap-info {
  position: absolute;
  left: 50%;
  bottom: calc(50% + 5px - var(--lane-label-nudge));
  transform: translateX(-50%);
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0px;
  text-align: center;
  width: calc(var(--model-ch, 1) * 1ch);
}

.tutorial-roadmap-dot {
  position: absolute;
  left: 50%;
  top: calc(50% + var(--lane-center-nudge));
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
  border: 1px dashed #000;
  box-shadow: none;
  z-index: 1;
}

.roadmap-point-link,
.roadmap-point-text {
  display: block;
  white-space: nowrap;
}

.roadmap-point-link {
  color: #000;
  text-decoration: none;
  border-bottom: 1px dashed #000;
}

.roadmap-point-link:hover,
.roadmap-point-link:focus-visible {
  color: #000;
  text-decoration: none;
  border-bottom-style: solid;
}

.roadmap-date {
  color: var(--muted-soft);
  font-size: 12px;
  font-weight: 400;
}

.roadmap-model {
  color: var(--text);
  border-bottom-color: var(--text);
  font-size: 12px;
  font-weight: 400;
}

.tutorial-roadmap-turn {
  position: relative;
  height: 0;
}

.tutorial-roadmap-turn::before {
  content: "";
  position: absolute;
  height: calc(var(--roadmap-point-height) + var(--roadmap-lane-pad-top) + var(--roadmap-lane-pad-bottom));
  top: calc(-1 * ((var(--roadmap-point-height) + var(--roadmap-lane-pad-top) + var(--roadmap-lane-pad-bottom)) / 2));
  width: 1px;
  background: var(--line);
}

.tutorial-roadmap > .tutorial-roadmap-lane:first-child + .tutorial-roadmap-turn::before {
  height: calc(var(--roadmap-point-height) + var(--roadmap-lane-pad-top) + var(--roadmap-lane-pad-bottom) + (var(--roadmap-first-lane-extra-top) / 2));
  top: calc(-1 * (((var(--roadmap-point-height) + var(--roadmap-lane-pad-top) + var(--roadmap-lane-pad-bottom)) / 2) + (var(--roadmap-first-lane-extra-top) / 2)));
}

.tutorial-roadmap-turn.at-right::before {
  right: 0;
}

.tutorial-roadmap-turn.at-left::before {
  left: 0;
}



.article-view {
  max-width: var(--content-max);
  padding: 2px 0 12px;
}

.article-kicker {
  margin: 0;
  color: var(--muted);
}

.article-view h1 {
  margin: 16px 0 0;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.04em;
  word-spacing: -0.08em;
  overflow-wrap: anywhere;
}

.article-date {
  margin: 7px 0 0;
  color: var(--muted-soft);
}

.article-date span,
.article-email span,
.article-paper span {
  color: var(--muted-soft);
}

.article-email {
  margin: 2px 0 0;
  color: var(--muted-soft);
}

.article-email a {
  color: var(--muted-soft);
  text-decoration: underline;
  text-decoration-style: dotted;
}

.article-paper {
  margin: 2px 0 0;
  color: var(--muted-soft);
}

.article-paper a {
  color: var(--muted-soft);
  text-decoration: underline;
}

.article-media-gallery {
  margin-top: 28px;
  display: grid;
  gap: 22px;
}

.article-media-group {
  display: grid;
  gap: 10px;
}

.article-media-heading {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.article-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.article-media-card {
  margin: 0;
  min-width: 0;
}

.article-media-layout-single {
  grid-column: 1 / -1;
}

.article-media-layout-double {
  grid-column: auto;
}

.article-video-frame {
  width: 100%;
  background: #000;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
}

.article-video-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 12px;
}

.article-figure {
  margin: 0;
}

.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.article-media-card figcaption {
  margin-top: 8px;
  color: #999;
  font-size: 13px;
  line-height: 1.5;
}

.article-body {
  margin-top: 28px;
}

.article-body p {
  margin: 0 0 12px;
  max-width: none;
}

.join-us-view {
  max-width: var(--content-max);
  padding: 18px 0;
}

.join-us-view h1 {
  margin: 0 0 10px;
  font-size: 30px;
}

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

  .article-media-layout-single,
  .article-media-layout-double {
    grid-column: 1 / -1;
  }
}

.join-us-view p {
  margin: 0 0 8px;
  color: var(--muted);
}

.contact-link {
  color: #000;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.intro [data-i18n-intro-repo] {
  margin-top: 14px;
}

.site-footer {
  margin-top: 20px;
  padding: 10px 0 20px;
}

.site-footer::before {
  content: "";
  display: block;
  width: min(var(--content-max), 100%);
  border-top: 1px solid var(--muted-soft);
  margin-bottom: 10px;
}

.site-footer p {
  margin: 0;
  width: min(var(--content-max), 100%);
  font-size: 16px;
  line-height: 1.08;
  color: var(--muted-soft);
  font-weight: 400;
  letter-spacing: -0.05em;
  word-spacing: -0.06em;
}

.site-footer p + p {
  margin-top: 4px;
}

.floating-controls {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
}

.back-to-prev,
.back-to-top,
.back-to-next {
  width: 36px;
  height: 36px;
  border: 2px solid #000;
  border-radius: 2px;
  background: #fefefe;
  color: #000;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 #000;
}

.back-to-prev:hover,
.back-to-prev:focus-visible,
.back-to-top:hover,
.back-to-top:focus-visible,
.back-to-next:hover,
.back-to-next:focus-visible {
  background: #000;
  color: #fff;
  box-shadow: 2px 2px 0 #000;
}

@media (max-width: 820px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .site-nav {
    gap: 12px;
  }

  .logo-text {
    font-size: 22px;
  }

  body {
    padding-top: 21px;
  }

  .timeline-head {
    flex-direction: column;
    gap: 2px;
  }

  .timeline-date {
    font-size: 12px;
    margin-left: 0;
  }

  .scenario-link {
    grid-template-columns: 1fr;
  }

  .tutorial-top-nav {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .tutorial-roadmap-lane {
    gap: 3ch;
    --roadmap-point-height: 46px;
    --roadmap-lane-pad-top: 3px;
    --roadmap-lane-pad-bottom: 0px;
  }

  .tutorial-roadmap {
    --roadmap-first-lane-extra-top: 10px;
  }

  .tutorial-roadmap-lane {
    padding: var(--roadmap-lane-pad-top) 16px var(--roadmap-lane-pad-bottom) 2px;
  }

  .tutorial-roadmap-lane:first-child {
    padding-top: calc(var(--roadmap-lane-pad-top) + var(--roadmap-first-lane-extra-top));
  }

  .tutorial-roadmap-point {
    min-height: var(--roadmap-point-height);
  }

  .tutorial-roadmap-info {
    width: min(98%, 180px);
  }

  .timeline {
    padding-left: 18px;
  }

  .timeline-item::before {
    left: -16px;
  }

  .article-view h1 {
    font-size: 28px;
  }

  .floating-controls {
    left: 0;
    right: 0;
    top: auto;
    bottom: 12px;
    width: 100%;
    transform: none;
    flex-direction: row;
    justify-content: center;
    pointer-events: none;
  }

  .back-to-prev,
  .back-to-top,
  .back-to-next {
    pointer-events: auto;
  }

  .back-to-prev,
  .back-to-top,
  .back-to-next {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  body {
    padding-bottom: 56px;
  }
}

@media (max-width: 560px) {
  .logo-text {
    font-size: 19px;
  }

  .site-nav {
    gap: 10px;
  }
}

/* Highlighted research title */
.highlighted-title {
  color: #e53935 !important;
}
