/* Atlas — site design system.
   Direction: engineering manual. Neutral paper, system type, and one blue accent for key text, labels and actions. */

:root {
  --bg: #f5f5f7;
  --paper: #fff;
  --ink: #1d1d1f;
  --ink2: #6e6e73;
  --line: rgba(0, 0, 0, .12);
  --line2: color-mix(in srgb, var(--ink) 28%, transparent); /* controls: quieter than ink, firmer than a hairline */
  --accent: #2b5c8a;
  --accent-press: #224a70;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html {
  -webkit-tap-highlight-color: transparent; /* our own :active states give press feedback */
  -webkit-text-size-adjust: 100%;           /* no font inflation in landscape on iOS */
}
a, button { touch-action: manipulation; }
/* Controls, not content: no long-press text selection. Body text stays selectable. */
.at-btn, .at-bar nav, .at-bot, .at-tag { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 100%/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Type primitives ── */
.at-mono { font-size: 12px; }

/* ── Motion ──
   .in: staggered entrance for above-the-fold content (first paint only).
   .rv: reveal once when scrolled into view (js/atlas.js adds .show). */
.in { opacity: 0; transform: translateY(10px); animation: at-in 400ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes at-in { to { opacity: 1; transform: none; } }
.js .rv { opacity: 0; transform: translateY(12px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); }
.js .rv.show { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .in { transform: none; animation: at-fade 300ms ease forwards; animation-delay: 0ms; }
  @keyframes at-fade { to { opacity: 1; } }
  .js .rv { transform: none; transition: opacity 300ms ease; }
}

/* ── Top bar ── */
.at-bar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 44px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); border-bottom: 1px solid var(--line); }
.at-bar nav { display: flex; gap: 22px; justify-self: center; }
.at-bar nav a { position: relative; color: var(--ink2); transition: color 150ms ease; }
.at-bar nav a[aria-current] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.at-bar .r { justify-self: end; color: var(--ink2); }
@media (hover: hover) and (pointer: fine) { .at-bar nav a:hover { color: var(--accent); } }
@media (prefers-reduced-transparency: reduce) { .at-bar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }

.at-wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* ── Buttons ── */
.at-btn { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 8px; background: none; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease; }
.at-btn.fill { background: var(--accent); border-color: var(--accent); color: #fff; }
.at-btn svg { width: 13px; height: 13px; flex-shrink: 0; margin-right: -2px; }
.at-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .at-btn:not(.fill):hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
  .at-btn.fill:hover { background: var(--accent-press); border-color: var(--accent-press); }
}

/* ── Hero ── */
.at-hero { padding: 44px 0 0; }
.at-kicker { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; color: var(--ink2); }
.at-top { display: grid; grid-template-columns: 4fr 3fr; gap: 48px; padding-top: 26px; }
.at-name { font-weight: 700; font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1; letter-spacing: -0.02em; margin: 0; }
.at-name .dot { color: var(--accent); }
.at-lead { font-size: clamp(1.35rem, 2.2vw, 1.9rem); line-height: 1.2; letter-spacing: -0.024em; margin: 18px 0 0; font-weight: 500; text-wrap: balance; }
.at-lead b { font-weight: 700; color: var(--accent); }
.at-pitch { font-size: 1.05rem; line-height: 1.45; margin: 12px 0 0; max-width: 52ch; opacity: .75; }
.at-ctas { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }

/* ── Spec sheet ──
   Each value is an item: primary line (may wrap, balanced) + year column (never wraps)
   + optional meta line. Lines break where the design says, not where the browser runs out. */
.at-spec { margin: 0; border-top: 1px solid var(--ink); align-self: start; }
.at-spec > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.at-spec dt { color: var(--ink2); margin: 0; padding-top: 2px; }
.at-spec dd { margin: 0; min-width: 0; }
.at-spec .it { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: baseline; }
.at-spec .it + .it { margin-top: 9px; }
.at-spec .p { text-wrap: balance; }
.at-spec .deg { color: var(--accent); font-weight: 650; }
.at-spec .lvl { color: var(--ink2); font-size: 12px; margin-left: 2px; }
.at-spec .y { color: var(--ink2); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.at-spec .s { grid-column: 1 / -1; justify-self: start; margin-top: 3px; color: var(--ink2); font-size: 12px; }

/* ── Capabilities + stack ── */
.at-caps { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 40px; border-top: 1px solid var(--ink); }
.at-cap { padding: 14px 18px 16px 0; border-right: 1px solid var(--line); }
.at-cap + .at-cap { padding-left: 18px; }
.at-cap:last-child { border-right: 0; }
.at-cap .k { color: var(--accent); }
.at-cap h3 { margin: 8px 0 6px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.at-cap p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink2); }
.at-stack { display: grid; grid-template-columns: 96px 1fr; align-items: stretch; margin-top: 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.at-stack .k { color: var(--ink2); padding: 12px 0; }
.at-stack ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); }
.at-stack li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 11px 6px 10px; border-left: 1px solid var(--line); text-align: center; color: var(--ink); font-size: 11.5px; }
.at-stack img { width: auto; max-width: 50px; height: 20px; object-fit: contain; }
.at-stack img.tile { width: 20px; border-radius: 4px; }

