/* Unicode theme: one shared header, a configurable home page, and posts
   with the reader sidebar. Loads after the Commons stylesheet. */

body.u {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.u a { color: var(--link); text-decoration: none; }
.u a:hover { text-decoration: none; }
.u .m { color: var(--h1-mark); font-weight: 400; }
.u .dim { color: var(--fg-dim); font-weight: 400; }

/* ── Header: on every page, pinned while scrolling ── */
.hd {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  max-width: var(--page-width);
  width: 100%;
  margin: 0 auto;
  padding: 16px 28px 0;
  box-sizing: border-box;
}
.sticky-off .hd { position: static; }
.hd-row { display: flex; justify-content: space-between; align-items: center; gap: 10px 32px; }
.hd-title { font-size: 26px; font-weight: 600; color: var(--fg-strong) !important; white-space: nowrap; }
.hd-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; font-size: 15px; }
.hd-nav a, .hd-mnav a { color: var(--wikilink); padding: 2px 4px; border-radius: 3px; }
.hd-nav a .b, .hd-mnav a .b { color: var(--wikilink-bracket); }
/* Menu hover: the wikilink brackets open a little; the word stays green. */
.hd-nav a .b, .hd-mnav a .b { display: inline-block; transition: transform .2s ease, color .2s; }
.hd-nav a, .hd-mnav a { transition: color .2s; }
.hd-nav a:hover .b, .hd-mnav a:hover .b { color: var(--wikilink); }
.hd-nav a:hover .b:first-child, .hd-mnav a:hover .b:first-child { transform: translateX(-4px); }
.hd-nav a:hover .b:last-child, .hd-mnav a:hover .b:last-child { transform: translateX(4px); }

/* Title hover: the # cycles through the seven chakra colors for as long as
   the pointer stays on it, looping from violet back to red. */
