@font-face { font-family:'Roca'; src:url('fonts/Roca-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Roca'; src:url('fonts/Roca-Italic.woff2') format('woff2'); font-weight:400; font-style:italic; font-display:swap; }
@font-face { font-family:'Martian Mono'; src:url('fonts/MartianMono.ttf') format('truetype'); font-weight:100 800; font-stretch:75% 112.5%; font-display:swap; }

html { font-size:17px; }
@media (max-width:1199px) { html { font-size:15.5px; } }
@media (max-width:600px)  { html { font-size:15px; } }
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
:root {
  --bg:#081207; --raise:#18231a; --text:#EEE4CE; --dim:#bcb89f; --faint:#96977f;
  --border:rgba(186,210,92,.2); --pink:#D98ACB;
  color-scheme:dark;
}
html,body { width:100%; height:100%; overflow:hidden; background:var(--bg); color:var(--text);
  font:400 1rem/1.4 'Work Sans',sans-serif; -webkit-font-smoothing:antialiased; }
h1,h2,h3,.serif { font-family:'Roca',serif; font-weight:400; line-height:1.1; text-wrap:balance; }
button,input,textarea,select { font:inherit; color:inherit; }
button { background:none; border:0; cursor:pointer; }
:focus-visible { outline:2px solid var(--pink); outline-offset:2px; }
[hidden] { display:none !important; }
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-thumb { background:rgba(186,210,92,.3); border-radius:3px; }

.view { position:fixed; inset:0; visibility:hidden; opacity:0; transition:opacity .3s; }
.view.active { visibility:visible; opacity:1; }
.scroll { overflow-y:auto; padding-bottom:110px; }
.inner { max-width:1040px; margin:0 auto; padding:56px 28px 20px; }
.inner h1 { font-style:italic; font-size:3rem; margin-bottom:22px; }

/* map */
#map { position:absolute; inset:0; width:100%; height:100%; display:block; touch-action:none; cursor:grab; }
#map.over { cursor:pointer; }
#map.dragging { cursor:grabbing; }
#topicbar { position:absolute; top:16px; left:18px; right:150px; display:flex; gap:7px; overflow-x:auto; scrollbar-width:none; padding:3px; }
#topicbar::-webkit-scrollbar { display:none; }
#map-empty { position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; color:var(--dim);
  font-family:'Roca',serif; font-weight:400; font-size:1.4rem; }
#legend { position:absolute; bottom:80px; left:50%; transform:translateX(-50%); display:flex; gap:2px; max-width:96vw; flex-wrap:wrap; justify-content:center; }
#legend button { display:flex; align-items:center; gap:7px; padding:6px 10px; border-radius:99px; font-size:.82rem; color:var(--dim); background:rgba(8,18,7,.72); }
#legend button:hover,#legend button:focus-visible { color:var(--text); background:var(--raise); }
#zoom { position:absolute; right:18px; bottom:22px; display:flex; flex-direction:column; border:1px solid var(--border); border-radius:12px; overflow:hidden; background:rgba(8,18,7,.85); }
#zoom button { width:42px; height:38px; color:var(--dim); }
#zoom button:hover { color:var(--text); background:var(--raise); }
#zoom .fit { font-size:.78rem; }
#hover { position:absolute; z-index:5; max-width:270px; padding:13px 16px; border-radius:14px; pointer-events:none; opacity:0; transition:opacity .14s;
  background:rgba(14,23,14,.97); border:1px solid var(--border); box-shadow:0 8px 36px rgba(0,0,0,.55); }
#hover.show { opacity:1; }
#hover .serif { font-size:1.18rem; margin-top:8px; }

