/* Snug components: the styles for everything Snug's own templates and helpers put on a page:
   posts and their lists, galleries, the carousel and lightbox, reply context, mentions, comments,
   pinned labels, social links, the archive, tags, search and About pages.
   Any theme can load this file and then its own stylesheet. The default theme does (see site.css for its
   shell: colours, type, header and footer). The audio player and the reply card have files of their own
   (player.css, quote.css) that are loaded when a page needs them, and so has what a post's text can hold
   (content.css, linked by Theme::head() on every page).

   Everything here is driven by these variables. A theme sets the ones it wants; the rest fall back to
   values taken from the page's own text colour, so the components suit any background.
     --ink, --ink-2      text, and quieter text
     --accent            links and highlights (site.js takes the theme's link colour when this is not set)
     --on-accent         text on the accent
     --paper, --paper-2  the page background, and a slightly different one for insets
     --surface           raised surfaces
     --rule              hairlines
     --radius, --ease, --font-mono */
:where(:root){
  --ink:currentColor;
  --ink-2:color-mix(in srgb,currentColor 64%,transparent);
  --accent:LinkText;
  --on-accent:Canvas;
  --paper:Canvas;
  --paper-2:color-mix(in srgb,currentColor 6%,transparent);
  --surface:color-mix(in srgb,currentColor 4%,transparent);
  --rule:color-mix(in srgb,currentColor 14%,transparent);
  --radius:14px;
  --ease:cubic-bezier(.2,.7,.2,1);
  --font-mono:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
}
[hidden]{display:none!important}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.page-title{font-size:clamp(1.7rem,3.2vw,2.3rem);line-height:1.15;letter-spacing:-.02em;margin:0 0 1.2em}
.empty{color:var(--ink-2);text-align:center;padding:48px 0}
.notice{background:color-mix(in srgb,var(--accent) 12%,var(--paper));padding:11px 15px;border-radius:12px;font-size:.92rem}
.btn{display:inline-flex;align-items:center;gap:.4em;padding:.55em 1.1em;border-radius:999px;border:1px solid var(--accent);background:var(--accent);color:var(--on-accent);font:inherit;font-size:.9rem;font-weight:600;text-decoration:none;cursor:pointer;transition:transform .2s var(--ease),background-color .2s,color .2s}
.btn:hover{transform:translateY(-1px);text-decoration:none}

.day{margin:0 0 clamp(28px,5vw,44px)}
.entry{margin:0 0 clamp(28px,5vw,44px)}
.day > .entry:last-child{margin-bottom:0}
.day + .day{border-top:1px solid var(--rule);padding-top:clamp(28px,5vw,44px)}
.day > .entry + .entry{border-top:1px dashed var(--rule);padding-top:clamp(24px,4vw,36px)}

/* Status day: the date is the title, each status keeps its own time stamp */
.day-title{font-size:clamp(1.25rem,2.2vw,1.5rem);line-height:1.25;letter-spacing:-.015em;margin:0 0 .9em}
.day-title a{color:var(--ink);text-decoration:none}
.day-title a:hover{color:var(--accent)}
.status{position:relative;padding-left:20px;border-left:2px solid var(--rail,var(--rule))}
.status + .status{margin-top:24px}
.status-more{margin:.8em 0 0}
.status::before{content:"";position:absolute;left:-6px;top:.6em;width:10px;height:10px;border-radius:50%;background:var(--paper);border:2px solid var(--rail-dot,var(--accent))}
.single .status-meta,.status-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:.84rem;color:var(--ink-2);margin:.6em 0 0}
.stamp{font-variant-numeric:tabular-nums;color:var(--ink-2);text-decoration:none;font-weight:600}
.stamp:hover{color:var(--accent)}
.tag{color:var(--ink-2);text-decoration:none}
.tag:hover{color:var(--accent)}
.syndication a{color:var(--ink-2)}
.edit-link{display:inline-flex;align-items:center;justify-content:center;margin-left:auto;min-width:32px;min-height:32px;border-radius:6px;color:var(--ink-2);text-decoration:none}
.edit-link:hover{color:var(--accent);background:color-mix(in srgb,var(--ink) 7%,transparent)}
.edit-link svg{display:block}

