/* =====================================================================
   Evolution of Existence · stylesheet
   Dark by default, light when the visitor prefers it or flips the toggle.
   Change the palette in the token blocks below; everything else follows.
   ===================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg: #0b0d12;
  --bg-elev: #141720;
  --bg-code: #10131a;
  --text: #e8e9ef;
  --text-strong: #ffffff;
  --muted: #9aa1b3;
  --line: #242936;
  --accent: #8f7dff;
  --accent-2: #3fd9c3;
  --accent-3: #f2b65a;
  /* three stops, one per thread: mind, body, spirit */
  --accent-grad: linear-gradient(120deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  --link: #b3a7ff;
  --blob-opacity: 0.28;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --show-sun: inline;
  --show-moon: none;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;

  --wrap: 72rem;
  --measure: 68ch;
  --radius: 16px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f5f0;
  --bg-elev: #ffffff;
  --bg-code: #efede6;
  --text: #1c1e26;
  --text-strong: #0b0d12;
  --muted: #5f6577;
  --line: #e2dfd6;
  --link: #5b47e0;
  --blob-opacity: 0.22;
  --shadow: 0 10px 40px rgba(20, 20, 40, 0.08);
  --show-sun: none;
  --show-moon: inline;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f5f0;
    --bg-elev: #ffffff;
    --bg-code: #efede6;
    --text: #1c1e26;
    --text-strong: #0b0d12;
    --muted: #5f6577;
    --line: #e2dfd6;
    --link: #5b47e0;
    --blob-opacity: 0.22;
    --shadow: 0 10px 40px rgba(20, 20, 40, 0.08);
    --show-sun: none;
    --show-moon: inline;
    color-scheme: light;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: clamp(16px, 0.5vw + 14px, 18px);
  line-height: 1.65;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }

main { flex: 1; padding-block: 1.5rem 5rem; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--text-strong); }

img, svg, video { max-width: 100%; height: auto; }

::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.dot { margin-inline: 0.5em; color: var(--muted); }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--bg-elev); color: var(--text); padding: 0.5rem 1rem; border-radius: 8px; z-index: 20;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- drifting background ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden; pointer-events: none;
}
.bg::before, .bg::after {
  content: ""; position: absolute;
  width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: var(--blob-opacity);
}
.bg::before { background: var(--accent); top: -22vmax; left: -12vmax; animation: drift 42s ease-in-out infinite alternate; }
.bg::after { background: var(--accent-2); bottom: -28vmax; right: -16vmax; animation: drift 58s ease-in-out infinite alternate-reverse; }

@keyframes drift {
  to { transform: translate(9vmax, 7vmax) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .bg::before, .bg::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1.5rem; padding-block: 0.85rem; }

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.01em;
  color: var(--text-strong); text-decoration: none;
}
.brand .mark { width: 26px; height: 26px; flex: none; }

.nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; list-style: none; margin: 0 0 0 auto; padding: 0; justify-content: flex-end; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text-strong); }

.theme-toggle {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: none; border: 1px solid var(--line); color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--text-strong); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-sun { display: var(--show-sun); }
.icon-moon { display: var(--show-moon); }

@media (max-width: 640px) {
  .nav { flex-wrap: wrap; gap: 0.75rem 1rem; }
  .theme-toggle { margin-left: auto; }
  .nav-links { order: 3; width: 100%; margin-left: 0; gap: 1rem; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(3rem, 10vw, 7rem) 2rem; max-width: 48rem; }

.eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

.hero-title {
  margin: 0; max-width: 12ch;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.75rem, 8vw, 5.5rem); line-height: 0.98; letter-spacing: -0.025em;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.08em; /* keeps descenders inside the clipped box */
}

.lede {
  margin: 1.25rem 0 0;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 40rem;
}

.cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.25rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); background: color-mix(in srgb, var(--bg-elev) 60%, transparent);
  text-decoration: none; font-weight: 500;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--muted); color: var(--text-strong); }
