/* Arrows: one diagram. Every work, role, idea and cited note is a node, drawn by its arrows.
   Positions come from the build (arrowsLayout.js); the browser only chooses which neighbourhood to look at.
   Without JavaScript (no .live) the page is the node's card, its arrows as links, and the list. */
:root {
  --ground: #e7eae4; --ink: #0b0c0c; --ink-2: #565d58; --dot: #cdd3ca;
  --sans: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gl: max(16px, env(safe-area-inset-left, 0px)); --gr: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ground: #0c0e0d; --ink: #eef1ea; --ink-2: #98a19a; --dot: #1d2220; color-scheme: dark; }
}
:root[data-theme="dark"] { --ground: #0c0e0d; --ink: #eef1ea; --ink-2: #98a19a; --dot: #1d2220; color-scheme: dark; }
body { background: var(--ground); color: var(--ink); font: 15px/1.45 var(--sans); }
#main a { color: var(--ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
#main :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.arrows-page:not(.live) .js { display: none !important; }
.b { font: 500 12px var(--mono); color: var(--ink); background: none; border: 1.5px solid var(--ink); padding: 6px 10px; cursor: pointer; }
#main a.b { text-decoration: none; display: inline-block; }
.b[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.tag { font: 11px/1.4 var(--mono); color: var(--ink-2); margin: 0; }

.arrows-page { display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.arrows-page.live { height: calc(100dvh - var(--bar-h)); min-height: 560px; }
#hud { padding-block: 26px 22px; padding-left: var(--gl); padding-right: 22px; border-right: 1.5px solid var(--ink);
  overflow: auto; display: flex; flex-direction: column; gap: 11px; }
#hud .name { font-size: 46px; line-height: .92; font-weight: 750; letter-spacing: -.03em; margin: 0 0 6px; font-variation-settings: "opsz" 96; }
#hud p { margin: 0; font-size: 14px; }
#hud .open { border-left: 3px solid var(--ink); padding-left: 10px; font-weight: 600; }
#hud .links { display: flex; gap: 14px; font: 12px var(--mono); }
.ctl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
#hud .legend { font: 12px/1.6 var(--mono); color: var(--ink-2); margin: 0; }
#epi { margin: auto 0 0; padding-top: 18px; }
#epi blockquote { margin: 0; font-size: 22px; line-height: 1.14; font-weight: 520; letter-spacing: -.015em; }
#epi figcaption { font: 11px var(--mono); color: var(--ink-2); margin-top: 6px; }

#stage { position: relative; min-width: 0; padding: 22px var(--gr) 30px 22px;
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.4px); background-size: 22px 22px; }
.live #stage { overflow: hidden; padding: 0; }
#dia { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: manipulation; }
#labs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.nl { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: auto; cursor: pointer; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 3px 6px; white-space: nowrap; color: var(--ink); line-height: 1; outline: none; user-select: none; -webkit-user-select: none; }
#labs.moving .nl { will-change: transform; }
.nl .t { font-family: var(--sans); letter-spacing: -.02em; line-height: 1.02; }
.nl.k-me .t { font-weight: 780; font-variation-settings: "opsz" 96; }
.nl.k-idea .t { font-weight: 680; font-variation-settings: "opsz" 96; }
.nl.k-work .t { font-weight: 580; }
.nl.k-note .t { font-weight: 400; font-style: italic; }
.nl.k-role .t { font-weight: 460; }
.nl .tg { font: 10.5px/1.3 var(--mono); color: var(--ink-2); letter-spacing: 0; }
.nl .tg.sub { margin-top: 3px; }
.nl.k-idea .tg.sub { font: 13px/1.2 var(--sans); }
.nl.sel { background: var(--ink); color: var(--ground); }
.nl.sel .tg { color: var(--ground); }
.nl:hover .t { text-decoration: underline; text-decoration-thickness: 1px; }
.nl:focus-visible { outline: 1.5px dashed var(--ink); outline-offset: 2px; }
#labs.dimmed .nl:not(.nb):not(.sel) { opacity: .15; }
#lead { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#lead line { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
#pbar { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; gap: 12px; align-items: center;
  padding: 8px var(--gr) 8px 16px; border-bottom: 1.5px solid var(--ink); background: var(--ground); min-height: 50px; }
#pbar > .tag { flex: none; }
#crumbs { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
#crumbs button { font: 650 16px var(--sans); color: var(--ink); background: none; border: 0; padding: 2px 3px; cursor: pointer; }
#crumbs button[aria-current] { background: var(--ink); color: var(--ground); }
.mor { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 3px; line-height: 1; }
.mor i { font: normal 10px var(--mono); color: var(--ink-2); }
.mor b { font: 400 18px var(--mono); margin-top: -2px; }
.ph { font-size: 14px; white-space: normal; display: block; }

