/* The public pages. Home, Work and the missing page are quiet stones; Writing,
   posts and Bookmarks are flat colour and hand-drawn ink. One header, paper,
   serif and music control join them.

   Fonts: EB Garamond and Instrument Sans (the Latin and Latin Extended
   subsets) and JetBrains Mono for code, all SIL Open Font License
   (public/fonts/OFL.txt). Site.astro preloads the two every page draws with. */
@font-face { font-family: 'EB Garamond'; src: url('/fonts/eb-garamond-latin.woff2') format('woff2'); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'EB Garamond'; src: url('/fonts/eb-garamond-latin-ext.woff2') format('woff2'); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'EB Garamond'; src: url('/fonts/eb-garamond-italic-latin.woff2') format('woff2'); font-style: italic; font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'EB Garamond'; src: url('/fonts/eb-garamond-italic-latin-ext.woff2') format('woff2'); font-style: italic; font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/instrument-sans-latin.woff2') format('woff2'); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/instrument-sans-latin-ext.woff2') format('woff2'); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-code.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }

@supports (--gate: 0) {

/* ---- Tokens: light for a new visitor, dark by data-theme ---- */
:root {
    --paper: #f0eee6;
    --ink: #141413;
    --muted: #66645b;
    --line: #d6d2c4;
    --soft: #e7e4d8;
    --clay: #bd5d3a;
    /* Clay where it colours small text: dark enough to read on the paper. */
    --clay-text: #a14b2b;
    /* The colour blocks behind the drawings, and the drawings themselves. */
    --b-clay: #d97757;
    --b-sage: #bcd1ca;
    --b-sky: #a8c0da;
    --b-oat: #ddd0ba;
    --b-heather: #cbcadb;
    --art-line: #141413;
    --art-paper: #faf9f5;
    --serif: 'EB Garamond', Garamond, Georgia, serif;
    --sans: 'Instrument Sans', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    /* One design pixel: --u on the reading pages, --f on the one-screen ones. */
    --u: 1px;
    --f: 1px;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --paper: #171715;
    --ink: #f3f0e8;
    --muted: #a5a196;
    --line: #33322d;
    --soft: #22221f;
    --clay: #e08a6d;
    --clay-text: #e08a6d;
    --b-clay: #c46a4c;
    --b-sage: #8aa89e;
    --b-sky: #7b98b8;
    --b-oat: #b9ad9a;
    --b-heather: #9b99b4;
    color-scheme: dark;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font: 400 14px/1.45 var(--serif); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.stillness { --side: 22px; }
/* Clear of a notch when the phone is on its side. */
@supports (width: max(1px, env(safe-area-inset-left))) { body.stillness { --side: max(22px, env(safe-area-inset-left), env(safe-area-inset-right)); } }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; font-weight: 400; }
ol, ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--clay-text); outline-offset: 3px; }
[data-unselectable], [data-unselectable] * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
[data-unselectable] a, [data-unselectable] img, a[data-unselectable] { -webkit-user-drag: none; }
#pjax-root { position: relative; outline: 0; }
#yt-player { position: fixed; right: 0; bottom: 0; width: 2px; height: 2px; opacity: .01; pointer-events: none; z-index: -1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Header ---- */
.top { position: absolute; z-index: 5; top: 18px; top: max(18px, env(safe-area-inset-top)); left: var(--side); right: var(--side); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.top__name { font-size: 19px; text-decoration: none; white-space: nowrap; }
.top__end { display: flex; align-items: center; gap: 12px; }
.top nav { display: flex; gap: 14px; font: 400 12px/1.45 var(--sans); color: var(--muted); }
.top nav a { padding: 4px 0; text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.top__theme { display: none; place-items: center; width: 24px; height: 24px; margin-right: -5px; border-radius: 50%; color: var(--muted); }
.top__theme:hover { color: var(--ink); }
.top__theme svg { width: 15px; height: 15px; }
.js .top__theme { display: grid; }

/* ---- Music control ---- */
.music { display: none; align-items: center; gap: 12px; min-width: 0; font: 400 15px/1.45 var(--serif); color: var(--muted); text-align: left; -webkit-tap-highlight-color: transparent; }
.js .music { display: flex; }
.js .music[data-optional] { display: none; }
.music__dot { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); }
.music__dot svg { width: 9px; height: 9px; fill: currentColor; }
.music__hold, .music[aria-pressed="true"] .music__go { display: none; }
.music[aria-pressed="true"] .music__hold { display: block; }
.music__track { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music__track b { font-weight: 400; color: var(--ink); }
.music__eq { display: flex; flex: none; align-items: center; gap: 3px; height: 12px; }
.music__eq i { width: 3px; height: 3px; border-radius: 2px; background: var(--muted); }
.music.is-playing .music__eq i { background: var(--clay); animation: beat 1.2s ease-in-out infinite alternate; }
.music.is-playing .music__eq i:nth-child(2) { animation-delay: -.4s; }
.music.is-playing .music__eq i:nth-child(3) { animation-delay: -.8s; }
@keyframes beat { to { height: 11px; } }

/* ---- Social links ---- */
.social { display: flex; gap: 4px; }
.social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); transition: color .2s; }
.social a:hover { color: var(--clay-text); }
.social svg { width: 17px; height: 17px; fill: currentColor; }