/* Article card: title with the date beside it */
.article-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin-bottom:.6em}
.article-title{font-size:clamp(1.35rem,2.6vw,1.75rem);line-height:1.2;letter-spacing:-.02em;margin:0;flex:1 1 18rem}
.article-title a{color:var(--ink);text-decoration:none}
.article-title a:hover{color:var(--accent)}
.article-date{flex:none;color:var(--ink-2);font-size:.86rem;text-decoration:none;white-space:nowrap}
a.article-date:hover{color:var(--accent)}
.article-cover{display:block;margin:.4em 0 .8em;border-radius:var(--radius);overflow:hidden}
.article-cover img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover}
/* On the blogroll the cover is a small thumbnail beside the excerpt */
.article-card{display:flow-root}
.article-card .article-cover{float:right;width:min(36%,200px);margin:.15em 0 .6em 1.1em;border-radius:12px}
.article-card .article-cover img{aspect-ratio:4/3}
.p-summary > :first-child{margin-top:0}
.article-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin-top:1em;font-size:.88rem}

/* Single */
.single-head{margin-bottom:1.2em}
.single .article-title{font-size:clamp(1.8rem,4vw,2.6rem);flex:none}
.single .article-date{margin:.5em 0 0}
.single-foot{margin-top:1.8em;padding-top:1em;border-top:1px solid var(--rule)}
.context{font-size:.9rem;color:var(--ink-2);margin:0 0 .6em}

/* What is inside a post's text (headings, lists, tables, quotations, code, footnotes, formulas, embeds)
   is styled by content.css, which Theme::head() links on every page. */
.hashtag{text-decoration:none}

/* ---------- Media: grid & carousel ---------- */
.media{margin:1em 0 0}
.e-content .media{margin:1em 0}
.e-content > .media:last-child{margin-bottom:0}
.media figure{margin:0}
figcaption{font-size:.82rem;color:var(--ink-2);margin-top:6px}
.gallery{display:grid;gap:6px;border-radius:var(--radius);overflow:hidden}
.gallery img,.gallery video{display:block;width:100%;height:100%;object-fit:cover;border-radius:0}
.gallery-1 .gallery-item img{height:auto;max-height:80vh;object-fit:contain;background:var(--paper-2)}
.gallery-1{border-radius:var(--radius)}
.gallery-2{grid-template-columns:1fr 1fr}
.gallery-2 .gallery-item,.gallery-4 .gallery-item,.gallery-many .gallery-item{aspect-ratio:1}
.gallery-3{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr;aspect-ratio:3/2}
.gallery-3 .gallery-item:first-child{grid-row:span 2}
.gallery-4{grid-template-columns:1fr 1fr}
.gallery-many{grid-template-columns:repeat(3,1fr)}
.gallery figcaption{display:none}
.gallery .lightbox{display:block;height:100%;cursor:zoom-in}

/* Blogroll: small previews so more posts fit (a click opens the full image); a post's own page shows media full size */
.media.compact{--cap:240px;--thumb:128px;margin-top:.7em}
.media.compact .gallery-1 .gallery-item{width:100%;max-width:calc(var(--cap) * var(--ar,1.3333));aspect-ratio:var(--ar,4/3);border-radius:12px;overflow:hidden;background:var(--paper-2)}
.media.compact .gallery-1 .gallery-item img,.media.compact .gallery-1 .gallery-item video{height:100%;max-height:none;object-fit:cover;background:none}
.media.compact .gallery:not(.gallery-1){display:flex;flex-wrap:wrap;gap:6px;aspect-ratio:auto;border-radius:0;overflow:visible}
.media.compact .gallery:not(.gallery-1) .gallery-item{width:var(--thumb);aspect-ratio:1;border-radius:10px;overflow:hidden}
.media.compact .carousel{max-width:calc(var(--cap) * 1.6)}
.media.compact .carousel-slide{min-height:0}
.media.compact .carousel-slide img,.media.compact .carousel-slide video{max-height:var(--cap)}
@media (max-width:520px){.media.compact{--cap:200px;--thumb:calc((100% - 12px) / 3)}}
.carousel{position:relative;border-radius:var(--radius);overflow:hidden;background:var(--paper-2)}
.carousel-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.carousel-track::-webkit-scrollbar{display:none}
.carousel-slide{flex:0 0 100%;scroll-snap-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:200px}
.carousel-slide img,.carousel-slide video{display:block;max-height:75vh;width:auto;max-width:100%;object-fit:contain;border-radius:0}
.carousel-slide figcaption{padding:6px 12px 30px}
.carousel-btn{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:50%;border:0;background:color-mix(in srgb,var(--paper) 80%,transparent);color:var(--ink);font-size:24px;line-height:1;cursor:pointer;box-shadow:0 4px 14px -6px rgba(0,0,0,.4);opacity:.9}
.carousel-btn:hover{opacity:1}
.carousel-btn.prev{left:10px}
.carousel-btn.next{right:10px}
.carousel-btn[disabled]{opacity:0;pointer-events:none}
.carousel-dots{position:absolute;bottom:10px;left:0;right:0;display:flex;justify-content:center;gap:6px;pointer-events:none}
.carousel-dots span{width:7px;height:7px;border-radius:50%;background:color-mix(in srgb,var(--ink) 30%,transparent);transition:background .2s,transform .2s}
.carousel-dots span.on{background:var(--accent);transform:scale(1.25)}
@media (hover:none){.carousel-btn{display:none}}
.attachment{font-size:.9rem}
.audio audio{width:100%}

