/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --bg-grad: radial-gradient(1200px 500px at 10% -10%, #d7f3ef 0%, transparent 60%),
             radial-gradient(900px 400px at 100% 0%, #e4e9fb 0%, transparent 55%);
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #111827;
  --muted: #5b6474;
  --faint: #8a93a3;
  --accent: #0d9488;
  --accent-hover: #0b7f75;
  --accent-soft: #d5f2ee;
  --accent-text: #ffffff;
  --danger: #c2410c;
  --danger-soft: #fdeee6;
  --warn: #a16207;
  --warn-soft: #fdf4d8;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 8px 24px -12px rgb(16 24 40 / 0.12);
  --radius: 14px;
  --radius-sm: 9px;

  /* nucleotide colours */
  --nt-A: #16a34a;
  --nt-C: #2563eb;
  --nt-G: #d97706;
  --nt-T: #dc2626;
  --nt-U: #db2777;
  --nt-X: #9ca3af;

  /* chart */
  --series-1: #0d9488;
  --series-2: #6366f1;
  --series-3: #d97706;
  --grid: #eceef2;

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0f14;
    --bg-grad: radial-gradient(1200px 500px at 10% -10%, rgb(13 148 136 / 0.16) 0%, transparent 60%),
               radial-gradient(900px 400px at 100% 0%, rgb(99 102 241 / 0.14) 0%, transparent 55%);
    --surface: #121821;
    --surface-2: #19212c;
    --border: #232c39;
    --border-strong: #303b4b;
    --text: #e6eaf0;
    --muted: #9aa4b2;
    --faint: #6b7686;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-soft: rgb(45 212 191 / 0.14);
    --accent-text: #04201d;
    --danger: #fb923c;
    --danger-soft: rgb(251 146 60 / 0.12);
    --warn: #facc15;
    --warn-soft: rgb(250 204 21 / 0.1);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -16px rgb(0 0 0 / 0.6);
    --nt-A: #4ade80; --nt-C: #60a5fa; --nt-G: #fbbf24; --nt-T: #f87171; --nt-U: #f472b6; --nt-X: #6b7280;
    --series-1: #2dd4bf; --series-2: #818cf8; --series-3: #fbbf24;
    --grid: #1e2632;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-grad: radial-gradient(1200px 500px at 10% -10%, rgb(13 148 136 / 0.16) 0%, transparent 60%),
             radial-gradient(900px 400px at 100% 0%, rgb(99 102 241 / 0.14) 0%, transparent 55%);
  --surface: #121821;
  --surface-2: #19212c;
  --border: #232c39;
  --border-strong: #303b4b;
  --text: #e6eaf0;
  --muted: #9aa4b2;
  --faint: #6b7686;
  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --accent-soft: rgb(45 212 191 / 0.14);
  --accent-text: #04201d;
  --danger: #fb923c;
  --danger-soft: rgb(251 146 60 / 0.12);
  --warn: #facc15;
  --warn-soft: rgb(250 204 21 / 0.1);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -16px rgb(0 0 0 / 0.6);
  --nt-A: #4ade80; --nt-C: #60a5fa; --nt-G: #fbbf24; --nt-T: #f87171; --nt-U: #f472b6; --nt-X: #6b7280;
  --series-1: #2dd4bf; --series-2: #818cf8; --series-3: #fbbf24;
  --grid: #1e2632;
}

/* ------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ----------------------------------------------------------------- topbar */
.topbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-mark rect { fill: var(--accent); }
.brand-mark path { stroke: var(--accent-text); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.brand h1 { font-size: 19px; font-weight: 700; }
.tagline { margin: 0; font-size: 13px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  font-size: 12.5px; color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status[data-state="ok"] .dot { background: #22c55e; box-shadow: 0 0 0 3px rgb(34 197 94 / 0.18); }
.status[data-state="error"] .dot { background: var(--danger); }
.status[data-state="loading"] .dot { animation: pulse 1s ease-in-out infinite; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------- tabs */
.tabs {
  position: relative;
  max-width: 1280px;
  margin: 8px auto 0;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 12px 18px 14px;
  background: none; border: 0; border-radius: 10px 10px 0 0;
  cursor: pointer;
  color: var(--muted);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.tab[aria-selected="true"] { color: var(--text); }
.tab-title { font-weight: 600; font-size: 14.5px; }
.tab-sub { font-size: 12px; color: var(--faint); }
.tab-indicator {
  position: absolute; bottom: -1px; left: 0;
  height: 2px; width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), width .25s cubic-bezier(.2,.8,.2,1);
}

/* ------------------------------------------------------------------ panel */
main { max-width: 1280px; margin: 0 auto; padding: 24px; }
.panel {
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  animation: fade-in .25s ease;
}
@media (max-width: 960px) {
  .panel { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding: 16px 16px 6px; }
  .tabs { padding: 0 16px; }
  main { padding: 16px; }
  .tab-sub { display: none; }
}
@media (max-width: 520px) {
  .tagline { display: none; }
  .status #status-text { display: none; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.input-card {
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 16px;
}
@media (max-width: 960px) { .input-card { position: static; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 15.5px; font-weight: 650; }
.examples { display: flex; gap: 14px; }

/* ----------------------------------------------------------------- fields */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.hint { font-size: 12.5px; color: var(--faint); }
textarea, input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea {
  resize: vertical;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  min-height: 84px;
}
textarea:focus, input[type="number"]:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row.three { grid-template-columns: repeat(3, 1fr); }

.dropzone { position: relative; }
.drop-hint {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border: 2px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-soft) 85%, var(--surface));
  color: var(--accent);
  font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .15s;
}
.dropzone.dragging .drop-hint { opacity: 1; }

.segmented {
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  gap: 4px;
}
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 11.5px; color: var(--faint);
  transition: background .15s, color .15s, box-shadow .15s;
}
.segmented strong { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.segmented input:checked + span { background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.08); color: var(--muted); }
.segmented input:checked + span strong { color: var(--text); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }

/* ---------------------------------------------------------------- buttons */
.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 20px;
  border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  transition: background .15s, transform .05s, box-shadow .15s;
}
.btn.primary { background: var(--accent); color: var(--accent-text); box-shadow: 0 1px 2px rgb(0 0 0 / 0.1); }
.btn.primary:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn .spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.loading .spinner { display: inline-block; }

.link-btn {
  padding: 0; border: 0; background: none;
  color: var(--accent); font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

.file-btn {
  font-size: 13px; color: var(--muted); font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: border-color .15s, color .15s;
}
.file-btn:hover { border-color: var(--border-strong); color: var(--text); }
.file-btn input { display: none; }

kbd {
  font-family: var(--mono); font-size: 11px;
  padding: 1px 6px;
  border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-2);
}

/* ---------------------------------------------------------------- results */
.results { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.results > * { animation: rise .3s cubic-bezier(.2,.8,.2,1) both; }
.results > *:nth-child(2) { animation-delay: .04s; }
.results > *:nth-child(3) { animation-delay: .08s; }
.results > *:nth-child(n+4) { animation-delay: .12s; }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  gap: 10px;
  min-height: 360px;
  padding: 40px 24px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty svg { width: 54px; height: 54px; stroke: var(--faint); fill: none; stroke-width: 1.5; stroke-linecap: round; }
.empty h3 { font-size: 16px; color: var(--text); font-weight: 600; }
.empty p { margin: 0; max-width: 420px; font-size: 13.5px; }

.result-card { padding: 20px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.result-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.result-head h3 { font-size: 16.5px; font-weight: 650; font-family: var(--mono); word-break: break-all; }
.result-head .desc { color: var(--muted); font-size: 13.5px; }
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent);
}
.badge.muted { background: var(--surface-2); color: var(--muted); }

.section-title { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.tile {
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  min-width: 0;
}
.tile .k { font-size: 12px; color: var(--muted); }
.tile .v { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.tile.accent { background: var(--accent-soft); border-color: transparent; }
.tile.accent .v { color: var(--accent); }

/* composition bar */
.comp-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.comp-bar span { height: 100%; transition: filter .15s; }
.comp-bar span:hover { filter: brightness(1.15); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend-item b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* sequence box */
.seq-box {
  position: relative;
  max-height: 180px;
  overflow: auto;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  word-break: break-all;
  letter-spacing: 0.04em;
}
.seq-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.seq-head .section-title { margin: 0; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 7px;
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.copy-btn.done { color: var(--accent); border-color: var(--accent); }

.nt-A { color: var(--nt-A); } .nt-C { color: var(--nt-C); } .nt-G { color: var(--nt-G); }
.nt-T { color: var(--nt-T); } .nt-U { color: var(--nt-U); } .nt-X { color: var(--nt-X); }

/* callouts */
.callout {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 13.5px;
}
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.callout.error { background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); }
.callout.error strong { display: block; margin-bottom: 2px; }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
.callout code { font-family: var(--mono); font-size: 12px; }

/* charts */
.chart-wrap { position: relative; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .zero-line { stroke: var(--border-strong); stroke-width: 1; }
.chart .mean-line { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .axis-label { fill: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; font-family: var(--sans); }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: 0.12; }
.chart .guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .marker { stroke: var(--surface); stroke-width: 2; }
.chart .annot { font-size: 11px; font-weight: 600; font-family: var(--sans); }
.chart-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.chart-title h4 { margin: 0; font-size: 14px; font-weight: 600; }
.chart-title p { margin: 0; font-size: 12.5px; color: var(--faint); }

.tooltip {
  position: fixed; z-index: 10;
  pointer-events: none;
  padding: 8px 10px;
  background: var(--text); color: var(--bg);
  border-radius: 8px;
  font-size: 12px; line-height: 1.45;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.2);
  transform: translate(-50%, calc(-100% - 12px));
  white-space: nowrap;
}
.tooltip b { font-weight: 600; }

select {
  font: inherit; font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--text);
}

/* alignment view */
.aln {
  overflow-x: auto;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.35;
}
.aln-block { display: grid; grid-template-columns: auto auto auto auto; column-gap: 12px; margin-bottom: 14px; width: max-content; }
.aln-block:last-child { margin-bottom: 0; }
.aln-name { color: var(--muted); font-weight: 600; }
.aln-pos { color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.aln-seq { white-space: pre; letter-spacing: 0.08em; }
.aln-mid { white-space: pre; letter-spacing: 0.08em; color: var(--faint); }
.aln .m { color: var(--text); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.aln .x { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); font-weight: 600; }
.aln .g { color: var(--faint); }

.aln-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.aln-legend span { display: inline-flex; align-items: center; gap: 6px; }
.aln-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.tiles.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1180px) { .tiles.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tiles.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.matrix-wrap {
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
}
.matrix { display: block; width: 100%; max-width: 620px; height: auto; max-height: 520px; margin: 0 auto; overflow: visible; }
.matrix .cell { fill: var(--surface); stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.matrix .cell.on { fill: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.matrix .frame { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.matrix .path { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-width: 2.5; }
.matrix .letter { font-family: var(--mono); font-size: 0.6px; fill: var(--muted); text-anchor: middle; dominant-baseline: central; }
.matrix-caption { font-size: 12.5px; color: var(--faint); margin: 10px 0 0; }

/* tree */
.dendro { display: block; width: 100%; height: auto; overflow: visible; }
.dendro .branch { stroke: var(--text); stroke-width: 1.6; fill: none; stroke-linecap: round; }
.dendro .node { fill: var(--accent); }
.dendro .leaf-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.dendro .leaf-label { fill: var(--text); font-size: 13px; font-family: var(--mono); dominant-baseline: middle; }
.dendro .bl { fill: var(--faint); font-size: 10.5px; font-variant-numeric: tabular-nums; font-family: var(--sans); }
.dendro .axis { stroke: var(--border-strong); stroke-width: 1; }
.dendro .axis-label { fill: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; font-family: var(--sans); }
.dendro .node-hit { fill: transparent; cursor: default; }
.dendro .node-hit:hover + .node { r: 6; }

.dist-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 11px; }
table.dist { border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; width: max-content; min-width: 100%; }
table.dist th, table.dist td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.dist th { font-family: var(--mono); font-weight: 600; color: var(--muted); background: var(--surface-2); }
table.dist thead th { position: sticky; top: 0; }
table.dist tbody th { text-align: left; }
table.dist tr:last-child td, table.dist tr:last-child th { border-bottom: 0; }
table.dist td.diag { color: var(--faint); }

.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px;
}
.steps li::before {
  content: counter(step);
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 11.5px;
}
.steps .who { font-family: var(--mono); min-width: 0; overflow-wrap: anywhere; }
.steps .who i { font-style: normal; color: var(--faint); padding: 0 4px; }
.steps .at { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.tree-scroll { overflow-x: auto; }
.tree-scroll .dendro { min-width: 520px; }

.footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 24px 32px;
  font-size: 12.5px;
  color: var(--faint);
}

/* -------------------------------------------------------------- keyframes */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