/* ---- Stones: a canvas while WebGL runs, a still picture otherwise ---- */
.stage { position: relative; }
.stage__canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.stage__box { position: relative; }
.still { display: block; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: center / 100% 100% no-repeat; }
.stage.is-live .still { display: none; }
.stage.is-live .stage__box { position: static; width: auto; max-width: none; height: auto; margin: 0; }
.stage.is-live .stage__box::before { display: none; }

/* The pictures are asked for only where they are needed: without scripts,
   without WebGL, or if building the stones is slow. */

/* The homepage and missing-page pictures keep the shape they were drawn in, so
   that each label stays beside its own stone. */
.stage--home, .stage--lost { display: flex; align-items: center; justify-content: center; }
.stage--home .stage__box, .stage--lost .stage__box { width: 100%; max-width: 440px; }
.stage--home .stage__box::before { content: ''; display: block; padding-top: 92.31%; }
.stage--lost .stage__box::before { content: ''; display: block; padding-top: 84.62%; }
html:not(.js) .stage--home .still, .no-gl .stage--home .still, .stones-wait .stage--home .still { background-image: url('/images/stones/home-tall.webp'); }
html:not(.js) .stage--lost .still, .no-gl .stage--lost .still, .stones-wait .stage--lost .still { background-image: url('/images/stones/lost-tall.webp'); }
.stage--home.is-live, .stage--lost.is-live { display: block; }