.lightbox-overlay{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.9);display:grid;place-items:center;padding:16px;cursor:zoom-out}
/* The whole picture fits the screen: percentages don't work here (the grid row has no fixed height), so use the viewport. */
.lightbox-overlay img{width:auto;height:auto;max-width:100%;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));object-fit:contain}
.lb-close{position:absolute;top:max(12px,env(safe-area-inset-top));right:14px;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:28px;cursor:pointer}

/* ---------- Webmentions ---------- */
.mentions{margin-top:40px;padding-top:24px;border-top:1px solid var(--rule)}
.mentions h2{font-size:1.15rem;margin:0 0 16px}
.facepile h3{font-size:.85rem;font-weight:600;color:var(--ink-2);margin:0 0 8px}
.facepile .count{font-variant-numeric:tabular-nums}
.facepile ul{list-style:none;display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px;padding:0}
.facepile img,.facepile .initial,.reply-author img,.reply-author .initial{width:36px;height:36px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:var(--paper-2);color:var(--ink-2);font-weight:700;font-size:.85rem}
.replies{list-style:none;margin:0;padding:0;display:grid;gap:18px}
.reply{display:grid;gap:4px;padding:14px;border:1px solid var(--rule);border-radius:var(--radius);background:var(--surface)}
.reply-author{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-weight:600}
.reply-author img,.reply-author .initial{width:32px;height:32px}
.reply .p-content{font-size:.95rem}
.reply-date{font-size:.8rem;color:var(--ink-2);text-decoration:none}
.wm-form{margin-top:24px;font-size:.88rem;color:var(--ink-2)}
.wm-send .wm-form{margin-top:0}
.wm-row{display:flex;gap:8px;margin-top:6px}
input[type=url],input[type=search],input[type=text]{flex:1;min-width:0;font:inherit;font-size:1rem;color:var(--ink);background:var(--surface);border:1px solid var(--rule);border-radius:999px;padding:.55em 1em}
.wm-form.stacked{display:grid;gap:14px;max-width:32rem}
.wm-form.stacked label{display:grid;gap:4px}
.wm-form.stacked input{border-radius:10px}

/* ---------- Lists ---------- */
.pagination,.neighbours{display:flex;justify-content:space-between;gap:16px;margin-top:40px;font-size:.92rem}
.pagination a{font-weight:600;text-decoration:none}
.neighbours a{display:grid;gap:2px;text-decoration:none;max-width:48%;color:var(--ink)}
.neighbours a small{color:var(--ink-2)}
.neighbours a span{font-weight:600}
.neighbours .prev{text-align:right;margin-left:auto}
.tag-cloud{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:8px 10px}
.tag-cloud a{display:inline-block;padding:.3em .8em;border:1px solid var(--rule);border-radius:999px;text-decoration:none;font-size:calc(.9rem * var(--w,1))}
.tag-cloud small{color:var(--ink-2)}
.archive-year h2{font-size:1.1rem;margin:1.6em 0 .4em}
.archive-months{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(10rem,1fr));gap:4px 16px}
.archive-months small{color:var(--ink-2)}
.photo-wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}
.photo-wall a{display:block;aspect-ratio:1;overflow:hidden;border-radius:8px;background:var(--paper-2)}
.photo-wall img{width:100%;height:100%;object-fit:cover;transition:transform .4s var(--ease)}
.photo-wall a:hover img{transform:scale(1.04)}
.search-form{display:flex;gap:8px;margin-bottom:32px}
.error-page{text-align:center;padding:40px 0}
.error-code{font-size:4rem;font-weight:800;color:var(--accent);margin:0;line-height:1}

/* Social links: a soft capsule holding round icon buttons or name chips */
/* One line. Links that do not fit are reached by scrolling sideways; the theme's script then turns the line into
   an endless strip (.is-loop). Without scripts it simply scrolls. */