#card { max-width: 34rem; background: var(--ground); border: 1.5px solid var(--ink); padding: 12px 14px 14px; font-size: 13px; line-height: 1.42; }
.live #card { position: absolute; right: var(--gr); top: 66px; width: 300px; max-height: calc(100% - 84px); overflow: auto; z-index: 1; }
.live #card.me { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#card h1 { font-size: 20px; line-height: 1.08; margin: 3px 0 6px; font-weight: 680; letter-spacing: -.01em; }
#card .ah { margin-top: 12px; font-weight: 400; }
.info p { margin: 6px 0; }
.info .q { font-weight: 600; }
.info dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 8px 0; padding: 7px 0; border-block: 1px solid var(--ink); }
.info dt { font: 11px var(--mono); color: var(--ink-2); padding-top: 2px; }
.info dd { margin: 0; }
.info .lk { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 12px var(--mono); }
.say { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 9px; }
.say blockquote { margin: 0; font-size: 15px; line-height: 1.22; font-weight: 520; }
.arrs, .ar { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 1px; }
#main .arrs a, #main .ar a { font: 12px/1.5 var(--mono); text-decoration: none; }
.arrs b, .ar b { font: 600 13px var(--sans); }
#main .arrs a:hover b, #main .arrs a:focus-visible b, #main .ar a:hover b, #main .ar a:focus-visible b { text-decoration: underline; }
#main .arrs a:focus-visible, #main .ar a:focus-visible { outline-offset: 1px; }

svg text { fill: var(--ink); }
.node { cursor: pointer; outline: none; }
.node .t { font-family: var(--sans); text-anchor: middle; letter-spacing: -.02em; }
.k-me .t { font-weight: 780; font-variation-settings: "opsz" 96; }
.k-idea .t { font-weight: 680; font-variation-settings: "opsz" 96; }
.k-work .t { font-weight: 580; }
.k-note .t { font-weight: 400; font-style: italic; }
.k-role .t { font-weight: 460; }
.node .tg { font: 10.5px var(--mono); fill: var(--ink-2); text-anchor: middle; letter-spacing: 0; }
.k-idea .tg.sub { font: 13px var(--sans); }
.hl { fill: var(--ink); opacity: 0; }
.ring { fill: none; stroke: none; }
.sel .hl { opacity: 1; }
.sel .t, .sel .tg { fill: var(--ground); }
.node:focus-visible .ring { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 3; }
.node:hover .t { text-decoration: underline; text-decoration-thickness: 1px; }
.dimmed .node:not(.nb):not(.sel) { opacity: .15; }
.e { fill: none; stroke: var(--ink); stroke-width: 1.1px; opacity: .3; }
.e.lo { opacity: .1; }
.dimmed .e { opacity: .05; }
#dia.moving.dimmed .e:not(.on):not(.pth) { visibility: hidden; }
.e.on { opacity: 1; stroke-width: 1.6px; stroke-dasharray: 1; animation: draw .8s cubic-bezier(.3,.7,.2,1); }
.e.pth { opacity: 1; stroke-width: 3px; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.mf { fill: var(--ink); }
.mo { fill: var(--ground); stroke: var(--ink); stroke-width: 1.3; }
.el { visibility: hidden; cursor: pointer; }
.el.on, .el.pth { visibility: visible; }
.nolab .el.on:not(.pth) { visibility: hidden; }
.el rect { fill: var(--ground); stroke: var(--ink); stroke-width: 1; }
.el text { font: 10.5px var(--mono); text-anchor: middle; }
.el:hover rect, .el.pth rect { fill: var(--ink); }
.el:hover text, .el.pth text { fill: var(--ground); }
.cg { display: none; }
.cg path { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.cg polygon { fill: var(--ink); fill-opacity: .13; stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.cg circle { fill: var(--ink); }
.sel .cg polygon { fill-opacity: .9; }
.car #labs, .car .el { display: none; }
.car .cg { display: inline; }
.arrows-page.car #card, .arrows-page.car #lead { display: none; }

#list { scroll-margin-top: var(--bar-h); padding-block: 44px 72px; padding-left: var(--gl); padding-right: var(--gr); border-top: 1.5px solid var(--ink); }
#list > h2 { font-size: 44px; line-height: 1; letter-spacing: -.03em; margin: 0 0 6px; font-weight: 750; }
#list > h2:focus { outline: none; }
.lgrid { columns: 290px 4; column-gap: 34px; margin-top: 26px; }
.lgrid h3 { column-span: all; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; border-bottom: 1.5px solid var(--ink); padding-bottom: 4px; margin: 18px 0 14px; }
.lgrid article { break-inside: avoid; margin: 0 0 22px; font-size: 13px; }
.lgrid h4 { margin: 0 0 2px; font-size: 18px; line-height: 1.1; }
#main .lgrid h4 a { font-weight: 680; text-decoration: none; }
#main .lgrid h4 a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .arrows-page, .arrows-page.live { display: block; height: auto; min-height: 0; }
  #hud { border-right: 0; border-bottom: 1.5px solid var(--ink); padding-right: var(--gr); padding-block: 22px 20px; }
  #hud .name { font-size: 40px; }
  #epi { margin-top: 6px; padding-top: 6px; }
  #stage { padding-left: var(--gl); }
  .live #stage { height: 84svh; }
  .live #card { left: var(--gl); right: var(--gr); width: auto; top: auto; bottom: 8px; max-height: 46%; }
  #list > h2 { font-size: 36px; }
  .lgrid { columns: 1; }
}
@media (prefers-reduced-motion: reduce) { .e.on { animation: none; } }