.tag { position: absolute; left: var(--x); top: var(--y); transform: translateY(-50%); z-index: 2; display: flex; align-items: center; gap: 10px; min-height: 28px; font: 400 15px/1.45 var(--sans); color: var(--ink); white-space: nowrap; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.tag::before { content: ''; width: 26px; height: 1px; background: var(--muted); transition: width .3s, background .3s; }
.tag::after { content: ''; position: absolute; top: 100%; right: 0; left: 0; height: var(--rose, 0px); }
.tag:hover, .tag.is-hot, .tag:focus-visible { color: var(--clay-text); }
.tag:hover::before, .tag.is-hot::before, .tag:focus-visible::before { width: 44px; background: var(--clay-text); }
.tag[data-stone="0"] { --x: 67.31%; --y: 76.29%; }
.tag[data-stone="1"] { --x: 62.04%; --y: 60.22%; }
.tag[data-stone="2"] { --x: 52.95%; --y: 46.07%; }
.tag[data-stone="3"] { --x: 50.28%; --y: 33.54%; }
.tag[data-stone="4"] { --x: 43.52%; --y: 22.65%; }
/* These two only do something with scripts. */
html:not(.js) [data-music], html:not(.js) [data-greet] { display: none; }

/* ---- Home: one screen. The stones take what the intro and music leave ---- */
.home { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-top: 66px; padding-top: calc(max(18px, env(safe-area-inset-top)) + 48px); }
.intro { width: 100%; padding: 0 var(--side); }
.intro__photo { display: block; width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: top; filter: saturate(.8); }
.intro h1 { margin: 18px 0 8px; font-size: 29px; line-height: 1.18; }
.intro p { margin-bottom: 8px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.intro p a { text-decoration: none; }
.intro p a:hover { color: var(--clay-text); }
.intro .social { margin-left: -8px; }
.home .stage { flex: 1 0 240px; }
.home .music { margin: 0 var(--side) 18px; margin-bottom: max(18px, env(safe-area-inset-bottom)); align-self: flex-start; max-width: calc(100% - 2 * var(--side)); min-height: 30px; }
html:not(.js) .home { padding-bottom: 24px; }

/* ---- Work: one screen with scripts, every project in a column without ---- */
.work { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-top: 66px; padding-top: calc(max(18px, env(safe-area-inset-top)) + 48px); }
.work__head { position: relative; padding: 0 var(--side); }
.work__head h1 { font-size: 30px; line-height: 1.15; }
.work__head p { margin-top: 4px; font-size: 15px; font-style: italic; color: var(--muted); }
.projects { margin: 20px var(--side) 0; }
.js .project { display: none; }
.js .project.is-current { display: block; }
html:not(.js) .project + .project { margin-top: 44px; }
.project__shot { display: block; height: 210px; border-radius: 4px; overflow: hidden; }
.project__shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.project__card { display: grid; place-items: center; height: 100%; padding: 24px; border: 1px solid var(--line); border-radius: 4px; background: var(--soft); font-size: 28px; text-align: center; color: var(--muted); }
.project__info { margin-top: 16px; }
.project__num { font: 400 12px/1.45 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.project h2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 4px 0; font-size: 32px; line-height: 1.45; overflow-wrap: break-word; }
.project__desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 17px; line-height: 1.45; color: var(--muted); }
.project__visit { display: inline-block; margin-top: 10px; padding-bottom: 3px; border-bottom: 1px solid var(--clay); font: 400 13px/1.45 var(--sans); text-decoration: none; }
html:not(.js) .project h2, html:not(.js) .project__desc { display: block; }
.work .music { margin: 0 var(--side) 18px; margin-bottom: max(18px, env(safe-area-inset-bottom)); align-self: flex-start; max-width: calc(100% - 2 * var(--side)); min-height: 30px; }

.stage--work { flex: 1 0 96px; display: flex; align-items: center; }
.stage--work .stage__box { display: flex; flex: 1; justify-content: center; padding: 0 var(--side); }
.pebble { flex: 1 1 0; max-width: 112px; height: 78px; background: center / contain no-repeat; border-radius: 40%; -webkit-tap-highlight-color: transparent; }
.no-gl .pebble--0, .stones-wait .pebble--0 { background-image: url('/images/stones/stone-0.webp'); }
.no-gl .pebble--1, .stones-wait .pebble--1 { background-image: url('/images/stones/stone-1.webp'); }
.no-gl .pebble--2, .stones-wait .pebble--2 { background-image: url('/images/stones/stone-2.webp'); }
.no-gl .pebble--3, .stones-wait .pebble--3 { background-image: url('/images/stones/stone-3.webp'); }
.no-gl .pebble--4, .stones-wait .pebble--4 { background-image: url('/images/stones/stone-4.webp'); }
.no-gl .pebble[aria-pressed="true"], .stones-wait .pebble[aria-pressed="true"] { background-image: url('/images/stones/stone-clay.webp'); transform: translateY(-10px); }
.stage--work.is-live .stage__box { display: block; flex: none; padding: 0; }
.stage--work.is-live .pebble { position: absolute; z-index: 2; max-width: none; background: none; transform: none; border-radius: 50%; }
/* More projects than stones: previous and next sit beside the headline. */
.steps { position: absolute; top: -4px; right: var(--side); display: flex; gap: 6px; }
.step { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; font: 400 15px/1 var(--sans); color: var(--muted); }
.step:hover { border-color: var(--clay); color: var(--clay-text); }
html:not(.js) .steps { display: none; }
/* Without scripts the stones cannot choose anything: a still row of them. */
html:not(.js) .stage--work { flex: none; height: 110px; margin-top: 24px; background: url('/images/stones/work-row.webp') center / contain no-repeat; }
html:not(.js) .stage--work > * { display: none; }

/* ---- The missing page ---- */
.lost { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-top: 66px; padding-top: calc(max(18px, env(safe-area-inset-top)) + 48px); }
.lost .stage { flex: 0 0 330px; height: 330px; margin-top: 54px; }
.lost__text { margin-top: 20px; padding: 0 20px 24px; text-align: center; }
.lost__text h1 { font-size: 40px; line-height: 1.45; }
.lost__text p { margin: 6px 0 20px; font-size: 19px; color: var(--muted); }
.lost__home { display: inline-block; padding: 10px 20px; border: 1px solid var(--ink); border-radius: 99px; font: 400 13px/1.45 var(--sans); text-decoration: none; }
.lost__home:hover { background: var(--ink); color: var(--paper); }
.lost .music { margin: auto var(--side) 18px; margin-bottom: max(18px, env(safe-area-inset-bottom)); align-self: flex-start; max-width: calc(100% - 2 * var(--side)); }

/* ---- Reading pages: the content, then a footer at its end ---- */
.read-page #pjax-root { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.read { margin: 0 var(--side); padding: 74px 0 40px; padding-top: calc(max(18px, env(safe-area-inset-top)) + 56px); }
.headline { font-size: 31px; line-height: 1.16; letter-spacing: -.018em; text-wrap: balance; }
.headline b { font-family: var(--sans); font-weight: 600; font-size: .93em; letter-spacing: -.032em; }
.empty { margin-top: 30px; font-size: 19px; color: var(--muted); }
.end { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: auto var(--side) 0; padding: 14px 0 18px; padding-bottom: max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.end .music { min-height: 34px; }
.end .music__track { max-width: 176px; }
.end .music__eq { display: none; }
.end .social { flex: none; gap: 0; margin: 0 -8px 0 auto; }
.end .social a { width: 30px; }

/* The ink drawings: a paper blob and strokes that draw themselves in. */
.art { overflow: visible; }
.art__paper { fill: var(--art-paper); }
.art__ink { fill: none; stroke: var(--art-line); stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: draw 1.3s cubic-bezier(.5, 0, .2, 1) forwards; animation-delay: var(--d, 0s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.mini { display: grid; place-items: center; border-radius: 10px; }
.b-clay { background: var(--b-clay); }
.b-sage { background: var(--b-sage); }
.b-sky { background: var(--b-sky); }
.b-oat { background: var(--b-oat); }
.b-heather { background: var(--b-heather); }

/* Writing */
.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
html:not(.js) .topics { display: none; }
.topic { display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 12px; align-items: center; align-content: start; padding-top: 14px; border-top: 1px solid var(--line); border-radius: 0; text-align: left; -webkit-tap-highlight-color: transparent; }
.topic[aria-pressed="true"] { padding-top: 12px; border-top: 3px solid var(--ink); }
.topic .mini { width: 58px; height: 58px; }
.topic .art { width: 88%; height: 88%; }
.topic .art__ink { stroke-width: 9; }
.topic__text { min-width: 0; }
.topic b { display: block; font: 600 19px/1.45 var(--sans); overflow-wrap: break-word; }
.topic small { display: block; font-size: 15px; color: var(--muted); }
@media (max-width: 699px) { .topic--long b { font-size: 15.5px; } }
.topics + .sr-only + .rows { margin-top: 0; }
.rows { margin-top: 30px; }
.rows > li { border-top: 1px solid var(--line); }
.rows > li[hidden] { display: none; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) 20px; gap: 4px 0; align-items: baseline; padding: 17px 0; font-size: 19px; line-height: 1.45; text-decoration: none; }
.row__meta { font: 400 13px/1.45 var(--sans); color: var(--muted); }
.row time { grid-column: 1; grid-row: 1; }
.row__topic { grid-column: 2; grid-row: 1; }
.row__topic:not(:empty)::before { content: '\00b7'; margin: 0 .4em; }
.row__title { grid-column: 1 / 3; grid-row: 2; overflow-wrap: break-word; }
.row__arrow { grid-column: 3; grid-row: 2; text-align: right; }
.row:hover .row__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* Bookmarks */
.marks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 34px; }
.marks li { display: flex; }
.mark { display: grid; flex: 1; grid-template-columns: 66px minmax(0, 1fr); gap: 20px; align-items: center; padding: 16px; border-radius: 14px; background: var(--soft); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.mark .mini { height: 66px; }
.mark .art { width: 86%; height: 86%; }
.mark .art__ink { stroke-width: 8; }
.mark__text { min-width: 0; overflow-wrap: anywhere; }
.mark b { display: block; margin-bottom: 6px; font: 600 17px/1.25 var(--sans); }
.mark small { display: block; font-size: 15px; color: var(--muted); }
.mark:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* A post */
.read--post { padding-top: 66px; padding-top: calc(max(18px, env(safe-area-inset-top)) + 48px); padding-bottom: 0; }
.band { display: grid; place-items: center; height: 210px; border-radius: 16px; overflow: hidden; }
.band .art { width: 190px; height: 190px; }
.band--cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.band--cover { grid-template-rows: 100%; grid-template-columns: 100%; }
.post { padding: 24px 0 36px; font-size: 19px; line-height: 1.62; overflow-wrap: break-word; }
.post__meta { margin-bottom: 12px; font: 400 13px/1.45 var(--sans); color: var(--muted); }
.post header h1 { margin-bottom: 26px; font: 600 28px/1.15 var(--sans); letter-spacing: -.03em; }
.post-content > :first-child { margin-top: 0; }
.post-content p { margin: 0 0 20px; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 { margin: 1.7em 0 .6em; font-family: var(--sans); font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }
.post-content h1 { font-size: 1.22em; }
.post-content h2 { font-size: 1.13em; }
.post-content h3 { font-size: 1.02em; }
.post-content h4, .post-content h5, .post-content h6 { font-size: .9em; }
.post-content strong, .post-content b { font-weight: 700; }
.post-content a { text-decoration: underline; text-decoration-color: var(--clay); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-content a:hover { color: var(--clay-text); }
.post-content ul, .post-content ol { margin: 0 0 20px; padding-left: 1.3em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin: .25em 0; }
.post-content li > ul, .post-content li > ol { margin-bottom: 0; }
.post-content img, .post-content video { display: block; max-width: 100%; height: auto; margin: 28px auto; border-radius: 12px; }
.post-content code { padding: .1em .32em; border: 1px solid var(--line); border-radius: 5px; background: var(--soft); font-family: var(--mono); font-size: .76em; }
.post-content pre { margin: 0 0 24px; padding: 16px 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-family: var(--mono); font-size: 13px; line-height: 1.6; overflow-wrap: normal; font-variant-ligatures: none; }
.post-content pre code { padding: 0; border: 0; background: none; font-size: inherit; }
.post-content blockquote { margin: 28px 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--clay); color: var(--muted); font-style: italic; }
.post-content blockquote > :last-child { margin-bottom: 0; }
.post-content table { display: block; max-width: 100%; margin: 0 0 24px; overflow-x: auto; border-collapse: collapse; font-size: .84em; line-height: 1.45; }
.post-content th, .post-content td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: normal; }
.post-content th { background: var(--soft); font-weight: 600; }
.post-content hr { margin: 36px 0; border: 0; border-top: 1px solid var(--line); }

/* ---- Small phones ---- */
@media (max-width: 374px) {
    body.stillness { --side: 16px; }
    @supports (width: max(1px, env(safe-area-inset-left))) { body.stillness { --side: max(16px, env(safe-area-inset-left), env(safe-area-inset-right)); } }
    .top__name { font-size: 17px; }
    .top__end { gap: 8px; }
    .top nav { gap: 10px; font-size: 11.5px; }
    .headline { font-size: 28px; }
    .topic { grid-template-columns: 46px minmax(0, 1fr); column-gap: 10px; }
    .topic .mini { width: 46px; height: 46px; }
    .topic b { font-size: 16px; }
    .end { gap: 8px; }
    .end .music { gap: 8px; font-size: 14px; }
    .tag { font-size: 14px; gap: 8px; }
    .tag::before { width: 18px; }
    .tag:hover::before, .tag.is-hot::before, .tag:focus-visible::before { width: 30px; }
}

/* ---- Short phone screens: everything a little smaller, still one screen ---- */
@media (max-width: 699px) and (max-height: 720px) {
    .intro__photo { width: 40px; height: 40px; }
    .intro h1 { margin: 10px 0 6px; font-size: 25px; }
    .intro p { margin-bottom: 4px; font-size: 15px; line-height: 1.4; }
    .home .stage { flex-basis: 230px; }
    .home .stage__box { max-width: 320px; }
    .projects { margin-top: 14px; }
    .project__shot { height: 170px; height: 26vh; height: 26dvh; }
    .project__info { margin-top: 10px; }
    .project h2 { margin: 0; font-size: 27px; line-height: 1.35; }
    .project__desc { -webkit-line-clamp: 2; font-size: 16px; line-height: 1.35; }
    .project__visit { margin-top: 6px; }
    .lost .stage { flex-basis: 260px; height: 260px; margin-top: 16px; }
    .lost__text { margin-top: 10px; }
    .lost__text h1 { font-size: 34px; }
}

/* ---- Between phone and desktop: the phone arrangement, set larger ---- */
@media (min-width: 700px) {
    body.stillness { --side: 48px; }
    @supports (width: max(1px, env(safe-area-inset-left))) { body.stillness { --side: max(48px, calc((100% - 660px) / 2), env(safe-area-inset-left), env(safe-area-inset-right)); } }
    .top { top: 28px; top: max(28px, env(safe-area-inset-top)); }
    .top__name { font-size: 22px; }
    .top nav { gap: 26px; font-size: 13px; }
    .top__end { gap: 22px; }
    .home, .work, .lost { padding-top: 96px; }
    .intro__photo { width: 60px; height: 60px; }
    .intro h1 { margin: 18px 0 12px; font-size: 40px; text-wrap: balance; }
    .intro p { margin-bottom: 14px; font-size: 19px; }
    .home .stage { flex-basis: 320px; }
    .home .stage__box { max-width: 520px; }
    .home .music, .work .music, .lost .music { margin-bottom: 30px; font-size: 17px; }
    .work__head h1 { font-size: 40px; }
    .work__head p { font-size: 18px; }
    /* The picture keeps the shape it has on the desktop. */
    .project__shot { height: 360px; height: 34vh; height: 34dvh; max-width: 100%; aspect-ratio: 56 / 33; }
    .project h2 { font-size: 42px; line-height: 1.35; }
    .project__desc { font-size: 20px; }
    .tag { font-size: 16px; }
    .stage--work { flex-basis: 150px; }
    .pebble { height: 104px; }
    .read { padding-top: 112px; padding-bottom: 56px; }
    .headline { font-size: 46px; }
    .topics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 34px 0 30px; }
    .topic { grid-template-columns: 1fr; row-gap: 8px; }
    .row { font-size: 21px; }
    .marks { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 34px; }
    .read--post { padding-top: 92px; padding-bottom: 0; }
    .band { height: 280px; }
    .band .art { width: 240px; height: 240px; }
    .post { padding-top: 36px; font-size: 21px; }
    .post header h1 { font-size: 38px; }
    .post-content pre { font-size: 14px; }
    .end { padding-top: 20px; }
    .end .music { font-size: 17px; }
    .end .music__track { max-width: 320px; }
    .end .music__eq { display: flex; }
    .end .social { gap: 4px; }
    .end .social a { width: 34px; }
}

@media (min-width: 700px) and (max-height: 880px) {
    .home, .work, .lost { padding-top: 84px; }
    .intro__photo { width: 52px; height: 52px; }
    .intro h1 { margin: 12px 0 8px; font-size: 34px; }
    .intro p { margin-bottom: 8px; font-size: 18px; }
    .projects { margin-top: 14px; }
    .project__shot { height: 34vh; height: clamp(180px, calc(100vh - 500px), 34vh); height: clamp(180px, calc(100dvh - 500px), 34dvh); }
    .project h2 { margin: 0; font-size: 34px; }
    .project__info { margin-top: 12px; }
    .stage--work { flex-basis: 110px; }
}

/* ---- The wide composition, drawn on 1280 x 760 and centred ----
   javascript/stone.js uses the same condition. */
@media (min-width: 1080px), (min-width: 900px) and (min-aspect-ratio: 6/5) {
    /* One-screen pages are sized to fit the window both ways; the reading
       pages only grow. --side is the margin that centres the composition. */
    body.stillness { --side: 96px; --vo: 0px; }
    @supports (width: clamp(1px, 2px, 3px)) {
        :root { --u: clamp(1px, min(.078125vw, .131579vh), 1.35px); }
        .home-page, .work-page, .lost-page { --f: clamp(.62px, min(.078125vw, .131579vh), 1.35px); }
        body.stillness { --side: max(min(96px, 7.5vw), calc((100% - var(--u) * 1088) / 2)); }
        body.stillness.home-page, body.stillness.work-page, body.stillness.lost-page { --side: max(calc(var(--f) * 96), calc((100% - var(--f) * 1088) / 2)); --vo: max(0px, calc((100vh - var(--f) * 760) / 2)); }
    }

    .top { top: calc(var(--u) * 32); }
    .top__name { font-size: calc(var(--u) * 22); }
    .top nav { gap: calc(var(--u) * 30); font-size: calc(var(--u) * 13); }
    .top__end { gap: calc(var(--u) * 24); }
    .home-page .top, .work-page .top, .lost-page .top { top: calc(var(--vo) + var(--f) * 32); }
    .home-page .top__name, .work-page .top__name, .lost-page .top__name { font-size: max(17px, calc(var(--f) * 22)); }
    .home-page .top nav, .work-page .top nav, .lost-page .top nav { gap: calc(var(--f) * 30); font-size: max(12px, calc(var(--f) * 13)); }
    .home-page .top__end, .work-page .top__end, .lost-page .top__end { gap: calc(var(--f) * 24); }

    .home, .work, .lost { display: block; position: relative; height: 100vh; min-height: calc(var(--f) * 760); padding: 0; }
    @supports (height: 100dvh) {
        .home, .work, .lost { height: 100dvh; }
    }
    @supports (height: 100dvh) and (width: clamp(1px, 2px, 3px)) {
        body.stillness.home-page, body.stillness.work-page, body.stillness.lost-page { --vo: max(0px, calc((100dvh - var(--f) * 760) / 2)); }
    }
    .home .music, .js .work .music, .lost .music { position: absolute; z-index: 4; left: var(--side); bottom: calc(var(--vo) + var(--f) * 30); margin: 0; max-width: calc(var(--f) * 420); font-size: max(14px, calc(var(--f) * 17)); }

    .intro { position: absolute; z-index: 2; left: var(--side); top: calc(var(--vo) + var(--f) * 176); width: calc(var(--f) * 440); padding: 0; }
    .intro__photo { width: calc(var(--f) * 64); height: calc(var(--f) * 64); }
    .intro h1 { margin: calc(var(--f) * 31) 0 calc(var(--f) * 20); font-size: calc(var(--f) * 44); text-wrap: wrap; }
    .intro p { margin-bottom: calc(var(--f) * 24); font-size: max(13px, calc(var(--f) * 19)); }
    .intro .social a { width: calc(var(--f) * 34); height: calc(var(--f) * 34); min-width: 28px; min-height: 28px; }
    .intro .social svg { width: max(15px, calc(var(--f) * 17)); height: max(15px, calc(var(--f) * 17)); }

    .home .stage { position: absolute; left: calc(var(--side) + var(--f) * 424); top: calc(var(--vo) + var(--f) * 70); width: calc(var(--f) * 700); height: calc(var(--f) * 660); }
    .home .stage__box { max-width: none; }
    .stage--home .stage__box::before { padding-top: 94.29%; }
    html:not(.js) .stage--home .still, .no-gl .stage--home .still, .stones-wait .stage--home .still { background-image: url('/images/stones/home-wide.webp'); }
    .tag { font-size: max(13px, calc(var(--f) * 15)); gap: calc(var(--f) * 10); }
    .tag::before { width: calc(var(--f) * 26); }
    .tag:hover::before, .tag.is-hot::before, .tag:focus-visible::before { width: calc(var(--f) * 44); }
    .tag[data-stone="0"] { --x: 80.68%; --y: 77.22%; }
    .tag[data-stone="1"] { --x: 75.22%; --y: 60.93%; }
    .tag[data-stone="2"] { --x: 65.81%; --y: 46.58%; }
    .tag[data-stone="3"] { --x: 63.04%; --y: 33.88%; }
    .tag[data-stone="4"] { --x: 56.03%; --y: 22.83%; }

    .js .work__head { position: absolute; left: var(--side); top: calc(var(--vo) + var(--f) * 104); width: calc(var(--f) * 1088); padding: 0; }
    .steps { top: calc(var(--f) * 10); right: 0; }
    html:not(.js) .steps { display: none; }
    .js .work__head h1 { font-size: calc(var(--f) * 40); }
    .js .work__head p { margin-top: calc(var(--f) * 4); font-size: max(13px, calc(var(--f) * 18)); line-height: 1.15; }
    .js .projects { position: absolute; left: var(--side); top: calc(var(--vo) + var(--f) * 210); width: calc(var(--f) * 1088); height: calc(var(--f) * 330); margin: 0; }
    .js .project.is-current { position: relative; height: 100%; }
    .js .project__shot { width: calc(var(--f) * 560); height: calc(var(--f) * 330); }
    .js .project__info { position: absolute; left: calc(var(--f) * 616); top: 0; width: calc(var(--f) * 420); max-height: 100%; margin: 0; }
    .js .project__num { font-size: max(11px, calc(var(--f) * 12)); }
    .js .project h2 { margin: calc(var(--f) * 12) 0; font-size: calc(var(--f) * 48); line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
    .js .project__desc { -webkit-line-clamp: 4; font-size: max(14px, calc(var(--f) * 22)); line-height: 1.45; }
    .js .project__visit { margin-top: calc(var(--f) * 26); font-size: max(12px, calc(var(--f) * 13)); }
    .js .project__card { font-size: calc(var(--f) * 40); }
    .js .stage--work { position: absolute; left: var(--side); top: calc(var(--vo) + var(--f) * 548); width: calc(var(--f) * 1088); height: calc(var(--f) * 170); }
    /* Without scripts Work is the stacked column, set a little wider. */
    html:not(.js) .work { display: flex; height: auto; padding: calc(var(--f) * 104) 0 40px; }
    html:not(.js) .work__head, html:not(.js) .projects { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; padding: 0; }
    html:not(.js) .project__shot { height: 420px; }

    .lost .stage { position: absolute; left: calc(var(--side) + var(--f) * 244); top: calc(var(--vo) + var(--f) * 80); width: calc(var(--f) * 600); height: calc(var(--f) * 380); margin: 0; }
    .lost .stage__box { max-width: none; }
    .stage--lost .stage__box::before { padding-top: 63.33%; }
    html:not(.js) .stage--lost .still, .no-gl .stage--lost .still, .stones-wait .stage--lost .still { background-image: url('/images/stones/lost-wide.webp'); }
    .lost__text { position: absolute; left: 0; right: 0; top: calc(var(--vo) + var(--f) * 470); margin: 0; padding: 0 20px; }
    .lost__text h1 { font-size: calc(var(--f) * 40); }
    .lost__text p { margin: calc(var(--f) * 6) 0 calc(var(--f) * 20); font-size: max(14px, calc(var(--f) * 19)); }
    .lost__home { padding: calc(var(--f) * 10) calc(var(--f) * 20); font-size: max(12px, calc(var(--f) * 13)); }

    .read { padding: calc(var(--u) * 104) 0 calc(var(--u) * 56); }
    .headline { font-size: calc(var(--u) * 50); }
    .topics { gap: calc(var(--u) * 20); margin: calc(var(--u) * 34) 0 calc(var(--u) * 30); }
    .topic { grid-template-columns: calc(var(--u) * 58) minmax(0, 1fr); column-gap: calc(var(--u) * 12); row-gap: 0; padding-top: calc(var(--u) * 14); }
    .topic[aria-pressed="true"] { padding-top: calc(var(--u) * 14 - 2px); }
    .topic .mini { width: calc(var(--u) * 58); height: calc(var(--u) * 58); border-radius: calc(var(--u) * 10); }
    .topic b { font-size: calc(var(--u) * 19); }
    .topic small { font-size: calc(var(--u) * 17); }
    .rows { margin-top: calc(var(--u) * 30); }
    .row { grid-template-columns: calc(var(--u) * 130) calc(var(--u) * 110) minmax(0, 1fr) calc(var(--u) * 20); gap: 0 calc(var(--u) * 12); padding: calc(var(--u) * 17) 0; font-size: calc(var(--u) * 22); }
    .row__meta { font-size: calc(var(--u) * 13); }
    .row__topic { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .row__topic:not(:empty)::before { content: none; }
    .row__title { grid-column: 3; grid-row: 1; }
    .row__arrow { grid-column: 4; grid-row: 1; }
    .marks { gap: calc(var(--u) * 20); margin-top: calc(var(--u) * 34); }
    .mark { grid-template-columns: calc(var(--u) * 96) minmax(0, 1fr); gap: calc(var(--u) * 20); padding: calc(var(--u) * 24); border-radius: calc(var(--u) * 14); }
    .mark .mini { height: calc(var(--u) * 96); border-radius: calc(var(--u) * 10); }
    .mark b { font-size: calc(var(--u) * 20); }
    .mark small { font-size: calc(var(--u) * 17); }
    .read--post { padding: calc(var(--u) * 84) 0 0; }
    .band { height: calc(var(--u) * 300); border-radius: calc(var(--u) * 16); }
    .band .art { width: calc(var(--u) * 260); height: calc(var(--u) * 260); }
    .post { width: calc(var(--u) * 660); max-width: 100%; margin: 0 auto; padding: calc(var(--u) * 36) 0 calc(var(--u) * 50); font-size: calc(var(--u) * 22); }
    .post__meta { font-size: calc(var(--u) * 13); }
    .post header h1 { margin-bottom: calc(var(--u) * 26); font-size: calc(var(--u) * 40); }
    .post-content pre { font-size: calc(var(--u) * 14); }
    .end { padding: calc(var(--u) * 20) 0 calc(var(--u) * 28); }
    .end .music { gap: calc(var(--u) * 12); font-size: calc(var(--u) * 17); }
    .end .social a { width: calc(var(--u) * 34); height: calc(var(--u) * 34); }
    .end .social svg { width: calc(var(--u) * 17); height: calc(var(--u) * 17); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
    .music.is-playing .music__eq i { animation: none; height: 8px; }
    .art__ink { animation: none; stroke-dashoffset: 0; }
}

} /* @supports */