@keyframes chakra-sweep {
  0% { color: #ef4444; } 14% { color: #f97316; } 28% { color: #facc15; } 43% { color: #4ade80; }
  57% { color: #60a5fa; } 71% { color: #818cf8; } 86% { color: #a78bfa; } 100% { color: #ef4444; }
}
.hd-title .m { display: inline-block; }
.hd-title:hover .m { animation: chakra-sweep 2.8s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .hd-nav a .b, .hd-mnav a .b { transition: none; }
  .hd-nav a:hover .b, .hd-mnav a:hover .b { transform: none; }
  .hd-title:hover .m { animation: none; color: var(--accent); }
}
.u .hd-sub { background: var(--accent); color: var(--bg); padding: 3px 10px; margin-left: 6px; }
.u .hd-sub:hover { background: var(--fg-strong); color: var(--bg); }
.hd-rule { margin-top: 14px; border-top: 1px solid var(--border); }
.hd-mnav { display: none; position: relative; }
.hd-mnav summary { cursor: pointer; list-style: none; color: var(--wikilink); font-size: 15px; }
.hd-mnav summary::-webkit-details-marker { display: none; }
.hd-mnav nav {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  display: flex; flex-direction: column; gap: 6px; min-width: 200px;
  background: var(--bg-secondary); border: 1px solid var(--border); padding: 12px 14px;
}
.u .hd-mnav .hd-sub { margin: 0 0 4px; align-self: flex-start; }

/* ── Home profile strip (home page only) ── */
.hd-strip {
  max-width: var(--page-width); margin: 0 auto; padding: 10px 28px 0; box-sizing: border-box;
  display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline;
  font-size: 13px; color: var(--fg-dim); white-space: nowrap;
}
.hd-strip .desc { color: var(--fg-muted); font-style: italic; margin-right: 6px; }
.hd-strip .desc::before { content: "> "; color: var(--mark); font-style: normal; }
.hd-strip .s-tagline { color: var(--task); }
.hd-strip a { color: var(--link); }
.hd-strip a:hover { color: var(--fg-strong); }

/* ── Page frame ── */
.u-main { flex: 1; width: 100%; margin: 0 auto; box-sizing: border-box; }
.u-main.narrow { max-width: calc(var(--content-width) + 56px); padding: 34px 28px 60px; }
.u-main.wide { max-width: var(--page-width); padding: 0 0 60px; }
.u .page-heading { font-size: 28px; color: var(--fg-strong); }
.u .page-heading::before { content: "# "; color: var(--h1-mark); }

.h2 { color: var(--h2); font-weight: 600; margin: 0 0 14px; }
.h2 .m { color: var(--h2-mark); }
.more { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--wikilink) !important; }
.more:hover { color: var(--fg-strong) !important; }

/* ── Hero and /now ── */
.home-top { padding: 24px 28px 40px; display: flex; flex-wrap: wrap; gap: 36px; align-items: stretch; }
.hero { flex: 1 1 560px; min-width: 0; box-sizing: border-box; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-secondary); color: inherit; transition: border-color .2s, transform .2s, box-shadow .2s; }
a.hero:hover, .hero-aph:hover { border-color: var(--h1-mark); }
.hero-aph { padding: 30px 34px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.hero-label { font-size: 12px; color: var(--fg-dim); }
.hero-aph blockquote { margin: 0; font-size: 26px; line-height: 1.45; color: var(--fg-strong); }
.hero-aph blockquote p { margin: 0; }
.hero-meta { font-size: 13px; color: var(--fg-dim) !important; }
.hero-card { display: flex; flex-direction: column; overflow: hidden; }
.hero-card .ph img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.hero-card .t { font-size: 26px; }
.now { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; }
.now-body { font-size: 15px; }
.u .now-body ul { padding-left: 0; list-style: none; margin: 0; }
.u .now-body li { padding: 1px 6px; margin-left: -6px; border-radius: 3px; }
.u .now-body li:hover { background: var(--bg-hover); }
.now .more { margin-top: auto; padding-top: 12px; }

/* ── Pinned and columns ── */
.home-sec { padding: 0 28px 44px; }
.pins { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.home-cols { display: flex; gap: 40px; align-items: flex-start; }
.cols { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.col.span-2 { grid-column: span 2; }
.cols.n-1 { grid-template-columns: minmax(0, 1fr); }
.cols.n-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols.n-1 .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
/* A row right under the profile strip, or first on the page, gets the same
   breathing room the hero has. */
.hd-strip + .home-sec, .u-main > .home-sec:first-child { padding-top: 24px; }
.col-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.filters { display: flex; gap: 12px; font-weight: 400; font-size: 13px; }
.filters a { color: var(--fg-dim) !important; }
.filters a:hover { color: var(--fg-strong) !important; }
.grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.span-2 .grid { display: block; columns: 2 260px; column-gap: 20px; }
.span-2 .grid .card { break-inside: avoid; margin-bottom: 20px; }

/* Cards */
.card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-secondary); overflow: hidden; color: inherit !important; transition: border-color .2s, transform .25s, box-shadow .25s; }
.card .ph { position: relative; overflow: hidden; background: var(--bg); }
.card .ph img { width: 100%; height: auto; max-height: 260px; object-fit: cover; display: block; transition: transform .4s; }
.card .ph-text { padding: 22px 20px 6px; background: none; }
.card .q { font-size: 18px; line-height: 1.5; color: var(--fg-strong); }
.card .q p { margin: 0; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--bg); border: 1px solid var(--accent); color: var(--fg-strong); padding: 5px 12px; font-size: 13px; }
.cb { padding: 14px 16px 16px; }
.k { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.form-essay .kind, .form-lesson .kind { color: var(--k-essay); }
.form-aphorism .kind { color: var(--k-aphorism); }
.form-post .kind { color: var(--k-post); }
.form-poem .kind { color: var(--k-poem); }
.form-video .kind { color: var(--k-video); }
.form-photo .kind { color: var(--k-photo); }
.form-project .kind { color: var(--k-project); }
/* Kind marks: a line icon (or typed mark) in its kind's color. */
.km { display: inline-flex; vertical-align: -0.12em; }
.km-i { width: 1.05em; height: 1.05em; }
.k-essay, .k-lesson { color: var(--k-essay); }
.k-aphorism { color: var(--k-aphorism); }
.k-post { color: var(--k-post); }
.k-poem { color: var(--k-poem); }
.k-video { color: var(--k-video); }
.k-photo { color: var(--k-photo); }
.k-project { color: var(--k-project); }
.kind-marks-one .km, .kind-marks-one .kind { color: var(--task); }
.kind { display: inline-flex; align-items: center; gap: 5px; }
.hero-label { display: flex; align-items: center; gap: 6px; }
.t { font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--fg-strong); margin-bottom: 6px; }
.x { font-size: 13px; line-height: 1.6; color: var(--fg-muted); }
.cb .d { display: block; margin-top: 8px; font-size: 12px; color: var(--fg-dim) !important; }