.dot { width:11px; height:11px; border-radius:50%; flex:none; display:inline-block; }
.tags { display:flex; flex-wrap:wrap; gap:6px; }
.tag { display:inline-flex; align-items:center; gap:6px; padding:3px 11px; border-radius:99px; font-size:.8rem; font-weight:500; color:#081207; }
.tag.line { color:var(--text); border:1px solid var(--border); font-weight:400; }
button.tag.line:hover { background:var(--raise); }
.chips { display:flex; flex-wrap:wrap; gap:7px; }
.chip { display:inline-flex; align-items:center; gap:7px; padding:5px 13px; border-radius:99px; border:1px solid var(--border); background:rgba(8,18,7,.78);
  color:var(--dim); font-size:.84rem; white-space:nowrap; min-height:32px; }
.chip:hover { color:var(--text); }
.chip[aria-pressed=true] { background:var(--c,#BAD25C); border-color:var(--c,#BAD25C); color:var(--ci,#081207); }
.chip[aria-pressed=true] .dot { background:var(--ci,#081207) !important; }
.chip.suggest { border-style:dashed; }

/* pill nav */
#nav { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); z-index:20; display:flex; align-items:center; padding:3px 4px; border-radius:99px;
  background:#BAD25C; color:#081207; transition:background .6s,color .6s; }
#nav button { font-family:'Martian Mono',monospace; text-transform:uppercase; font-size:.74rem; padding:4px 11px; border-radius:99px; min-height:32px; }
#nav button:hover { background:rgba(0,0,0,.1); }
#nav button.on { background:rgba(0,0,0,.16); }
#nav svg { width:16px; height:16px; display:block; stroke:currentColor; fill:none; stroke-width:1.9; }

#owner { position:fixed; top:16px; right:18px; z-index:15; display:flex; gap:8px; }
.btn { border:1px solid var(--border); border-radius:99px; padding:7px 16px; background:rgba(8,18,7,.85); color:var(--text); font-size:.88rem; }
.btn:hover { background:var(--raise); }
.btn.main { background:#BAD25C; color:#081207; border-color:#BAD25C; font-weight:500; }
.btn.main:hover { background:#D2E583; }
.btn:disabled { opacity:.5; }
.btn.quiet { color:var(--faint); border-color:transparent; background:none; }
.btn.danger { color:#f0977d; }
#notice { position:fixed; left:18px; bottom:22px; z-index:14; max-width:250px; font-size:.8rem; color:var(--dim); background:rgba(8,18,7,.9);
  padding:10px 13px; border-radius:12px; border:1px solid var(--border); }

/* panel */
#panel { position:fixed; top:0; right:0; bottom:0; width:min(440px,100vw); z-index:30; background:#0e170e; border-left:1px solid var(--border);
  transform:translateX(102%); visibility:hidden; transition:transform .3s cubic-bezier(.2,.8,.3,1),visibility .3s; overflow-y:auto; padding:22px 26px 60px; }
#panel.open { transform:none; visibility:visible; }
#panel .top { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:20px; }
#panel h2 { font-size:2rem; margin:14px 0 6px; overflow-wrap:anywhere; }
#panel .meta { color:var(--faint); font-size:.85rem; margin-bottom:14px; }
#panel .body { color:#dcd4c0; margin:20px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
#panel a { color:var(--text); text-underline-offset:3px; overflow-wrap:anywhere; }
#panel h3 { font-family:'Martian Mono',monospace; text-transform:uppercase; font-size:.82rem; color:var(--dim); margin:28px 0 10px; }
.row { display:block; width:100%; text-align:left; padding:12px 0; border-top:1px solid var(--border); }
.row:hover .serif { color:#fff; }
.row .serif { font-size:1.12rem; display:block; overflow-wrap:anywhere; }
.row small { color:var(--faint); font-size:.8rem; }
.row .excerpt { display:block; color:var(--dim); font-size:.9rem; margin-top:3px; max-width:70ch; }
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin:14px 0 4px; overflow-x:auto; }
.tabs button { padding:9px 11px; font-size:.88rem; color:var(--dim); border-bottom:2px solid transparent; white-space:nowrap; }
.tabs button[aria-selected=true] { color:var(--text); border-color:var(--c,#BAD25C); }
.none { color:var(--faint); padding:18px 0; }

/* dialogs */
dialog { margin:auto; width:min(600px,94vw); max-height:92vh; overflow-y:auto; color:var(--text); background:#0e170e; border:1px solid var(--border); border-radius:18px; padding:26px 28px; }
dialog::backdrop { background:rgba(3,8,3,.72); }
dialog h2 { font-size:1.7rem; margin-bottom:16px; }
dialog p { color:var(--dim); margin-bottom:12px; }
.f { display:block; margin-bottom:16px; }
.f > span { display:block; font-size:.84rem; color:var(--dim); margin-bottom:6px; }
input[type=text],input[type=email],input[type=password],input[type=url],input[type=date],input[type=search],textarea,select {
  width:100%; background:#172217; border:1px solid var(--border); border-radius:10px; padding:10px 13px; font-size:max(1rem,16px); }
textarea { min-height:130px; resize:vertical; line-height:1.45; }
#q,#t-title { font-family:'Roca',serif; font-weight:400; font-size:1.35rem; }
input::placeholder,textarea::placeholder { color:var(--faint); }
.two { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.acts { display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; margin-top:8px; }
.acts .left { margin-right:auto; }
.err { color:#f0977d; font-size:.88rem; min-height:1.2em; }
.check { display:flex; gap:9px; align-items:center; font-size:.92rem; margin-bottom:14px; }
.string-row { display:flex; gap:10px; align-items:center; margin-bottom:10px; }
.string-row input[type=color] { width:44px; height:42px; flex:none; border:0; background:none; }
#toast { position:fixed; bottom:84px; left:50%; transform:translate(-50%,12px); z-index:60; background:#BAD25C; color:#081207; border-radius:99px; padding:8px 18px;
  font-size:.9rem; opacity:0; pointer-events:none; transition:.25s; max-width:92vw; }
#toast.show { opacity:1; transform:translate(-50%,0); }

/* insights */
#insights { margin-top:22px; }
.lede { font-family:'Roca',serif; font-weight:400; font-size:1.45rem; line-height:1.3; max-width:34ch; margin:8px 0 36px; }
.charts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:44px 48px; }
.chart.wide { grid-column:1/-1; }
.chart h2 { font-size:1.35rem; margin-bottom:4px; }
.chart > p { color:var(--faint); font-size:.85rem; margin-bottom:16px; }
.bar { display:grid; grid-template-columns:minmax(80px,32%) 1fr 34px; gap:10px; align-items:center; width:100%; text-align:left; padding:5px 0; font-size:.88rem; }
.bar .nm { color:var(--dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
button.bar:hover .nm { color:var(--text); }
.bar i { display:block; height:14px; border-radius:0 4px 4px 0; min-width:2px; }
.bar b { font-weight:400; font-variant-numeric:tabular-nums; }
.key { display:flex; gap:16px; flex-wrap:wrap; font-size:.82rem; color:var(--dim); margin-bottom:12px; }
.key span { display:flex; gap:7px; align-items:center; }
.cols { display:flex; align-items:flex-end; gap:3px; height:190px; border-bottom:1px solid var(--border); }
.col { flex:1; max-width:44px; height:100%; display:flex; flex-direction:column; justify-content:flex-end; gap:2px; min-width:3px; }
.col i { display:block; }
.col i:first-child { border-radius:4px 4px 0 0; }
.col:hover { background:rgba(238,228,206,.06); }
.axis { display:flex; gap:3px; font-size:.74rem; color:var(--faint); margin-top:5px; }
.axis span { flex:1; max-width:44px; min-width:3px; white-space:nowrap; overflow:visible; }
.split { display:flex; gap:2px; height:26px; margin-bottom:12px; }
.split i { min-width:2px; }
.split i:first-child { border-radius:4px 0 0 4px; } .split i:last-child { border-radius:0 4px 4px 0; } .split i:only-child { border-radius:4px; }
.tw { overflow-x:auto; }
table { border-collapse:separate; border-spacing:2px; font-size:.84rem; width:100%; }
th { font-weight:400; color:var(--dim); text-align:left; padding:5px 8px; white-space:nowrap; }
td { text-align:center; padding:7px 8px; font-variant-numeric:tabular-nums; border-radius:3px; }
#tip { position:fixed; z-index:70; pointer-events:none; opacity:0; background:#1b281b; border:1px solid var(--border); border-radius:8px; padding:6px 11px; font-size:.82rem; white-space:pre-line; }
#tip.show { opacity:1; }

@media (max-width:700px) {
  .charts { grid-template-columns:minmax(0,1fr); }
  .inner { padding:70px 18px 20px; }
  #panel { top:auto; left:0; width:100%; height:72vh; border-left:0; border-top:1px solid var(--border); border-radius:18px 18px 0 0; transform:translateY(102%); }
  #topicbar { top:60px; right:0; }
  #zoom { display:none; }
  #legend { bottom:76px; }
  #legend button { padding:4px 7px; font-size:.76rem; }
  #notice { bottom:auto; top:104px; left:14px; right:14px; max-width:none; }
  .two { grid-template-columns:1fr; gap:0; }
  dialog { padding:20px 18px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition-duration:.01ms !important; } }

.stage { flex:none; vertical-align:-3px; }
figure { margin:0 0 20px; }
figure img,figure video { display:block; width:100%; height:auto; border-radius:10px; }
figure iframe { display:block; width:100%; aspect-ratio:16/9; border:0; border-radius:10px; background:#000; }
figcaption { font-style:italic; font-size:.86rem; color:var(--dim); margin-top:7px; text-align:center; overflow-wrap:anywhere; }
.vlink { display:block; padding:14px; border:1px solid var(--border); border-radius:10px; }
.m-row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:10px; }
.m-row img { width:64px; height:64px; object-fit:cover; border-radius:8px; }
.m-row input { flex:1 1 150px; width:auto; min-width:0; }
.row small,#panel .meta { font-family:'Martian Mono',monospace; font-size:.7rem; line-height:1.6; }
/* subheadings */
.chart h2,#panel h3,dialog h2 { font-family:'Martian Mono',monospace; font-weight:700; line-height:1.35; }
.chart h2 { font-size:.92rem; margin-bottom:6px; }
#panel h3 { margin:32px 0 10px; }
.row .serif { font-size:1.15rem; line-height:1.2; }
#hover .serif { margin-top:10px; }
dialog h2 { font-size:1.1rem; margin-bottom:18px; }

/* spacing */
.inner h1 { margin-bottom:26px; }
.filters { display:flex; flex-direction:column; gap:14px; margin-bottom:30px; }
.chips { gap:8px; }
.row { padding:18px 0; }
.row .tags { align-items:center; gap:8px; margin-bottom:10px !important; }
.row small { display:block; margin-top:6px; }
.row .excerpt { margin-top:9px; line-height:1.5; }
#panel .top { margin-bottom:24px; }
#panel h2 { margin:16px 0 10px; line-height:1.15; }
#panel .meta { margin-bottom:16px; }
#panel .body { margin:24px 0 28px; line-height:1.55; }
.lede { margin:26px 0 40px; }
.chart > p { margin-bottom:18px; }
.key { row-gap:8px; }
#legend { bottom:74px; }
@media (max-width:700px) { .tabs button { padding:9px 8px; } #legend { bottom:68px; } }

/* images and videos */
figure { margin:0 auto 24px; max-width:300px; }
figure img { width:auto; max-width:100%; max-height:260px; margin:0 auto; }
/* coloured tabs */
.tabs { flex-wrap:wrap; gap:8px; border-bottom:0; margin:18px 0 16px; padding:4px 0; overflow:visible; }
.tabs button { display:inline-flex; align-items:center; gap:5px; padding:6px 10px; border:0; border-radius:99px; background:var(--tc); color:var(--ti); font-size:.78rem; font-weight:500; }
.tabs button[aria-selected=true] { color:var(--ti); box-shadow:0 0 0 2px #0e170e,0 0 0 4px var(--tc); }
.tabs .stage path { fill:currentColor; stroke:none; }
@media (max-width:700px) { .tabs button { padding:8px 11px; } }
.topics-all { margin-bottom:44px; }
#topicbar:empty { display:none; }
/* hover preview card, as on Strings of Thought */
#hover { width:270px; max-width:270px; padding:15px 17px 14px; }
#hover.show { pointer-events:auto; }
.hc-img { display:block; width:100%; max-height:150px; object-fit:cover; border-radius:8px; margin-bottom:12px; }
.hc-dots { display:flex; gap:6px; margin-bottom:9px; }
.hc-dots .dot { width:12px; height:12px; }
#hover .hc-dots + .serif { margin-top:0; font-size:1.2rem; line-height:1.18; }
.hc-date { font-size:.72rem; color:var(--faint); margin:5px 0 9px; }
.hc-ex { font-size:.88rem; line-height:1.42; color:var(--dim); margin-bottom:11px; }
.hc-read { font-family:'Roca',serif; font-size:.9rem; color:var(--dim); padding:0; }
.hc-read:hover { color:var(--text); }
.m-row .chip { min-height:30px; }
/* timestamps in capitals */
.row small,#panel .meta { text-transform:uppercase; letter-spacing:.03em; }
/* kind tag: just the icon until hovered */
.tag.kind { gap:0; padding:5px 7px; cursor:default; transition:gap .2s,padding .2s; }
.kind-label { max-width:0; overflow:hidden; white-space:nowrap; opacity:0; transition:max-width .25s ease,opacity .2s; }
.tag.kind:hover,.tag.kind:focus-visible { gap:6px; padding:5px 11px; }
.tag.kind:hover .kind-label,.tag.kind:focus-visible .kind-label { max-width:240px; opacity:1; }
.tag.kind .stage { vertical-align:0; }
.row [data-tip] { display:inline-flex; cursor:help; }
/* article body: paragraphs, headings, images in place */
#panel .body { white-space:normal; }
#panel .body p { margin-bottom:1em; }
#panel .body h4 { font-family:'Roca',serif; font-weight:400; font-size:1.3rem; line-height:1.2; color:var(--text); margin:1.6em 0 .6em; }
#panel .body + figure, #panel .body figure { margin-top:4px; }
.figrow { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0 0 24px; }
.figrow figure { max-width:none; margin:0; }
.figrow figure img { max-height:190px; width:100%; object-fit:cover; }
#panel .body > figure { margin:6px auto 24px; }
.m-num { font-size:.78rem; color:var(--faint); min-width:56px; }
.f > span b { color:var(--text); font-weight:500; }
/* home page: everything in Roca */
#view-map, #view-map button, #legend button, #zoom button, #nav button, #owner .btn, #hover, #hover .hc-date, #hover .hc-ex, #hover .hc-read, #hover .tag, #notice, #topicbar .chip { font-family:'Roca',serif; font-weight:400; }
#nav button { text-transform:none; letter-spacing:0; font-size:.95rem; }
#legend button { font-size:.9rem; }
#hover .hc-ex { font-size:.92rem; line-height:1.38; }
#hover .hc-date { font-size:.78rem; }
/* insights: chart headings in Roca, the line under each in Martian Mono regular */
.chart h2 { font-family:'Roca',serif; font-weight:400; font-size:1.3rem; line-height:1.2; }
.chart > p { font-family:'Martian Mono',monospace; font-weight:400; font-size:.74rem; }
/* one caption, centred under images that sit side by side */
.figrow { margin-bottom:8px; }
#panel .body .rowcap { font-style:italic; font-size:.86rem; color:var(--dim); text-align:center; margin:0 auto 24px; max-width:44ch; }
figcaption { text-align:center; margin-left:auto; margin-right:auto; }
/* Martian Mono is always uppercase: bottom bar, top buttons, sub-lines, timestamps, small headings */
#nav button, #owner .btn { font-family:'Martian Mono',monospace; font-weight:400; text-transform:uppercase; letter-spacing:.02em; font-size:.74rem; }
.chart > p, .row small, #panel .meta, #panel h3, dialog h2 { text-transform:uppercase; letter-spacing:.02em; }

/* preview card excerpt in Work Sans */
#hover .hc-ex { font-family:'Work Sans',sans-serif; font-size:.86rem; line-height:1.45; }

/* home page legend: small Work Sans pills */
#legend { gap:6px; }
#legend button { font-family:'Work Sans',sans-serif; font-weight:500; font-size:.72rem; padding:4px 11px 4px 9px; gap:6px; border:1px solid rgba(238,228,206,.28); border-radius:99px; background:rgba(14,23,14,.92); color:var(--text); }
#legend button .dot { width:8px; height:8px; }
#legend button:hover,#legend button:focus-visible { border-color:rgba(238,228,206,.55); }

/* legend pills wear their string's colour */
#legend button { border:0; padding:4px 11px; }
#legend button:hover,#legend button:focus-visible { filter:brightness(1.12); background-clip:padding-box; }

/* legend: coloured circles; the name pops up above on hover (as on Strings of Thought) */
#legend { gap:14px; bottom:78px; flex-wrap:nowrap; }
#legend button { position:relative; display:flex; align-items:center; justify-content:center; width:22px; height:22px; padding:0; border:0; border-radius:50%; background:none !important; }
#legend button:hover,#legend button:focus-visible { background:none; filter:none; }
#legend .l-circle { width:12px; height:12px; border-radius:50%; transition:transform .18s,opacity .18s; }
#legend .l-badge { position:absolute; bottom:calc(100% + 7px); left:50%; transform:translateX(-50%) translateY(4px); padding:4px 12px; border-radius:99px;
  font-family:'Work Sans',sans-serif; font-weight:500; font-size:.76rem; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity .16s,transform .16s; }
#legend button:hover .l-badge,#legend button:focus-visible .l-badge { opacity:1; transform:translateX(-50%) translateY(0); }
#legend button:hover .l-circle,#legend button:focus-visible .l-circle { transform:scale(1.2); }
#legend:hover button { opacity:.75; } #legend:hover button:hover { opacity:1; }
@media (max-width:700px) { #legend { bottom:70px; } }