/* ── Section header ── */
.at-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 64px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.at-sec h2 { margin: 0; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1; }
.at-sec a { color: var(--ink2); transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .at-sec a:hover { color: var(--accent); } }

/* ── Research plates ── */
.at-plate { display: grid; grid-template-columns: 56px 232px 1fr; gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: start; }
.at-num { font-weight: 800; font-size: 2.1rem; line-height: .85; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1.2px var(--accent); }
.at-fig { position: relative; margin: 0; padding: 6px; background: var(--paper); border: 1px solid var(--line); }
.at-fig::before, .at-fig::after { content: ""; position: absolute; width: 10px; height: 10px; border: 1px solid var(--line2); }
.at-fig::before { top: -5px; left: -5px; border-width: 1px 0 0 1px; }
.at-fig::after { bottom: -5px; right: -5px; border-width: 0 1px 1px 0; }
.at-fig .m { aspect-ratio: 16 / 10; overflow: hidden; background: #e8e8ed; }
.at-fig .m > * { width: 100%; height: 100%; object-fit: cover; }
/* Media whose labels sit at the edges (e.g. PIU grid): show it whole; white matches its own background. */
.at-fig .m.fit { background: #fff; }
.at-fig .m.fit > * { object-fit: contain; }
.at-fig figcaption { margin-top: 6px; color: var(--ink2); font-size: 12px; }
.at-venue { margin: 0 0 6px; color: var(--accent); }
.at-txt h3 { margin: 0; font-weight: 650; font-size: 1.2rem; line-height: 1.2; letter-spacing: -0.018em; text-wrap: balance; }
.at-txt p.d { color: var(--ink2); font-size: 15px; line-height: 1.5; margin: 8px 0 0; max-width: 62ch; text-wrap: balance; }
#research .at-txt p.d { max-width: 29.5em; } /* one shared measure: the casual blurbs read as matching two-line blocks */
.at-txt .lab { margin: 8px 0 0; color: var(--ink2); }
.at-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.at-acts .at-btn { height: 30px; padding: 0 11px; font-size: 12px; }

/* ── Trajectory: one linear timeline, instrument-style nodes ── */
.at-tl { list-style: none; margin: 0; padding: 28px 0 0; }
.at-tl-item { display: grid; grid-template-columns: 132px 40px 1fr; grid-template-areas: "date rail body"; column-gap: 22px; padding-bottom: 30px; }
.at-tl-date { grid-area: date; color: var(--ink2); padding-top: 13px; text-align: right; }
.at-tl-rail { grid-area: rail; position: relative; }
.at-tl-item:not(:last-child) .at-tl-rail::after { content: ""; position: absolute; left: 50%; top: 46px; bottom: -24px; width: 1px; background: var(--line); }
.at-tl-node { position: relative; display: block; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; }
.at-tl-node img { width: 100%; height: 100%; object-fit: cover; }
.at-tl-item.now .at-tl-node { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.at-tl-item.now .at-tl-node::after { content: ""; position: absolute; top: -1px; right: -1px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
.at-tl-item.now .at-tl-date { color: var(--accent); }
.at-tl-body { grid-area: body; padding-top: 8px; max-width: 68ch; }
.at-tl-body h3 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.012em; }
.at-tl-body .org { margin: 5px 0 0; color: var(--ink2); }
.at-tl-body .d { margin: 8px 0 0; color: var(--ink2); font-size: 14.5px; line-height: 1.5; text-wrap: pretty; }

/* ── Footer ── */
.at-foot { margin-top: 96px; border-top: 1px solid var(--ink); }
.at-foot .at-wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px 28px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 40px; }
.at-foot .links { display: flex; gap: 8px; flex-wrap: wrap; }
.at-foot .c { color: var(--ink2); }
.at-copy { display: inline-flex; align-items: center; gap: 10px; }
.at-copy [data-copy] { min-width: 64px; justify-content: center; }

/* ── Page header (inner pages) ── */
.at-page { padding: 44px 0 0; }
.at-back { display: inline-flex; gap: 8px; color: var(--ink2); margin-bottom: 18px; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .at-back:hover { color: var(--accent); } }
.at-h1 { font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.04; letter-spacing: -0.03em; margin: 24px 0 0; text-wrap: balance; }
.at-page .at-lead { max-width: 30ch; }
.at-page .at-intro { margin: 16px 0 0; max-width: 64ch; color: var(--ink2); font-size: 16px; line-height: 1.55; text-wrap: pretty; }

/* ── Tags ── */
.at-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.at-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink2); font-size: 12px; }