.btn.primary { background: var(--accent-grad); color: #0b0d12; border-color: transparent; }
.btn.primary:hover { color: #0b0d12; filter: brightness(1.05); }

/* ---------- home layout ---------- */
.home-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
  gap: 3rem; margin-top: 3rem; align-items: start;
}
.home-side { display: grid; gap: 1.5rem; align-content: start; position: sticky; top: 5.5rem; }
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .home-side { position: static; order: -1; }
}

/* ---------- thoughts ---------- */
.thought { max-width: var(--measure); padding: 1.1rem 0; border-top: 1px solid var(--line); }
.thought:last-of-type { border-bottom: 1px solid var(--line); }
.thought .prose { font-size: 1.02rem; }
.thought footer { margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.75rem; }
.thought footer a { color: var(--muted); text-decoration: none; }
.thought footer a:hover { color: var(--text-strong); }
.thought:target { box-shadow: inset 3px 0 0 var(--accent); padding-left: 0.9rem; }
.lately .thought { padding: 0.75rem 0; }
.lately .thought:first-of-type { border-top: 0; padding-top: 0.25rem; }
.lately .thought:last-of-type { border-bottom: 0; }
.lately .thought .prose { font-size: 0.95rem; }
.thought-months { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 2rem 0 0; padding: 0; }
.thought-months .tag { font-size: 0.85rem; padding: 0.35rem 0.8rem; }
.thought-months .tag.current { color: var(--text-strong); border-color: var(--accent); }
.thought-months .count { color: var(--muted); margin-left: 0.5em; }
.swatch.thought { width: 7px; height: 7px; background: var(--muted); opacity: 0.8; }

.card {
  background: color-mix(in srgb, var(--bg-elev) 85%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow);
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem;
}
.section-head h2 {
  margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; letter-spacing: -0.01em;
  color: var(--text-strong);
}
.section-head a { color: var(--muted); text-decoration: none; font-size: 0.95rem; white-space: nowrap; }
.section-head a:hover { color: var(--text-strong); }

.now .section-head h2 { font-size: 1.35rem; }
.now .section-head { margin-bottom: 0.5rem; }

/* ---------- post list ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }

.post-item {
  display: grid; grid-template-columns: 10rem 1fr; gap: 0.25rem 1.5rem;
  padding: 1.4rem 0; border-top: 1px solid var(--line);
}
.post-item:last-child { border-bottom: 1px solid var(--line); }
.post-item time { color: var(--muted); font-family: var(--font-mono); font-size: 0.82rem; padding-top: 0.4rem; }
.post-item h3 {
  margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; line-height: 1.25; letter-spacing: -0.01em;
}
.post-item h3 a { color: var(--text-strong); text-decoration: none; }
.post-item h3 a:hover {
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.post-item .summary { margin: 0.4rem 0 0.6rem; color: var(--muted); }
.post-item .meta { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; font-size: 0.82rem; color: var(--muted); }

@media (max-width: 640px) {
  .post-item { grid-template-columns: 1fr; gap: 0.15rem; }
  .post-item time { padding-top: 0; }
}

.year {
  margin: 2.75rem 0 0.5rem;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.85rem; letter-spacing: 0.12em; color: var(--muted);
}

.tag {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.02em; text-decoration: none;
}
.tag:hover { color: var(--text-strong); border-color: var(--accent); }

.draft-badge {
  display: inline-block; vertical-align: middle; margin-left: 0.4rem; padding: 0.1rem 0.5rem; border-radius: 999px;
  background: var(--accent); color: #0b0d12; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; margin: 0.5rem 0 2rem; }
.tag-cloud .tag { font-size: 0.9rem; padding: 0.4rem 0.9rem; }
.tag-cloud .count { color: var(--muted); margin-left: 0.5em; }

/* ---------- articles ---------- */
.article-head { max-width: var(--measure); padding-block: 1.5rem 1.25rem; }
.article-head h1 {
  margin: 0.4rem 0 0.9rem;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--text-strong);
}
.article-head .meta {
  margin: 0; display: flex; flex-wrap: wrap; align-items: center;
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted);
}
.article-head .meta a { color: var(--muted); }
.article-head .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* the quiet line under a post title: time, place, weather, moon, media */
.context {
  display: flex; flex-wrap: wrap; gap: 0.25rem 0; list-style: none; margin: 1rem 0 0; padding: 0.6rem 0 0;
  border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); line-height: 1.6;
}
.context li + li::before { content: "·"; margin-inline: 0.6em; opacity: 0.6; }

