:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #1d1f22;
  --muted: #667085;
  --line: #d0d7e2;
  --brand: #9fc3fa;
  --brand-soft: #eaf2ff;
  --surface-2: #f6f7fb;
  --shadow: 0 10px 30px rgba(18, 23, 43, 0.12);
  --radius: 8px;
  --timeline-width: 2860px;
  --lane-count: 11;
  --lane-height: 166px;
  color-scheme: light;
  font-family:
    "Poppins", "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

.filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.shell {
  width: min(1680px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0;
  max-width: 100%;
}

.app-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.header-copy {
  min-width: 0;
}

.eyebrow,
.toolbar-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.typing-title {
  max-width: 100%;
}

.developer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  max-width: 980px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(0.76rem, 1vw, 0.92rem);
  line-height: 1.35;
}

.developer-contact strong {
  color: var(--ink);
  font-weight: 700;
}

.developer-contact a {
  color: #6fa4f2;
  font-weight: 700;
  text-decoration: none;
}

.developer-contact a:hover {
  text-decoration: underline;
}

.typing-title span {
  position: relative;
  display: inline-block;
  max-width: 100%;
  color: transparent;
  white-space: nowrap;
}

.typing-title span::before {
  position: absolute;
  inset: 0;
  width: 0;
  overflow: hidden;
  color: var(--ink);
  white-space: nowrap;
  content: attr(data-text);
  animation: type-title 2.25s steps(26, end) 180ms forwards;
}

.typing-title span::after {
  position: absolute;
  top: 0.07em;
  bottom: 0.02em;
  left: 0;
  width: 3px;
  background: var(--ink);
  content: "";
  animation:
    caret-move 2.25s steps(26, end) 180ms forwards,
    caret-blink 740ms step-end infinite;
}

@keyframes type-title {
  to {
    width: 100%;
  }
}

@keyframes caret-move {
  to {
    left: 100%;
  }
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

h2 {
  line-height: 1.05;
  letter-spacing: 0;
}

.header-actions,
.view-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-button,
.tool-button,
.text-button {
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.icon-button:hover,
.tool-button:hover,
.text-button:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.icon-button {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(18, 23, 43, 0.1);
  font-size: 1.25rem;
  font-weight: 800;
}

.tool-button {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-weight: 800;
}

.panel-toggle {
  width: 42px;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.panel-toggle[aria-pressed="true"] {
  border-color: #6fa4f2;
  background: #6fa4f2;
  color: #ffffff;
}

.text-button {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.view-toggle[aria-pressed="true"] {
  border-color: #6fa4f2;
  background: #6fa4f2;
  color: #ffffff;
}

.workbench {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr) 330px;
  height: clamp(620px, calc(100vh - 210px), 820px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  max-width: 100%;
}

body.is-map-focus .shell {
  width: min(1960px, calc(100vw - 24px));
}

.workbench.is-map-focus {
  grid-template-columns: minmax(0, 1fr);
  height: clamp(700px, calc(100vh - 172px), 900px);
}

.workbench.is-left-collapsed:not(.is-map-focus) {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.workbench.is-right-collapsed:not(.is-map-focus) {
  grid-template-columns: 258px minmax(0, 1fr);
}

.workbench.is-left-collapsed.is-right-collapsed:not(.is-map-focus) {
  grid-template-columns: minmax(0, 1fr);
}

.legend-panel,
.detail-panel {
  min-height: 0;
  overflow-y: auto;
  background: #ffffff;
}

.legend-panel {
  border-right: 1px solid var(--line);
  padding: 18px;
}

.detail-panel {
  border-left: 1px solid var(--line);
  padding: 22px;
}

.panel-section + .panel-section {
  margin-top: 28px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 820;
  text-transform: uppercase;
}

.filter-list {
  display: grid;
  gap: 9px;
}

.filter-chip {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.filter-chip.is-off {
  opacity: 0.42;
}

.filter-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.filter-chip strong {
  display: block;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.12;
}

.filter-chip span:last-child {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.75rem;
}

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

.researcher-button {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 92px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  cursor: pointer;
}

.researcher-button.is-active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 32%, transparent);
}

.researcher-button span {
  max-width: 100%;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 730;
  line-height: 1.12;
  text-align: center;
  white-space: normal;
}

.portrait {
  --accent: #9fc3fa;
  position: relative;
  width: 48px;
  height: 54px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 48%, #fff 52%);
  border-radius: 42% 42% 46% 46%;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, #fff 82%), var(--brand-soft));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.42),
    0 9px 14px rgba(18, 23, 43, 0.11);
}

.portrait::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(18, 23, 43, 0.12));
  mix-blend-mode: soft-light;
  pointer-events: none;
  content: "";
}

.portrait::after {
  position: absolute;
  right: -4px;
  bottom: 2px;
  z-index: 3;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 70%, #fff 30%);
  content: attr(data-initials);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 820;
  line-height: 18px;
  text-align: center;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: var(--photo-fit, cover);
  object-position: var(--photo-position, 50% 34%);
  filter: var(--photo-filter, saturate(1.55) contrast(1.24) brightness(1.04) sepia(0.08));
  transform: scale(var(--photo-scale, 1.18));
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: color-mix(in srgb, var(--accent) 76%, var(--ink) 24%);
  font-size: 1rem;
  font-weight: 900;
}

.portrait.has-error img,
.portrait.no-photo img {
  display: none;
}

.portrait.has-error .portrait-fallback,
.portrait.no-photo .portrait-fallback {
  display: grid;
}

.timeline-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 24px 24px, rgba(159, 195, 250, 0.28) 1px, transparent 1px) 0 0 / 30px 30px,
    var(--surface-2);
}

.timeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 13px;
  border-bottom: 1px solid var(--line);
}

.timeline-toolbar h2 {
  margin: 0;
  font-size: 1.34rem;
}

.timeline-viewport {
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  cursor: grab;
  outline: none;
  scrollbar-color: #9fc3fa transparent;
  scrollbar-width: thin;
}

.timeline-viewport:active {
  cursor: grabbing;
}

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

.timeline-viewport::-webkit-scrollbar-thumb {
  border: 2px solid var(--surface-2);
  border-radius: 999px;
  background: #9fc3fa;
}

.timeline-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.timeline-canvas {
  position: relative;
  width: max(var(--timeline-width), 100%);
  min-height: calc((var(--lane-height) * var(--lane-count)) + 72px);
  padding: 0 42px 32px;
}

.year-axis {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 46px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 247, 251, 0.94) 100%);
  box-shadow: 0 10px 20px rgba(18, 23, 43, 0.08);
  backdrop-filter: blur(4px);
}

.year-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 10px;
  background: #9fc3fa;
}

.year-tick span {
  position: absolute;
  top: 7px;
  left: -18px;
  width: 44px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  text-align: center;
}

.lanes {
  display: grid;
  gap: 0;
}

.lane {
  position: relative;
  height: var(--lane-height);
  border-bottom: 1px solid rgba(208, 215, 226, 0.88);
}

.lane:last-child {
  border-bottom: 0;
}

.lane-label {
  position: sticky;
  left: 18px;
  z-index: 3;
  display: inline-grid;
  grid-template-columns: 11px auto;
  align-items: center;
  gap: 9px;
  max-width: 210px;
  margin-top: 16px;
  padding: 8px 11px;
  border: 1px solid rgba(208, 215, 226, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(18, 23, 43, 0.08);
  font-size: 0.82rem;
  font-weight: 820;
}

.lane-label i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.lane-line {
  position: absolute;
  top: 66px;
  left: 42px;
  right: 42px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 44%, #eaf2ff);
}

.milestone {
  position: absolute;
  top: 28px;
  z-index: 2;
  width: 152px;
  min-height: 72px;
  padding: 9px 9px 9px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 26px rgba(18, 23, 43, 0.11);
  cursor: pointer;
  text-align: left;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    opacity 150ms ease;
}

.milestone:hover,
.milestone.is-selected {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(18, 23, 43, 0.16);
}

.milestone.is-dimmed {
  opacity: 0.18;
  pointer-events: none;
}

.milestone .year {
  display: block;
  color: color-mix(in srgb, var(--accent) 72%, var(--ink) 28%);
  font-size: 0.72rem;
  font-weight: 850;
}

.milestone strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.milestone small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.18;
}

