/* Vijfhart house style: brand colours from the website, Open Sans with bold
   headings, square blocks, clear grids and fine dividers. */
:root {
  --red: #E20025;
  --navy: #223139;
  --cyan: #31BEE2;
  --green: #76C539;
  --white: #FFFFFF;

  --bg: #F7F7F7;
  --surface: var(--white);
  --surface-2: #F0F2F3;
  --border: #E2E5E7;
  --border-strong: #C9CFD2;
  --text: #313131;
  --muted: #5E686D;
  --faint: #879095;
  --heading: var(--navy);
  --link: var(--navy);
  --focus: var(--cyan);
  --select-bg: #E3F6FC;
  --mark: rgba(49, 190, 226, .28);
  --shadow: 0 2px 10px rgba(34, 49, 57, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #172227;
    --surface: #1E2B32;
    --surface-2: #263740;
    --border: #2F424C;
    --border-strong: #3E545F;
    --text: #E9EDEF;
    --muted: #A8B4BA;
    --faint: #7F8D94;
    --heading: var(--white);
    --link: var(--cyan);
    --select-bg: #1B3E4B;
    --mark: rgba(49, 190, 226, .35);
    --shadow: 0 2px 12px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #172227;
  --surface: #1E2B32;
  --surface-2: #263740;
  --border: #2F424C;
  --border-strong: #3E545F;
  --text: #E9EDEF;
  --muted: #A8B4BA;
  --faint: #7F8D94;
  --heading: var(--white);
  --link: var(--cyan);
  --select-bg: #1B3E4B;
  --mark: rgba(49, 190, 226, .35);
  --shadow: 0 2px 12px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { font-weight: 700; color: var(--heading); }
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--cyan); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
mark { background: var(--mark); color: inherit; padding: 0 1px; }

/* top bar: dark blue-grey band with a red brand block */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: stretch; gap: 28px;
  padding: 0 24px 0 0; min-height: 56px;   /* as tall as the tabs, also on the login page, which has none */
  background: var(--navy); color: var(--white);
  border-bottom: 3px solid var(--red);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 17px; font-weight: 600; white-space: nowrap;
}
.brand b { font-weight: 800; }
.logo {
  width: 56px; align-self: stretch; background: var(--red); position: relative;
}
.logo::after {
  content: ""; position: absolute; left: 17px; top: 50%; width: 16px; height: 16px; margin-top: -10px;
  border: 3px solid var(--white); border-radius: 50%;
}
.logo::before {
  content: ""; position: absolute; left: 33px; top: 50%; width: 9px; height: 3px; margin-top: 7px;
  background: var(--white); transform: rotate(45deg); transform-origin: left center;
}
.tabs { display: flex; }
.tabs a {
  display: flex; align-items: center; padding: 0 16px; min-height: 56px;
  color: rgba(255, 255, 255, .8); font-weight: 600; text-decoration: none;
  border-bottom: 3px solid transparent; margin-bottom: -3px;
}
.tabs a:hover { color: var(--white); background: rgba(255, 255, 255, .06); }
.tabs a[aria-current="page"] { color: var(--white); border-bottom-color: var(--cyan); }
.status {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: rgba(255, 255, 255, .75); white-space: nowrap;
}
.status-bar { width: 120px; height: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.status-bar span { display: block; height: 100%; width: 0; background: var(--cyan); transition: width .4s; }
.status.done .status-bar { display: none; }
a.status { text-decoration: none; }
a.status:hover .status-text { color: var(--white); text-decoration: underline; }
.theme {
  align-self: center; width: 34px; height: 34px; flex: none; cursor: pointer;
  background: none; border: 1px solid rgba(255, 255, 255, .25); color: var(--white); font-size: 15px; line-height: 1;
}
.theme:hover { border-color: var(--cyan); }
.status[hidden] + .theme, .status[hidden] + .user-menu { margin-left: auto; }

/* account menu in the top bar */
.user-menu { align-self: center; position: relative; }
.user-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; height: 34px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .25); color: var(--white); font-size: 13.5px; font-weight: 600;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary::after { content: "▾"; margin-left: 8px; opacity: .7; }
.user-menu summary:hover, .user-menu[open] summary { border-color: var(--cyan); }
.user-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px;
  display: grid; gap: 10px; padding: 14px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.user-email { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* login page */
.auth-page { max-width: 440px; padding-top: clamp(32px, 12vh, 112px); }
.auth { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--red); padding: 32px 32px 24px; }
.auth h1 { margin: 0 0 20px; font-size: 26px; font-weight: 800; }
.auth-msg { margin: 0 0 16px; padding: 12px 16px; font-size: 14px; }
.providers-label {
  margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint);
}
.providers { display: grid; gap: 10px; }
.provider {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); text-decoration: none;
  transition: border-color .15s, background-color .15s;
}
.provider:hover, .provider:focus-visible { border-color: var(--cyan); background: var(--surface-2); outline: none; }
/* The marks are made for white, so their tile stays white in the dark theme too. */
.provider-mark {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  background: #FFFFFF; border: 1px solid var(--border); font-weight: 800; color: #3C4B53;
}
.provider-mark img { display: block; width: 32px; height: 32px; object-fit: contain; }
.provider-text { display: grid; gap: 2px; min-width: 0; }
.provider-text b { font-size: 15px; font-weight: 700; }
.provider-text small { font-size: 13px; color: var(--muted); }
.provider-go { margin-left: auto; color: var(--faint); font-size: 18px; transition: transform .15s, color .15s; }
.provider:hover .provider-go, .provider:focus-visible .provider-go { color: var(--cyan); transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .provider, .provider-go { transition: none; } }
.auth-foot { margin: 20px 0 0; font-size: 13px; color: var(--faint); }