/* Lists */
.entry { display: block; padding: 14px 0; border-top: 1px solid var(--border-soft); color: inherit !important; }
.ed { font-size: 12px; color: var(--fg-dim) !important; }
.et { font-size: 16px; font-weight: 600; color: var(--fg-strong); transition: color .15s; }
a.entry:hover .et { color: var(--wikilink); }
.ex { font-size: 13px; line-height: 1.6; color: var(--fg-muted); margin-top: 4px; }
.entry-text { font-size: 15px; line-height: 1.6; color: var(--fg); }
.entry-text p { display: inline; margin: 0; }
.q-mark { color: var(--task); margin-right: 8px; }
.short .ed { display: inline-block; margin-top: 6px; }

/* Growth marks */
.stage-seedling { color: #fb923c; }
.stage-growing { color: var(--task); }
.stage-evergreen { color: var(--wikilink); }
.marks-off .stage { display: none; }

/* Short text in lists and cards never takes the post drop cap. */
.entry-text .drop-cap, .card .q .drop-cap, .hero-aph .drop-cap, .now-body .drop-cap { float: none; font-size: inherit; line-height: inherit; padding: 0; margin: 0; color: inherit; font-weight: inherit; }

/* Hover: lift, slight tilt, accent shadow, image zoom. */
a.card:hover, .card:hover { transform: translateY(-4px) rotate(-.3deg); border-color: var(--h1-mark); box-shadow: 0 9px 18px -10px var(--shadow), 0 2px 6px rgba(0, 0, 0, .35); }
.card:hover .ph img { transform: scale(1.05); }
.hover-off .card:hover, .hover-off a.hero:hover { transform: none; box-shadow: none; }
.hover-off .card:hover .ph img { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .card, .card .ph img, .hero { transition: none; }
  .card:hover, a.hero:hover { transform: none !important; }
  .card:hover .ph img { transform: none !important; }
}
.corners-round { --radius: 10px; }
.corners-square { --radius: 0px; }

/* ── Sidebar: a column on wide screens, a slide-out panel elsewhere ── */
.side { font-size: 13px; line-height: 1.7; }
.side h3 { font-size: 13px; font-weight: 600; color: var(--accent); margin: 0 0 8px; }
.side h3 .m { color: var(--h1-mark); }
.side-sec { margin-bottom: 24px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side ul.inline { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.side li a { color: var(--fg); }
.side li a:hover { color: var(--wikilink); }
.side .entry { padding: 10px 0; }
.side .entry-text { font-size: 14px; }
.side-open, .side-close { font: inherit; font-size: 13px; cursor: pointer; border: 0; }
.side-close { display: none; background: none; color: var(--accent); margin: 0 0 16px auto; padding: 0; }

@media (min-width: 1100px) {
  .side[popover] {
    display: block; position: static; inset: auto; width: 270px; flex: 0 0 270px; height: auto; max-height: none;
    margin: 0; padding: 0 0 0 22px; border: 0; border-left: 1px solid var(--border); background: none; color: inherit; overflow: visible;
  }
  .side-open { display: none; }
}
@media (max-width: 1099.98px) {
  .side-open {
    position: fixed; right: 0; top: 45%; z-index: 15; writing-mode: vertical-rl;
    background: var(--accent); color: var(--bg); font-weight: 600; padding: 12px 6px; border-radius: 6px 0 0 6px;
  }
}
/* An open drawer stays a drawer at every width: widening the window doesn't
   close a popover, and the wide column styles would leave it see-through. */
.side:popover-open {
  position: fixed; inset: var(--hd-h) 0 0 auto; margin: 0; width: min(320px, 88vw); height: auto; max-height: none; box-sizing: border-box;
  padding: 20px 22px; background: var(--bg-secondary); color: var(--fg); border: 0; border-left: 1px solid var(--h1-mark);
  overflow-y: auto; overscroll-behavior: contain;
}
.side:popover-open .side-close { display: block; }
/* The drawer opens below the header, which stays visible and undimmed. */
.side::backdrop { inset: var(--hd-h, 75px) 0 0 0; background: rgba(0, 0, 0, .55); }
:root { --hd-h: 75px; }

/* Phones: the page behind an open drawer stays still. */
@media (max-width: 699.98px) {
  html:has(.side:popover-open) { overflow: hidden; }
}
/* Tablets: the text rewraps beside the open drawer instead of being covered,
   and keeps scrolling. */
@media (min-width: 700px) and (max-width: 1099.98px) {
  .u-article:has(.side.reader:popover-open) { padding-right: calc(min(320px, 88vw) + 28px); }
  .side.reader::backdrop { background: transparent; }
}

/* ── Posts and pages ── */
/* Posts sit centered at every width: beside the sidebar on wide screens,
   alone in the middle where the sidebar is a drawer. */
.u-article { display: flex; justify-content: center; gap: 48px; align-items: flex-start; padding: 34px 28px 0; max-width: var(--page-width); margin: 0 auto; box-sizing: border-box; }
.u-article .article { flex: 0 1 var(--content-width); max-width: var(--content-width); min-width: 0; }
.u-article .side.reader[popover] { width: 300px; flex-basis: 300px; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
.u-article .side.reader:popover-open { position: fixed; top: var(--hd-h); width: min(320px, 88vw); max-height: none; }
.path { font-size: 13px; color: var(--fg-dim); margin-bottom: 10px; }
.path a { color: var(--fg-muted); }
.path a:hover { color: var(--accent); }
.u .article-title { font-size: 34px; line-height: 1.2; color: var(--fg-strong); margin: 0 0 14px; font-family: var(--font-mono); }
.u .article-meta { font-size: 13px; color: var(--fg-dim); font-family: var(--font-mono); }
.u .article-tags { margin: 10px 0 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.u .tag { background: none; padding: 0; color: var(--accent); font-family: var(--font-mono); font-size: 13px; }
.u .article-cover img { width: 100%; height: auto; display: block; margin-bottom: 20px; }
.u .prose { font-family: var(--font-mono); font-size: 16px; line-height: 1.8; color: var(--fg); }
.u .prose h1::before { content: "# "; color: var(--h1-mark); }
.u .prose h2::before { content: "## "; color: var(--h2-mark); }
.u .prose h3::before { content: "### "; opacity: .45; }
.u .prose .web-steps h3::before { content: counter(step) ". "; counter-increment: step; opacity: 1; color: var(--accent); }
.u .prose a:not([href^="http"]) { color: var(--wikilink); text-decoration: none; }
.u .prose a:not([href^="http"])::before { content: "[["; color: var(--wikilink-bracket); }
.u .prose a:not([href^="http"])::after { content: "]]"; color: var(--wikilink-bracket); }
.u .prose sup a::before, .u .prose sup a::after, .u .prose a[href^="#"]::before, .u .prose a[href^="#"]::after { content: none; }
.u .prose a[href^="http"] { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.u .prose blockquote { border-left: 2px solid var(--mark); color: var(--fg-muted); }
.u .prose em { color: var(--fg-muted); }
/* Task lists read like the editor: [x] and [ ] instead of form checkboxes. */
.u .prose ul:has(> li > input[type="checkbox"]), .u .prose ul:has(> li.task-doing) { list-style: none; padding-left: 0; }
.u .prose li.task-doing { display: block; }
.u .prose li.task-doing::before { content: "[/]"; color: var(--link); margin-right: 2ch; }
.u .prose li:has(> input[type="checkbox"]) { display: block; }
.u .prose li > input[type="checkbox"] { display: none; }
.u .prose li:has(> input[type="checkbox"])::before { content: "[ ]"; color: var(--task); margin-right: 1ch; }
.u .prose li:has(> input[type="checkbox"]:checked)::before { content: "[x]"; color: var(--wikilink); }
.u .now-body li::marker { content: none; }
.u .now-body li:not(:has(> input))::before { content: "- "; color: var(--link); white-space: pre; }
.u .drop-cap { float: none; font-size: inherit; line-height: inherit; padding: 0; margin: 0; color: inherit; font-weight: inherit; }
.drop-cap-on .prose .drop-cap { float: left; font-size: 3.2em; line-height: .9; padding: 4px 8px 0 0; color: var(--accent); font-weight: 600; }

/* ── Footer ── */
.ft { max-width: var(--page-width); width: 100%; margin: 0 auto; box-sizing: border-box; padding: 18px 28px 30px; border-top: 1px solid var(--border); font-size: 12px; color: var(--fg-dim); }

/* ── Tablet and phone ── */
@media (max-width: 1099.98px) {
  .home-cols { display: block; }
}
@media (max-width: 900px) {
  .hd-nav { display: none; }
  .hd-mnav { display: block; }
}
@media (max-width: 1100px) {
  .cols.n-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 40px; }
}
@media (max-width: 760px) {
  :root { --hd-h: 63px; }
  .hd { padding: 12px 16px 0; }
  .hd-title { font-size: 21px; }
  .hd-strip { padding: 10px 16px 0; white-space: normal; }
  .home-top, .home-sec, .u-article { padding-left: 16px; padding-right: 16px; }
  .home-top { gap: 24px; }
  .cols, .cols.n-3 { grid-template-columns: 1fr; gap: 36px 0; }
  .col.span-2 { grid-column: auto; }
  .hero-aph { padding: 22px; }
  .hero-aph blockquote { font-size: 21px; }
  .u-main.narrow { padding: 24px 16px 48px; }
  .u .article-title { font-size: 27px; }
  .u .prose { font-size: 15px; }
  .ft { padding: 16px; }
}

/* A [[page]] shown in the sidebar, such as a blogroll list. */
.side-page ul { list-style: none; margin: 0; padding: 0; }
.side-page li { margin: 0 0 2px; color: var(--fg-dim); }
.side-page li a { color: var(--fg); }
.side-page li a:hover { color: var(--wikilink); }
.side-page p { margin: 0 0 8px; }
.side .more { margin-top: 6px; }
.home-intro { max-width: var(--content-width); padding-top: 24px; padding-bottom: 8px; }
/* Layout blocks between homepage rows take the rows' full width. */
.home-intro:has(.web-section, .web-card-grid, .web-cta, .web-subscribe) { max-width: none; }

/* Drawer cards sit under the heading their link appears in, marked the way
   the post marks it: # for the title, ## for sections. */
/* Drawer headings read like the post's own ## headings. */
.u .cl-section-head { color: var(--h2); font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; margin: 18px 0 4px; }
.u .cl-section-head::before { content: "## "; color: var(--h2-mark); }
.u .cl-title-head { color: var(--fg-strong); }
.u .cl-title-head::before { content: "# "; color: var(--h1-mark); }
.u .cl-footnotes-head { color: var(--fg-muted); }
.u .cl-footnotes-head::before { content: none; }

/* A short form opens its post from anywhere on it: the date link stretches
   over the whole block, and links inside the text stay clickable on top. */
.entry.short, .hero-aph { position: relative; }
.entry.short .ed::after, .hero-aph .hero-meta::after { content: ""; position: absolute; inset: 0; }
.entry.short .entry-text a, .hero-aph blockquote a { position: relative; z-index: 1; }
.entry.short:hover .entry-text, .hero-aph:hover blockquote { color: var(--fg-strong); }

/* Card titles stay below their heading in the drawer's hierarchy. */
.u .cl-resolved { font-family: var(--font-mono); font-size: 13px; margin: 2px 0 2px; }
.u .cl-section-head { font-size: 14px; }


/* Short posts: date and the platforms it also went out on. */
.short .emeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font-size: 12px; }
.short .emeta .ed { margin-top: 0; }
.via { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; color: var(--fg-muted) !important; }
.via:hover { color: var(--fg-strong) !important; }
.via .pmark { color: var(--brand, currentColor); }
.entry-text .web-poem { text-align: center; margin: 0; }
.entry-text:has(> .web-poem) { text-align: center; }
.entry-text:has(> .web-poem) .q-mark { display: block; margin: 0 0 6px; }
.short:has(.web-poem) .emeta { justify-content: center; }
.entry-text .web-poem p { display: block; margin: 0 0 .5em; }
.hero-aph .web-poem { margin: 0; }
.hero-aph .web-poem p { margin: 0 0 .6em; }
.u .also { font-family: var(--font-mono); }

.hero-aph .hero-title { font-size: 15px; font-weight: 600; color: var(--fg-strong); margin-top: -6px; }

/* Pinned row: a pin tacked through each card's top edge, a border around
   each card, both, or neither (plain featured posts). */
.pinned-item { position: relative; display: flex; flex-direction: column; min-width: 0; }
.pinned-item > .card { flex: 1; }
.pinned.with-pin .pins { padding-top: 10px; }
.pinned.with-pin .card { border-top: 2px solid var(--pin); }
.pinned.with-border .card { border-color: var(--pin); }
.pinned .tack { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); z-index: 2; padding: 0 4px; background: var(--bg); color: var(--pin); line-height: 0; }

/* Media hero: an image with optional text and buttons, as an overlay, a
   split, or the image alone. Its height follows the content. */
.hero-media { position: relative; overflow: hidden; display: flex; }
.hero-media .hm-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-media .hm-text { display: flex; flex-direction: column; gap: 14px; padding: 34px 36px; }
.hm-title { margin: 0; font-size: 28px; line-height: 1.25; color: var(--fg-strong); font-family: var(--font-mono); }
.hm-line { font-size: 15px; line-height: 1.6; color: var(--fg); }
.hm-line p { margin: 0 0 6px; }
.hm-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.hm-btn { display: inline-block; padding: 9px 16px; border: 1px solid var(--accent); color: var(--accent) !important; font-weight: 600; font-size: 14px; }
.hm-btn.primary { background: var(--accent); color: var(--bg) !important; }
.hm-btn:hover { filter: brightness(1.12); }
.hm-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.hm-links a { color: var(--fg-muted) !important; }
.hm-links a:hover { color: var(--fg-strong) !important; }
/* overlay: text sits over the image on a dark wash */
.layout-overlay { min-height: 360px; }
.layout-overlay .hm-media { position: absolute; inset: 0; }
.layout-overlay .hm-text { position: relative; justify-content: center; width: 100%; background: linear-gradient(90deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .6) 45%, rgba(0, 0, 0, .1) 80%, transparent 100%); }
.layout-overlay .hm-text > * { max-width: 680px; }
.layout-overlay .hm-title, .layout-overlay .hm-line { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.layout-overlay .hm-links a { color: rgba(255, 255, 255, .8) !important; }
.layout-overlay.no-image .hm-text, .layout-split.no-image .hm-text { background: none; max-width: none; }
.layout-overlay.no-image .hm-title, .layout-overlay.no-image .hm-line { color: inherit; text-shadow: none; }
/* split: image beside the text */
.layout-split .hm-media { flex: 1 1 50%; min-height: 300px; }
.layout-split .hm-text { flex: 1 1 50%; justify-content: center; }
/* media only: the image at its own shape, kept from swallowing the screen */
.layout-media .hm-media { width: 100%; }
.layout-media .hm-media img { height: auto; max-height: 560px; }
/* Statement: one sentence set large, no image. */
.hero-statement { border: 0; background: none; }
.hero-statement .hm-text { padding: 48px 0 40px; gap: 18px; }
.hero-statement.align-center .hm-text { align-items: center; text-align: center; }
.hero-statement.align-center .hm-buttons, .hero-statement.align-center .hm-links { justify-content: center; }
.hero-statement .hm-title { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.2; max-width: 22ch; font-weight: 600; }
.hero-statement .hm-line { font-size: 17px; color: var(--fg-muted); max-width: 60ch; }
/* Video in the browser's own player; a hover clip over a still. The clip is
   lazy and hidden until hover, so it never loads on phones. */
.hm-video video { display: block; width: 100%; height: 100%; max-height: 560px; background: #000; object-fit: cover; }
.hm-media { position: relative; }
.hm-clip { display: none !important; position: absolute; inset: 0; pointer-events: none; }
.hero-media:hover .hm-clip { display: block !important; }
@media (prefers-reduced-motion: reduce) { .hero-media:hover .hm-clip { display: none !important; } }
/* Carousel: slides you swipe or scroll; dots and arrows where the browser
   draws them (CSS scroll markers), a thin scrollbar elsewhere. No script. */
.carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 6px; scroll-marker-group: after; anchor-name: --carousel; }
.carousel .slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; }
.carousel .slide > .hero { flex: 1; min-height: 300px; }
.carousel::scroll-marker-group { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.carousel .slide::scroll-marker { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--fg-dim); }
.carousel .slide::scroll-marker:target-current { background: var(--accent); border-color: var(--accent); }
.carousel::scroll-button(left), .carousel::scroll-button(right) { position: absolute; position-anchor: --carousel; top: anchor(center); translate: 0 -50%; width: 34px; height: 34px; border: 1px solid var(--border); background: var(--bg); color: var(--fg-strong); cursor: pointer; font: inherit; }
.carousel::scroll-button(left) { content: "←" / "Previous"; left: calc(anchor(left) + 10px); }
.carousel::scroll-button(right) { content: "→" / "Next"; right: calc(anchor(right) + 10px); }
.carousel::scroll-button(*):disabled { opacity: .3; cursor: default; }
@supports (scroll-marker-group: after) { .carousel { scrollbar-width: none; } }
/* Note map: the site's notes and their links, drawn at build time. */
.hero-map { padding: 10px 12px 12px; }
.note-map { display: block; width: 100%; height: auto; }
.nm-edges line { stroke: var(--fg-dim); stroke-opacity: .45; stroke-width: 1.2; }
.nm-n circle { fill: var(--fg-dim); stroke: var(--bg); stroke-width: 1.5; transition: r .15s; }
.nm-n.k-essay circle, .nm-n.k-lesson circle { fill: var(--k-essay); }
.nm-n.k-aphorism circle { fill: var(--k-aphorism); }
.nm-n.k-post circle { fill: var(--k-post); }
.nm-n.k-poem circle { fill: var(--k-poem); }
.nm-n.k-video circle { fill: var(--k-video); }
.nm-n.k-photo circle { fill: var(--k-photo); }
.nm-n.k-project circle { fill: var(--k-project); }
.nm-n text { font-size: 11px; fill: var(--fg-muted); font-family: var(--font-mono); }
.nm-n:hover circle { stroke: var(--fg-strong); }
.nm-n:hover text { fill: var(--fg-strong); }
.nm-caption { font-size: 12px; color: var(--fg-dim); margin-top: 6px; }
@media (max-width: 760px) {
  .layout-split { flex-direction: column; }
  .layout-split .hm-media { min-height: 200px; }
  .hero-media .hm-text { padding: 22px; }
  .hm-title { font-size: 22px; }
  .layout-overlay { min-height: 300px; }
  .layout-overlay .hm-text { background: rgba(0, 0, 0, .62); }
}

.u .site-foot { font-family: var(--font-mono); }
.u .pcard-h .m { color: var(--h1-mark); }
.u .pcard-h { color: var(--h2); }
.u .ft-line a { color: var(--wikilink); }

/* Product cards: price and a small buy button; cards per row; text over the photo. */
.cols .grid.per-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols .grid.per-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 .grid.per-2, .span-2 .grid.per-3 { display: grid; columns: auto; }
@media (max-width: 760px) { .cols .grid.per-2, .cols .grid.per-3 { grid-template-columns: 1fr; } }
.card .buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.card .buy .price { font-size: 16px; font-weight: 600; color: var(--fg-strong); }
.card .buy-btn { padding: 5px 11px; font-size: 12.5px; }
a.t { display: block; color: var(--fg-strong) !important; }
a.t:hover { color: var(--accent) !important; }
.card.over { position: relative; min-height: 300px; justify-content: flex-end; border: 0; }
.card.over .ph { position: absolute; inset: 0; }
.card.over .ph img, .card.over .ph a { display: block; width: 100%; height: 100%; object-fit: cover; }
.card.over .cb { position: relative; background: linear-gradient(0deg, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .55) 60%, transparent 100%); padding-top: 60px; }
.card.over .t, .card.over .buy .price, .card.over .x { color: #fff !important; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.card.over .kind, .card.over .d { color: rgba(255, 255, 255, .8); }

/* Giving in the Unicode look. */
.hd-give { color: var(--accent) !important; border: 1px solid var(--accent); padding: 2px 8px; }
.hd-give:hover { background: var(--accent); color: var(--bg) !important; }
.give-row { text-align: center; }
.give-row .give-lead { font-size: 17px; color: var(--fg-strong); }
.give-row .give-ways { max-width: 900px; margin: 14px auto 0; text-align: left; }
.side-give .give-lead { font-size: 13px; color: var(--fg-muted); }
.give-line { font-family: var(--font-mono); font-size: 13px; }
.u .prose .give-ways a::before, .u .prose .give-ways a::after, .u .prose .buy-line a::before, .u .prose .buy-line a::after, .u .prose .buy-box a::before, .u .prose .buy-box a::after { content: none; }

/* ── Layout blocks in Unicode: flat frames, mono labels, no wikilink
   brackets on button-like links. ── */
.u .prose a.btn::before, .u .prose a.btn::after, .u .prose a.web-linkcard::before, .u .prose a.web-linkcard::after, .u .prose a.audio-dl::before, .u .prose a.audio-dl::after, .u .prose a.gal-item::before, .u .prose a.gal-item::after, .u .prose a.sc-thumb::before, .u .prose a.sc-thumb::after, .u .prose a.sc-prev::before, .u .prose a.sc-prev::after, .u .prose a.sc-next::before, .u .prose a.sc-next::after, .u .prose a.series-item::before, .u .prose a.series-item::after { content: none; }
.u .web-hours .bk-h, .u .web-contact .bk-h, .u .web-map .bk-h { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--h2); }
.u .web-hours .bk-h::before, .u .web-contact .bk-h::before, .u .web-map .bk-h::before { content: "### "; color: var(--h2-mark); }
.u .card .badge { margin-left: auto; }
.u .prose a.web-linkcard, .u .prose a.btn, .u .prose a.audio-dl, .u .prose a.gal-item, .u .prose a.sc-thumb, .u .prose a.sc-prev, .u .prose a.sc-next, .u .prose a.series-item { text-decoration: none; }
.u .prose a.series-item { color: var(--fg); }
.u .prose a.sc-prev, .u .prose a.sc-next { color: var(--fg-muted); }
/* Showcase in Unicode: the title is a # heading, facts in the mono face. */
.u .web-showcase .sc-title { font-size: 26px; font-weight: 600; color: var(--fg-strong); }
.u .web-showcase .sc-title::before { content: "# "; color: var(--h1-mark); }
.u .web-showcase .sc-kind { font-size: 11px; letter-spacing: 0.06em; text-transform: none; font-weight: 400; color: var(--h2); }
.u .web-showcase .sc-lead { border-radius: 6px; }
.u .web-showcase.layout-stack .sc-facts dt { font-size: 10px; }
.u .prose a.web-linkcard { color: var(--fg); }
.u .prose a.btn { color: var(--accent); }
.u .prose a.btn.primary { color: var(--bg); }
.u .prose a.audio-dl { color: var(--link); }
.u .prose .web-section h2::before { content: "## "; }
.u .web-section .section-label { font-family: var(--font-mono); font-weight: 500; font-size: 11px; }
.u .web-section .section-label::before { content: "── "; color: var(--mark); }
.u .summary-label { font-family: var(--font-mono); font-weight: 500; color: var(--h2); }
.u .web-callout { background: color-mix(in srgb, var(--tone) 6%, var(--bg)); border-left-width: 2px; border-radius: 0; }
.u .callout-title { font-family: var(--font-mono); text-transform: none; letter-spacing: 0; font-size: 14px; }
.u .web-card { background: transparent; border-radius: 0; }
.u .web-card h4 { color: var(--fg-strong); font-size: 15px; }
.u .card-icon { color: var(--k-project); }
.u .card-icon .zi { width: 22px; height: 22px; stroke-width: 1.6; }
.u ol.web-steps > li::before { background: transparent; border: 1px solid var(--accent); color: var(--accent); border-radius: 0; font-family: var(--font-mono); font-weight: 400; width: 24px; height: 24px; font-size: 13px; }
.u .step-title { color: var(--fg-strong); }
.u .web-terms .term { border-bottom-style: dashed; }
.u .web-terms dt { color: var(--fg-strong); }
.u .web-terms .syn { color: var(--wikilink); }
.u .web-checklist > li::before { color: var(--wikilink); }
.u .web-timeline { border-left-width: 1px; }
.u .web-timeline > li::before { border-radius: 0; background: var(--accent); width: 7px; height: 7px; left: -21px; }
.u .tl-when { font-family: var(--font-mono); font-weight: 400; color: var(--task); }
.u .web-compare, .u .cmp-col.pick { border-radius: 0; }
.u .cmp-col.pick { background: color-mix(in srgb, var(--accent) 7%, var(--bg)); }
.u .web-faq summary, .u .q-answer summary, .u .audio-transcript summary { list-style: none; }
.u .web-faq summary::before, .u .q-answer summary::before, .u .audio-transcript summary::before { content: "▸ "; color: var(--fg-dim); }
.u .web-faq details[open] summary::before, .u .q-answer[open] summary::before, .u .audio-transcript[open] summary::before { content: "▾ "; }
.u .web-faq summary { color: var(--fg-strong); font-weight: 400; }
.u .q-answer summary, .u .audio-transcript summary { color: var(--link); font-weight: 400; }
.u .q-options li { border-radius: 0; background: transparent; padding: 5px 10px; }
.u .q-options li::marker { color: var(--accent); font-weight: 400; }
.u .q-answer > :not(summary) { border-left-width: 1px; border-color: var(--border); }
.u .web-audio { border-radius: 0; background: transparent; }
.u .audio-title { color: var(--fg-strong); font-weight: 400; }
.u .web-audio audio { color-scheme: dark; height: 36px; }
.u .web-linkcard { border-radius: 0; background: transparent; }
.u .lc-title { color: var(--fg-strong); font-weight: 400; }
.u .btn { border-radius: 0; font-family: var(--font-mono); font-weight: 400; font-size: 14px; padding: 5px 12px; }
.u .btn.primary { color: var(--bg); }
.u .web-cta { border-radius: 0; background: transparent; border-color: var(--border); }
.u .web-subscribe { border-radius: 0; }
.u .web-summary { border-radius: 0; }
.u .web-section { border-radius: 0; }
.u .web-section.style-tint { border-color: color-mix(in srgb, var(--tone) 30%, var(--bg)); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .u .web-audio audio { color-scheme: light; }
}
