/* === Font faces === */
@font-face {
  font-family: "Velvelyne";
  src: url("../assets/fonts/Velvelyne-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Velvelyne";
  src: url("../assets/fonts/Velvelyne-Book.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Velvelyne";
  src: url("../assets/fonts/Velvelyne-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "FT88";
  src: url("../assets/fonts/FT88-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "FT88";
  src: url("../assets/fonts/FT88-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* === Global usage === */
:root {
  --font-body: "Velvelyne", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-title: "FT88", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body { font-family: var(--font-body); font-weight: 400; }

/* Overlay panel content = Velvelyne */
.panel .content {
  font-family: "Velvelyne", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;              /* Book */
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: lightsalmon;
}


/* Titles/headlines = FT88 Italic */
.panel header h3,
.panel .content :where(h1, h2, h3, h4, h5, h6) {
  font-family: "FT88", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-style: italic;            /* select FT88-Italic face */
  font-weight: 400;
  letter-spacing: .2px;
  margin: 0 0 8px;
}

/* Sizes & spacing for essay headings */
.panel .content h1 { font-size: 28px; margin-top: 4px; }
.panel .content h2 { font-size: 22px; margin-top: 14px; }
.panel .content h3 { font-size: 18px; margin-top: 12px; }

/* Paragraphs, lists, quotes */
.panel .content :where(p, li) { font-weight: 400; }
.panel .content p { margin: 0 0 12px; }
.panel .content ul, .panel .content ol { margin: 0 0 14px 20px; }
.panel .content blockquote {
  margin: 10px 0;
  padding: 8px 12px;
  border-left: 2px solid rgba(255,255,255,.18);
  color: #dfe4f4;
}

/* Links in essays */
.panel .content a {
  color: #a6d0ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Images & media inside essays */
.panel .content img, .panel .content video {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
}

html, body { height: 100%; margin: 0; overflow: hidden; background: #0b0f16; }
#bg { position: fixed; inset: 0; z-index: 0; }
#app { position: relative; z-index: 1; }
canvas { display:block; }

/* Small, soft peephole */
#veil {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;

  /* Subtle fog tint over everything */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: saturate(0.8);

  --x: 50%;
  --y: 50%;
  --r: 100px;

  /* Radial gradient overlay that saturates around cursor */
  background-image: radial-gradient(
    circle var(--r) at var(--x) var(--y),
    rgba(255,255,255,0.15) 0%,
    rgba(255,255,255,0.05) 40%,
    rgba(255,255,255,0.0) 80%
  );

  /* Additional localized filter at the center */
  filter: saturate(1.3) contrast(1.05);

  transition: backdrop-filter .25s ease, background .25s ease;
}

.tests {
  position: fixed; right:12px; bottom:12px; z-index:5; pointer-events:none;
  backdrop-filter: blur(6px);
  background: rgba(10,12,20,.35);
  border:1px solid rgba(255,255,255,.08);
  color:#e7e9ee; padding:8px 10px; border-radius:999px; font:12px ui-sans-serif;
}
.errorBox {
  position: fixed; top:12px; left:12px; z-index: 10; max-width: 560px;
  font: 12px/1.45 ui-sans-serif, system-ui; color:#ffdddd; background: rgba(60,0,0,.6);
  border:1px solid rgba(255,120,120,.5); padding:10px 12px; border-radius:10px;
  white-space:pre-wrap;
}

/* Overlay (modal) */
.overlay {
  position: fixed; inset: 0; z-index: 6; display:none; place-items:center;
  backdrop-filter: blur(5px); background: rgba(6,10,16,.0);
  opacity: 0; transition: background .35s ease, opacity .35s ease;
}
.overlay.is-open { background: rgba(38, 66, 108, 0.35); opacity: 1; }
.panel {
  width:min(860px, calc(100vw - 32px)); max-height: min(72vh, 760px); overflow:auto; overscroll-behavior: contain;
  background: rgba(49, 61, 97, 0.564); color:#e8ebf4; border:1px solid rgba(255,255,255,.08);
  border-radius: 16px; box-shadow: 0 30px 120px rgba(0,0,0,.5);
  transform: translateY(8px) scale(.98); opacity: 0;
  transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .35s ease;
}
.panel.in { transform: translateY(0) scale(1); opacity: 1; }
.panel header {
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  gap:8px; 
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.08); 
  position:sticky; top:0; 
  background: rgba(23, 255, 6, 0.75);
}
.panel header h3 { 
  margin:0; 
  font-family: "FT88", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-style: italic;            /* select FT88-Italic face */
  font-weight: 400;
  letter-spacing: .2px;
  margin: 0 0 8px;
  color: #bd00fc;
}
.panel .content { padding: 16px; display:grid; gap:18px; }
.close {
  font-family: "Velvelyne", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-weight: 400;  /* Book */
  letter-spacing: .2px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #bd00fc;
  transition: background .25s ease, color .25s ease, border .25s ease;
}
.close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255,255,255,0.25);
  color: #ffffff;
}

.thumb { width:100%; border-radius:12px; overflow:hidden; aspect-ratio: 16 / 9; background:#0b0d14;
  display:grid; place-items:center; border:1px solid rgba(255,255,255,.08); }
.audio { width:100%; }

/* Hotspot tooltip */
.tooltip {
  position: fixed;
  z-index: 5;               /* above veil (z:2), below overlay (z:6) */
  pointer-events: none;
  max-width: min(60ch, 60vw);
  padding: 6px 9px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(23, 255, 6, 0.75);
  backdrop-filter: blur(6px);
  color: #bd00fc;

  /* fonts */
  font-family: "FT88", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-style: italic;       /* FT88 italic */
  font-weight: 400;
  font-size: 14px;
  line-height: 1.35;

  transform: translate(-50%, -120%); /* center and lift above cursor */
  opacity: 0;
  transition: opacity .12s ease;
  will-change: transform, opacity;
}
.tooltip.show { opacity: 1; }

/* Long texts (essays, stories): white, readable measure */
.panel .content .essay-body {
  color: #ffffff;
  max-width: 68ch;
  margin: 0 auto;
}
.panel .content .essay-body :where(h1, h2, h3, h4) { color: #ffffff; }
.panel.is-essay { background: rgba(28, 34, 66, 0.82); }   /* a bit darker so white text holds up over bright clouds */

/* The backdrop is now clickable to close */
.overlay.is-open { cursor: zoom-out; }
.overlay .panel { cursor: auto; }

/* ==========================================================
   Reader design (v2): legible long-form texts
   ========================================================== */
.panel {
  --accent: #00aeef;
  position: relative;
  background: rgba(16, 18, 44, 0.9);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid rgba(255,255,255,.10);
}
.panel header {
  background: rgba(16, 18, 44, 0.96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 18px 22px 16px;
  align-items: flex-start;
  z-index: 2;
}
.panel-heading { display: grid; gap: 6px; min-width: 0; }
.kicker {
  font-family: var(--font-body);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.kicker:empty { display: none; }
.panel header h3 {
  margin: 0;
  color: #7dff6a;                 /* the site's neon green, readable on dark */
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.15;
}
.close {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  font-size: 22px; line-height: 1; cursor: pointer;
  color: #ffffff; background: rgba(255,255,255,.08);
}
.close:hover { background: var(--accent); color: #10122c; border-color: transparent; }
.progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .08s linear;
}

/* Long texts open taller, as a reader */
.panel.is-essay { max-height: min(86vh, 980px); width: min(820px, calc(100vw - 32px)); }
.panel.is-essay .content { padding: 28px 22px 48px; }

.panel .content .essay-body {
  max-width: 62ch;
  margin: 0 auto;
  color: #f4f2ff;
  font-size: clamp(17px, 1.25vw, 19.5px);
  line-height: 1.75;
  letter-spacing: .005em;
  font-weight: 400;
  hyphens: auto;
  text-wrap: pretty;
}
.panel .content .essay-body p { margin: 0 0 1.15em; }
.panel .content .essay-body p:first-child { font-size: 1.12em; line-height: 1.65; }
.panel .content .essay-body i,
.panel .content .essay-body em { color: #ffffff; }

/* Poems and verse: set apart with the accent rule */
.panel .content .essay-body p.verse {
  margin: 1.6em 0;
  padding: .2em 0 .2em 1.4em;
  border-left: 2px solid var(--accent);
  line-height: 1.85;
  font-style: italic;
}
.panel .content .essay-body p.source {
  font-size: .85em; opacity: .7; font-style: normal;
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 1em; margin-top: 2em;
}
.panel .content .essay-body a { color: #a6d0ff; }
.panel .content .essay-body img { display: block; margin: 1em auto; }

/* Reading list */
.reading-list { list-style: none; margin: 0; padding: 0; }
.reading-list li {
  padding: 1em 0;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.reading-list .author { font-weight: 700; }
.reading-list .meta { display: block; font-size: .85em; opacity: .7; }
.reading-list .tag {
  display: inline-block; margin-top: .4em; font-size: .75em;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.essay-body h2.section { font-size: .8em !important; letter-spacing: .14em; text-transform: uppercase; color: var(--accent) !important; font-style: normal !important; margin-top: 2em !important; }

/* Legend */
.legend {
  position: fixed; left: 16px; bottom: 16px; z-index: 5;
  display: grid; gap: 2px; padding: 10px 8px;
  background: rgba(16,18,44,.55); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.10); border-radius: 14px;
}
.legend button {
  all: unset; cursor: default; display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; border-radius: 8px;
  font-family: var(--font-body); font-size: 13px; color: #f4f2ff;
}
.legend button:hover, .legend button:focus-visible { background: rgba(255,255,255,.10); }
.legend-star { font-family: var(--font-title); font-size: 18px; line-height: 1; width: 14px; text-align: center; }
.legend-n { margin-left: auto; padding-left: 10px; opacity: .55; font-size: 12px; }

/* Dev status pill: hidden in the public version */
.tests { display: none; }

@media (max-width: 640px) {
  .legend { left: 8px; bottom: 8px; padding: 6px 4px; }
  .legend button { font-size: 12px; }
  .panel.is-essay .content { padding: 20px 16px 36px; }
}

/* Spellbreak manual elements */
.essay-body .toc { margin: 1.5em 0 2.5em; padding: 1em 1.2em; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; font-size: .9em; }
.essay-body .toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 2em; }
.essay-body .toc a { color: #f4f2ff; text-decoration: none; }
.essay-body .toc a:hover { color: var(--accent); }
.panel .content .essay-body h2 { font-size: 1.45em; margin: 2.2em 0 .7em; color: #7dff6a; scroll-margin-top: 110px; }
.panel .content .essay-body h3 { font-size: 1em; margin: 1.6em 0 .5em; color: var(--accent); font-style: normal; letter-spacing: .06em; text-transform: uppercase; }
.essay-body blockquote { margin: 1.6em 0; padding: .6em 0 .6em 1.2em; border-left: 2px solid var(--accent); color: #f4f2ff; font-style: italic; }
.essay-body blockquote cite { display: block; margin-top: .6em; font-size: .8em; font-style: normal; opacity: .7; }
.essay-body .incantation { margin: 1.4em 0; padding: 1.4em 1.6em; border-radius: 14px; background: rgba(238, 42, 123, .12); border: 1px solid rgba(238, 42, 123, .35); }
.essay-body .incantation p { font-family: var(--font-title); font-style: italic; font-size: 1.02em; margin: 0 0 .8em; }
.essay-body .incantation p:last-child { margin: 0; }
.essay-body ul, .essay-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.essay-body li { margin: 0 0 .55em; }
.essay-body li::marker { color: var(--accent); }
.essay-body ol.questions li { padding-left: .3em; }
.essay-body ul.portals { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.essay-body ul.portals li { margin: 0; padding: .7em .9em; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); font-size: .9em; line-height: 1.45; }
.essay-body dl.schedule { display: grid; grid-template-columns: 4.5em 1fr; gap: .35em 1em; margin: 0 0 1.4em; }
.essay-body dl.schedule dt { color: var(--accent); font-variant-numeric: tabular-nums; }
.essay-body dl.schedule dd { margin: 0; }
.essay-body ul.resources { font-size: .92em; }
.essay-body .aside { font-size: .9em; opacity: .8; }
.essay-body figure { margin: 2em 0; }
.essay-body figure img { width: 100%; max-width: 520px; display: block; margin: 0 auto; border-radius: 10px; }
.essay-body figcaption { text-align: center; font-size: .82em; opacity: .7; margin-top: .6em; }
@media (max-width: 640px) { .essay-body .toc ol { columns: 1; } }

/* Header fully opaque so scrolled text never shows through */
.panel header { background: #10122c; isolation: isolate; }
.panel .content .essay-body { hyphens: manual; }
.essay-body .incantation p { font-family: var(--font-body); font-style: italic; font-size: 1.12em; line-height: 1.6; letter-spacing: 0; }
.essay-body .incantation p:nth-child(-n+3) { font-family: var(--font-title); font-size: 1.05em; color: #ffd6ea; }
.essay-body ul.reading-list { padding-left: 0; }

/* ==========================================================
   Brighter palette (v2): remove the haze that muted the scene
   ========================================================== */
#veil {
  background-color: transparent;
  backdrop-filter: saturate(1.25) contrast(1.04);
  -webkit-backdrop-filter: saturate(1.25) contrast(1.04);
  filter: none;
}
.overlay.is-open { background: rgba(40, 0, 120, 0.28); }
.panel { background: rgba(18, 10, 52, 0.9); border-color: rgba(255,255,255,.14); }
.panel header { background: #120a34; }
.panel header h3 { color: #8dff3a; }
.tooltip { background: #8dff3a; color: #5a00c8; border-color: transparent; }

/* ==========================================================
   Interactive project map
   ========================================================== */
.panel.is-map { width: min(1080px, calc(100vw - 32px)); }
.panel.is-map .content .essay-body { max-width: none; }
.panel.is-map .content .essay-body > p:first-child { max-width: 62ch; margin: 0 auto 1em; font-size: 1em; }
.project-map { margin: 0 auto; max-width: 980px; }
.pm-svg { width: 100%; height: auto; display: block; overflow: visible; }
.pm-node { cursor: default; transform-box: view-box; animation: pm-float 6s ease-in-out infinite; animation-delay: calc(var(--d) * -1); transition: opacity .25s ease; }
.pm-node.pm-linked { cursor: pointer; }
.pm-fill { fill-opacity: .82; transition: fill-opacity .2s ease; }
.pm-ring { stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .9; }
.pm-label { fill: #ffffff; text-anchor: middle; font-family: var(--font-title); pointer-events: none; }
.pm-node:hover .pm-fill, .pm-node:focus .pm-fill { fill-opacity: 1; }
.pm-node:focus { outline: none; }
.pm-svg.pm-focus .pm-node { opacity: .18; }
.pm-svg.pm-focus .pm-node.pm-lit { opacity: 1; }
.pm-caption { text-align: center; min-height: 1.6em; margin: .8em auto 0 !important; font-size: .9em; color: #f4f2ff; opacity: .85; }
.pm-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: .6em; font-size: .8em; opacity: .85; }
.pm-key i { display: inline-block; width: .75em; height: .75em; border-radius: 50%; margin-right: .45em; vertical-align: -.05em; }
@keyframes pm-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(0, -2.5px); } }
@media (prefers-reduced-motion: reduce) { .pm-node { animation: none; } }
.panel.is-map .content .essay-body { width: 100%; }
#veil { backdrop-filter: saturate(1.12) contrast(1.05); -webkit-backdrop-filter: saturate(1.12) contrast(1.05); }
.panel.is-map .project-map { max-width: min(980px, calc((86vh - 300px) * 1.4)); }

/* Link cards (v3) */
.link-card { display: grid; gap: 18px; max-width: 62ch; margin: 0 auto; padding: 6px 0 4px; }
.link-thumb { width: 100%; border-radius: 12px; }
.panel .content .link-excerpt { margin: 0; color: #f4f2ff; font-size: 18px; line-height: 1.65; }
.link-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.link-host { font-size: 13px; letter-spacing: .06em; color: var(--accent); }
.link-visit { display: inline-block; padding: 9px 16px; border-radius: 999px; background: var(--accent); color: #120a34 !important; font-weight: 700; font-size: 14px; text-decoration: none !important; transition: transform .15s ease, filter .15s ease; }
.link-visit:hover { transform: translateY(-1px); filter: brightness(1.1); }
.panel .content { color: #f4f2ff; }

/* ==========================================================
   v4: early-web windows (A frame + C hypertext page + lime shadow)
   ========================================================== */
:root { --ink: #14102a; --ink-accent: #3a00d6; --ink-pink: #c4007a; --chrome: #c9c9d6; --hi: #ffffff; --lo: #4a4a5a; }
.panel, .panel.is-essay, .panel.is-map {
  background: var(--chrome);
  border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi);
  border-radius: 0;
  box-shadow: 8px 8px 0 #b6ff00;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  color: var(--ink);
}
/* title bar + location row */
.panel header {
  display: grid; grid-template-columns: 1fr auto; gap: 0;
  padding: 0; background: var(--chrome); border-bottom: 1px solid #8a8a9a;
  align-items: stretch;
}
.panel header::before { content: ''; grid-area: 1 / 1 / 2 / 3; background: linear-gradient(90deg, #3a00d6, #ff3fb4); }
.panel-heading { display: contents; }
.panel header h3 {
  grid-area: 1 / 1; position: relative; z-index: 1;
  margin: 0; padding: 8px 12px; color: #ffffff;
  font-size: clamp(16px, 1.6vw, 20px); line-height: 1.25;
}
.close {
  grid-area: 1 / 2; position: relative; z-index: 1; align-self: center;
  width: 26px; height: 24px; margin: 6px 8px; border-radius: 0; padding: 0;
  background: var(--chrome); color: #000; font: 16px/1 "FT88", monospace;
  border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi);
}
.close:hover { background: #dcdce6; color: #000; }
.close:active { border-color: var(--lo) var(--hi) var(--hi) var(--lo); }
.kicker {
  grid-area: 2 / 1 / 3 / 3; display: flex !important; align-items: center; gap: 8px;
  padding: 6px 10px; color: #222; font-family: var(--font-title); font-size: 12px;
  letter-spacing: .04em; text-transform: none;
}
.kicker::before { content: 'Location:'; }
.kicker:empty::before { content: none; }
.progress { background: #3a00d6; height: 3px; }

/* the inset page */
.panel .content, .panel.is-essay .content {
  margin: 8px; padding: 22px 24px 32px;
  background: #fffef6; color: var(--ink);
  border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo);
}
.panel .content .essay-body {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6; letter-spacing: 0;
}
.panel .content .essay-body i, .panel .content .essay-body em { color: var(--ink); }
.panel .content .essay-body a, .panel .content a { color: #0000ee; text-decoration: underline; }
.panel .content .essay-body a:visited { color: #551a8b; }
.panel .content .essay-body h2 { color: var(--ink-accent); font-size: 1.35em; }
.panel .content .essay-body h3 { color: var(--ink-pink); }
.essay-body h2.section { color: var(--ink-pink) !important; }
.panel .content .essay-body p.verse { border-left-color: var(--ink-accent); }
.panel .content .essay-body p.source { border-top-color: #ccc; opacity: .8; }
.essay-body blockquote { color: var(--ink); border-left-color: var(--ink-pink); }
.essay-body li::marker { color: var(--ink-accent); }
.essay-body .toc { border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); background: #fff; border-radius: 0; font-family: Georgia, serif; }
.essay-body .toc a { color: #0000ee; text-decoration: underline; }
.essay-body .incantation { background: #f2ffd6; border: 2px dashed var(--ink-accent); border-radius: 0; }
.essay-body .incantation p:nth-child(-n+3) { color: var(--ink-accent); }
.essay-body ul.portals li { background: var(--chrome); color: var(--ink); border-radius: 0; border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); font-family: var(--font-body); }
.essay-body dl.schedule dt { color: var(--ink-pink); font-family: var(--font-title); }
.essay-body figure img { border-radius: 0; border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); }
.reading-list li { border-bottom-color: #ddd; }
.reading-list .tag { color: var(--ink-pink); font-family: var(--font-title); }
.panel .content .essay-body > p:first-child { font-size: 1.08em; }

/* link cards as classic buttons */
.panel .content .link-excerpt { color: var(--ink); font-family: Georgia, serif; font-size: 18px; line-height: 1.6; }
.link-meta { border-top: 2px groove #ddd; }
.link-host { color: var(--ink-pink); font-family: var(--font-title); }
.link-visit {
  border-radius: 0; background: var(--chrome); color: #000 !important; font-family: var(--font-title); font-weight: 400;
  border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi);
}
.link-visit:hover { transform: none; filter: none; background: #dcdce6; }
.link-visit:active { border-color: var(--lo) var(--hi) var(--hi) var(--lo); }

/* project map on the light page */
.pm-caption { color: var(--ink) !important; font-family: Georgia, serif; }
.pm-key { color: var(--ink); opacity: 1; }
.panel.is-map .content .essay-body > p:first-child { color: var(--ink); }

/* media embeds */
.panel .content .thumb { background: #000; border-radius: 0; }

/* Paged reader (Spellbreak) */
.pager-index { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 1.6em; padding: 0 0 1em; border-bottom: 2px groove #ddd; font-family: var(--font-title); font-size: 13px; }
.pager-link { all: unset; cursor: pointer; color: #0000ee; text-decoration: underline; }
.pager-link.is-current { color: var(--ink); text-decoration: none; background: #b6ff00; padding: 0 4px; }
.pager-link:focus-visible { outline: 2px dotted var(--ink-accent); }
.pager-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2.4em; padding-top: 1em; border-top: 2px groove #ddd; flex-wrap: wrap; }
.pager-count { font-family: var(--font-title); font-size: 12px; color: var(--ink-pink); }
.pager-btn {
  font-family: var(--font-title); font-size: 13px; color: #000; cursor: pointer;
  padding: 7px 12px; background: var(--chrome);
  border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi);
}
.pager-btn:hover:not(:disabled) { background: #dcdce6; }
.pager-btn:active:not(:disabled) { border-color: var(--lo) var(--hi) var(--hi) var(--lo); }
.pager-btn:disabled { color: #8a8a9a; cursor: default; }
.sb-page > h2:first-child, .sb-page > p:first-child + h2 { margin-top: .4em; }
.panel .content .essay-body, .panel .content .essay-body p { text-wrap: wrap; }