/* ── Project card grid ── */
.at-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; padding-top: 28px; }
.at-card { display: flex; flex-direction: column; min-width: 0; }
.at-card .at-fig .m { aspect-ratio: 16 / 10; }
.at-card .meta { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--ink2); }
.at-card .meta img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.at-card .meta .y { margin-left: auto; color: var(--accent); }
.at-card h3 { margin: 8px 0 0; font-weight: 650; font-size: 1.02rem; line-height: 1.25; letter-spacing: -0.015em; text-wrap: balance; }
.at-card h3 a { transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .at-card h3 a:hover { color: var(--accent); } }
.at-card .sum { margin: 8px 0 0; color: var(--ink2); font-size: 14px; line-height: 1.5; }
.at-card .sum p { margin: 0; }
.at-card .sum ul { margin: 0; padding-left: 16px; }
.at-card .sum li + li { margin-top: 3px; }
.at-card .at-acts { margin-top: auto; padding-top: 14px; }

/* ── Article (project detail) ── */
.at-article { max-width: 880px; }
.at-article .at-fig { margin-top: 28px; padding: 8px; }
.at-article .at-fig .m { aspect-ratio: auto; max-height: 72vh; display: grid; place-items: center; background: #eeeef1; }
.at-article .at-fig .m > * { width: 100%; height: auto; max-height: 72vh; object-fit: contain; filter: none; }
.at-prose { padding-top: 18px; font-size: 16.5px; line-height: 1.65; max-width: 68ch; }
.at-prose p { margin: 0 0 14px; }
.at-prose ul { margin: 0 0 14px; padding-left: 20px; }
.at-prose li + li { margin-top: 6px; }
.at-prose strong { font-weight: 650; }
.at-article .at-acts { margin-top: 18px; }
.at-article .at-acts .at-btn { height: 34px; padding: 0 13px; font-size: 12px; }

/* ── Walkthrough figures (research pages): pipeline strip, column labels, side-by-side blocks, charts, equations ── */
.at-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding-top: 22px; }
.at-strip span { padding: 9px 13px; border: 1px solid var(--ink); border-radius: 2px; background: var(--paper); font-weight: 650; font-size: 14px; line-height: 1.2; letter-spacing: -0.01em; }
.at-strip span.key { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.at-strip i { font-style: normal; color: var(--accent); }
/* Labels that sit over the columns (or beside the rows) of a figure grid */
.at-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; padding: 2px 0 8px; text-align: center; color: var(--ink2); }
.at-cols .hi { color: var(--accent); }
.at-article .at-cols + .m, .at-article .at-cols + .m > * { max-height: none; } /* letterboxing would pull the image out from under its labels */
.at-rows { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.at-rows .k { display: grid; grid-auto-rows: 1fr; color: var(--ink2); }
.at-rows .k span { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.at-split, .at-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 28px; align-items: start; }
.at-split > .at-fig, .at-pair > .at-fig { margin-top: 0; }
.at-split .at-intro { margin-top: 0; }
.at-parts { border-top: 1px solid var(--ink); }
.at-sec + .at-parts { margin-top: 4px; border-top: 0; } /* the section rule already sits on top */
.at-part { padding: 14px 0; border-bottom: 1px solid var(--line); }
.at-part .k { color: var(--accent); }
.at-part h3 { margin: 6px 0 4px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.at-part p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink2); }
.at-part .big { display: block; margin-top: 6px; font-weight: 800; font-size: 2.2rem; line-height: 1; letter-spacing: -0.04em; color: var(--accent); }
/* Charts are drawn at the container's real width (js/charts.js), so these sizes are on-screen pixels */
.at-chart { padding: 6px 6px 2px; }
.at-chart .t, .at-eq .t { display: block; margin-bottom: 10px; color: var(--ink2); }
.at-chart svg, .at-svg { display: block; width: 100%; height: auto; font-size: 11px; font-variant-numeric: tabular-nums; }
.at-chart svg .s, .at-svg .s { font-size: 12.5px; }
.at-eq { padding: 14px 16px 10px; }
.at-eq .eqs { overflow-x: auto; }
.at-eq math { margin: 12px 0; font-size: 1.25rem; }
.at-eq .tot { color: var(--accent); }
.at-eq math, .at-tag math { font-family: "STIX Two Math", "Cambria Math", math; } /* the generic `math` font can lack stretchy brackets and accents */
.at-tag math { text-transform: none; font-size: 12px; }
@media (max-width: 600px) {
  .at-split, .at-pair { grid-template-columns: 1fr; }
  .at-eq math { font-size: .9rem; }
  .at-strip { flex-direction: column; align-items: flex-start; gap: 6px; } /* a vertical pipeline: no arrow left dangling at a line end */
  .at-strip i { transform: rotate(90deg); margin-left: 14px; }
}

