/* suhailyadgari.com
   A mustard/brown "field" for the nav, homepage top, essay heads and feet; plain reading pages below it.
   Layout modelled on tomcritchlow.com, drawn with Suhail's own marks: wave logo, Cairo, mustard and brown. */

@font-face { font-family: "Cairo"; src: url("/assets/Cairo.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #faf5ea; --panel: #fffdf8; --fg: #2a1505; --muted: #7b6753;
  --rule: #e7dcc8; --field: #d89b00; --mark: #c48800; --ink: #8f5d00;
  --on-field: #2a1505; --hl: #f2cf6c; --wash: #f3e9d3;
  --font-body: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 64px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #170b03; --panel: #22130a; --fg: #f4ecdd; --muted: #b8a690;
  --rule: #3b2717; --field: #4a2408; --mark: #e2a517; --ink: #ecb432;
  --on-field: #fcf3df; --hl: #6d4b00; --wash: #2d1a0c;
  color-scheme: dark;
} }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17.5px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
::selection { background: var(--hl); color: var(--fg); }
.field ::selection { background: var(--on-field); color: var(--field); }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.field :focus-visible { outline-color: var(--on-field); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus-visible { position: fixed !important; top: 12px; left: 12px; width: auto; height: auto; overflow: visible; clip-path: none; z-index: 100; background: var(--on-field); color: var(--field); padding: 10px 14px; border-radius: 8px; font: 600 14px/1 var(--font-body); text-decoration: none; }
.pad { padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap { max-width: 1320px; margin-inline: auto; }
kbd { font: 500 11px/1 var(--font-mono); border: 1px solid currentColor; border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; }

/* ---------- the field: nav ---------- */
.field { position: relative; background: var(--field); color: var(--on-field); }
.nav { padding-top: 22px; font-size: 15px; }
.nav-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.nav nav { display: flex; gap: 10px; align-items: center; }
.nav a { text-decoration: none; padding: 3px 7px; border-radius: 6px; transition: background .12s ease-out, color .12s ease-out; }
.nav nav a[aria-current="page"] { background: color-mix(in oklch, var(--on-field) 14%, transparent); font-weight: 700; }
.nav nav a:hover { background: var(--on-field); color: var(--field); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font: 800 19px/1 var(--font-body); letter-spacing: -.01em; text-decoration: none; padding: 2px 0 !important; }
.wordmark svg { width: 30px; height: auto; flex: none; transition: transform .18s ease-out; }
.wordmark:hover svg { transform: translateX(3px); }
.searchbtn { font: 600 14px/1 var(--font-body); display: inline-flex; gap: 8px; align-items: center; background: transparent; color: inherit; border: 1.5px solid currentColor; border-radius: 8px; padding: 6px 9px; cursor: pointer; margin-left: 6px; transition: background .12s ease-out, color .12s ease-out, border-color .12s ease-out; }
.field .searchbtn:hover { background: var(--on-field); color: var(--field); }
.searchbtn.quiet { border: 1px solid var(--rule); color: var(--muted); background: var(--panel); margin-left: 0; }
.searchbtn.quiet:hover { border-color: var(--fg); color: var(--fg); }

/* ---------- homepage ---------- */
.home { padding-bottom: 56px; overflow: hidden; }
.ascii { font-family: var(--font-mono); margin: 0; white-space: pre; overflow: hidden; user-select: none; -webkit-user-select: none; }
.eat { font-size: 7px; line-height: 1.15; margin-top: 26px; min-height: clamp(110px, 11.5vw, 170px); cursor: crosshair; color: color-mix(in oklch, var(--on-field) 17%, transparent); }
.eat b { color: var(--on-field); font-weight: 700; background: color-mix(in oklch, var(--on-field) 30%, transparent); }
.eat.hash { line-height: 1; margin-top: 40px; color: var(--on-field); }
.eat.hash b { background: none; }
.eat u { text-decoration: none; color: var(--on-field); font-weight: 700; }
.intro2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(20px, 5vw, 80px); margin-top: 30px; }
.say { font: 500 clamp(17px, 1.45vw, 20px)/1.5 var(--font-body); margin: 0; max-width: 44ch; }
.say + .say { margin-top: .8em; }
.say a { text-decoration-thickness: 2px; text-underline-offset: 4px; transition: background .12s ease-out, color .12s ease-out; }
.say a:hover { background: var(--on-field); color: var(--field); text-decoration: none; }

.signup { margin-top: 24px; padding-top: 16px; border-top: 1px solid color-mix(in oklch, var(--on-field) 28%, transparent); display: grid; gap: 10px; max-width: 520px; }
.signup h2 { font: 600 13px/1 var(--font-mono); margin: 0; }
.signup p { margin: 0; font-size: 15px; }
.signup .row { display: flex; gap: 8px; }
.signup .addr { flex: 1; min-width: 0; font: 400 15px/1.2 var(--font-body); padding: 10px 12px; border: 1.5px solid var(--on-field); border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.signup .go { font: 700 14px/1.2 var(--font-body); padding: 10px 16px; border: 1.5px solid var(--on-field); border-radius: 8px; background: var(--on-field); color: var(--field); text-decoration: none; white-space: nowrap; text-align: center; transition: opacity .12s ease-out, transform .12s ease-out; }
.signup .go:hover { opacity: .88; }
.signup .go:active { transform: scale(.97); }
.signup :focus-visible { outline-offset: 2px; border-radius: 8px; }
.signup-latest { font-size: 13.5px !important; line-height: 1.45; opacity: .9; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.signup-latest a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

.projects { margin-top: 64px; border-top: 2px solid var(--on-field); padding-top: 16px; }
.tops { margin-top: 72px; border-top: 2px solid var(--on-field); padding-top: 16px; }
.tops h2, .projects h2, .lhead h2, .archive h2 { font: 600 13px/1 var(--font-mono); margin: 0; }
.feathead { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; min-height: 36px; }
.featnav { display: flex; align-items: center; gap: 10px; font: 500 12.5px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.featnav button { font: 600 15px/1 var(--font-body); width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--on-field); background: transparent; color: inherit; cursor: pointer; transition: transform .12s ease-out, background .12s ease-out, color .12s ease-out, opacity .15s ease-out; }
.featnav button:hover { background: var(--on-field); color: var(--field); }
.featnav button:active { transform: scale(.94); }
.featnav button:disabled { opacity: .35; cursor: default; pointer-events: none; }
.row-scroll { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 2px; padding: 8px var(--gutter) 22px 2px; margin-right: calc(-1 * var(--gutter)); scrollbar-width: thin; scrollbar-color: var(--on-field) transparent; }

.proj { flex: none; width: min(340px, 78vw); scroll-snap-align: start; text-decoration: none; color: inherit; border: 2px solid var(--on-field); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease-out, box-shadow .18s ease-out; }
a.proj:hover, a.proj:focus-visible { transform: translateY(-6px); box-shadow: 0 14px 0 -6px var(--on-field); }
.proj figure { margin: 0; aspect-ratio: 1; background: var(--on-field); border-bottom: 2px solid var(--on-field); overflow: hidden; }
.proj img { display: block; width: 100%; height: 100%; object-fit: cover; }
.proj figure.mark, .sheet figure.mark { background: #000; display: grid; place-items: center; }
.proj figure.mark img, .sheet figure.mark img { width: 34%; height: auto; object-fit: contain; }
button.proj { font: inherit; text-align: left; background: transparent; padding: 0; cursor: pointer; }
button.proj:hover, button.proj:focus-visible { transform: translateY(-6px); box-shadow: 0 14px 0 -6px var(--on-field); }
button.proj:active { transform: translateY(-3px); }
.proj .ph { display: grid; place-items: center; height: 100%; padding: 0 18px; text-align: center; color: var(--field); font: 900 clamp(34px, 5vw, 50px)/1 var(--font-body); letter-spacing: -.04em; text-wrap: balance; }
.proj .meta { padding: 14px 16px 16px; display: grid; gap: 4px; }
.proj b { font: 800 22px/1.15 var(--font-body); letter-spacing: -.02em; }
.proj i { font-style: normal; font-size: 15px; line-height: 1.4; }
.proj small { font: 400 12px/1.4 var(--font-mono); margin-top: 4px; opacity: .85; display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }

/* a miniature of the essay page: real title, real opening paragraphs */
.mini { --s: .47; display: block; width: calc(640px * var(--s)); height: calc(830px * var(--s)); overflow: hidden; border-radius: 10px; border: 2px solid var(--on-field); background: var(--bg); text-decoration: none; color: var(--fg); position: relative; flex: none; scroll-snap-align: start; transition: transform .18s ease-out, box-shadow .18s ease-out; }
.mini > div { width: 640px; height: 830px; transform: scale(var(--s)); transform-origin: 0 0; display: flex; flex-direction: column; }
.minihead { background: var(--field); color: var(--on-field); padding: 26px 44px; }
.minihead .mw { font: 800 15px/1 var(--font-body); margin-bottom: 34px; }
.minihead time { font: 400 13px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.minihead b { display: block; font: 800 44px/1.02 var(--font-body); letter-spacing: -.035em; margin: 12px 0 10px; text-wrap: balance; }
.minihead i { font-style: normal; font-size: 19px; line-height: 1.35; display: block; }
.minibody { padding: 22px 44px 0; flex: 1; overflow: hidden; }
.minibody p { font: 400 17.5px/1.66 var(--font-body); margin: 0 0 1.05em; }
.mini::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: linear-gradient(to bottom, transparent, var(--bg) 82%); pointer-events: none; }
.mini:hover, .mini:focus-visible { transform: translateY(-6px); box-shadow: 0 14px 0 -6px var(--on-field); }

/* dithered joins between sections */
canvas.fade { display: block; width: 100%; background: var(--bg); color: var(--field); margin: -1px 0; image-rendering: pixelated; }
canvas.fade[data-live] { cursor: crosshair; }
canvas.fade.to-deep { color: var(--fg); }
canvas.fade.from-deep { background: var(--fg); color: var(--field); }

/* latest */
.latestC { padding-top: 26px; padding-bottom: 0; }
.lhead { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 10px; }
.lhead h2, .archive h2 { color: var(--ink); }
.crisp { list-style: none; margin: 0 -10px; padding: 0; }
.crisp a { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: baseline; text-decoration: none; padding: 12px 10px; border-radius: 8px; transition: background .12s ease-out; }
.crisp li + li a { box-shadow: 0 -1px 0 var(--rule); }
.crisp time { font: 400 12.5px/1.4 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.crisp b { font: 700 17px/1.3 var(--font-body); letter-spacing: -.005em; }
.crisp i { display: block; font-style: normal; font-size: 14.5px; line-height: 1.4; color: var(--muted); margin-top: 1px; }
.crisp a:hover, .crisp a:focus-visible { background: var(--wash); box-shadow: none; }
.more { display: inline-block; margin-top: 20px; font: 700 14.5px/1 var(--font-body); color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 4px; padding: 4px 0; transition: opacity .12s ease-out; }
.more:hover { opacity: .78; }

/* every title, on the inverse ground */
.deep { background: var(--fg); color: var(--bg); padding: 0; }
.deephead { position: sticky; top: 0; z-index: 5; background: var(--fg); padding: 18px 0 12px; border-bottom: 1px solid color-mix(in oklch, var(--bg) 22%, transparent); }
.deepbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 22px; align-items: center; }
.deepbar h2 { font: 600 13px/1 var(--font-mono); margin: 0; color: var(--mark); }
.readout { margin: 0; font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readout b { color: var(--mark); font-weight: 700; margin-right: .6em; font-variant-numeric: tabular-nums; }
.deepbar input { font: 400 15px/1 var(--font-body); padding: 9px 12px; border: 1.5px solid color-mix(in oklch, var(--bg) 50%, transparent); border-radius: 8px; background: transparent; color: inherit; min-width: 230px; caret-color: var(--mark); }
.deepbar input::placeholder { color: inherit; opacity: .6; }
.yearchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.yearchips button { font: 400 12px/1 var(--font-mono); padding: 5px 7px; border-radius: 6px; border: 0; background: transparent; color: color-mix(in oklch, var(--bg) 70%, transparent); cursor: pointer; }
.yearchips button:hover { background: color-mix(in oklch, var(--bg) 14%, transparent); color: var(--bg); }
.yearchips button[aria-pressed="true"] { background: var(--mark); color: var(--fg); }
.deep :focus-visible { outline-color: var(--mark); }
.deepwall { font: 800 clamp(24px, 3.5vw, 56px)/1.12 var(--font-body); letter-spacing: -.035em; margin: 30px 0 0; text-wrap: pretty; }
.deepwall a { text-decoration: none; color: color-mix(in oklch, var(--bg) 78%, transparent); transition: color .14s ease-out; }
.deepwall:hover a, .deepwall:focus-within a { color: color-mix(in oklch, var(--bg) 26%, transparent); }
.deepwall a:hover, .deepwall a:focus-visible { color: var(--mark) !important; }
.deepwall a.hit { color: var(--mark); }
.deepwall a.miss { color: color-mix(in oklch, var(--bg) 16%, transparent); }
.deepwall sup { font: 400 11px/1 var(--font-mono); letter-spacing: 0; margin: 0 .9em 0 .25em; opacity: .45; vertical-align: .9em; }

/* ---------- writing index ---------- */
.archive { padding-top: 34px; padding-bottom: 0; }
.archive h2 { margin: 38px 0 8px; display: flex; justify-content: space-between; scroll-margin-top: 24px; font-variant-numeric: tabular-nums; }
.archive h2 span { color: var(--muted); font-weight: 400; }
.years { display: flex; flex-wrap: wrap; gap: 4px 6px; font: 400 12.5px/1 var(--font-mono); font-variant-numeric: tabular-nums; margin: 0 -7px 6px; }
.years a { text-decoration: none; padding: 6px 7px; border-radius: 6px; color: var(--muted); transition: background .12s ease-out, color .12s ease-out; }
.years a:hover { background: var(--wash); color: var(--fg); }

/* ---------- essay ---------- */
.striptitle { padding-top: 46px; padding-bottom: 30px; }
.inner, .essay > .post-wrap { max-width: 930px; margin-inline: auto; }
.striptitle time { font: 400 12.5px/1.4 var(--font-mono); font-variant-numeric: tabular-nums; }
.st1 { font: 900 clamp(36px, 5.4vw, 72px)/1.02 var(--font-body); letter-spacing: -.04em; margin: 14px 0 12px; text-wrap: balance; max-width: 18ch; }
.st2 { font-size: clamp(18px, 1.6vw, 22px); margin: 0; max-width: 40ch; }
.spined { position: relative; }
.spined::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--field); z-index: 2; }
.essay { padding-top: 34px; padding-bottom: 0; }
.post-body { position: relative; max-width: 66ch; min-width: 0; }
.post-body > *:first-child { margin-top: 0; }
.post-body p, .post-body li { font-size: 17.5px; line-height: 1.68; }
.post-body p { margin: 0 0 1.1em; }
.post-body h2 { font: 800 24px/1.2 var(--font-body); letter-spacing: -.018em; margin: 2em 0 .5em; padding-top: 1.1em; border-top: 1px solid var(--rule); scroll-margin-top: 24px; }
.post-body h3 { font: 800 20px/1.25 var(--font-body); margin: 1.7em 0 .45em; }
.post-body a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: background .12s ease-out; }
.post-body a:hover { background: var(--wash); }
.post-body ul, .post-body ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.post-body li { margin-bottom: .35em; }
.post-body img { height: auto; border-radius: 4px; }
.post-body figure { margin: 1.4em 0; }
.post-body blockquote { margin: 1.2em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--mark); }
.post-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2.2em 0; }
.post-body code { font: 400 .86em/1.5 var(--font-mono); background: var(--wash); border-radius: 4px; padding: 1px 4px; }
.post-body pre { font: 400 13.5px/1.55 var(--font-mono); background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; overflow-x: auto; }
.post-body a.dl { display: inline-block; font: 700 15px/1.2 var(--font-body); padding: 11px 18px; border-radius: 8px; background: var(--fg); color: var(--bg); text-decoration: none; transition: opacity .12s ease-out, transform .12s ease-out; }
.post-body a.dl:hover { background: var(--fg); opacity: .88; }
.post-body a.dl:active { transform: scale(.97); }
.post-body figure img { display: block; max-width: 100%; height: auto; border-radius: 4px; }
.post-body figcaption { font-size: 13.5px; line-height: 1.5; color: var(--muted); margin-top: 8px; }
.draftnote { font: 400 12.5px/1.5 var(--font-mono); background: var(--hl); color: var(--fg); border-radius: 8px; padding: 8px 12px; margin: 0 0 22px; max-width: 66ch; }
mark.gap { background: var(--hl); color: var(--fg); border-radius: 3px; padding: 1px 3px; font-size: .92em; }
.readtime { opacity: .8; margin-left: 10px; }