main { max-width: 1280px; margin: 0 auto; padding: 24px 24px 64px; }

/* search: white field with the cyan search block on the right */
.searchrow { display: flex; gap: 10px; margin-bottom: 24px; }
.search {
  flex: 1; display: flex; align-items: stretch;
  height: 52px; background: var(--surface); border: 1px solid var(--border-strong);
}
.search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.search { position: relative; }
.suggest {
  position: absolute; left: -1px; right: -1px; top: 100%; z-index: 30; list-style: none; margin: 0; padding: 4px 0;
  background: var(--surface); border: 1px solid var(--cyan); border-top: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  max-height: 420px; overflow: auto;
}
.suggest-head { padding: 8px 16px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 7px 16px; cursor: pointer; font-size: 14.5px; }
.suggest-item:hover, .suggest-item.active { background: var(--surface-2); }
.suggest-item.active { box-shadow: inset 3px 0 0 var(--cyan); }
.sug-icon { width: 18px; text-align: center; color: var(--faint); font-weight: 700; }
.sug-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-item small { color: var(--faint); font-size: 12px; white-space: nowrap; }
.suggest-item .badge { flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; padding: 0 16px; }
.search kbd {
  align-self: center; margin-right: 12px;
  font: 12px ui-monospace, monospace; color: var(--faint);
  border: 1px solid var(--border); padding: 1px 6px;
}
.search-icon { width: 56px; flex: none; display: grid; place-items: center; background: var(--cyan); }
.search-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--white); stroke-width: 2.5; stroke-linecap: round; }
.btn {
  height: 38px; padding: 0 18px; cursor: pointer;
  background: var(--navy); color: var(--white); border: 0; font-weight: 700;
}
.btn:hover { background: #2E424C; }
.btn:disabled { opacity: .6; cursor: default; }
.filters-toggle { display: none; height: 52px; }

.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }

/* facets */
.facets { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding-right: 6px; }
.facet { border-top: 1px solid var(--border); padding: 14px 0; }
.facet:first-child { border-top: 0; padding-top: 0; }
.facet h3 {
  margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  display: flex; justify-content: space-between; align-items: center;
}
.facet h3 button {
  border: 0; background: none; color: var(--link); cursor: pointer; padding: 0;
  font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0;
  text-decoration: underline; text-decoration-color: var(--cyan); text-underline-offset: 3px;
}
.facet-filter {
  width: 100%; margin: 0 0 8px; padding: 6px 10px; font-size: 13px;
  border: 1px solid var(--border-strong); background: var(--surface); outline: 0;
}
.facet-filter:focus { border-color: var(--cyan); }
.opt {
  display: flex; align-items: center; gap: 9px; padding: 3px 4px;
  cursor: pointer; font-size: 14px; user-select: none;
}
.opt:hover { background: var(--surface-2); }
.opt input { margin: 0; accent-color: var(--green); width: 15px; height: 15px; flex: none; }
.opt .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .n { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.opt.zero { opacity: .5; }
.tree-row { display: flex; align-items: center; }
.tree-row .opt { flex: 1; min-width: 0; }
.caret {
  width: 20px; height: 20px; flex: none; border: 0; background: none; cursor: pointer; padding: 0;
  color: var(--muted); font-size: 10px; transition: transform .15s;
}
.caret[aria-expanded="true"] { transform: rotate(90deg); }
.caret.spacer { visibility: hidden; }
.tree-children { margin-left: 12px; padding-left: 8px; border-left: 1px solid var(--border); }
.showmore {
  border: 0; background: none; color: var(--link); cursor: pointer; font-size: 13px; font-weight: 600; padding: 6px 4px 0;
  text-decoration: underline; text-decoration-color: var(--cyan); text-underline-offset: 3px;
}

/* results */
.results-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px; padding-bottom: 12px; min-height: 38px; border-bottom: 1px solid var(--border);
}
.count { font-weight: 700; color: var(--heading); }
.count small { font-weight: 400; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 8px 3px 10px; font-size: 13px; font-weight: 600;
  background: var(--select-bg); color: var(--text); border: 1px solid var(--cyan); cursor: pointer;
}
.chip::after { content: "×"; font-size: 16px; line-height: 1; color: var(--muted); }
.chip:hover::after { color: var(--red); }
.chip.clear { background: none; border-color: transparent; color: var(--muted); text-decoration: underline; }
.chip.clear::after { content: none; }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-left: auto; }
.sort select { padding: 6px 8px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 0; }
.notice {
  margin-bottom: 14px; padding: 10px 14px; font-size: 14px;
  background: var(--select-bg); border-left: 3px solid var(--cyan);
  display: flex; gap: 10px; align-items: center;
}
.notice button { border: 0; background: none; color: var(--link); font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; text-decoration-color: var(--cyan); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.card {
  display: block; padding: 16px 20px; color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid transparent;
  transition: border-color .12s, box-shadow .12s;
}
.card:hover { color: inherit; border-color: var(--border-strong); border-left-color: var(--red); box-shadow: var(--shadow); }
.card-top { display: flex; gap: 16px; align-items: baseline; }
.card h2 { margin: 0; font-size: 17px; line-height: 1.35; flex: 1; min-width: 0; }
.price { font-weight: 800; color: var(--heading); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price small { font-weight: 400; color: var(--faint); font-size: 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--muted); }
.meta .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.badge {
  display: inline-block; padding: 0 8px; font-size: 11.5px; font-weight: 700; line-height: 21px;
  text-transform: uppercase; letter-spacing: .03em;
  background: var(--surface-2); color: var(--muted);
}
.badge.traject { background: var(--navy); color: var(--white); }
.badge.new { background: var(--green); color: var(--white); }
.badge.special { background: var(--red); color: var(--white); }
.badge.hidden { background: none; border: 1px dashed var(--border-strong); line-height: 19px; color: var(--faint); font-weight: 600; }
.path { margin-top: 3px; font-size: 13px; color: var(--faint); }
.snippet { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tag { font-size: 12px; padding: 1px 8px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
button.tag { cursor: pointer; }
button.tag:hover { border-color: var(--cyan); color: var(--text); background: var(--select-bg); }
.more { text-align: center; margin-top: 20px; }
.empty { padding: 56px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px solid var(--border); }
.empty b { display: block; color: var(--heading); font-size: 18px; margin-bottom: 4px; }

.skeleton { height: 104px; background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--surface-2), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(34, 49, 57, .55); animation: fade .15s; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(780px, 100%);
  background: var(--surface); overflow: auto; outline: 0;
  border-top: 4px solid var(--red);
  box-shadow: -8px 0 32px rgba(0, 0, 0, .2); animation: slide .2s ease-out;
  padding: 32px 40px 64px;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-close {
  position: sticky; top: 0; float: right; margin: -16px -24px 0 0;
  width: 40px; height: 40px; border: 0; cursor: pointer;
  background: var(--navy); color: var(--white); font-size: 24px; line-height: 1;
}
.drawer-close:hover { background: var(--red); }
.d-kicker { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.drawer h1 { margin: 0 48px 6px 0; font-size: 26px; line-height: 1.25; font-weight: 800; }
.drawer .path { font-size: 14px; }
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  margin: 24px 0; border: 1px solid var(--border); background: var(--border);
}
.fact { background: var(--surface-2); padding: 12px 16px; }
.fact dt { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.fact dd { margin: 2px 0 0; font-weight: 800; color: var(--heading); font-size: 16px; }
.fact dd small { font-weight: 400; color: var(--faint); font-size: 12px; }
.drawer section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.drawer h2 {
  font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 10px;
  display: flex; align-items: center; gap: 10px;
}
.drawer h2::before { content: ""; width: 12px; height: 3px; background: var(--red); flex: none; }
.drawer p { margin: 0 0 10px; }
.prose { overflow-wrap: anywhere; }
.outline { list-style: none; margin: 0; padding: 0; }
.outline li { padding: 3px 0 3px calc((var(--lvl, 1) - 1) * 20px + 22px); position: relative; }
.outline li::before {
  content: ""; position: absolute; left: calc((var(--lvl, 1) - 1) * 20px + 2px); top: 9px;
  width: 9px; height: 5px; border: solid var(--green); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg);
}
.outline li.top { font-weight: 600; }
.outline li.sub { color: var(--muted); font-size: 14px; }
.outline li.sub::before { width: 5px; height: 5px; border: 0; background: var(--faint); transform: none; top: 11px; }
.linklist { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.linklist li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.linklist .aside { color: var(--faint); font-size: 13px; }
.steps { counter-reset: step; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.steps li { counter-increment: step; padding: 10px 14px; background: var(--surface); }
.steps li::before {
  content: counter(step); flex: none; width: 24px; height: 24px; display: inline-grid; place-items: center;
  background: var(--navy); color: var(--white); font-weight: 700; font-size: 12px; align-self: center;
}
.variants { width: 100%; border-collapse: collapse; font-size: 14px; }
.variants td, .variants th { text-align: left; padding: 7px 12px; border-bottom: 1px solid var(--border); }
.variants th { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.variants td:first-child { font-family: ui-monospace, monospace; }
.variants tr.current td { font-weight: 700; box-shadow: inset 3px 0 0 var(--red); }
.seg { display: inline-flex; margin-left: auto; border: 1px solid var(--border-strong); }
.seg button {
  border: 0; background: none; padding: 2px 10px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted);
  text-transform: none; letter-spacing: 0;
}
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
details.raw { margin-top: 36px; }
details.raw summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.raw pre { max-height: 400px; overflow: auto; font-size: 12px; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.error { padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--red); color: var(--text); }

.table-wrap { margin-top: 12px; background: var(--surface); border: 1px solid var(--border); overflow: auto; }

/* start dates */
.next-start { margin-top: 6px; font-size: 13.5px; color: var(--text); display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
.next-start small { color: var(--faint); }
.guarantee { color: var(--green); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.guarantee.soft { font-weight: 600; opacity: .85; }
.sessions h2 small { font-size: 13px; font-weight: 400; color: var(--faint); margin-left: 4px; }
.sessions-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sessions-table th, .sessions-table td { text-align: left; padding: 7px 12px; border-bottom: 1px solid var(--border); }
.sessions-table th { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
.sessions-table tr:last-child td { border-bottom: 0; }
.sessions-table td small { color: var(--faint); }
.sessions-table .code { font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--muted); }
.sessions-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sessions .table-wrap { margin-top: 0; }
.sessions .showmore { margin-top: 8px; }
.site-link { display: table; margin-top: 10px; font-weight: 700; }
.muted.small { font-size: 12.5px; margin-top: 6px; }

/* updates */
.upd-stats { grid-template-columns: repeat(4, 1fr); margin: 0 0 28px; }
.upd-stats .wide { grid-column: 1 / -1; }
.mono, .codes { font-family: ui-monospace, monospace; font-size: 13px; font-weight: 400; }
#updates-view h2 { font-size: 18px; margin: 0 0 12px; }
.upd-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.upd-filter input {
  padding: 8px 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; min-width: 240px;
}
.pills { display: flex; flex-wrap: wrap; }
.pill {
  padding: 7px 14px; border: 1px solid var(--border-strong); margin: 0 -1px -1px 0;
  background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
}
.pill:hover { background: var(--surface-2); }
.pill .n { color: var(--faint); margin-left: 5px; font-size: 12px; font-weight: 400; }
.pill[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); position: relative; }
.pill[aria-pressed="true"] .n { color: rgba(255, 255, 255, .75); }
.changes { list-style: none; margin: 0 0 12px; padding: 0; background: var(--surface); border: 1px solid var(--border); }
.changes .empty { border: 0; }
.change {
  display: grid; grid-template-columns: 130px 110px 1fr; gap: 12px; align-items: baseline;
  padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 14px;
}
.change:last-child { border-bottom: 0; }
.change time { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.change .badge.kind { justify-self: start; }
.change-title { font-weight: 700; }
.change-title small { font-weight: 400; color: var(--faint); }
.field-change, .change .muted { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.field-change b { color: var(--text); font-weight: 600; }
.field-change del { color: var(--faint); }
.field-change ins { text-decoration: none; color: var(--heading); font-weight: 600; }
.badge.k-new, .badge.k-restored { background: var(--green); color: var(--white); }
.badge.k-updated { background: var(--cyan); color: var(--navy); }
.badge.k-archived, .badge.k-removed { background: var(--navy); color: var(--white); }
.badge.k-error { background: var(--red); color: var(--white); }
.badge.k-list, .badge.k-crawl { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); }
#upd-more { margin-bottom: 28px; }
.upd-log { margin-top: 16px; }
.upd-log summary { cursor: pointer; font-weight: 700; font-size: 18px; color: var(--heading); margin-bottom: 12px; }
.upd-log summary small { font-weight: 400; font-size: 13px; color: var(--faint); }
#upd-log {
  max-height: 420px; overflow: auto; margin: 0; padding: 12px 16px; font-size: 12.5px; line-height: 1.55;
  background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; word-break: break-word;
}
.log-ts { color: var(--faint); }
.log-warning { color: #B25E00; }
.log-error { color: var(--red); }

/* insights */
#insights-view h2 { font-size: 18px; margin: 28px 0 12px; }
.ins-legend { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.ins-legend span { width: 12px; height: 12px; display: inline-block; margin-left: 10px; }
.ins-legend span:first-child { margin-left: 0; }
.ins-chart {
  display: flex; align-items: stretch; gap: 3px; height: 160px; padding: 12px 12px 0;
  background: var(--surface); border: 1px solid var(--border);
}
.ins-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.ins-stack { display: flex; flex-direction: column; min-height: 0; }
.ins-bar small { height: 20px; line-height: 20px; font-size: 10.5px; color: var(--faint); text-align: center; white-space: nowrap; overflow: visible; }
.ins-chat { background: var(--navy); }
.ins-nl { background: var(--cyan); }
:root[data-theme="dark"] .ins-chat { background: var(--white); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ins-chat { background: var(--white); } }
.ins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ins-rank { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); }
.ins-rank li { position: relative; display: flex; gap: 8px; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.ins-rank li:last-child { border-bottom: 0; }
.ins-rank-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--surface-2); z-index: 0; }
.ins-rank-label, .ins-rank .n { position: relative; z-index: 1; }
.ins-rank-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-rank .n { color: var(--faint); font-variant-numeric: tabular-nums; }
.ins-courses { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 13.5px; }

@media (max-width: 860px) {
  .ins-grid { grid-template-columns: 1fr; }
  .change { grid-template-columns: 1fr auto; }
  .upd-stats { grid-template-columns: repeat(2, 1fr); }
  .change-body { grid-column: 1 / -1; }
  .topbar { padding: 0 16px 0 0; gap: 12px; flex-wrap: wrap; min-height: 52px; }
  .logo { width: 48px; }
  .logo::after { left: 13px; }
  .logo::before { left: 29px; }
  .tabs a { padding: 0 10px; min-height: 52px; }
  .status { width: 100%; margin: 0 0 8px 16px; order: 3; }
  .status-bar { flex: 1; }
  main { padding: 16px 16px 48px; }
  .layout { grid-template-columns: 1fr; }
  .filters-toggle { display: block; }
  .facets { position: static; max-height: none; display: none; background: var(--surface); border: 1px solid var(--border); padding: 14px 16px; }
  .facets.open { display: block; }
  .search kbd { display: none; }
  .drawer-panel { padding: 22px 18px 48px; }
  .drawer-close { margin: -10px -6px 0 0; }
  .card { padding: 14px 16px; }
  .card-top { flex-direction: column; gap: 2px; }
}

/* --- AI features ---------------------------------------------------------- */
.btn-ai { background: var(--cyan); color: var(--navy); }
.btn-ai:hover { background: #22A9CC; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost[aria-pressed="true"] { background: var(--select-bg); border-color: var(--cyan); }
.btn-danger { background: var(--surface); color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: var(--white); }
.ai-search { height: 52px; white-space: nowrap; }
.ai-search.busy { opacity: .7; cursor: progress; }
.ai-mark { font-weight: 800; color: var(--navy); background: var(--cyan); padding: 0 6px; font-size: 12px; }
.muted { color: var(--muted); }

/* drawer actions and learning map */
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.map { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch; border: 1px solid var(--border); }
.map-col { padding: 10px 12px; min-width: 0; }
.map-col.current { background: var(--navy); color: var(--white); display: flex; flex-direction: column; justify-content: center; max-width: 200px; }
.map-col.current .map-head { color: rgba(255, 255, 255, .7); }
.map-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.map-level { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.map-level + .map-level { padding-top: 8px; border-top: 1px dashed var(--border); }
.map-node { font-size: 13.5px; line-height: 1.35; display: flex; justify-content: space-between; gap: 8px; }
.map-node small { color: var(--faint); white-space: nowrap; }
.map-node small.archived { color: var(--red); font-weight: 600; }
.map-node.self { font-weight: 700; }
.map-empty { margin: 0; color: var(--faint); font-size: 13px; }
.map-col.before { border-right: 3px solid var(--red); }
.map-col.after { border-left: 3px solid var(--green); }
.map-paths { margin-top: 10px; font-size: 14px; }

/* compare */
.result { position: relative; }
.compare-toggle {
  position: absolute; right: 12px; bottom: 12px; padding: 2px 10px; font-size: 12px; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--muted); border: 1px solid var(--border-strong);
}
.compare-toggle:hover { border-color: var(--cyan); color: var(--text); }
.compare-toggle[aria-pressed="true"] { background: var(--select-bg); border-color: var(--cyan); color: var(--text); }
.compare-toggle[aria-pressed="true"]::before { content: "✓ "; color: var(--green); font-weight: 800; }
.compare-tray {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 12px; width: min(1000px, calc(100% - 32px));
  background: var(--navy); color: var(--white); padding: 10px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
  border-top: 3px solid var(--cyan);
}
.tray-label { font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
.tray-items { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; flex: 1; }
.compare-tray .chip { background: rgba(255, 255, 255, .1); color: var(--white); border-color: rgba(255, 255, 255, .3); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-tray .btn { background: var(--cyan); color: var(--navy); display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.compare-tray .btn.disabled { opacity: .6; pointer-events: none; }
.tray-clear { background: none; border: 0; color: rgba(255, 255, 255, .75); cursor: pointer; text-decoration: underline; }
.compare-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.compare-head h1 { margin: 0; font-size: 24px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.compare-table th, .compare-table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.compare-table thead th { background: var(--navy); color: var(--white); position: relative; padding-right: 36px; min-width: 200px; font-size: 15px; }
.compare-table thead th a { color: var(--white); }
.compare-table tbody th { width: 140px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.compare-table ul { margin: 0; padding-left: 18px; }
.compare-remove { position: absolute; top: 8px; right: 10px; color: rgba(255, 255, 255, .7) !important; text-decoration: none; font-size: 18px; }

/* advisor */
.advisor { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.advisor-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
.advisor-side .btn { width: 100%; margin-bottom: 20px; }
.advisor-side h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; }
.side-filter {
  display: block; width: 100%; margin: -8px 0 20px; padding: 7px 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px;
}
.side-section { margin-bottom: 24px; }
.side-all { display: inline-block; margin-top: 6px; font-size: 13px; }
.journey-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.journey-list li { background: var(--surface); padding: 6px 10px; display: grid; min-width: 0; }
.journey-list li.muted { font-size: 13px; }
.journey-list small { color: var(--faint); font-size: 12px; }
.journey-list a.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.chat-list a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list li.current { box-shadow: inset 3px 0 0 var(--cyan); }
/* On a mouse, a chat's actions show on hover so the list stays calm; touch screens always show them. */
@media (hover: hover) {
  .advisor-side .item-actions { visibility: hidden; }
  .advisor-side li:hover .item-actions, .advisor-side li:focus-within .item-actions, .advisor-side li.current .item-actions { visibility: visible; }
}
.history { max-width: 900px; }
.hist-list li { padding: 10px 16px; }
.hist-list a { font-weight: 600; }
.hist-list li.hist-group {
  padding: 14px 16px 6px; background: var(--surface-2); color: var(--muted);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.pill[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: var(--white); position: relative; text-decoration: none; }
.pill[aria-current="page"] .n { color: rgba(255, 255, 255, .75); }
a.pill { text-decoration: none; }
.item-actions { display: inline-flex; gap: 8px; margin-left: 8px; }
.link-btn {
  padding: 0; border: 0; background: none; cursor: pointer; font-size: 12px; color: var(--muted);
  text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px;
}
.link-btn:hover { color: var(--cyan); }
.link-btn.danger:hover { color: var(--red); }
.shared-mark { color: var(--cyan); font-weight: 700; }
.unowned { font-size: 12px; color: var(--muted); }
.shared-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px; padding: 12px 16px; background: var(--select-bg); border-left: 3px solid var(--cyan);
}
.shared-chat h1 { font-size: 22px; margin: 0 0 16px; }
.chat { max-width: 860px; }
.chat-log { display: grid; gap: 14px; margin-bottom: 16px; }
.welcome { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--red); padding: 28px 32px; }
.welcome h1 { margin: 0 0 8px; font-size: 26px; font-weight: 800; }
.welcome p { color: var(--muted); max-width: 640px; }
.welcome pre { background: var(--surface-2); padding: 12px; border: 1px solid var(--border); }
.starters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 20px; }
.starter {
  text-align: left; padding: 12px 14px; cursor: pointer; font-size: 14px; line-height: 1.4;
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--cyan);
}
.starter:hover { background: var(--select-bg); border-color: var(--cyan); }
.msg { padding: 14px 18px; border: 1px solid var(--border); background: var(--surface); }
.msg.user { background: var(--navy); color: var(--white); border-color: var(--navy); margin-left: 15%; }
.msg.user p { margin: 0; white-space: pre-wrap; }
.msg-context { font-size: 12px; color: rgba(255, 255, 255, .7); margin-bottom: 4px; }
.msg.assistant { border-left: 3px solid var(--red); margin-right: 5%; }
.tool-steps { font-size: 13px; color: var(--faint); margin: 0 0 10px; }
.tool-steps summary { cursor: pointer; width: max-content; list-style: none; }
.tool-steps summary::-webkit-details-marker { display: none; }
.tool-steps summary::before { content: "✓ "; color: var(--green); font-weight: 800; }
.tool-steps summary::after { content: " ▸"; font-size: 10px; }
.tool-steps[open] summary::after { content: " ▾"; }
.tool-steps summary:hover { color: var(--muted); }
.tool-steps.live .step-now::before { content: "… "; color: var(--cyan); font-weight: 800; }
.statuses { list-style: none; margin: 6px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); }
.statuses li { margin: 2px 0; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol { margin: 0 0 10px; }
.md ul, .md ol { padding-left: 22px; }
.md li { margin: 4px 0; }
.md h4 { margin: 14px 0 6px; font-size: 15px; color: var(--heading); }
.md code { font: 13px ui-monospace, monospace; background: var(--surface-2); padding: 0 4px; }
.course-ref {
  font-weight: 600; color: var(--text); text-decoration: underline; text-decoration-color: var(--cyan);
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.course-ref:hover { color: var(--text); background: var(--select-bg); }
.mentioned { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 14px; }
.mentioned summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; width: max-content; }
.mentioned summary:hover { color: var(--text); }
.mentioned ul { list-style: none; margin: 8px 0 0; padding: 0; }
.mentioned li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.mentioned li:last-child { border-bottom: 0; }
.mentioned-meta { color: var(--muted); font-size: 13px; white-space: nowrap; text-align: right; }
@media (max-width: 600px) { .mentioned li { flex-direction: column; gap: 0; } .mentioned-meta { text-align: left; white-space: normal; } }
.journey-ref { font-weight: 700; }
.typing { display: flex; gap: 4px; padding: 6px 0; }
.typing span { width: 7px; height: 7px; background: var(--cyan); animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.questions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.msg > .questions:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.question p { margin: 0 0 6px; font-weight: 700; color: var(--heading); }
.options { display: flex; flex-wrap: wrap; gap: 6px; }
.option {
  padding: 6px 12px; font-size: 14px; cursor: pointer; background: var(--surface); border: 1px solid var(--cyan); color: var(--text);
}
.option:hover:not(:disabled) { background: var(--select-bg); }
.option[aria-pressed="true"] { background: var(--cyan); color: var(--navy); font-weight: 700; }
.option:disabled { cursor: default; opacity: .55; border-color: var(--border-strong); }
.questions.answered .question-hint { display: none; }
.question-hint { margin: 0; font-size: 12px; color: var(--faint); }
.copy-text { display: block; margin: 6px 0 0 auto; padding: 2px 8px; border: 1px solid var(--border); background: none;
  color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.copy-text:hover { color: var(--heading); border-color: var(--muted); }
.journey-card, .compare-card {
  display: grid; gap: 2px; margin-top: 12px; padding: 12px 16px; text-decoration: none; color: inherit;
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--green);
}
.journey-card:hover { border-color: var(--green); color: inherit; box-shadow: var(--shadow); }
.journey-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.journey-card strong { font-size: 16px; color: var(--heading); }
.journey-meta { font-size: 13px; color: var(--muted); }
.compare-card { border-left-color: var(--cyan); gap: 8px; justify-items: start; }
.compare-names { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-context { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.ctx-clear { border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--muted); }
.chat-form { display: flex; gap: 0; border: 1px solid var(--border-strong); background: var(--surface); position: sticky; bottom: 12px; box-shadow: var(--shadow); }
.chat-form:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), var(--shadow); }
.chat-form textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: vertical; padding: 12px 14px; font: inherit; background: none; min-height: 52px; }
.chat-form .btn { height: auto; border-radius: 0; padding: 0 24px; }
.chat-form .btn.stop { background: var(--red); }
.chat-hint { font-size: 12px; color: var(--faint); margin: 8px 0 0; }

/* journey page */
.journey { max-width: 900px; }
.journey h1 { margin: 0 0 6px; font-size: 30px; font-weight: 800; }
.journey-goal { font-size: 17px; margin: 0 0 6px; }
.journey-levels { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); margin: 0; }
.journey-levels .arrow { color: var(--red); font-weight: 800; }
.journey-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.phase { background: var(--surface); border: 1px solid var(--border); }
.phase-head { display: flex; align-items: stretch; background: var(--navy); color: var(--white); }
.phase-no { width: 48px; display: grid; place-items: center; background: var(--red); font-weight: 800; font-size: 20px; }
.phase-head h2 { margin: 0; padding: 12px 16px; color: var(--white); font-size: 18px; }
.phase-desc { margin: 0; padding: 12px 16px 0; color: var(--muted); }
.phase-courses { list-style: none; margin: 0; padding: 8px 0; }
.phase-course { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.phase-course:first-child { border-top: 0; }
.phase-course.optional { background: var(--surface-2); }
.step-no { width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--green); font-weight: 800; font-size: 13px; color: var(--heading); }
.step-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-weight: 700; font-size: 16px; }
.step-reason { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.step-edit { display: flex; flex-direction: column; gap: 2px; }
.step-edit button { width: 28px; height: 24px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--muted); }
.step-edit button:hover:not(:disabled) { border-color: var(--cyan); color: var(--text); }
.step-edit button:disabled { opacity: .3; cursor: default; }
.journey-notes { margin-top: 24px; }
.journey-notes h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }

/* Robot buddy on the advisor page */
/* The bubble sits above the robot, so it never covers the chat form's send button. */
.buddy { position: fixed; right: 20px; bottom: 16px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.buddy[hidden] { display: none; }
.buddy-bot {
  pointer-events: auto; width: 170px; height: 170px; padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18));
}
.buddy-bot:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 50%; }
.buddy-bot video, .buddy-bot img { width: 100%; height: 100%; display: block; object-fit: contain; }
.buddy-bot [hidden] { display: none; }
.buddy-bubble {
  position: relative; max-width: 240px; padding: 10px 28px 10px 14px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 3px solid var(--red);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12); font-size: 14px; line-height: 1.4;
  opacity: 0; transform: translateY(6px) scale(.96); transform-origin: bottom right; transition: opacity .2s, transform .2s;
}
.buddy-bubble::after { /* tail pointing down at the robot's head */
  content: ''; position: absolute; right: 60px; bottom: -8px; width: 14px; height: 14px; background: var(--surface);
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transform: rotate(45deg);
}
.buddy.talking .buddy-bubble { opacity: 1; transform: none; pointer-events: auto; }
.buddy-close {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; padding: 0; border: 0; background: none;
  color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1;
}
.buddy-close:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .buddy-bubble { transition: none; }
}
@media (max-width: 1400px) {
  .buddy-bot { width: 120px; height: 120px; }
  .buddy-bubble { max-width: 210px; }
  .buddy-bubble::after { right: 44px; }
}
@media print { .buddy { display: none; } }

@media (max-width: 860px) {
  .advisor { grid-template-columns: 1fr; }
  .buddy { right: 8px; bottom: 8px; }
  .buddy-bot { width: 84px; height: 84px; }
  .buddy-bubble { max-width: 180px; font-size: 13px; }
  .buddy-bubble::after { right: 30px; }
  #advisor-view .chat-form { margin-right: 84px; } /* room for the robot next to the send button */
  .advisor-side { position: static; order: 2; max-height: none; overflow: visible; }
  .msg.user { margin-left: 8%; }
  .msg.assistant { margin-right: 0; }
  .map { grid-template-columns: 1fr; }
  .map-col.current { max-width: none; }
  .map-col.before { border-right: 0; border-bottom: 3px solid var(--red); }
  .map-col.after { border-left: 0; border-top: 3px solid var(--green); }
  .ai-search { height: 52px; padding: 0 12px; }
  .compare-toggle { position: static; margin-top: -6px; }
  .compare-tray { left: 16px; right: 16px; transform: none; flex-wrap: wrap; }
  .phase-course { grid-template-columns: 32px minmax(0, 1fr); }
  .step-edit { grid-column: 2; flex-direction: row; }
  .welcome { padding: 20px; }
}

@media print {
  .topbar, .no-print, .step-edit, .compare-tray, .drawer, .chat-hint { display: none !important; }
  body { background: #fff; color: #000; }
  main { padding: 0; max-width: none; }
  .phase { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