/* ── Research page (large plates) ── */
.at-plate.lg { grid-template-columns: 56px minmax(0, 6fr) minmax(0, 5fr); gap: 32px; padding: 36px 0; }
.at-plate.lg .at-fig .m { aspect-ratio: 16 / 10; }
.at-plate.lg .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.at-plate.lg .at-fig .cap { margin: 8px 0 0; color: var(--ink2); font-size: 13px; line-height: 1.45; text-transform: none; letter-spacing: 0; font-family: var(--font-sans); }
.at-plate.lg h2 { margin: 0; font-weight: 650; font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
.at-plate.lg p.d { font-size: 15.5px; }

/* ── Contact ── */
.at-contact { margin-top: 36px; border-top: 1px solid var(--ink); }
.at-crow { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.at-crow .k { color: var(--ink2); }
.at-crow .v { font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 500; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.at-crow .a { display: flex; gap: 6px; }

/* ── Inner-page responsive ── */
@media (max-width: 900px) {
  .at-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .at-plate.lg { grid-template-columns: 1fr; gap: 18px; }
  .at-crow { grid-template-columns: 120px minmax(0, 1fr); }
  .at-crow .a { grid-column: 2; }
}
@media (max-width: 600px) {
  .at-grid { grid-template-columns: 1fr; }
  .at-plate.lg .pair { grid-template-columns: 1fr; }
  .at-crow { grid-template-columns: 1fr; gap: 6px; }
  .at-crow .a { grid-column: 1; }
}

/* ── Corner bot (js/src/bot.jsx) ── */
#at-bot { position: fixed; left: 36px; bottom: 44px; z-index: 30; }
.at-bot { position: relative; }
.at-bot-btn { display: block; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; transition: transform 160ms var(--ease-out); }
.at-bot-btn:active { transform: scale(0.97); }

/* Menu panel: grows up from the bot's corner */
.at-bot-menu { position: absolute; left: 0; bottom: calc(100% + 10px); display: flex; flex-direction: column; width: 280px; max-height: calc(100vh - 170px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; background: var(--paper); border: 1px solid var(--ink); box-shadow: 0 12px 32px rgba(18, 18, 18, .12); transform-origin: bottom left; opacity: 0; transform: translateY(6px) scale(.96); visibility: hidden; transition: opacity 120ms ease-out, transform 120ms var(--ease-out), visibility 0s linear 120ms; }
.at-bot[data-open] .at-bot-menu { opacity: 1; transform: none; visibility: visible; transition: opacity 180ms ease-out, transform 220ms var(--ease-out), visibility 0s; }
.at-bot-menu .h { padding: 8px 10px; color: var(--ink2); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.at-bot-menu .h + a, .at-bot-menu .h + .q { margin-top: 0; }
.at-bot-menu a:not(.more), .at-bot-menu .q { display: grid; grid-template-columns: 30px 1fr auto; align-items: baseline; gap: 0; width: 100%; padding: 10px; border: 0; background: none; color: inherit; font: inherit; font-size: 12px; text-transform: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.at-bot-menu a ~ .h { margin-top: 6px; border-top: 1px solid var(--line); }
.at-bot-menu .n { color: var(--accent); }
.at-bot-menu .go { color: var(--ink2); transition: transform 200ms var(--ease-out), color 150ms ease; }
.at-bot-menu .q .qt { font-family: var(--font-sans); font-size: 13.5px; text-transform: none; letter-spacing: 0; line-height: 1.35; text-wrap: pretty; padding-right: 8px; }
.at-bot-menu :focus-visible { outline-offset: -2px; }
.at-bot-menu a:not(.more):active, .at-bot-menu .q:active { background: color-mix(in srgb, var(--ink) 8%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .at-bot-menu a:not(.more):hover, .at-bot-menu .q:hover { background: var(--ink); color: var(--bg); }
  .at-bot-menu a:not(.more):hover .go, .at-bot-menu .q:hover .go { color: var(--bg); transform: translateX(2px); }
}

/* Answer view */
.at-bot-menu .ans { padding: 6px 10px 10px; animation: at-bot-swap 180ms var(--ease-out); }
@keyframes at-bot-swap { from { opacity: 0; transform: translateY(4px); } }
.at-bot-menu .back { padding: 4px 0; border: 0; background: none; color: var(--ink2); font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .at-bot-menu .back:hover { color: var(--accent); } }
.at-bot-menu .qq { margin: 10px 0 0; font-weight: 650; font-size: 14px; line-height: 1.25; letter-spacing: -0.01em; text-transform: none; text-wrap: balance; }
.at-bot-menu .aa { margin: 8px 0 0; font-family: var(--font-sans); font-size: 14px; line-height: 1.55; text-transform: none; letter-spacing: 0; color: var(--ink); text-wrap: pretty; }
.at-bot-menu .aa.todo { color: var(--ink2); font-style: italic; }
.at-bot-menu .more { display: inline-block; margin-top: 12px; color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Quick-action circles: fan out to the right of the bot */
.at-bot-acts { position: absolute; left: calc(100% + 12px); bottom: 16px; display: flex; gap: 8px; }
.at-bot-act { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--paper); border: 1px solid var(--ink); color: var(--ink); box-shadow: 0 6px 16px rgba(18, 18, 18, .10); opacity: 0; transform: translateX(-10px) scale(.9); transition: opacity 120ms ease-out, transform 120ms var(--ease-out), background-color 150ms ease, color 150ms ease; }
.at-bot[data-open] .at-bot-act { opacity: 1; transform: none; transition: opacity 180ms ease-out calc(var(--i) * 40ms), transform 220ms var(--ease-out) calc(var(--i) * 40ms), background-color 150ms ease, color 150ms ease; }
.at-bot[data-open] .at-bot-act:active { transform: scale(.95); transition-delay: 0ms; }
.at-bot-act::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--ink2); white-space: nowrap; opacity: 0; transition: opacity 150ms ease; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .at-bot-act:hover { background: var(--ink); color: var(--bg); }
  .at-bot-act:hover::after { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .at-bot-menu, .at-bot[data-open] .at-bot-menu, .at-bot-act, .at-bot[data-open] .at-bot-act { transform: none; }
  .at-bot-menu .ans { animation: none; }
}
@media (max-width: 600px) { #at-bot { display: none; } }

/* ── Trajectory chart (js/trajectory.js) ── */
.tc { --lane: 116px; margin-top: 28px; }
.tc-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-mask-image: linear-gradient(to right, #000 92%, transparent); mask-image: linear-gradient(to right, #000 92%, transparent); }
@media (min-width: 760px) { .tc-scroll { -webkit-mask-image: none; mask-image: none; } }
.tc-grid { position: relative; min-width: 680px; display: grid; grid-template-columns: var(--lane) 1fr; }
.tc-ruler { grid-column: 2; position: relative; height: 26px; border-bottom: 1px solid var(--ink); }
.tc-ruler span { position: absolute; bottom: 6px; transform: translateX(-50%); color: var(--ink2); }
.tc-lane-k { grid-column: 1; color: var(--ink2); padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.tc-lane { grid-column: 2; position: relative; border-bottom: 1px solid var(--line); }
.tc-lane.edu { height: 64px; }
.tc-lane.exp { height: 96px; }
.tc-lane.exp .tc-bar { top: 12px; }
.tc-lane.exp .tc-bar.r2 { top: 52px; }
.tc-lane.out { height: 72px; }
.tc-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tc-bar { position: absolute; top: 16px; height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line2); background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; overflow: hidden; white-space: nowrap; transform-origin: left center; transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out); }
.tc-bar img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
/* Stays too short for a label (e.g. Rice, 2 months): centred logo only, label kept for screen readers */
.tc-bar.tiny { justify-content: center; padding: 0; }
.tc-bar.tiny .t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tc-bar .t { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
/* Solid fill on one row (data-fill="exp" | "edu"); the other row stays white paper */
.tc--graphite { --fill: #3a3a3c; --fill-fg: #fff; }
.tc[data-fill="exp"] .tc-bar.exp, .tc[data-fill="edu"] .tc-bar.edu { background: var(--fill); border-color: var(--fill); color: var(--fill-fg); }
/* Inked bars: fill never changes; selection shows as an accent ring */
.tc[data-fill="exp"] .tc-bar.exp[aria-pressed="true"], .tc[data-fill="edu"] .tc-bar.edu[aria-pressed="true"] { color: var(--fill-fg); outline: 2px solid var(--accent); outline-offset: 1px; }
.tc[data-fill="exp"] .tc-bar.exp:hover, .tc[data-fill="edu"] .tc-bar.edu:hover { border-color: var(--fill); }
/* Selected: same paper fill, accent outline + label (like the active nav item), never a solid block */
.tc-bar[aria-pressed="true"] { color: var(--accent); outline: 1px solid var(--accent); outline-offset: -1px; z-index: 1; }
.tc-bar:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .tc-bar:not([aria-pressed="true"]):hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--ink)); } }
.tc-seg { border-left-width: 0; }
/* University thirds inside the MSc bar: short ruler ticks on the top and bottom edges, never across the label */
.tc-tk { position: absolute; left: var(--at); width: 1px; height: 6px; background: currentColor; opacity: .5; }
.tc-tk.t { top: 0; } .tc-tk.b { bottom: 0; }
.tc-seg.first { border-left-width: 1px; }
.tc-dot { position: absolute; z-index: 1; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--ink); transition: transform 160ms var(--ease-out), background-color 180ms ease; }
.tc-dot.r { background: var(--accent); }
.tc-dot::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; } /* bigger hit target than the 9px dot */
.tc-hit { position: absolute; top: 6px; border-radius: 4px; cursor: pointer; }
.tc-dot.dim { background: color-mix(in srgb, var(--ink) 22%, transparent); }
.tc-dot.on { background: var(--accent); }
.tc-glabel { position: absolute; z-index: 1; transform: translateX(-50%); margin-top: 2px; padding: 2px 4px; border: 0; background: none; font: inherit; font-size: 11px; color: var(--ink2); white-space: nowrap; cursor: pointer; transition: color 150ms ease, opacity 150ms ease; }
@media (hover: hover) and (pointer: fine) { .tc-glabel:hover { color: var(--accent); } }
.tc-glabel.on { color: var(--accent); }
.tc-glabel.dim { opacity: .35; }
.tc-unis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tc-uni .h { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); }
.tc-uni .h img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.tc-uni .m { margin: 4px 0 8px 26px; color: var(--ink2); font-size: 12px; }
.tc-uni a { display: block; margin-left: 26px; padding: 4px 0; font-size: 14px; line-height: 1.35; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--ink) 28%, transparent); transition: color 150ms ease, text-decoration-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .tc-uni a:hover { color: var(--accent); text-decoration-color: var(--accent); } }
@media (max-width: 760px) { .tc-unis { grid-template-columns: 1fr; gap: 14px; } }
.tc-built { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tc-built a { font-size: 14px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--ink) 28%, transparent); transition: color 150ms ease, text-decoration-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .tc-built a:hover { color: var(--accent); text-decoration-color: var(--accent); } }
.tc-dot:focus-visible { outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .tc-dot:hover { transform: scale(1.5); } }
.tc-tip { position: absolute; left: 0; top: 0; pointer-events: none; padding: 5px 8px; background: var(--ink); color: var(--bg); font-size: 12px; white-space: nowrap; opacity: 0; transform: translate(-50%, -100%) translateY(-8px); transition: opacity 120ms ease-out; z-index: 3; }
.tc-tip.on { opacity: 1; }
.tc-detail { display: grid; grid-template-columns: var(--lane) 1fr; gap: 0; padding-top: 22px; }
.tc-detail:empty { padding-top: 0; }
.tc-detail .k { color: var(--accent); padding-top: 4px; }
.tc-detail h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.012em; color: var(--accent); }
.tc-detail .org { margin: 5px 0 0; color: var(--ink2); }
.tc-detail .d { margin: 10px 0 0; color: var(--ink2); font-size: 14.5px; line-height: 1.5; max-width: 64ch; }
.tc-detail .at-tags { margin-top: 12px; }
.tc-detail .body { animation: tc-swap 180ms var(--ease-out); }
@keyframes tc-swap { from { opacity: 0; transform: translateY(4px); } }
/* backwards, not both: the clip applies during the delay and is released at the end, so outlines outside the bar show */
.tc-grow { animation: tc-grow 520ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes tc-grow { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.tc-pop { animation: tc-pop 260ms var(--ease-out) both; animation-delay: calc(400ms + var(--i, 0) * 25ms); }
@keyframes tc-pop { from { opacity: 0; transform: scale(.6); } }
@media (max-width: 600px) { .tc { --lane: 0px; } .tc-lane-k { display: none; } .tc-detail { grid-template-columns: 1fr; } .tc-detail .k { display: none; } }
@media (prefers-reduced-motion: reduce) { .tc-grow, .tc-pop, .tc-detail .body { animation: none; } }

/* Entrance waits until the chart scrolls into view (js adds .play) */
.tc .tc-grow, .tc .tc-pop { animation-play-state: paused; }
.tc.play .tc-grow, .tc.play .tc-pop { animation-play-state: running; }

/* ── Responsive ── */
@media (max-width: 1099px) {
  .at-top { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 900px) {
  .at-bar { grid-template-columns: 1fr auto; padding: 0 20px; }
  .at-bar .r { display: none; }
  .at-bar nav { justify-self: end; gap: 16px; }
  .at-wrap { padding: 0 20px; }
  .at-top { grid-template-columns: 1fr; gap: 28px; }
  .at-caps { grid-template-columns: 1fr 1fr; }
  .at-cap:nth-child(2) { border-right: 0; }
  .at-cap:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line); }
  .at-cap:nth-child(4) { border-top: 1px solid var(--line); }
  .at-stack { grid-template-columns: 1fr; }
  .at-stack .k { padding: 12px 0 0; }
  .at-stack ul { grid-template-columns: repeat(4, 1fr); }
  .at-stack ul { margin-top: 10px; }
  .at-stack li { border-left: 0; border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
  .at-stack li:nth-child(4n) { border-right: 0; }
  .at-plate { grid-template-columns: 160px 1fr; gap: 18px; }
  .at-num { display: none; }
}
@media (max-width: 600px) {
  .at-hero .at-kicker span:last-child { display: none; }
  .at-spec > div { grid-template-columns: 1fr; gap: 4px; }
  .at-bar nav a:first-child { display: none; }
  .at-bar nav { gap: 14px; }
  .at-bar > span:first-child { white-space: nowrap; }
  .at-plate { grid-template-columns: 1fr; }
  .at-tl-item { grid-template-columns: 40px 1fr; grid-template-areas: "rail date" "rail body"; column-gap: 16px; }
  .at-tl-date { text-align: left; padding-top: 2px; }
  .at-tl-body { padding-top: 4px; }
}

/* Inline text link: a real text underline (follows the words when they wrap), quiet until hover. */
.at-ul, .at-spec a.s, .at-txt .lab a, .at-prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--ink) 28%, transparent); transition: color 150ms ease, text-decoration-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .at-ul:hover, .at-spec a.s:hover, .at-txt .lab a:hover, .at-prose a:hover { color: var(--accent); text-decoration-color: var(--accent); } }
@media (max-width: 360px) { .at-name { font-size: 1.08rem; } }

/* More contrast requested: hairlines and secondary text go full ink. */
@media (prefers-contrast: more) {
  :root { --line: rgba(0, 0, 0, .55); --line2: var(--ink); --ink2: #3a3a3c; }
  .at-bar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Worst-case data (break-ui): long unbreakable titles (file names, repo slugs) break only when they must,
   and a card or plate without media drops the empty frame instead of showing a grey box. */
.at-h1, .at-lead, .at-card h3, .at-txt h3, .at-plate h2, .at-tl-body h3, .at-prose, .at-card .sum { overflow-wrap: anywhere; }
.at-fig:has(> .m:empty) { display: none; }