.social-icons{display:inline-flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:2px;max-width:100%;list-style:none;margin:0;padding:4px;
  overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  --bar:color-mix(in srgb,var(--surface) 82%,var(--paper));background:var(--bar);border:1px solid var(--rule);border-radius:22px;
  box-shadow:0 1px 2px rgba(0,0,0,.04),0 10px 24px -14px rgba(0,0,0,.22)}
.social-icons::-webkit-scrollbar{display:none}
.social-icons li{display:flex;flex:none}
.social-icons.is-loop{cursor:grab}
/* the strip fades out at both ends of the bar, which shows there is more either way */
.social-icons.is-loop::before,.social-icons.is-loop::after{content:"";position:sticky;z-index:1;flex:none;width:26px;height:36px;pointer-events:none}
.social-icons.is-loop::before{left:0;margin:0 -28px 0 -4px;background:linear-gradient(90deg,var(--bar) 25%,transparent)}
.social-icons.is-loop::after{right:0;margin:0 -4px 0 -28px;background:linear-gradient(270deg,var(--bar) 25%,transparent)}
.social-icons.is-loop.is-dragging{cursor:grabbing;user-select:none;-webkit-user-select:none}
.social-icons.is-loop.is-dragging a{pointer-events:none}
/* a website's own favicon, redrawn as a glyph: it takes the link's colour like the icons beside it */
.social-glyph{display:block;flex:none;background:currentColor;-webkit-mask:var(--glyph) center/contain no-repeat;mask:var(--glyph) center/contain no-repeat}
.social-icons a{display:grid;place-items:center;width:36px;height:36px;border-radius:999px;color:var(--ink-2);text-decoration:none;
  transition:background-color .2s var(--ease),color .2s var(--ease),transform .15s var(--ease)}
.social-icons a:hover,.social-icons a:focus-visible{color:var(--accent);background:color-mix(in srgb,var(--accent) 13%,transparent)}
.social-icons a:active{transform:scale(.95)}
/* Icons alone: the service's name shows in a label by the icon (hover, keyboard focus, long press). The theme's
   script places the label; it floats above the page so that the scrolling bar does not cut it off. */
.social-icons.style-icons a{-webkit-touch-callout:none}
.tip{position:fixed;z-index:60;padding:.36em .72em;border-radius:8px;background:var(--ink);color:var(--paper);font-size:.76rem;font-weight:600;line-height:1.2;letter-spacing:.01em;white-space:nowrap;pointer-events:none;opacity:0;transform:translateY(-3px);transition:opacity .15s,transform .15s var(--ease)}
.tip.is-on{opacity:1;transform:none}
.social-icons.style-links a,.social-icons.style-both a{display:inline-flex;align-items:center;gap:7px;width:auto;padding:0 13px;font-size:.86rem;font-weight:500;letter-spacing:.005em}
.social-icons.style-both a{padding-left:11px}
.about-elsewhere .social-icons{justify-content:flex-start}
@media (max-width:520px){.social-icons.style-links a,.social-icons.style-both a{padding:0 11px}}
/* ---------- Pinned posts ---------- */
/* ---------- Filter: all posts, statuses, articles ---------- */
/* A three-way switch. The track is a flat tint; the thumb is a raised surface that slides to the chosen option
   (--at is 0, 1 or 2). The options are equal thirds, so the thumb is one third wide. */