.context-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.context-groups h3 { margin: 0 0 0.1rem; font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; color: var(--text-strong); }
.context-list { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.context-list li { padding: 0.45rem 0; border-top: 1px solid var(--line); }
.context-list .value { display: block; color: var(--text-strong); }
.context-list .where { display: block; font-size: 0.82rem; color: var(--muted); }
.context-list .where a { color: var(--muted); }
.context-list .where a:hover { color: var(--text-strong); }
@media (max-width: 760px) { .context-groups { grid-template-columns: 1fr; } }
.article-head .lede { margin: 0 0 0.75rem; font-size: 1.15rem; }

.prose { max-width: var(--measure); font-size: 1.04rem; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose.compact { font-size: 0.95rem; }

.prose h2, .prose h3, .prose h4 {
  margin: 2.2em 0 0.6em;
  font-family: var(--font-display); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; color: var(--text-strong);
}
.prose h2 { font-size: 1.75rem; }
.prose h3 { font-size: 1.35rem; }
.prose h4 { font-size: 1.1rem; }

.prose p, .prose ul, .prose ol, .prose .table-wrap { margin: 0 0 1.25em; }
.prose li { margin: 0.3em 0; }
.prose li > ul, .prose li > ol { margin: 0.3em 0 0; }
.prose li > p { margin-bottom: 0.5em; }
.prose ul.task-list { list-style: none; padding-left: 0.25em; }
.prose input[type="checkbox"] { margin: 0 0.5em 0 0; accent-color: var(--accent); vertical-align: -0.1em; }

.prose blockquote {
  margin: 1.5em 0; padding: 0.2em 0 0.2em 1.25em;
  border-left: 3px solid var(--accent); color: var(--muted); font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--bg-code); border: 1px solid var(--line); border-radius: 6px; padding: 0.1em 0.35em;
}
.prose pre {
  margin: 1.5em 0; padding: 1rem 1.25rem; overflow-x: auto; line-height: 1.55;
  background: var(--bg-code); border: 1px solid var(--line); border-radius: 12px;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: 0.9rem; }

.prose img { display: block; margin: 1.5em auto; border-radius: 12px; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 3em 0; }

.prose .table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 0.6em 0.8em; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--text-strong); font-weight: 600; }

.prose a.wikilink { text-decoration-style: dotted; }
.prose .wikilink.missing {
  color: var(--muted); border-bottom: 1px dashed var(--muted); cursor: help;
}

.prose details { margin: 1.25em 0; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 12px; }
.prose summary { cursor: pointer; font-weight: 500; color: var(--text-strong); }

.updated { max-width: var(--measure); margin-top: 2.5rem; }

/* ---------- prev / next ---------- */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  max-width: var(--measure); margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.post-nav a {
  display: block; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); text-decoration: none; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.3;
}
.post-nav a:hover { border-color: var(--accent); color: var(--text-strong); }
.post-nav .label {
  display: block; margin-bottom: 0.3rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.post-nav .next { text-align: right; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } }

/* ---------- journey timeline (pages with `layout: timeline`) ---------- */
.timeline .prose { position: relative; padding-left: 2rem; border-left: 2px solid var(--line); }
.timeline .prose h2 { position: relative; margin-top: 2.6rem; }
.timeline .prose h2:first-child { margin-top: 0.25rem; }
.timeline .prose h2::before {
  content: ""; position: absolute; left: calc(-2rem - 8px); top: 0.42em;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-grad); box-shadow: 0 0 0 4px var(--bg);
}

/* ---------- the three threads ---------- */
.section { margin-top: 3rem; }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }

.pillar-card {
  position: relative; display: flex; flex-direction: column; gap: 0.4rem;
  padding: 1.5rem 1.4rem 1.2rem; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
  color: var(--text); text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.pillar-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--pillar); }
