/* BOARD — the portfolio as the whiteboard he plans on. World units are px at zoom 1. */

:root {
  --board: #f5f6f3;
  --ink: #1b1d22;
  --ink-2: #4a4e57;
  --ink-3: #6b6f78;
  --line: #d9dcd4;
  --dot: #c3c7bd;
  --white: #ffffff;
  --yellow: #ffe066;
  --pink: #ffb3c7;
  --mint: #b5ecc9;
  --sky: #b9dcff;
  --live: #1f8f4e;
  --focus: #2563eb;
  --here: #e6eeff;   /* "you are here": the minimap's blue view box, as a fill */
  --chip: #f0f1ec;
  --inset: clamp(12px, 2vw, 20px);
  --ui: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Kalam", "Comic Sans MS", cursive;
  --shadow-card: 0 1px 2px rgb(20 22 28 / .07), 0 2px 6px rgb(20 22 28 / .05), 0 28px 56px -30px rgb(20 22 28 / .32);
  --shadow-paper: 0 1px 1px rgb(30 28 20 / .07), 0 14px 22px -14px rgb(30 28 20 / .42);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--board); color: var(--ink); font: 400 16px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* ---------- Modes: no JS = index; JS starts on the board unless #index ---------- */
#board-view { display: none; }
html.js.mode-board, html.js.mode-board body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.js.mode-board #board-view { display: block; }
html.js.mode-board #index-view { display: none; }
html.js.mode-index #board-view { display: none; }
@media (prefers-reduced-motion: no-preference) {
  html.js #board-view, html.js #index-view { animation: modein .32s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes modein { from { opacity: 0; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* ---------- Chrome: pills floating over the board ---------- */
.chrome {
  position: fixed; inset: 0 0 auto; z-index: 30; pointer-events: none;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 14px clamp(12px, 2vw, 20px);
}
.chrome > * { pointer-events: auto; }
.chrome-left { display: flex; gap: 8px; align-items: center; min-width: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  background: var(--white); border-radius: 12px; box-shadow: var(--shadow-card);
  font: 600 14px/1 var(--ui); text-decoration: none; white-space: nowrap;
}
.pill:hover { background: #fafaf8; }
.mark { font-weight: 800; letter-spacing: -.01em; }
.contact-link { justify-self: end; }
.toggle {
  display: flex; padding: 4px; gap: 2px; border-radius: 14px; background: var(--white); box-shadow: var(--shadow-card);
}
.toggle button {
  height: 34px; padding: 0 16px; border: 0; border-radius: 10px; background: none; cursor: pointer;
  font: 600 14px/1 var(--ui); color: var(--ink-2);
  transition: background-color .2s ease, color .2s ease;
}
.toggle button:hover { color: var(--ink); }
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
html:not(.js) .toggle { display: none; }
html.js.mode-index .chrome { position: sticky; top: 0; background: color-mix(in srgb, var(--board) 92%, transparent); }

/* ---------- The board ---------- */
.viewport {
  position: fixed; inset: 0; overflow: hidden; touch-action: none; cursor: grab;
  user-select: none; -webkit-user-select: none; outline: none;
  background-color: var(--board);
  background-image: radial-gradient(circle, var(--dot) var(--dr, 1.2px), transparent calc(var(--dr, 1.2px) + .7px));
  background-size: var(--gs, 24px) var(--gs, 24px);
  background-position: var(--gx, 0) var(--gy, 0);
}
.viewport:focus-visible { box-shadow: inset 0 0 0 3px var(--focus); }
.viewport.can-zoom { cursor: zoom-in; }
.viewport.is-panning { cursor: grabbing; }
.viewport a, .viewport img { -webkit-user-drag: none; }
.board { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.board.is-moving { will-change: transform; }
.item {
  position: absolute; left: calc(var(--x) * 1px); top: calc(var(--y) * 1px); width: calc(var(--w) * 1px);
  transform: rotate(calc(var(--r, 0) * 1deg));
}
.connectors { position: absolute; overflow: visible; pointer-events: none; }
.connectors path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.connectors .ghost { stroke-width: 1.4; opacity: .35; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1.5px solid var(--ink); background: var(--white); color: var(--ink);
  font: 600 15px/1 var(--ui); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); background: #f2f3ef; }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #33363d; }
.btn-app { background: var(--app); border-color: var(--app); color: var(--tab-ink, #fff); }
.btn-app:hover { background: var(--app-hover, color-mix(in srgb, var(--app) 86%, #000)); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Statement */
.statement { background: var(--white); border-radius: 24px; padding: 40px 46px 40px; box-shadow: var(--shadow-card); }
.kicker { display: flex; align-items: center; gap: 10px; font: 600 13px/1 var(--ui); letter-spacing: .02em; color: var(--ink-3); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.statement h1 { margin: 18px 0 16px; font: 800 68px/.98 var(--ui); letter-spacing: -.035em; }
.st-lede { font-size: 20px; line-height: 1.45; color: var(--ink-2); margin-bottom: 26px; }
.linkish {
  padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink);
  font: inherit; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.linkish:hover { text-decoration-color: var(--focus); }

/* Polaroid */
.polaroid { background: var(--white); padding: 12px 12px 0; box-shadow: var(--shadow-paper); border-radius: 3px; }
.polaroid img { aspect-ratio: 3 / 4; object-fit: cover; }
.polaroid figcaption { font: 400 22px/1 var(--hand); text-align: center; padding: 14px 0 16px; color: #2a2a2a; }

/* Stickies */
.sticky {
  position: relative; background: var(--c); color: #24221b; font-family: var(--hand);
  border-radius: 2px 2px 14px 2px; box-shadow: var(--shadow-paper);
  background-image: linear-gradient(160deg, rgb(255 255 255 / .22), transparent 40%, rgb(0 0 0 / .04));
}
.now { padding: 18px 20px 16px; }
.now-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.now-head h2 { font: 700 22px/1 var(--hand); }
.now-clock { margin-left: auto; font: 600 13px/1 var(--ui); color: #4a4428; font-variant-numeric: tabular-nums; }
.now-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--live); flex: none; }
@media (prefers-reduced-motion: no-preference) { .now-pulse { animation: pulse 2.2s ease-out infinite; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(31 143 78 / .5); } 75%, 100% { box-shadow: 0 0 0 9px rgb(31 143 78 / 0); } }
.now-list { display: grid; gap: 8px; font-size: 16px; line-height: 1.3; }
.now-list strong { display: block; font-weight: 700; font-size: 19px; }
.now-asof { margin-top: 12px; font: 500 12px/1 var(--ui); color: #5a5332; }

/* Frames (FigJam sections) */
.frame { background: var(--white); border-radius: 18px; box-shadow: var(--shadow-card); }
.frame-tab { position: absolute; left: 0; bottom: calc(100% + 10px); font: 700 16px/1 var(--ui); letter-spacing: -.005em; white-space: nowrap; }
.frame-tab button {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 14px; border: 0; border-radius: 10px;
  background: var(--app); color: var(--tab-ink, #fff); font: inherit; letter-spacing: inherit; cursor: zoom-in;
  transition: transform .15s ease, background-color .15s ease;
}
.frame-tab button:hover { transform: translateY(-1px); background: var(--app-hover, color-mix(in srgb, var(--app) 86%, #000)); }
.tab-open { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.frame-tab button:hover .tab-open { opacity: 1; }
.frame:focus-visible { border-radius: 18px; outline-offset: 8px; }
.statement:focus-visible { border-radius: 24px; outline-offset: 8px; }
.frame-body { display: grid; gap: 12px; padding: 26px 28px 28px; }
.frame-head { display: flex; gap: 14px; align-items: center; }
.app-icon { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 6px 14px -6px rgb(0 0 0 / .35); flex: none; }
.status { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.live { background: var(--live); box-shadow: 0 0 0 3px rgb(31 143 78 / .2); }
.dot.soon { border: 2px solid var(--ink-3); }
.alias { font-size: 13.5px; color: var(--ink-3); margin-top: 2px; }
.tagline { font: 750 26px/1.15 var(--ui); letter-spacing: -.02em; }
.desc { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.features { display: grid; gap: 5px; font-size: 14.5px; }
.features li { position: relative; padding-left: 18px; }
.features li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--app); }
.proof { font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 3px 9px; border-radius: 7px; background: #f0f1ec; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.shots { display: flex; gap: 12px; margin-top: 6px; }
.shots img { width: calc((100% - 24px) / 3); border-radius: 10px; box-shadow: 0 0 0 1px rgb(0 0 0 / .05), 0 10px 20px -12px rgb(0 0 0 / .45); }
.shots-wide img { width: 100%; }
.contact .email { font: 800 30px/1.1 var(--ui); letter-spacing: -.02em; text-decoration: none; border-bottom: 3px solid var(--line); padding-bottom: 4px; justify-self: start; }
.contact .email:hover { border-color: var(--ink); }

/* Pinned prints */
.print { background: var(--white); padding: 6px; border-radius: 3px; box-shadow: var(--shadow-paper); }
.print::before {
  content: ""; position: absolute; left: 50%; top: -12px; width: 64px; height: 22px; transform: translateX(-50%) rotate(-3deg);
  background: rgb(255 238 170 / .75); box-shadow: 0 1px 2px rgb(0 0 0 / .08);
}

/* Board labels */
.board-label { font: 700 14px/1 var(--ui); letter-spacing: .02em; color: var(--ink-2); margin-bottom: 18px; }

/* Career timeline */
.tl-notes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 50px; align-items: end; }
.tl { padding: 16px 16px 18px; transform: rotate(calc(var(--r, 0) * 1deg)); min-height: 210px; }
.tl:nth-child(even) { margin-bottom: 22px; }
.tl-when { font: 600 13px/1 var(--ui); color: #3d3a2c; display: flex; align-items: center; gap: 8px; }
.tl h3 { font: 700 27px/1.05 var(--hand); margin: 10px 0 8px; }
.tl p:not(.tl-when) { font-size: 16.5px; line-height: 1.3; }
.now-tag { padding: 3px 7px; border-radius: 6px; background: var(--ink); color: var(--white); font: 700 10.5px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; }
.tl-line { position: relative; height: 30px; margin-top: 18px; border-top: 3px solid var(--ink); display: grid; grid-template-columns: repeat(5, 1fr); gap: 50px; }
.tl-line i { position: relative; }
.tl-line i::before { content: ""; position: absolute; left: 50%; top: -9px; width: 15px; height: 15px; border-radius: 50%; background: var(--board); border: 3px solid var(--ink); transform: translateX(-50%); }
.tl-line i:last-child::before { background: var(--ink); }
.timeline:focus-visible, .cluster:focus-visible { outline-offset: 14px; border-radius: 16px; }

/* Cluster */
.cl-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; align-items: start; }
.small { padding: 18px 18px 20px; transform: rotate(calc(var(--r, 0) * 1deg)); }
.small h3 { font: 700 24px/1 var(--hand); margin-bottom: 10px; }
.small ul { display: grid; gap: 4px; font-size: 17px; line-height: 1.3; }
.small p { font-size: 17px; line-height: 1.35; }

/* Connector labels */
.conn-label { width: auto; font: 400 22px/1 var(--hand); color: var(--ink); white-space: nowrap; transform: rotate(calc(var(--r, 0) * 1deg)); }

/* ---------- HUD: zoom + minimap ---------- */
.hud { position: fixed; right: var(--inset); bottom: var(--inset); z-index: 30; display: grid; gap: 10px; justify-items: end; }
.zoom { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: var(--white); box-shadow: var(--shadow-card); }
.zoom button {
  min-width: 36px; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: none; cursor: pointer;
  font: 600 18px/1 var(--ui);
}
.zoom button:hover { background: var(--chip); }
.zoom .fit { font-size: 14px; padding: 0 12px; }
.zoom .help-btn { font-size: 15px; font-weight: 700; margin-left: 2px; position: relative; }
.zoom .help-btn::before { content: ""; position: absolute; left: -3px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.zoom .help-btn[aria-expanded="true"] { background: var(--ink); color: var(--white); }
.zoom-pct { min-width: 54px; text-align: center; font: 600 13px/1 var(--ui); color: var(--ink-2); font-variant-numeric: tabular-nums; }

.hint {
  position: fixed; left: 50%; bottom: var(--inset); z-index: 30; transform: translateX(-50%);
  padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--white); pointer-events: none;
  font: 500 13px/1.3 var(--ui); box-shadow: var(--shadow-card); white-space: nowrap;
  transition: opacity .4s ease, transform .4s ease;
}
.hint kbd { display: inline-block; min-width: 18px; padding: 2px 5px; border-radius: 5px; background: rgb(255 255 255 / .16); font: 700 12px/1 var(--ui); text-align: center; }
.hint.is-gone { opacity: 0; transform: translate(-50%, 8px); }
@media (min-width: 701px) and (max-width: 1099px) { /* centred, it would run into the zoom bar */
  .hint { left: var(--inset); transform: none; }
  .hint.is-gone { transform: translateY(8px); }
}
.hint-touch { display: none; }
@media (hover: none), (pointer: coarse) { .hint-fine { display: none; } .hint-touch { display: inline; } }

/* ---------- Index (Louis Paquet): label column, hairline rows ---------- */
#index-view { max-width: 1120px; margin: 0 auto; padding: 120px clamp(16px, 4vw, 48px) 80px; }
.ix-head { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 32px; margin-bottom: 72px; }
.ix-head h1 { grid-column: 2; font: 800 clamp(2.4rem, 5vw, 4rem)/1 var(--ui); letter-spacing: -.035em; }
.ix-head p { grid-column: 2; font-size: 19px; color: var(--ink-2); max-width: 34em; }
.ix-sec { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 32px; margin-bottom: 56px; scroll-margin-top: 80px; }
.ix-label { font: 600 14px/1.6 var(--ui); color: var(--ink-3); padding-top: 12px; }
.ix-rows li > a, .ix-rows li > div {
  display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr) 6rem auto; gap: 18px; align-items: baseline;
  padding: 13px 0; border-top: 1px solid var(--line); text-decoration: none;
}
.ix-rows li:last-child > a, .ix-rows li:last-child > div { border-bottom: 1px solid var(--line); }
.ix-rows a { transition: padding .3s cubic-bezier(.2, .8, .2, 1), background-color .2s ease; }
.ix-rows a:hover, .ix-rows a:focus-visible { padding-left: 10px; }
.ix-name { font-weight: 700; }
.ix-what { color: var(--ink-2); }
.ix-year { color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; }
.ix-go { font-weight: 600; white-space: nowrap; }
.ix-foot { margin-top: 40px; font-size: 14px; color: var(--ink-3); padding-left: calc(13rem + 32px); }

/* ---------- Narrow screens ---------- */
@media (max-width: 700px) {
  .chrome { grid-template-columns: auto 1fr auto; padding: 10px 10px; gap: 6px; }
  .back-label { display: none; }
  .mark-long { display: none; }
  .mark-short { display: inline; }
  .pill { height: 40px; padding: 0 12px; }
  .toggle { justify-self: center; }
  .toggle button { height: 34px; padding: 0 18px; font-size: 15px; }
  .zoom-pct { display: none; }
  .zoom .help-btn { display: none; } /* phones reach help from the On this board sheet */
  .hud { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .zoom button { min-width: 40px; height: 44px; }
  .hint { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); transform: none; font-size: 12.5px; text-align: center; white-space: normal; } /* sits above the bottom bar */
  .hint.is-gone { transform: translateY(8px); }

  /* the statement card has a phone layout in world units so it reads at the fitted zoom */
  .statement { --x: -210 !important; --w: 420 !important; padding: 28px 26px 30px; }
  .statement h1 { font-size: 46px; }
  .st-lede { font-size: 18px; }

  #index-view { padding-top: 84px; }
  .ix-head, .ix-sec { grid-template-columns: 1fr; gap: 10px; }
  .ix-head h1, .ix-head p { grid-column: 1; }
  .ix-label { padding-top: 0; }
  .ix-rows li > a, .ix-rows li > div { grid-template-columns: 1fr auto; grid-template-areas: "name year" "what what" "go go"; gap: 4px 12px; }
  .ix-name { grid-area: name; } .ix-what { grid-area: what; } .ix-year { grid-area: year; } .ix-go { grid-area: go; }
  .ix-foot { padding-left: 0; }
}

/* ---------- Areas: FigJam-style sections that keep side projects and the day job apart ---------- */
.zone {
  border: 2px dashed color-mix(in srgb, var(--zone) 55%, transparent);
  background: color-mix(in srgb, var(--zone) 7%, transparent);
  border-radius: 28px; pointer-events: none;
}
.zone-side { --zone: #b04a0a; } /* marker orange: no app uses it, so the area never reads as one app's */
.zone-job { --zone: #475569; }  /* slate */
.zone-label {
  position: absolute; left: 22px; top: -17px; padding: 6px 14px; border: 0; border-radius: 10px;
  background: var(--zone); color: #fff; font: 700 15px/1.2 var(--ui); letter-spacing: .01em; white-space: nowrap;
  pointer-events: auto; cursor: zoom-in; transition: transform .15s ease, background-color .15s ease;
}
.zone-label:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--zone) 84%, #000); }
/* both labels face the statement card, so the first screen names both areas */
.zone-side .zone-label { top: auto; bottom: -17px; left: calc(50% - 120px); } /* right where the "after hours" arrow lands */

@media (min-width: 701px) { .mark-short { display: none; } } /* phones show it; see the ≤700px block */

/* ---------- On this board: the board's legend (a crisp UI object, like FigJam's frames panel) ---------- */
.nav {
  position: fixed; z-index: 32; left: var(--inset); top: 66px; width: 268px;
  display: grid; grid-template-rows: auto 0fr;
  background: var(--white); border-radius: 16px; box-shadow: var(--shadow-card);
  transition: grid-template-rows .36s cubic-bezier(.2, .8, .2, 1);
}
.nav.is-open { grid-template-rows: auto 1fr; }
.nav.no-anim, .nav.no-anim * { transition: none !important; }
.nav-head {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 10px 0 14px;
  border: 0; border-radius: 16px; background: none; cursor: pointer; text-align: left;
  font: 600 14px/1 var(--ui); color: var(--ink);
}
.nav-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav-head-text { display: flex; align-items: baseline; gap: 6px; flex: 1; min-width: 0; }
.nav-title { white-space: nowrap; }
.nav-now { font-weight: 500; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-now:empty { display: none; }
.nav-now::before { content: "· "; }
.nav.is-open .nav-now { display: none; } /* the open list shows where you are */
.nav-chev {
  width: 28px; height: 28px; padding: 5px; flex: none; border-radius: 8px;
  fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), background-color .15s ease;
}
.nav-head:hover .nav-chev { background: var(--chip); }
.nav.is-open .nav-chev { transform: rotate(180deg); }
.nav.is-flash { animation: navflash 1s cubic-bezier(.2, .8, .2, 1); }
@keyframes navflash { 0%, 40% { box-shadow: 0 0 0 3px var(--ink), var(--shadow-card); } }

.nav-body { min-height: 0; overflow: hidden; }
.nav-scroll { max-height: calc(100dvh - 66px - 46px - var(--inset)); overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px; }
.nav-sheet-head { display: none; }

.nav .minimap {
  position: relative; height: 120px; margin: 0 2px 10px; overflow: hidden; cursor: pointer; touch-action: none;
  border-radius: 10px; background: #f7f8f5; box-shadow: inset 0 0 0 1px var(--line);
}
.mm-zones i, .mm-items i { position: absolute; }
.mm-zones i { border: 1.5px dashed color-mix(in srgb, var(--zone) 60%, transparent); background: color-mix(in srgb, var(--zone) 6%, transparent); border-radius: 4px; }
.mm-items i { border-radius: 2px; transition: box-shadow .15s ease; }
.mm-items i.is-hl { box-shadow: 0 0 0 1.5px var(--white), 0 0 0 3px var(--ink); z-index: 1; }
.mm-zones i.is-hl { border-style: solid; border-color: var(--zone); }
.mm-view { position: absolute; border: 2px solid var(--focus); border-radius: 3px; background: rgb(37 99 235 / .07); pointer-events: none; z-index: 2; }

.nav-list { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.nav-list ul { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; margin: 1px 0 0 16px; padding-left: 6px; border-left: 1px solid var(--line); }
.nav-here {
  position: absolute; left: 0; right: 0; top: 0; height: 34px; border-radius: 9px; background: var(--here);
  opacity: 0; pointer-events: none;
  transition: transform .42s cubic-bezier(.2, .8, .2, 1), height .42s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
}
.nav-here.is-on { opacity: 1; }
.nav-row {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 5px 8px;
  border: 0; border-radius: 9px; background: none; cursor: pointer; text-align: left;
  font: 500 14px/1.2 var(--ui); color: var(--ink-2);
  transition: background-color .15s ease, color .15s ease;
}
.nav-row:hover { background: rgb(27 29 34 / .05); color: var(--ink); }
.nav-row[aria-current] { color: var(--ink); font-weight: 650; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-meta { margin-left: auto; padding-left: 8px; font-size: 12px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.nav-thumb { width: 22px; height: 22px; flex: none; border-radius: 6px; box-shadow: 0 0 0 1px rgb(0 0 0 / .06); }
.nav-thumb.face { border-radius: 50%; object-fit: cover; object-position: 50% 30%; }
.nav-thumb.note { width: 20px; height: 20px; margin: 1px; border-radius: 2px 2px 6px 2px; background: var(--c); box-shadow: 0 1px 2px rgb(30 28 20 / .2); }
.nav-thumb.ink { display: grid; place-items: center; background: var(--ink); }
.nav-thumb.ink svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linejoin: round; }
.nav-ghead { margin-top: 6px; font-size: 12.5px; font-weight: 650; letter-spacing: .01em; }
.nav-swatch {
  width: 16px; height: 16px; margin: 0 3px; flex: none; border-radius: 4px;
  border: 1.5px dashed var(--zone); background: color-mix(in srgb, var(--zone) 12%, transparent);
}
.nav-group:has([aria-current]) > .nav-ghead .nav-swatch { border-style: solid; background: var(--zone); }

.nav-foot { display: grid; gap: 1px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.nav-link {
  display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px; border: 0; border-radius: 9px;
  background: none; cursor: pointer; text-align: left; font: 500 13px/1.25 var(--ui); color: var(--ink-3);
}
.nav-link:hover { background: rgb(27 29 34 / .05); color: var(--ink); }
.nav-help-link { display: none; } /* wide screens use the ? button by the zoom */
.nav-kbd, .help kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px;
  background: var(--chip); box-shadow: inset 0 -1px 0 var(--line); font: 600 11.5px/1 var(--ui); color: var(--ink-2);
}
.nav-kbd { margin-left: auto; }
.nav-scrim { display: none; }

/* ---------- How to get around ---------- */
.help {
  position: fixed; right: var(--inset); bottom: calc(var(--inset) + 56px); z-index: 33; width: 340px;
  padding: 16px 18px 16px; background: var(--white); border-radius: 16px; box-shadow: var(--shadow-card);
}
.help[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .help:not([hidden]) { animation: helpin .28s cubic-bezier(.2, .8, .2, 1); } }
@keyframes helpin { from { opacity: 0; transform: translateY(6px); } }
.help-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.help h2 { font: 700 16px/1.2 var(--ui); letter-spacing: -.01em; }
.help-close, .nav-close {
  display: grid; place-items: center; width: 32px; height: 32px; margin-right: -6px; border: 0; border-radius: 8px; background: none; cursor: pointer;
}
.help-close:hover, .nav-close:hover { background: var(--chip); }
.help-close svg, .nav-close svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; }
.help-list { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; margin: 0; font-size: 13.5px; line-height: 1.4; }
.help-list dt { font-weight: 650; }
.help-list dd { margin: 0; color: var(--ink-2); }
.help-list strong { font-weight: 650; color: var(--ink); }
.help-keys { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 8px 14px; }
.help-keys span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.help .touch { display: none; }
@media (hover: none), (pointer: coarse) { .help .fine { display: none; } .help .touch { display: inline; } }

/* ---------- On this board on phones: a bottom button that names where you are, opening a sheet ---------- */
@media (max-width: 700px) {
  .nav {
    top: auto; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; max-width: calc(100vw - 24px - 176px);
    display: block; border-radius: 14px;
  }
  .nav-head { height: 52px; padding: 0 8px 0 13px; border-radius: 14px; }
  .nav-head-text { flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav-title { font: 600 11.5px/1 var(--ui); color: var(--ink-3); }
  .nav .nav-now { display: block; font: 700 15px/1.1 var(--ui); color: var(--ink); max-width: 100%; }
  .nav-now::before { content: none; }
  .nav-chev { transform: rotate(180deg); }
  .nav.is-open .nav-chev { transform: none; }
  .nav-body {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
    background: var(--white); border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px -12px rgb(20 22 28 / .4);
    transform: translateY(104%); visibility: hidden;
    transition: transform .34s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .34s;
  }
  .nav.is-open .nav-body { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
  .nav-scroll { max-height: min(82dvh, 700px); padding: 6px 14px calc(14px + env(safe-area-inset-bottom)); }
  .nav-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px 8px; position: relative; }
  .nav-sheet-head::before { content: ""; position: absolute; left: 50%; top: -1px; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: var(--line); }
  .nav-sheet-head p { font: 700 17px/1.2 var(--ui); letter-spacing: -.01em; }
  .nav .minimap { height: 112px; }
  .nav-row { min-height: 42px; font-size: 15px; }
  .nav-ghead { font-size: 13px; }
  .nav-here { height: 42px; }
  .nav-link { min-height: 40px; font-size: 14px; }
  .nav-help-link { display: flex; }
  .nav-kbd { display: none; }
  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 31; background: rgb(20 22 28 / .3);
    opacity: 0; pointer-events: none; transition: opacity .3s ease;
  }
  .nav-scrim.is-on { opacity: 1; pointer-events: auto; }
  .help { left: 12px; right: 12px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* reduced motion: the camera already jumps; also drop the small UI transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