.post-filter{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:0 0 clamp(18px,3vw,26px)}
.page-title + .post-filter{margin-top:-.5em}
.type-filter{--pad:3px;--track:color-mix(in srgb,var(--ink) 8%,transparent);position:relative;display:inline-grid;grid-template-columns:repeat(3,minmax(0,1fr));max-width:100%;padding:var(--pad);border-radius:999px;background:var(--track);isolation:isolate}
/* the thumb is the page's own colour, so it reads as raised on a light page and as a clear window on a dark one */
.type-filter::before{content:"";position:absolute;z-index:-1;top:var(--pad);bottom:var(--pad);left:var(--pad);width:calc((100% - 2 * var(--pad)) / 3);border-radius:999px;background:var(--paper);box-shadow:0 1px 2px rgba(0,0,0,.14),0 3px 10px rgba(0,0,0,.06);transform:translateX(calc(var(--at,0) * 100%));transition:transform .32s var(--ease)}
.type-filter a{padding:.46em 1.15em;border-radius:999px;color:var(--ink-2);font-size:.86rem;font-weight:600;line-height:1.3;text-align:center;text-decoration:none;white-space:nowrap;transition:color .2s}
.type-filter a:hover{color:var(--ink);text-decoration:none}
.type-filter a[aria-current]{color:var(--ink)}
.type-filter a:focus-visible{outline:2px solid var(--ink-2);outline-offset:-2px}
@media (max-width:380px){.type-filter a{padding-inline:.8em;font-size:.82rem}}
@media (prefers-reduced-motion:reduce){.type-filter::before{transition:none}}
/* Only posts with pictures, videos, music or files: four toggles. One that is on is a solid fill. */
.with-filter{display:inline-flex;flex-wrap:wrap;gap:6px}
.with-filter a{display:inline-flex;align-items:center;gap:.42em;padding:.46em .95em .46em .8em;border-radius:999px;background:color-mix(in srgb,var(--ink) 8%,transparent);color:var(--ink-2);font-size:.86rem;font-weight:600;line-height:1.3;text-decoration:none;white-space:nowrap;transition:color .2s,background-color .2s}
.with-filter a:hover{color:var(--ink);text-decoration:none}
.with-filter a[aria-pressed]{background:var(--ink);color:var(--paper)}
.with-filter svg{flex:none}
/* Each pinned post sits in a container of its own, so it needs no rule beside it, under it or between it and the next. */
.pinned{display:grid;gap:12px;margin-bottom:clamp(28px,5vw,44px);padding:0;border:0}
.pinned > .entry,.day.pinned > .entry + .entry{margin:0;padding:clamp(14px,2.6vw,20px) clamp(16px,3vw,24px);border:0;border-radius:var(--radius);background:var(--paper-2)}
.pinned .status{padding-left:0;border-left:0}
.pinned .status::before{content:none}
.pinned + .day{border-top:0;padding-top:0}
.pin-label{display:inline-flex;align-items:center;gap:5px;margin:0 0 .5em;font-size:.76rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--accent)}
/* ---------- Pages ---------- */
.page-updated{margin:2em 0 0;font-size:.86rem;color:var(--ink-2)}
/* ---------- About page ---------- */
.about{display:grid;gap:22px}
.about-head{display:flex;gap:20px;align-items:center}
.about-photo{width:112px;height:112px;border-radius:50%;object-fit:cover;flex:none}
.about-name{font-size:clamp(1.7rem,3.2vw,2.3rem);line-height:1.15;letter-spacing:-.02em;margin:0}
.about-facts{list-style:none;padding:0;margin:.45em 0 0;display:flex;flex-wrap:wrap;gap:4px 16px;color:var(--ink-2);font-size:.92rem}
.about-facts a{color:inherit}
.about-lead{font-size:1.12rem;line-height:1.55}
.about-lead > :first-child{margin-top:0}
.about-lead > :last-child{margin-bottom:0}
.about-elsewhere h2{font-size:1rem;margin:0 0 .4em}
.about-elsewhere .rel-me{list-style:none;padding:0}
@media (max-width:520px){.about-head{gap:14px}.about-photo{width:76px;height:76px}}
.about-id{min-width:0}.about-name{overflow-wrap:anywhere}
.author{display:inline-flex;align-items:center;gap:6px}
.author .avatar{width:24px;height:24px;border-radius:50%}

/* Embed widget defaults (when this stylesheet is loaded alongside embed.js) */
.snug-embed{list-style:none;padding:0;margin:0;display:grid;gap:14px}
.snug-embed__item{display:flex;gap:12px}
.snug-embed__img img{width:64px;height:64px;object-fit:cover;border-radius:8px}
.snug-embed__body{display:grid}
.snug-embed__body time{font-size:.8em;opacity:.7}