.minimap {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
}

.minimap-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(251, 183, 184, 0.62), rgba(159, 195, 250, 0.62), rgba(141, 224, 200, 0.62), rgba(101, 201, 173, 0.62), rgba(111, 164, 242, 0.62), rgba(250, 202, 142, 0.62), rgba(237, 128, 238, 0.62), rgba(229, 143, 150, 0.62), rgba(217, 160, 94, 0.62), rgba(194, 148, 248, 0.62), rgba(86, 194, 189, 0.62));
  cursor: pointer;
}

.minimap-window {
  position: absolute;
  top: 2px;
  left: 0;
  height: 12px;
  min-width: 42px;
  border: 2px solid #6fa4f2;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.aied-tree-panel {
  margin-top: 18px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line);
}

.aied-tree-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr) auto;
  gap: 12px 22px;
  align-items: center;
  margin-bottom: 12px;
}

.aied-tree-heading .eyebrow {
  margin-bottom: 6px;
}

.aied-tree-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
}

.aied-tree-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.aied-toggle {
  white-space: nowrap;
}

.aied-tree {
  display: grid;
  grid-template-columns: repeat(6, minmax(190px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-color: #9fc3fa transparent;
  scrollbar-width: thin;
}

.aied-tree[hidden] {
  display: none;
}

.aied-tree-panel.is-collapsed {
  padding-bottom: 14px;
}

.aied-branch {
  --accent: #d9a05e;
  position: relative;
  min-width: 190px;
  padding: 14px 12px 12px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: var(--radius);
  background: #ffffff;
}

.aied-branch::before {
  position: absolute;
  top: 82px;
  bottom: 22px;
  left: 35px;
  width: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 38%, #eaf2ff);
  content: "";
}

.aied-branch-heading {
  min-height: 92px;
}

.aied-branch-heading span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, #fff 84%);
  color: color-mix(in srgb, var(--accent) 82%, var(--ink) 18%);
  font-size: 0.68rem;
  font-weight: 860;
  text-transform: uppercase;
}

.aied-branch-heading h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.08;
}

.aied-branch-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.aied-node-list {
  position: relative;
  display: grid;
  gap: 10px;
}

.aied-node {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(18, 23, 43, 0.08);
  cursor: pointer;
  text-align: left;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.aied-node:hover,
.aied-node.is-selected {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 15px 28px rgba(18, 23, 43, 0.13);
}

.aied-node .portrait {
  width: 42px;
  height: 48px;
}

.aied-node .portrait::after {
  right: -5px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  font-size: 0.52rem;
  line-height: 18px;
}

.aied-node-copy {
  min-width: 0;
}

.aied-node-copy small,
.aied-node-copy strong,
.aied-node-copy em {
  display: block;
}

.aied-node-copy small {
  color: color-mix(in srgb, var(--accent) 72%, var(--ink) 28%);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 860;
}

.aied-node-copy strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.12;
}

.aied-node-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 720;
  line-height: 1.15;
}

.detail-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 820;
  text-transform: uppercase;
}

.detail-portrait {
  width: 104px;
  height: 112px;
  margin-bottom: 18px;
}

.detail-portrait .portrait {
  width: 92px;
  height: 104px;
  margin-left: 2px;
}

.detail-portrait .portrait::after {
  right: -6px;
  bottom: 4px;
  width: 32px;
  height: 32px;
  font-size: 0.72rem;
  line-height: 32px;
}