/* library and wiki */
.tagbar button { font: inherit; border: 0; background: transparent; padding: 6px 7px; border-radius: 6px; color: var(--muted); cursor: pointer; transition: background .12s ease-out, color .12s ease-out; }
.tagbar button:hover { background: var(--wash); color: var(--fg); }
.tagbar button[aria-pressed="true"] { background: var(--mark); color: var(--bg); }
.lib { list-style: none; margin: 14px 0 0; padding: 0; max-width: 78ch; }
.lib li { padding: 18px 0; border-top: 1px solid var(--rule); }
.lib-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; text-decoration: none; }
.lib-title b { font: 800 20px/1.25 var(--font-body); letter-spacing: -.012em; text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lib-title span { font: 400 12.5px/1.4 var(--font-mono); color: var(--muted); }
.lib-title:hover b { background: var(--wash); }
.lib p { margin: 6px 0 8px; font-size: 16.5px; line-height: 1.55; }
.lib small { font: 400 12.5px/1.4 var(--font-mono); color: var(--muted); }
.lib small i { font-style: normal; color: var(--ink); margin-left: 8px; }
.crumb { font: 400 12.5px/1.4 var(--font-mono); margin: 0; }
.crumb a { text-underline-offset: 3px; }
.crumb::after { content: " /"; }
.paths { list-style: none; margin: 0; padding: 0; font: 400 13px/1.9 var(--font-mono); columns: 2 320px; }
.paths a { color: var(--muted); text-decoration: none; }
.paths a:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--mark); }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 66ch) minmax(0, 300px); gap: clamp(24px, 5vw, 64px); align-items: start; }
.portrait { margin: 0; border: 2px solid var(--fg); border-radius: 12px; overflow: hidden; background: #d89b00; }
.portrait img { display: block; width: 100%; height: auto; }
.portrait figcaption { font: 400 12px/1.4 var(--font-mono); padding: 9px 12px; background: var(--panel); border-top: 2px solid var(--fg); color: var(--muted); }
.facts { list-style: none; margin: 0 0 1.4em; padding: 0 !important; }
.facts li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.facts span { font: 400 12.5px/1.4 var(--font-mono); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; }
.chips li { font-size: 14.5px; background: var(--wash); border-radius: 999px; padding: 4px 13px; margin: 0; }

/* essay & site foot */
.foot { padding-top: 6px; padding-bottom: 44px; }
.foot-compact { padding-top: 26px; }
.foot .tops { margin-top: 18px; }
.foot .tops h2 { margin-bottom: 12px; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain a { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; text-decoration: none; padding: 13px 8px; border-bottom: 1px solid color-mix(in oklch, var(--on-field) 28%, transparent); transition: padding-left .14s ease-out, background .12s ease-out, color .12s ease-out; }
.plain time { font: 400 12.5px/1.4 var(--font-mono); font-variant-numeric: tabular-nums; }
.plain b { font: 700 19px/1.25 var(--font-body); letter-spacing: -.015em; }
.plain i { display: block; font-style: normal; font-size: 14.5px; line-height: 1.4; margin-top: 2px; opacity: .86; }
.plain a:hover, .plain a:focus-visible { background: var(--on-field); color: var(--field); padding-left: 16px; outline: 0; }
.footline { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 34px; padding-top: 20px; border-top: 1px solid color-mix(in oklch, var(--on-field) 24%, transparent); font-size: 14px; }
.foot-compact .footline { margin-top: 0; padding-top: 0; border-top: 0; }
.footline span { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.footline a { text-decoration: none; }
.footline span a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- search palette ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgb(20 10 2 / .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; justify-items: center; align-items: start; padding: 11vh 16px 0; }
.palette { width: min(660px, 100%); background: var(--panel); color: var(--fg); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 6px rgb(20 10 2 / .2), 0 30px 70px -20px rgb(20 10 2 / .6); animation: pal .16s ease-out; }
@keyframes pal { from { opacity: 0; transform: translateY(6px) scale(.985); } }
.palhead { display: flex; align-items: center; border-bottom: 1px solid var(--rule); }
.palette input { flex: 1; min-width: 0; border: 0; padding: 17px 18px; font: 400 18px/1.2 var(--font-body); background: transparent; color: var(--fg); outline: 0; caret-color: var(--ink); }
.palette input::placeholder { color: var(--muted); }
.palette input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.palclose { background: transparent; border: 0; color: var(--muted); font: 400 22px/1 var(--font-body); padding: 10px 16px; cursor: pointer; transition: color .12s ease-out; }
.palclose:hover { color: var(--fg); }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: min(52vh, 430px); overflow: auto; }
.palette li a { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 9px 10px; border-radius: 8px; text-decoration: none; }
.palette li[aria-selected="true"] a { background: var(--wash); box-shadow: inset 3px 0 0 var(--mark); }
.palette time { font: 400 12px/1.4 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.palette b { font: 700 15px/1.3 var(--font-body); }
.palette i { display: block; font-style: normal; font-size: 13.5px; color: var(--muted); }
.palette mark { background: var(--hl); color: inherit; border-radius: 2px; }
.palette .none { padding: 22px 16px; color: var(--muted); }
.palfoot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding: 10px 14px; font: 400 12px/1.4 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--muted); background: var(--bg); }

/* ---------- brand popup ---------- */
.sheet { border: 2px solid var(--fg); border-radius: 14px; padding: 0; width: min(860px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); background: var(--panel); color: var(--fg); overflow: auto; box-shadow: 0 30px 70px -20px rgb(20 10 2 / .6); }
.sheet::backdrop { background: rgb(20 10 2 / .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet[open] { animation: pal .18s ease-out; }
.sheet-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); position: relative; }
.sheet figure { margin: 0; aspect-ratio: 1; overflow: hidden; border-right: 2px solid var(--fg); }
.sheet figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sheet-body { padding: 30px 30px 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sheet-body small { font: 400 12px/1.4 var(--font-mono); color: var(--ink); display: flex; gap: 4px 18px; flex-wrap: wrap; padding-right: 44px; }
.sheet-body small span + span { color: var(--muted); }
.palkeys { display: flex; gap: 14px; flex-wrap: wrap; }
.sheet-body h3 { font: 900 clamp(28px, 4vw, 40px)/1.05 var(--font-body); letter-spacing: -.03em; margin: 0; padding-right: 30px; text-wrap: balance; }
.sheet-body p { margin: 0; font-size: 16px; line-height: 1.6; }
.sheet-foot { margin-top: auto; padding-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sheet .go { font: 700 14px/1.2 var(--font-body); padding: 10px 16px; border-radius: 8px; background: var(--fg); color: var(--bg); text-decoration: none; transition: opacity .12s ease-out, transform .12s ease-out; }
.sheet .go:hover { opacity: .88; } .sheet .go:active { transform: scale(.97); }
.sheet .featnav button { border-color: var(--fg); }
.sheet .featnav button:hover { background: var(--fg); color: var(--bg); }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1.5px solid var(--fg); background: var(--panel); color: var(--fg); cursor: pointer; transition: background .12s ease-out, color .12s ease-out, transform .12s ease-out; }
.sheet-x svg { width: 14px; height: 14px; display: block; }
.sheet-x:hover { background: var(--fg); color: var(--panel); }
.sheet-x:active { transform: scale(.94); }

.sheet.book { width: min(940px, calc(100vw - 32px)); }
.sheet.book figure { aspect-ratio: auto; height: 100%; min-height: 0; }
.sheet-body h4 { font: 600 12px/1 var(--font-mono); color: var(--ink); margin: 10px 0 0; }
.sheet-links { list-style: none; margin: 0; padding: 0; }
.sheet-links a { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 8px; margin: 0 -8px; border-radius: 8px; text-decoration: none; box-shadow: 0 1px 0 var(--rule); transition: background .12s ease-out; }
.sheet-links li:last-child a { box-shadow: none; }
.sheet-links b { font: 700 15.5px/1.3 var(--font-body); }
.sheet-links span { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-links i { font-style: normal; color: var(--ink); transition: transform .12s ease-out; }
.sheet-links a:hover { background: var(--wash); box-shadow: none; }
.sheet-links a:hover i { transform: translateX(3px); }
.quiet-link { font-size: 13.5px; color: var(--muted); text-underline-offset: 3px; }
.quiet-link:hover { color: var(--fg); }

/* Some screens draw a perfectly flat area in a slightly different tone from an area that has content in it.
   A second, invisible paint layer on the big grounds stops any of them being treated as a flat fill. */
body, .field, .deep { background-image: linear-gradient(rgb(0 0 0 / 0), rgb(0 0 0 / .004)); }
.post-body figure.tile img { max-width: min(340px, 100%); border-radius: 12px; }
.post-body figure.phone img { max-width: min(300px, 100%); border-radius: 18px; }

/* ---------- narrower screens ---------- */
@media (max-width: 820px) {
  .deepbar { grid-template-columns: 1fr; } .deepbar input { min-width: 0; width: 100%; } .readout { white-space: normal; }
  .intro2 { grid-template-columns: 1fr; gap: .8em; }
  .nav-inner { flex-wrap: wrap; row-gap: 12px; }
  .nav nav { flex-wrap: wrap; gap: 4px 6px; width: 100%; }
  .nav nav a { padding-left: 4px; padding-right: 8px; }
  .nav nav a:first-child { margin-left: -4px; }
  .nav .searchbtn { margin-left: auto; }
  .crisp a { grid-template-columns: 1fr; gap: 2px; }
  .plain a { grid-template-columns: 1fr; gap: 2px; }
  .footline { flex-direction: column; align-items: flex-start; }
  .eat, .eat.hash { font-size: 5px; margin-top: 28px; min-height: 120px; }
  .tops { margin-top: 48px; }
  .striptitle { padding-top: 30px; padding-bottom: 22px; }
  .signup .row { flex-direction: column; }
  .spined::before { width: 4px; }
  .palette li a { grid-template-columns: 1fr; gap: 2px; }
  .about-grid { grid-template-columns: 1fr; }
  .sheet-in { grid-template-columns: 1fr; }
  .sheet.book figure { aspect-ratio: 16/10; height: auto; }
  .sheet-links a { grid-template-columns: minmax(0, 1fr) auto; } .sheet-links span { grid-column: 1; grid-row: 2; white-space: normal; } .sheet-links i { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
  .sheet figure { aspect-ratio: 1; border-right: 0; border-bottom: 2px solid var(--fg); }
  .sheet { width: min(420px, calc(100vw - 32px)); }
  .sheet-body { padding: 20px 20px 20px; }
  .portrait { max-width: 300px; }
}
@media (hover: none) and (pointer: coarse) { .searchbtn kbd, .palfoot .palkeys { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