/* The audio player's styles are in player.css, loaded by site.js on pages that have audio. */
.media figure.audio + figure.audio{margin-top:12px}
.e-content .ap{margin:1.4em 0}
/* ---------- Comments ---------- */
.comment-form{margin-top:clamp(28px,5vw,44px);padding-top:clamp(20px,4vw,32px);border-top:1px solid var(--rule)}
.comment-form h2{font-size:1.15rem;margin:0 0 .8em}
.comment-form form{display:grid;gap:12px}
.comment-form label{display:grid;gap:4px;font-size:.86rem;font-weight:600;color:var(--ink-2)}
.comment-form input,.comment-form textarea{font:inherit;font-weight:400;color:var(--ink);background:var(--surface);border:1px solid var(--rule);border-radius:10px;padding:10px 12px;width:100%}
.comment-form textarea{resize:vertical;min-height:6.5em}
.comment-form .cf-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.comment-form .hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.comment-form .btn{justify-self:start}
.cf-msg{margin:0;padding:10px 14px;border-radius:10px;font-size:.92rem;background:color-mix(in srgb,var(--accent) 12%,var(--paper))}
.cf-msg.err{background:color-mix(in srgb,#b42318 10%,var(--paper));border-color:color-mix(in srgb,#b42318 40%,transparent)}
.message-page{padding:clamp(20px,6vw,60px) 0}
@media (max-width:520px){.comment-form .cf-row{grid-template-columns:1fr}}

/* under each post: the comment button and, when it differs, the licence */
.comment-link{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:0 4px;color:var(--ink-2);text-decoration:none;border-radius:6px;font-weight:600;font-variant-numeric:tabular-nums}
.comment-link:hover{color:var(--accent)}
.comment-link svg{display:block}
/* beside it, the Share button (shown by the theme's script, which opens the dialog below) */
.share-link{display:inline-flex;align-items:center;justify-content:center;min-width:26px;min-height:32px;margin:0;padding:0 4px;border:0;border-radius:6px;background:none;color:var(--ink-2);font:inherit;cursor:pointer;-webkit-appearance:none;appearance:none}
.share-link:hover{color:var(--accent)}
.share-link:focus-visible,.share-dialog :focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.share-link svg{display:block}
.layout-index .h-feed .share-link{display:none}
/* The Share dialog: a box in the middle of the page, a sheet from the bottom on phones. */
.share-dialog{width:min(27rem,calc(100vw - 32px));max-width:none;max-height:min(42rem,calc(100vh - 32px));max-height:min(42rem,calc(100dvh - 32px));margin:auto;padding:0 20px 20px;border:1.5px solid color-mix(in srgb,var(--ink) 26%,var(--paper));border-radius:var(--radius);background:var(--paper);color:var(--ink);font-size:.95rem;line-height:1.4;text-align:left;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;box-shadow:0 24px 60px rgba(0,0,0,.28)}
.share-dialog[open]{animation:share-in .2s var(--ease)}
.share-dialog::backdrop{background:rgba(0,0,0,.45);animation:share-fade .2s ease-out}
.share-dialog.is-closing{animation:share-out .16s ease-in forwards}
.share-dialog.is-closing::backdrop{animation:share-fade-out .16s ease-in forwards}
@keyframes share-in{from{opacity:0;transform:translateY(10px)}}
@keyframes share-out{to{opacity:0;transform:translateY(10px)}}
@keyframes share-up{from{transform:translateY(100%)}}
@keyframes share-down{to{transform:translateY(100%)}}
@keyframes share-fade{from{opacity:0}}
@keyframes share-fade-out{to{opacity:0}}
@media (prefers-reduced-motion:reduce){.share-dialog[open],.share-dialog::backdrop{animation:none!important}}
.share-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 -20px;padding:12px 12px 8px 20px;background:var(--paper)}
.share-head h2{margin:0;font-size:1.1rem;line-height:1.2;letter-spacing:-.01em}
.share-grip{display:none}
.share-close{display:inline-flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:none;color:var(--ink-2);cursor:pointer}
.share-close:hover{color:var(--ink);background:color-mix(in srgb,var(--ink) 8%,transparent)}
.share-what{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;margin:0 0 14px;color:var(--ink-2);font-size:.9rem;overflow-wrap:anywhere}
.share-native{width:100%;justify-content:center;min-height:46px;margin:0 0 12px}
.share-to{display:grid;grid-template-columns:repeat(auto-fill,minmax(7.4rem,1fr));gap:8px;margin:0;padding:0;list-style:none}
.share-to li{margin:0;padding:0}
.share-to a{display:flex;align-items:center;gap:9px;min-height:44px;padding:0 12px;border:1.5px solid var(--rule);border-radius:min(var(--radius,10px),12px);background:var(--surface);color:var(--ink);font-size:.88rem;font-weight:600;line-height:1.15;text-decoration:none}
.share-to a:hover{border-color:var(--accent);color:var(--accent)}
.share-to svg{flex:none}
.share-touch{display:none}
@media (pointer:coarse){.share-touch{display:block}}
.share-host,.share-links{display:grid;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid var(--rule)}
.share-host{gap:6px}
.share-dialog label{display:block;margin:0 0 4px;color:var(--ink-2);font-size:.78rem;font-weight:700}
.share-row{display:flex;align-items:center;gap:8px}
.share-row input{min-height:42px;text-overflow:ellipsis}
.share-row .btn{flex:none;justify-content:center;min-height:42px;margin:0}
.share-copy-btn{min-width:5.8rem}
.share-hint,.share-host-now{margin:0;color:var(--ink-2);font-size:.8rem}
.share-host-now{margin-top:10px}
.share-host-change{min-height:24px;padding:0;border:0;background:none;color:var(--accent);font:inherit;text-decoration:underline;cursor:pointer}
@media (max-width:760px){
  .share-dialog{width:100%;max-height:calc(100% - 56px);margin:auto 0 0;padding:0 max(16px,env(safe-area-inset-right,0px)) max(20px,env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));border-width:1.5px 0 0;border-radius:var(--radius) var(--radius) 0 0}
  .share-dialog[open]{animation:share-up .24s var(--ease)}
  .share-dialog.is-closing{animation:share-down .18s ease-in forwards}
  .share-head{margin:0 -16px;padding:20px 8px 8px 16px}
  .share-grip{display:block;position:absolute;top:8px;left:50%;width:40px;height:4px;margin-left:-20px;border-radius:2px;background:color-mix(in srgb,var(--ink) 30%,var(--paper))}
  .share-to{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.license{color:var(--ink-2);font-size:.8rem;text-decoration:none;border-bottom:1px dotted currentColor}
.license:hover{color:var(--ink)}

/* comments with a voice note or a picture */
.cf-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:-2px 0 4px}
.cf-tool{position:relative;display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:0 14px;border:1.5px solid var(--rule);border-radius:999px;background:var(--surface,transparent);color:var(--ink);font:inherit;font-size:.9rem;font-weight:600;cursor:pointer}
.cf-tool:hover{border-color:var(--ink)}
.cf-tool:disabled{opacity:.45;cursor:not-allowed}
.cf-tool:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.cf-hint{font-size:.8rem;color:var(--ink-2)}
.cf-rec{display:flex;align-items:center;gap:12px;padding:8px 12px 8px 8px;border:1.5px solid var(--rule);border-radius:999px}
.cf-stop{display:grid;place-items:center;width:40px;height:40px;flex:none;border:0;border-radius:50%;background:#c0392b;color:#fff;cursor:pointer}
.cf-stop span{width:12px;height:12px;border-radius:2px;background:currentColor}
.cf-meter{flex:1;height:6px;border-radius:3px;background:var(--rule);overflow:hidden}
.cf-meter i{display:block;height:100%;width:0;background:var(--accent);transition:width .2s linear}
.cf-time{font-variant-numeric:tabular-nums;font-size:.85rem;color:var(--ink-2);white-space:nowrap}
.cf-attached{display:grid;gap:10px}
.cf-item{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.cf-item audio{flex:1 1 220px;max-width:100%;height:40px}
.cf-item img{max-width:160px;max-height:120px;border-radius:8px;border:1.5px solid var(--rule);object-fit:cover}
.cf-remove{border:0;background:none;color:var(--ink-2);font:inherit;font-size:.85rem;text-decoration:underline;cursor:pointer;padding:6px 2px}
.cf-remove:hover{color:var(--ink)}
@media (prefers-reduced-motion:reduce){.cf-meter i{transition:none}}
.reply-pic{display:inline-block;margin-top:.5em;vertical-align:top;line-height:0;cursor:zoom-in}
.reply-pic img{display:block;width:auto;height:auto;max-width:min(100%,200px);max-height:150px;object-fit:cover;border-radius:8px;border:1px solid var(--rule)}
.reply-voice{margin-top:.5em;max-width:360px}
.reply-voice audio{width:100%;height:36px}
.reply-pic + .reply-voice{margin-top:.4em}
.reply-len{font-size:.8rem;color:var(--ink-2);font-variant-numeric:tabular-nums}
.comment-form label.cf-tool{display:inline-flex;flex-direction:row;align-items:center;gap:7px;margin:0;font-weight:600;font-size:.9rem}

/* who the comment will be from */
.cf-as{display:flex;align-items:center;gap:8px;margin:0;font-size:.86rem;color:var(--ink-2)}
.cf-as b{color:var(--ink)}
.cf-as img{width:28px;height:28px;border-radius:50%;object-fit:cover;flex:none}
.cf-note{margin:0;font-size:.82rem;color:var(--ink-2)}
/* a guest's fields; hidden while a Snug blogger comments as themselves */
.cf-guest{display:grid;gap:12px}
.cf-known{flex-wrap:wrap}
.cf-known .cf-site{overflow-wrap:anywhere}
.cf-switch{font:inherit;color:var(--accent);background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.cf-note a{color:var(--ink-2)}
.cf-note a:hover{color:var(--accent)}

/* a WeChat link: WeChat lets no other site show its articles or videos, so the card only says what it is */
.wx-card{display:flex;align-items:center;gap:12px;max-width:440px;padding:12px 14px;border-radius:var(--radius,12px);background:color-mix(in srgb,var(--ink) 5%,transparent);color:var(--ink);text-decoration:none}
.wx-card:hover{background:color-mix(in srgb,var(--ink) 9%,transparent)}
.wx-mark{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:10px;background:#07C160;color:#fff}
.wx-text{display:grid;gap:2px;min-width:0}
.wx-text b{font-size:.95rem}
.wx-text small{color:var(--ink-2);font-size:.8rem;overflow-wrap:anywhere}
.wx-go{margin-left:auto;color:var(--ink-2)}
.embed-wechat.compact .wx-card{padding:10px 12px}

/* the order of the comments: oldest first, or newest first (the reader's choice, kept in their browser) */
.replies-head{display:flex;justify-content:flex-end;margin:-6px 0 10px}
.replies-sort{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border:1px solid var(--rule);border-radius:999px;background:transparent;color:var(--ink-2);font:inherit;font-size:.85rem;cursor:pointer}
.replies-sort:hover{color:var(--ink);border-color:var(--ink-2)}
.replies-sort:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.replies-sort .s-up{opacity:1}.replies-sort .s-down{opacity:.4}
.replies-sort.is-newest .s-up{opacity:.4}.replies-sort.is-newest .s-down{opacity:1}

/* mentions between commenters: "@Name" marked in a comment, Reply under each, and the names offered while typing "@" */
.at-mention{font-weight:600;color:var(--accent)}
.reply-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 12px}
.reply-to{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:0 10px;border:0;border-radius:999px;background:transparent;color:var(--ink-2);font:inherit;font-size:.8rem;font-weight:600;cursor:pointer}
.reply-to:hover{color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}
.reply-to:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.cf-people{list-style:none;margin:-6px 0 0;padding:4px;border:1px solid var(--rule);border-radius:10px;background:var(--surface);box-shadow:0 8px 24px rgba(0,0,0,.08);max-width:20rem}
.cf-people li{padding:8px 10px;border-radius:7px;font-size:.92rem;cursor:pointer}
.cf-people li[aria-selected="true"],.cf-people li:hover{background:color-mix(in srgb,var(--accent) 12%,transparent)}
.comment-form .cf-email small{font-weight:400;font-size:.78rem;color:var(--ink-2)}

/* where a comment came from: the author, a guest (name not checked), the Fediverse, another website */
.reply-who{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px}
.reply-from{font-size:.72rem;font-weight:600;letter-spacing:.02em;padding:1px 8px;border-radius:999px;background:color-mix(in srgb,var(--ink) 7%,transparent);color:var(--ink-2)}
.from-author .reply-from{background:color-mix(in srgb,var(--accent) 16%,transparent);color:var(--accent)}
.reply-site{font-size:.8rem;color:var(--ink-2)}
span.reply-author{cursor:default}

/* a logo with a dark version: the one for the page's look */
/* a logo with a dark version, wherever it is drawn (header, footer) */
/* the author's picture, when dark mode has one of its own: the one for the mode shows (the other is only hidden, so each keeps its own layout) */
html[data-theme="light"] img.avatar-dark{display:none}
@media not all and (prefers-color-scheme:dark){html:not([data-theme="dark"]) img.avatar-dark{display:none}}
@media (prefers-color-scheme:dark){html:not([data-theme="light"]) img.avatar-light{display:none}}
html[data-theme="dark"] img.avatar-light{display:none}
html img.logo-dark{display:none}
@media (prefers-color-scheme:dark){html:not([data-theme="light"]) img.logo-light{display:none}html:not([data-theme="light"]) img.logo-dark{display:block}}
html[data-theme="dark"] img.logo-light{display:none}
html[data-theme="dark"] img.logo-dark{display:block}
/* the blog's name beside its logo: left out (for screen readers only) in a mode whose logo is drawn lettering */
html .brand-text.hide-light{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (prefers-color-scheme:dark){html:not([data-theme="light"]) .brand-text.hide-light{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}html:not([data-theme="light"]) .brand-text.hide-dark{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}
html[data-theme="dark"] .brand-text.hide-light{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}
html[data-theme="dark"] .brand-text.hide-dark{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