.detail-panel h2 {
  margin-bottom: 12px;
  font-size: clamp(1.38rem, 1.9vw, 1.62rem);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.detail-panel p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.detail-meta {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.detail-meta div {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
}

.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #6fa4f2;
  border-radius: 999px;
  background: #6fa4f2;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 780;
  text-decoration: none;
}

.milestone-dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(18, 23, 43, 0.28);
}

.milestone-dialog::backdrop {
  background: rgba(18, 23, 43, 0.34);
  backdrop-filter: blur(5px);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.modal-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 68px 0 28px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.modal-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.18fr);
  gap: 28px;
  padding: 22px 28px 28px;
}

.modal-portrait {
  width: 128px;
  height: 142px;
  margin-bottom: 18px;
}

.modal-portrait .portrait {
  width: 118px;
  height: 132px;
}

.modal-portrait .portrait::after {
  right: -7px;
  bottom: 6px;
  width: 34px;
  height: 34px;
  font-size: 0.74rem;
  line-height: 34px;
}

.milestone-dialog h2 {
  margin: 0 0 14px;
  padding-bottom: 0.08em;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

#modalTitle .typing-letter {
  display: inline-block;
  color: var(--ink);
  line-height: 1.12;
  opacity: 0;
  transform: translateY(0.08em);
  animation: modal-letter-in 46ms linear forwards;
  animation-delay: calc(var(--letter-index, 0) * 24ms);
}

#modalTitle .typing-space {
  width: 0.28em;
}

#modalTitle.is-typing .typing-letter {
  animation-name: modal-letter-in;
}

@keyframes modal-letter-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-summary {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.58;
}

.modal-body {
  display: grid;
  gap: 16px;
}

.modal-body section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.modal-body h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: uppercase;
}

.modal-body p {
  margin: 0;
  color: #344054;
  font-size: 0.95rem;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.modal-actions .text-button {
  min-height: 42px;
  padding-inline: 14px;
}

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: 220px minmax(0, 1fr);
    height: auto;
    min-height: 680px;
  }

  .workbench.is-left-collapsed:not(.is-map-focus),
  .workbench.is-right-collapsed:not(.is-map-focus),
  .workbench.is-left-collapsed.is-right-collapsed:not(.is-map-focus) {
    grid-template-columns: minmax(0, 1fr);
  }

  .aied-tree {
    grid-template-columns: repeat(6, minmax(220px, 1fr));
  }

  .detail-panel {
    grid-column: 1 / -1;
    max-height: none;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .timeline-panel {
    min-height: 680px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 18px, 720px);
    padding: 14px 0;
  }

  .app-header {
    flex-direction: column;
    align-items: start;
  }

  .header-actions {
    align-self: stretch;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .developer-contact {
    font-size: 0.76rem;
  }

  .workbench {
    grid-template-columns: 1fr;
    height: auto;
    min-height: unset;
    overflow: visible;
  }

  .timeline-panel {
    order: 1;
    min-height: min(680px, calc(100vh - 150px));
  }

  .legend-panel {
    order: 2;
  }

  .detail-panel {
    order: 3;
  }

  .timeline-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .view-tools {
    justify-content: flex-start;
  }

  .legend-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .researcher-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .aied-tree-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .timeline-canvas {
    --lane-height: 132px;
    padding-inline: 18px;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-topline,
  .modal-grid {
    padding-left: 20px;
    padding-right: 20px;
  }

  .modal-topline {
    padding-right: 66px;
  }

  .modal-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .typing-title span {
    color: var(--ink);
    white-space: normal;
  }

  .typing-title span::before,
  .typing-title span::after {
    display: none;
  }
}

.workbench.is-map-focus {
  grid-template-columns: minmax(0, 1fr);
}

.workbench.is-map-focus .legend-panel,
.workbench.is-map-focus .detail-panel,
.workbench.is-left-collapsed .legend-panel,
.workbench.is-right-collapsed .detail-panel {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