.pillar-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pillar) 60%, var(--line)); color: var(--text); }
.pillar-card h3 {
  margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.01em; color: var(--text-strong);
}
.pillar-card p { margin: 0; flex: 1; color: var(--muted); font-size: 0.95rem; }
.pillar-card .count {
  margin-top: 0.6rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.pillar-card .count::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pillar); margin-right: 0.55em;
}
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }

.tag.pillar { color: var(--text); border-color: color-mix(in srgb, var(--pillar) 55%, var(--line)); }
.tag.pillar::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pillar); margin-right: 0.45em; vertical-align: 0.1em;
}
.tag.pillar:hover { border-color: var(--pillar); }

.pillar-switch {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0 0 0.75rem;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.pillar-switch a { color: var(--muted); text-decoration: none; }
.pillar-switch a::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pillar); margin-right: 0.5em; opacity: 0.55;
}
.pillar-switch a:hover, .pillar-switch a[aria-current] { color: var(--text-strong); }
.pillar-switch a[aria-current]::before { opacity: 1; }

.pillar-page .article-head h1::after {
  content: ""; display: block; width: 3rem; height: 3px; margin-top: 0.8rem; border-radius: 2px; background: var(--pillar);
}

/* ---------- the web: graph, connections, word cloud ---------- */
.btn.small { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.link-button {
  background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 0.9rem; cursor: pointer; text-decoration: underline;
}
.link-button:hover { color: var(--text-strong); }
.kind {
  display: inline-block; margin-left: 0.5em; padding: 0.05rem 0.45rem; border-radius: 999px; border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}

.graph-wrap {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elev) 55%, transparent);
}
.graph-wrap canvas { display: block; width: 100%; touch-action: none; }
.graph-controls { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; color: var(--muted); }
.graph-controls label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.graph-controls input { accent-color: var(--accent); }

.graph-legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; list-style: none; margin: 0.75rem 0 0; padding: 0;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.graph-legend li { display: inline-flex; align-items: center; gap: 0.5em; }

.swatch {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--pillar, var(--muted)); flex: none;
}
.swatch.post { background: var(--muted); }
.swatch.page { background: var(--bg-elev); border: 1.5px solid var(--muted); }
.swatch.tag { width: 8px; height: 8px; background: transparent; border: 1px dashed var(--muted); }

.connections { max-width: var(--measure); margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.connections .section-head h2 { font-size: 1.35rem; }
.connection-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.25rem; }
.connection-lists h3 {
  margin: 0 0 0.5rem; font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.connection-lists ul { list-style: none; margin: 0; padding: 0; }
.connection-lists li { padding: 0.35rem 0; border-top: 1px solid var(--line); }
.connection-lists a { text-decoration: none; color: var(--text-strong); }
.connection-lists a:hover { color: var(--link); }
@media (max-width: 640px) { .connection-lists { grid-template-columns: 1fr; } }

.explore .article-head { max-width: none; }
.word-filter {
  padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--text);
  font: inherit; font-size: 0.9rem; min-width: 12rem;
}
.word-filter:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.cloud {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0.3rem 1rem;
  margin: 1.5rem 0; padding: clamp(1rem, 3vw, 2rem); line-height: 1.1;
  border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--bg-elev) 55%, transparent);
}
.cloud-word {
  background: none; border: 0; padding: 0.1em 0.2em; margin: 0; cursor: pointer;
  font-family: var(--font-display); color: var(--text);
  font-size: calc(0.85rem + var(--weight, 0.5) * 1.9rem);
  opacity: calc(0.55 + var(--weight, 0.5) * 0.45);
  transition: opacity 0.15s ease, color 0.15s ease;
  border-radius: 6px;
}
.cloud-word:hover { opacity: 1; color: var(--text-strong); }
.cloud-word[aria-pressed="true"] {
  opacity: 1; color: var(--text-strong); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.12em;
}
.cloud.filtering .cloud-word:not(.match) { opacity: 0.12; }

.word-results { max-width: var(--measure); }
.word-results .section-head h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; color: var(--text-strong); }
.word-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.word-list li { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.word-list li a { text-decoration: none; color: var(--text-strong); flex: 1; }
.word-list li a:hover { color: var(--link); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.footer-inner p { margin: 0; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text-strong); }
