/* exDesign v2 — variant D: showcase pages keep the motion, working pages (repo, app, articles, profile) stay quiet and put the action first. */
:root {
  --bg: #000000; --surface: #101011; --surface-2: #1C1C1E; --glass: rgba(0,0,0,.72);
  --fg: #F5F5F7; --muted: #86868B; --faint: #3A3A3C; --line: rgba(255,255,255,.10); --line-strong: rgba(255,255,255,.24);
  --inv-bg: #F5F5F7; --inv-fg: #000000; --spot: rgba(255,255,255,.07); --scrim: rgba(0,0,0,.96);
  --v-fg: #FFFFFF; --v-muted: rgba(255,255,255,.65); --v-btn: rgba(255,255,255,.1); --v-btn-h: rgba(255,255,255,.2); --v-chip: rgba(40,40,40,.7); --v-strip: #1C1C1E;
  --shadow: 0 40px 80px -40px rgba(0,0,0,.9);
  --display: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
  --logo: 'Space Grotesk', system-ui, sans-serif;
  --ease: cubic-bezier(.4,0,.2,1); --ease-out: cubic-bezier(.16,1,.3,1); --spring: cubic-bezier(.34,1.4,.64,1);
  --wrap: 1240px; --r: 28px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg: #FFFFFF; --surface: #F5F5F7; --surface-2: #E8E8ED; --glass: rgba(255,255,255,.72);
  --fg: #1D1D1F; --muted: #6E6E73; --faint: #D2D2D7; --line: rgba(0,0,0,.08); --line-strong: rgba(0,0,0,.2);
  --inv-bg: #1D1D1F; --inv-fg: #FFFFFF; --spot: rgba(0,0,0,.045); --shadow: 0 40px 80px -40px rgba(0,0,0,.25); color-scheme: light;
  --v-fg: #1D1D1F; --v-muted: rgba(0,0,0,.55); --v-btn: rgba(0,0,0,.06); --v-btn-h: rgba(0,0,0,.12); --v-chip: rgba(255,255,255,.8); --v-strip: #E8E8ED; --scrim: rgba(250,250,252,.97); } }
:root[data-theme="light"] {
  --bg: #FFFFFF; --surface: #F5F5F7; --surface-2: #E8E8ED; --glass: rgba(255,255,255,.72);
  --fg: #1D1D1F; --muted: #6E6E73; --faint: #D2D2D7; --line: rgba(0,0,0,.08); --line-strong: rgba(0,0,0,.2);
  --inv-bg: #1D1D1F; --inv-fg: #FFFFFF; --spot: rgba(0,0,0,.045); --shadow: 0 40px 80px -40px rgba(0,0,0,.25); color-scheme: light;
  --v-fg: #1D1D1F; --v-muted: rgba(0,0,0,.55); --v-btn: rgba(0,0,0,.06); --v-btn-h: rgba(0,0,0,.12); --v-chip: rgba(255,255,255,.8); --v-strip: #E8E8ED; --scrim: rgba(250,250,252,.97); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
/* no blue system highlight on tap or text selection on buttons; keyboard focus keeps its ring (:focus-visible) */
html { -webkit-tap-highlight-color: transparent; }
button, .btn, .icon-btn, [role="button"], summary { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
:focus:not(:focus-visible) { outline: none; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.55 var(--ui); letter-spacing: -.011em; -webkit-font-smoothing: antialiased; overflow-x: clip; min-height: 100svh; display: flex; flex-direction: column; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
#app { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 8px; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
@media (max-width: 640px) { .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); } }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.muted { color: var(--muted); }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: -.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Reveal on scroll */
[data-rv] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
[data-rv].in { opacity: 1; transform: none; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid transparent; transition: border-color .4s var(--ease); }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; height: 56px; }
.logo { font-family: var(--logo); font-weight: 600; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; justify-self: start; }
.nav { position: relative; display: flex; gap: 2px; }
.nav a { position: relative; z-index: 1; padding: 7px 14px; border-radius: 100px; font-size: 13.5px; color: var(--muted); transition: color .3s var(--ease); white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav .ind { position: absolute; left: 0; top: 0; height: 100%; border-radius: 100px; background: var(--surface-2); transition: transform .5s var(--ease-out), width .5s var(--ease-out), opacity .3s; opacity: 0; }
.acts { display: flex; gap: 6px; align-items: center; justify-self: end; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: transparent; border: 0; cursor: pointer; color: var(--fg); transition: background .25s var(--ease), transform .2s var(--ease); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 18px; height: 18px; }
.auth { height: 32px; padding: 0 14px; border-radius: 100px; background: var(--inv-bg); color: var(--inv-fg); font-weight: 500; font-size: 13.5px; display: inline-flex; align-items: center; gap: 7px; transition: opacity .2s, transform .2s var(--ease); white-space: nowrap; }
.auth:hover { opacity: .86; } .auth:active { transform: scale(.96); }
.auth .ava { width: 22px; height: 22px; margin-left: -9px; border-radius: 50%; background: var(--inv-fg); color: var(--inv-bg); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.burger { display: none; }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--fg); transform-origin: 0 50%; transform: scaleX(var(--rp, 0)); opacity: 0; transition: opacity .3s; }
.progress.on { opacity: .9; }
@media (max-width: 900px) { .top .wrap { grid-template-columns: 1fr auto; } .nav, .top .auth { display: none; } .burger { display: grid; } }

.sheet { position: fixed; inset: 0; z-index: 70; background: var(--glass); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 10px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 20px) max(16px, env(safe-area-inset-left, 0px)); opacity: 0; transition: opacity .35s var(--ease); }
.sheet.open { opacity: 1; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; min-height: 40px; }
.sheet nav { display: flex; flex-direction: column; margin-top: 36px; }
.sheet nav a { font-family: var(--display); font-weight: 600; letter-spacing: -.03em; font-size: 34px; padding: 6px 0; opacity: 0; transform: translateY(-10px); transition: opacity .5s var(--ease-out), transform .6s var(--ease-out); transition-delay: calc(var(--i) * 45ms + 60ms); }
.sheet nav a[aria-current="page"] { color: var(--muted); }
.sheet.open nav a { opacity: 1; transform: none; }
.sheet .auth { margin-top: auto; justify-content: center; height: 50px; font-size: 16px; }

/* Buttons & links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 100px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; font-weight: 500; font-size: 15px; transition: background .25s var(--ease), border-color .25s, opacity .2s, transform .2s var(--ease); white-space: nowrap; }
.btn:hover { border-color: var(--fg); }
.btn:active { transform: scale(.97); }
.btn.solid { background: var(--inv-bg); color: var(--inv-fg); border-color: transparent; }
.btn.solid:hover { opacity: .86; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--fg); background: var(--surface-2); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn svg { width: 17px; height: 17px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }
.more { display: inline-flex; align-items: center; gap: 2px; font-size: 17px; font-weight: 500; }
.more::after { content: "›"; font-size: 1.25em; line-height: 1; transform: translateY(-1px); transition: transform .35s var(--ease-out); }
.more:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.more:hover::after { transform: translate(4px, -1px); }
.pop { animation: pop .45s var(--spring); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* Hero */
.hero { min-height: min(820px, calc(100svh - 56px)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-block: 64px 40px; }
.hero h1 { font-size: clamp(44px, 8.2vw, 112px); max-width: 1100px; margin-top: 18px; line-height: 1.02; }
.hw { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .02em .1em; margin-bottom: -.1em; }
.hw > span { display: inline-block; animation: rise 1.2s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + 120ms); }
@keyframes rise { from { transform: translateY(105%); filter: blur(6px); } to { transform: none; filter: none; } }
.fade-in { animation: fadeUp 1.1s var(--ease-out) both; animation-delay: var(--d, 600ms); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero .ctas { display: flex; gap: 28px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.cue { margin-top: auto; padding-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.cue i { width: 1px; height: 44px; background: linear-gradient(var(--muted), transparent); transform-origin: top; animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* Showcase: scroll-scrubbed scale */
.showcase { height: 150vh; position: relative; --p: 0; }
.showcase .stick { position: sticky; top: 56px; height: calc(100vh - 56px); display: grid; place-items: center; overflow: hidden; }
.showcase .frame { position: relative; width: min(1400px, calc(100vw - 48px)); height: min(78vh, 60vw); border-radius: calc(44px - 18px * var(--p)); overflow: hidden; transform: scale(calc(.82 + .18 * var(--p))); background: var(--surface-2); box-shadow: var(--shadow); will-change: transform; }
.showcase .frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.15 - .15 * var(--p))); will-change: transform; }
.showcase .cap { position: absolute; inset: auto 0 0 0; padding: 120px clamp(24px, 4vw, 56px) clamp(24px, 4vw, 48px); background: linear-gradient(transparent, rgba(0,0,0,.78)); color: #FFFFFF; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; opacity: clamp(0, calc((var(--p) - .55) * 3.2), 1); transform: translateY(calc(30px - 30px * clamp(0, calc((var(--p) - .55) * 3.2), 1))); }
.showcase .cap .eyebrow { color: rgba(255,255,255,.7); }
.showcase .cap h2 { font-size: clamp(26px, 3.6vw, 48px); max-width: 760px; margin-top: 8px; }
.showcase .cap .btn { background: #FFFFFF; color: #000000; border: 0; }

/* Statement: words light up as you scroll */
.statement { padding-block: 120px 40px; }
.statement p { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.03em; font-size: clamp(28px, 3.8vw, 50px); line-height: 1.14; max-width: 1080px; }
.statement .w { color: var(--muted); transition: color .5s var(--ease); }
.statement .w.on { color: var(--fg); }

/* Sections */
.sec { padding-block: 120px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(36px, 5vw, 64px); max-width: 880px; }
.sec-head h2 span { color: var(--muted); }
.page-head { padding-block: 96px 64px; }
.page-head h1 { font-size: clamp(52px, 8vw, 104px); }
.page-head p { margin: 20px 0 0; font-size: clamp(19px, 2vw, 24px); color: var(--muted); max-width: 680px; letter-spacing: -.02em; line-height: 1.4; }

/* Spotlight tiles */
.spot { position: relative; isolation: isolate; }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: radial-gradient(520px circle at var(--mx, -999px) var(--my, -999px), var(--spot), transparent 60%); opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.spot:hover::before { opacity: 1; }
.tiles { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles > :first-child { grid-column: 1 / -1; }
@media (max-width: 800px) { .tiles { grid-template-columns: 1fr; } }
.ctile { display: flex; flex-direction: column; border-radius: var(--r); background: var(--surface); overflow: hidden; transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out); }
.ctile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ctile .txt { padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 48px) 28px; display: flex; flex-direction: column; gap: 12px; }
.ctile h3 { font-size: clamp(26px, 2.8vw, 38px); max-width: 720px; }
.ctile p { margin: 0; color: var(--muted); max-width: 620px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ctile .media { margin: 8px clamp(24px, 4vw, 48px) 0; border-radius: 18px 18px 0 0; overflow: hidden; aspect-ratio: 16/9; background: var(--surface-2); }
.tiles > :first-child .media { aspect-ratio: 21/9; }
.ctile .media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); will-change: transform; }

/* Rail (horizontal gallery) */
.rail-wrap { position: relative; }
.rail { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: max(32px, calc((100vw - var(--wrap)) / 2 + 32px)); padding-block: 8px 24px; scroll-padding-inline: max(32px, calc((100vw - var(--wrap)) / 2 + 32px)); }
.rail::-webkit-scrollbar { display: none; }
@media (max-width: 640px) { .rail { padding-inline: 16px; scroll-padding-inline: 16px; gap: 12px; } }
.rcard { flex: 0 0 clamp(260px, 30vw, 400px); scroll-snap-align: start; border: 0; padding: 0; background: var(--surface-2); border-radius: 24px; overflow: hidden; aspect-ratio: 4/5; position: relative; cursor: zoom-in; text-align: left; color: #FFFFFF; transition: transform .6s var(--ease-out); }
.rcard:active { transform: scale(.985); }
.rcard img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.rcard:hover img { transform: scale(1.05); }
.rcard span { position: absolute; inset: auto 0 0 0; padding: 60px 22px 20px; background: linear-gradient(transparent, rgba(0,0,0,.66)); font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.rail-ctl { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.rail-ctl button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; transition: opacity .3s, transform .2s var(--ease), background .25s; }
.rail-ctl button:hover { background: var(--faint); }
.rail-ctl button:active { transform: scale(.92); }
.rail-ctl button[disabled] { opacity: .3; cursor: default; }
.rail-ctl svg { width: 18px; height: 18px; }

/* App list (repo): one row per product, download right there */
.filters { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.filters .muted { font-size: 14.5px; }
.alist { border-top: 1px solid var(--line); }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) 170px auto; gap: 28px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); }
.arow .k { font-size: 13px; font-weight: 600; color: var(--muted); }
.arow .name { display: inline-block; margin-top: 4px; font-family: var(--display); font-weight: 600; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.03em; line-height: 1.1; }
.arow .name:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.arow p { margin: 6px 0 0; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 640px; }
.arow .meta { font-size: 14px; color: var(--muted); line-height: 1.5; }
.arow .meta b { display: block; color: var(--fg); font-weight: 500; }
.arow .get { display: flex; align-items: center; gap: 16px; justify-self: end; }
.arow .get .more { font-size: 15px; }
@media (max-width: 760px) { .arow { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; } .arow .meta { display: flex; gap: 8px; } .arow .meta b { display: inline; } .arow .get { justify-self: start; } }
.split { position: relative; display: inline-flex; }
.split > .btn { border-radius: 100px 0 0 100px; }
.split.single > .btn { border-radius: 100px; }
.split > .dl-more { border-radius: 0 100px 100px 0; padding: 0 12px; margin-left: 1px; }
.btn small { font-weight: 400; opacity: .65; }
.dl-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 260px; padding: 6px; border-radius: 18px; background: var(--surface); box-shadow: 0 24px 60px -12px rgba(0,0,0,.45), 0 0 0 1px var(--line); display: flex; flex-direction: column; animation: menuIn .3s var(--ease-out) both; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.dl-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; transition: background .2s; }
.dl-menu a:hover { background: var(--surface-2); }
.dl-menu a svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.dl-menu a span small { display: block; color: var(--muted); font-size: 13px; }
.app-hero .dl-menu { left: 50%; right: auto; transform: translateX(-50%); animation: none; }

/* Sticky download bar on the app page */
.buybar { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 56px); z-index: 45; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); transform: translateY(-110%); opacity: 0; transition: transform .45s var(--ease-out), opacity .3s var(--ease); pointer-events: none; }
.buybar.on { transform: none; opacity: 1; pointer-events: auto; }
.buybar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 52px; }
.buybar b { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.buybar .muted { font-size: 13.5px; margin-left: 10px; }
.buybar .btn { height: 32px; padding: 0 16px; font-size: 13.5px; }
.buybar .btn svg { width: 15px; height: 15px; }
@media (max-width: 560px) { .buybar .muted { display: none; } }
.app-hero .main-dl { height: 52px; padding: 0 28px; font-size: 16px; }
.app-hero .dl-note { margin-top: 12px; font-size: 14px; color: var(--muted); }
.app-hero .links { display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.app-hero .links .more { font-size: 15px; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.app-hero .ctas { flex-direction: column; gap: 0; }

/* Rows (list with hover preview) */
.rows { border-top: 1px solid var(--line); }
.row-l { position: relative; display: grid; grid-template-columns: 40px 128px minmax(0, 1fr) auto 28px; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); transition: opacity .45s var(--ease); }
.rows:hover .row-l:not(:hover) { opacity: .35; }
.row-l .n { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.row-l .t { transition: transform .6s var(--ease-out); min-width: 0; }
.row-l.noimg { grid-template-columns: 40px minmax(0, 1fr) auto 28px; }
.row-l .rt { width: 128px; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; transition: transform .6s var(--ease-out); }
.row-l .rt img { width: 100%; height: 100%; object-fit: cover; }
.row-l .rt .ph { color: var(--faint); } .row-l .rt .ph svg { width: 26px; height: 26px; }
.row-l:hover .rt { transform: scale(1.04); }
.row-l b { display: block; font-family: var(--display); font-weight: 600; letter-spacing: -.03em; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.12; }
.row-l small { display: block; margin-top: 6px; color: var(--muted); font-size: 15px; }
.row-l .d { color: var(--muted); font-size: 14.5px; white-space: nowrap; }
.row-l .arr { transition: transform .6s var(--ease-out); color: var(--muted); }
.row-l .arr svg { width: 22px; height: 22px; }
.row-l:hover .t { transform: translateX(14px); }
.row-l:hover .arr { transform: translateX(6px); color: var(--fg); }
@media (max-width: 640px) { .row-l.noimg { grid-template-columns: minmax(0, 1fr) 20px; } .row-l { grid-template-columns: 88px minmax(0, 1fr) 20px; gap: 14px; padding: 18px 0; } .row-l .rt { width: 88px; border-radius: 10px; } .row-l .n, .row-l .d { display: none; } .row-l:hover .t { transform: none; } .row-l b { font-size: 19px; } .row-l small { font-size: 14px; margin-top: 4px; } }

/* Masonry gallery */
.masonry { columns: 3 320px; column-gap: 20px; }
.mtile { display: block; width: 100%; margin: 0 0 20px; break-inside: avoid; border: 0; padding: 0; border-radius: 20px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; position: relative; color: #FFFFFF; text-align: left; }
.mtile img { width: 100%; height: auto; transition: transform 1.4s var(--ease-out); }
.mtile:hover img { transform: scale(1.04); }
.mtile span { position: absolute; inset: auto 0 0 0; padding: 48px 20px 18px; background: linear-gradient(transparent, rgba(0,0,0,.6)); font-weight: 600; font-size: 16px; opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .6s var(--ease-out); }
.mtile:hover span, .mtile:focus-visible span { opacity: 1; transform: none; }
@media (hover: none) { .mtile span { opacity: 1; transform: none; } }

/* Article */
.a-head { padding-block: 72px 56px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; padding: 8px 14px; border-radius: 100px; transition: color .25s, background .25s; margin-bottom: 36px; }
.back:hover { color: var(--fg); background: var(--surface); }
.back svg { width: 16px; height: 16px; }
.a-head h1 { font-size: clamp(38px, 6vw, 80px); max-width: 1000px; margin-top: 14px; }
.a-head .lead { font-size: clamp(19px, 2vw, 24px); color: var(--muted); margin: 24px 0 0; max-width: 760px; letter-spacing: -.02em; line-height: 1.4; }
.a-head .tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }
.chip { font-size: 13px; padding: 5px 12px; border-radius: 100px; background: var(--surface); color: var(--muted); }
.cover { border-radius: var(--r); overflow: hidden; background: var(--surface-2); border: 0; cursor: zoom-in; padding: 0; width: 100%; display: block; }
.cover img { width: 100%; max-height: 680px; object-fit: cover; }
.cover.anim img { animation: coverIn 1.6s var(--ease-out) both; }
@keyframes coverIn { from { transform: scale(1.08); opacity: 0; } to { transform: none; opacity: 1; } }
.reading { max-width: 720px; margin: 0 auto; padding-block: 72px 0; }
.prose { font-size: 19px; line-height: 1.7; letter-spacing: -.014em; }
.prose > h1:first-child { display: none; }
.prose p, .prose li { color: color-mix(in srgb, var(--fg) 86%, var(--bg)); }
.prose h1, .prose h2 { font-size: clamp(28px, 3vw, 36px); margin: 64px 0 18px; }
.prose h3 { font-size: 24px; margin: 40px 0 12px; letter-spacing: -.025em; }
.prose p { margin: 0 0 22px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--fg); }
.prose img { width: 100%; height: auto; border-radius: 18px; margin: 36px 0 10px; cursor: zoom-in; background: var(--surface-2); }
.prose blockquote { margin: 28px 0; padding: 2px 0 2px 16px; border-left: 2px solid var(--fg); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose blockquote p { color: var(--muted); }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 22px; }
.prose code { font-family: var(--mono); font-size: .84em; background: var(--surface); padding: 2px 6px; border-radius: 6px; }
.codebox { position: relative; margin: 28px 0; }
.prose pre { position: relative; background: var(--surface); border-radius: 16px; padding: 20px 22px; overflow-x: auto; margin: 28px 0; }
.codebox pre { margin: 0; }
.codebox.fold:not(.open) pre { max-height: 280px; overflow: hidden; }
.codebox.fold:not(.open)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; border-radius: 0 0 16px 16px; background: linear-gradient(transparent, var(--surface) 75%); pointer-events: none; }
.codebox .fold-btn { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1; height: 36px; padding: 0 16px; border-radius: 100px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--fg); font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .2s; }
.codebox .fold-btn:hover { border-color: var(--fg); }
.codebox.open .fold-btn { position: static; transform: none; display: block; margin: 12px auto 0; }
.prose pre code { background: none; padding: 0; font-size: 14px; }
.codebox .copy { position: absolute; z-index: 2; top: 10px; right: 10px; height: 30px; padding: 0 12px; border-radius: 100px; border: 0; background: var(--surface-2); color: var(--muted); font-size: 12.5px; cursor: pointer; opacity: 0; transition: opacity .2s, color .2s; }
.codebox:hover .copy, .codebox .copy:focus-visible { opacity: 1; }
.codebox .copy:hover { color: var(--fg); }
/* touch screens: the button is always shown, so the code starts below it instead of under it */
@media (hover: none) { .codebox .copy { opacity: 1; top: 8px; right: 8px; height: 28px; } .codebox pre { padding-top: 46px; } }
.prose .tbl { overflow-x: auto; margin: 32px 0; border: 1px solid var(--line); border-radius: 16px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15.5px; line-height: 1.5; }
.prose th, .prose td { padding: 12px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface); font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr { transition: background .2s; }
.prose tbody tr:hover { background: var(--surface); }
.prose td code { white-space: nowrap; background: var(--surface-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding-top: 40px; margin-top: 48px; border-top: 1px solid var(--line); }
.next-card { display: block; margin-top: 80px; padding: 40px; border-radius: var(--r); background: var(--surface); transition: transform .6s var(--ease-out); }
.next-card:hover { transform: translateY(-4px); }
.next-card b { display: block; font-family: var(--display); font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; line-height: 1.12; margin: 8px 0 14px; }

/* Comments */
.comments { margin-top: 80px; }
.comments h2 { font-size: 32px; margin-bottom: 24px; }
.c-form { display: flex; flex-direction: column; gap: 12px; }
.c-form label { font-size: 15px; color: var(--muted); }
.c-form label a { text-decoration: underline; color: var(--fg); }
.field { width: 100%; padding: 16px 18px; border-radius: 16px; border: 1px solid transparent; background: var(--surface); color: var(--fg); resize: none; min-height: 120px; max-height: 35vh; overflow-y: hidden; line-height: 1.5; transition: border-color .25s, background .25s; scrollbar-width: thin; scrollbar-color: var(--faint) transparent; }
.field::-webkit-scrollbar { width: 10px; }
.field::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
.field::-webkit-scrollbar-track { background: transparent; margin: 10px 0; }
.field:focus { outline: none; border-color: var(--line-strong); background: var(--bg); }
.c-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.c-list { list-style: none; padding: 0; margin: 32px 0 0; }
.c-list .c-list { margin: 0; padding-left: 52px; }
.c-item { padding: 20px 0; border-top: 1px solid var(--line); display: flex; gap: 14px; }
.c-item.new { animation: fadeUp .8s var(--ease-out) both; }
.c-ava { flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.c-ava.owner { background: var(--inv-bg); color: var(--inv-fg); }
.c-body { min-width: 0; flex: 1; }
.c-item .who { font-weight: 600; font-size: 15.5px; }
.c-item .when { color: var(--muted); font-size: 13.5px; margin-left: 8px; }
.c-item p { margin: 4px 0 0; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-item .c-acts { display: flex; gap: 4px; margin-top: 6px; }
.c-item .c-acts .btn { height: 30px; padding: 0 10px; font-size: 13.5px; }
.c-reply { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.c-reply .field { min-height: 80px; }
.c-reply .c-row { justify-content: flex-end; }

/* App page */
.app-hero { text-align: center; padding-block: 72px 48px; display: flex; flex-direction: column; align-items: center; }
.app-hero h1 { font-size: clamp(56px, 9vw, 120px); margin-top: 10px; }
.app-hero .lead { font-size: clamp(19px, 2vw, 24px); color: var(--muted); margin: 20px 0 0; max-width: 720px; letter-spacing: -.02em; line-height: 1.4; }
.app-hero .ctas { display: flex; gap: 24px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.stage { border-radius: var(--r); overflow: hidden; background: #000000; aspect-ratio: 16/9; width: 100%; padding: 0; border: 0; cursor: zoom-in; display: block; }
.stage img { width: 100%; height: 100%; object-fit: contain; transition: opacity .35s var(--ease); }
.thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 16px 6px 8px; margin: 0 -6px; justify-content: safe center; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: 0 0 96px; height: 60px; padding: 0; border-radius: 10px; overflow: hidden; border: 0; background: var(--surface-2); cursor: pointer; opacity: .45; transition: opacity .3s, transform .4s var(--ease-out); }
.thumb[aria-pressed="true"] { opacity: 1; transform: translateY(-2px); box-shadow: 0 0 0 2px var(--fg); }
.thumb:hover { opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 96px; border-top: 1px solid var(--line); }
.specs div { padding: 28px 24px 28px 0; }
.specs dt { color: var(--muted); font-size: 14px; }
.specs dd { margin: 6px 0 0; font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: -.025em; overflow-wrap: anywhere; }
@media (max-width: 760px) { .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feat-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; margin-top: 40px; }
.feat-lists > div { padding: 32px; border-radius: var(--r); background: var(--surface); }
.feat-lists h3 { font-size: 24px; margin-bottom: 14px; }
.feat-lists ul { margin: 0; padding-left: 20px; color: var(--muted); }
.feat-lists li { padding: 5px 0; }

/* Segmented control */
.seg { position: relative; display: inline-flex; padding: 3px; border-radius: 100px; background: var(--surface); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { position: relative; z-index: 1; height: 36px; padding: 0 18px; border-radius: 100px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: color .3s var(--ease); }
.seg button[aria-selected="true"] { color: var(--fg); }
.seg .ind { position: absolute; left: 0; top: 3px; height: 36px; border-radius: 100px; background: var(--bg); box-shadow: 0 2px 10px rgba(0,0,0,.14); transition: transform .5s var(--ease-out), width .5s var(--ease-out); }

/* Profile */
.p-hero { text-align: center; padding-block: 72px 40px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.p-ava { width: 112px; height: 112px; border-radius: 50%; background: var(--inv-bg); color: var(--inv-fg); display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 48px; margin-bottom: 16px; animation: avaIn 1s var(--spring) both; }
@keyframes avaIn { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.p-hero h1 { font-size: clamp(40px, 6vw, 64px); overflow-wrap: anywhere; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.p-card { border-radius: var(--r); background: var(--surface); padding: 28px 30px; display: flex; flex-direction: column; gap: 4px; }
.p-card h3 { font-size: 22px; margin-bottom: 8px; }
.p-card .kv { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.p-card .kv:last-of-type { border-bottom: 0; }
.p-card dl { margin: 0; }
.p-card dt { color: var(--muted); }
.p-card dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.p-card .btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; }
.p-card p { margin: 0 0 6px; color: var(--muted); }
.tg-state { display: inline-flex; align-items: center; gap: 8px; }
.tg-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.tg-state.on i { background: var(--fg); box-shadow: 0 0 0 4px var(--spot); }
.p-tabs { margin-top: 64px; display: flex; flex-direction: column; align-items: center; }
.panel { margin-top: 28px; width: 100%; animation: fadeUp .6s var(--ease-out) both; }
.mc { display: flex; flex-direction: column; gap: 8px; padding: 22px 26px; border-radius: 20px; background: var(--surface); margin-bottom: 12px; }
.mc .on { font-size: 14px; color: var(--muted); }
.mc .on a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.mc p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mc .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pager { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 24px; color: var(--muted); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.pager .btn { width: 44px; padding: 0; }
.blank { padding: 56px 24px; text-align: center; color: var(--muted); border-radius: 20px; background: var(--surface); }
.blank a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.fav { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.fav a { border-radius: 20px; background: var(--surface); overflow: hidden; transition: transform .6s var(--ease-out); }
.fav a:hover { transform: translateY(-3px); }
.fav .m { aspect-ratio: 16/10; background: var(--surface-2); }
.fav .m img { width: 100%; height: 100%; object-fit: cover; }
.fav .b { padding: 16px 18px 20px; }
.fav .b span { font-size: 13px; color: var(--muted); font-weight: 600; }
.fav .b b { display: block; margin-top: 4px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.login { max-width: 480px; margin: 0 auto; padding-block: 110px 0; text-align: center; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.login .mark { width: 72px; height: 72px; border-radius: 22px; background: var(--inv-bg); color: var(--inv-fg); display: grid; place-items: center; font-family: var(--logo); font-weight: 600; font-size: 24px; margin-bottom: 10px; animation: avaIn 1s var(--spring) both; }
.login h1 { font-size: clamp(40px, 6vw, 56px); }
.login p { margin: 0; color: var(--muted); }
.login .btn { width: 100%; height: 52px; font-size: 16px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 85; background: rgba(0,0,0,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .3s var(--ease); }
.modal.open { opacity: 1; }
.modal-card { width: min(460px, 100%); background: var(--surface); border-radius: 24px; padding: 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.4); transform: scale(.94) translateY(8px); transition: transform .5s var(--spring); }
.modal.open .modal-card { transform: none; }
.modal-card h3 { font-size: 24px; }
.modal-card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.modal-card .field { background: var(--bg); }
.modal-card .row { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* Viewer */
.viewer { position: fixed; inset: 0; z-index: 90; color: var(--v-fg); display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.viewer::before { content: ""; position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .45s var(--ease); }
.viewer.open::before { opacity: 1; }
.viewer > * { position: relative; }
.v-main { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px) max(16px, env(safe-area-inset-left, 0px)); }
.viewer.simple .v-main { padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.v-fade { opacity: 0; transition: opacity .45s var(--ease) .1s; }
.viewer.open .v-fade { opacity: 1; }
.viewer.open.idle .v-fade { opacity: 0; transition-delay: 0s; }
.viewer.idle { cursor: none; }
.v-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.v-count { font-size: 14px; color: var(--v-muted); font-variant-numeric: tabular-nums; padding-left: 6px; }
.v-tools { display: flex; gap: 6px; }
.v-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--v-btn); border: 0; color: var(--v-fg); cursor: pointer; transition: background .25s, transform .2s var(--ease), opacity .25s; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.v-btn:hover { background: var(--v-btn-h); }
.v-btn:active { transform: scale(.92); }
.v-btn svg { width: 18px; height: 18px; }
.v-btn[disabled] { opacity: .3; cursor: default; }
.v-stage { position: relative; overflow: hidden; min-height: 0; display: grid; place-items: center; touch-action: none; user-select: none; }
.v-stage img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; background: transparent; object-fit: contain; transform-origin: 0 0; will-change: transform; cursor: zoom-in; -webkit-user-drag: none; border-radius: 8px; opacity: 0; }
.v-stage.zoomed img { cursor: grab; border-radius: 0; }
.v-stage.dragging img { cursor: grabbing; }
.v-stage.anim img { transition: transform .45s var(--ease-out); }
.v-nav { position: absolute; top: 50%; margin-top: -22px; z-index: 2; width: 44px; height: 44px; }
.v-nav.prev { left: 8px; } .v-nav.next { right: 8px; }
@media (max-width: 700px) { .v-nav { display: none; } }
.v-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 12.5px; color: var(--v-muted); background: var(--v-chip); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 7px 14px; border-radius: 100px; pointer-events: none; transition: opacity .6s var(--ease); white-space: nowrap; }
.v-strip { display: flex; gap: 6px; overflow-x: auto; padding-top: 14px; justify-content: safe center; scrollbar-width: none; }
.v-strip::-webkit-scrollbar { display: none; }
.v-strip button { flex: 0 0 52px; height: 52px; padding: 0; border-radius: 10px; overflow: hidden; border: 0; background: var(--v-strip); cursor: pointer; opacity: .4; transform: scale(.86); transition: opacity .35s var(--ease), transform .5s var(--ease-out); }
.v-strip button[aria-current="true"] { opacity: 1; transform: none; }
.v-strip button:hover { opacity: .85; }
.v-strip img { width: 100%; height: 100%; object-fit: cover; }
.v-cap { text-align: center; color: var(--v-muted); font-size: 15px; padding-top: 12px; min-height: 1.6em; }
.v-side { width: 360px; background: var(--surface); color: var(--fg); display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 28px) max(28px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 24px) 28px; gap: 14px; min-height: 0; overflow: hidden; transform: translateX(40px); opacity: 0; transition: transform .6s var(--ease-out), opacity .45s var(--ease), width .55s var(--ease-out), padding .55s var(--ease-out); }
.viewer.open .v-side { transform: none; opacity: 1; }
.viewer.noside .v-side { width: 0; padding-left: 0; padding-right: 0; opacity: 0; }
.v-side > * { min-width: 300px; }
.v-side .k { font-size: 13px; font-weight: 600; color: var(--muted); }
.v-side h3 { font-size: 28px; line-height: 1.12; }
.v-side .d { color: var(--muted); font-size: 15.5px; line-height: 1.6; overflow-y: auto; flex: 1; margin: 0; }
.v-side .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.v-side .foot span { color: var(--muted); font-size: 14px; }
.v-side .acts2 { display: flex; gap: 6px; align-items: center; }
.v-side .icon-btn { background: var(--surface-2); }
.v-side .icon-btn[aria-pressed="true"] { background: var(--inv-bg); color: var(--inv-fg); }
.v-swap { animation: swap .5s var(--ease-out) both; }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .viewer { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .v-main { padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: 8px; }
  .v-side { width: auto; transform: translateY(40px); padding: 20px max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 16px) max(16px, env(safe-area-inset-left, 0px)); max-height: 36vh; gap: 8px; }
  .v-side > * { min-width: 0; }
  .viewer.noside .v-side { width: auto; max-height: 0; padding-top: 0; padding-bottom: 0; }
  .v-side h3 { font-size: 21px; }
}

/* Footer — original exDesign_ structure */
.footer { margin-top: 160px; padding-block: 80px 40px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; margin-bottom: 60px; }
.footer-grid > div > p { color: var(--muted); margin: 20px 0 0; max-width: 300px; font-size: 15px; }
.footer-links { display: flex; gap: 80px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 16px; margin: 0 0 22px; }
.footer-col a, .footer-col button { display: flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 14px; font-size: 15px; background: none; border: 0; padding: 0; cursor: pointer; transition: color .25s; }
.footer-col a:hover, .footer-col button:hover { color: var(--fg); }
.footer-col svg { width: 16px; height: 16px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 30px; }
@media (max-width: 760px) { .footer { padding-block: 56px calc(env(safe-area-inset-bottom, 0px) + 32px); } .footer-grid { grid-template-columns: 1fr; gap: 40px; } .footer-links { gap: 48px; } }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); z-index: 95; background: var(--inv-bg); color: var(--inv-fg); padding: 12px 20px; border-radius: 100px; font-size: 14.5px; font-weight: 500; box-shadow: 0 16px 40px rgba(0,0,0,.3); transform: translate(-50%, 24px) scale(.92); opacity: 0; transition: transform .5s var(--spring), opacity .3s var(--ease); pointer-events: none; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Carousel: <div class="post-gallery"> with several images */
.carousel { position: relative; margin: 36px 0 10px; outline-offset: 4px; }
.carousel .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 18px; background: var(--surface-2); overscroll-behavior-x: contain; }
.carousel .track::-webkit-scrollbar { display: none; }
.prose .carousel .track img { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; margin: 0; border-radius: 0; background: transparent; scroll-snap-align: center; scroll-snap-stop: always; }
.c-arrow { position: absolute; top: calc(50% - 32px); width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--fg); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .25s var(--ease), transform .2s var(--ease); }
.c-arrow svg { width: 18px; height: 18px; }
.c-arrow:active { transform: scale(.92); }
.c-arrow.prev { left: 12px; } .c-arrow.next { right: 12px; }
.carousel:hover .c-arrow, .carousel:focus-within .c-arrow { opacity: 1; }
.carousel .c-arrow[disabled] { opacity: 0; pointer-events: none; }
@media (hover: none) { .c-arrow { display: none; } }
.c-count { position: absolute; top: 12px; right: 12px; padding: 3px 10px; border-radius: 100px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; pointer-events: none; }
.c-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.c-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 100px; background: var(--faint); cursor: pointer; transition: width .4s var(--ease-out), background .25s; }
.c-dots button[aria-current="true"] { width: 22px; background: var(--fg); }

/* Table of contents: [TOC] */
.prose h2, .prose h3 { scroll-margin-top: 90px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.prose .toc li { color: inherit; margin: 0; }
.toc a { display: block; padding: 7px 0; font-size: 15.5px; line-height: 1.4; color: var(--muted); text-decoration: none; transition: color .2s; }
.toc a:hover, .toc a[aria-current="true"] { color: var(--fg); }
.toc li.sub a { padding-left: 16px; font-size: 14.5px; }
.toc-in { margin: 0 0 36px; border-radius: 18px; background: var(--surface); }
.toc-in summary { cursor: pointer; list-style: none; padding: 16px 20px; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.toc-in summary::-webkit-details-marker { display: none; }
.toc-in summary .muted { font-size: 14px; font-weight: 500; font-family: var(--ui); }
.toc-in summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .35s var(--ease-out); }
.toc-in[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.toc-in ol { padding: 0 20px 14px; }
.toc-side { display: none; }
.toc-fab { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 45; display: flex; align-items: center; gap: 10px; max-width: min(520px, calc(100vw - 32px)); height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 100px; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); color: var(--fg); box-shadow: 0 12px 32px -10px rgba(0,0,0,.45); font-size: 14px; cursor: pointer; transform: translate(-50%, calc(100% + 28px)); opacity: 0; pointer-events: none; transition: transform .45s var(--ease-out), opacity .3s var(--ease); }
.toc-fab.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toc-fab .tf-k { font-weight: 600; flex: none; }
.toc-fab .tf-k::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 9px; border-right: 1.5px solid var(--muted); border-top: 1.5px solid var(--muted); transform: translateY(-1px) rotate(-45deg); }
.toc-fab .tf-cur { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-fab .tf-cur:empty { display: none; }
.toc-sheet { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .3s var(--ease); }
.toc-sheet.open { opacity: 1; }
.ts-card { width: min(640px, 100%); max-height: 75vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 24px 24px 0 0; padding: 8px 8px calc(env(safe-area-inset-bottom, 0px) + 12px); transform: translateY(40px); transition: transform .45s var(--ease-out); box-shadow: 0 -20px 60px rgba(0,0,0,.35); }
.toc-sheet.open .ts-card { transform: none; }
.ts-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 8px 16px; font-family: var(--display); font-size: 19px; letter-spacing: -.02em; }
.ts-card nav { overflow-y: auto; padding: 0 16px 8px; overscroll-behavior: contain; }
.ts-card a { padding: 11px 0; font-size: 16px; border-top: 1px solid var(--line); }
.ts-card li:first-child a { border-top: 0; }
.ts-card li.sub a { padding-left: 18px; font-size: 15px; }
@media (min-width: 1320px) { .toc-fab, .toc-sheet { display: none !important; } }
@media (min-width: 1320px) {
  .reading.has-toc { position: relative; }
  .toc-side { display: block; position: absolute; top: 72px; bottom: 0; right: calc(100% + 48px); width: 200px; }
  .toc-side nav { position: sticky; top: 96px; max-height: calc(100vh - 130px); overflow-y: auto; scrollbar-width: none; }
  .toc-side b { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
  .toc-side a { padding: 6px 0 6px 14px; font-size: 14px; border-left: 1.5px solid var(--line); }
  .toc-side li.sub a { padding-left: 26px; font-size: 13.5px; }
  .toc-side a[aria-current="true"] { border-left-color: var(--fg); }
  .toc-in { display: none; }
}

/* Real-site additions: loading, visibility badge for the owner, empty and error states */
.btn .ln { font-size: 13.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.btn .ln:empty { display: none; }
.btn[aria-pressed="true"] { border-color: var(--fg); }
.skel { border-radius: var(--r); background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%) 0 0 / 300% 100%; animation: skel 1.6s linear infinite; }
@keyframes skel { to { background-position: -150% 0; } }
.skel.tile { height: 360px; } .skel.row { height: 96px; border-radius: 16px; margin-bottom: 12px; }
.vis { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 100px; background: var(--surface-2); color: var(--muted); vertical-align: middle; letter-spacing: 0; }
.vis i { width: 6px; height: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; }
.vis.draft i { background: currentColor; }
.state { padding-block: 140px 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.state h1 { font-size: clamp(64px, 12vw, 160px); }
.state p { margin: 0; color: var(--muted); font-size: 19px; max-width: 520px; }
.state .ctas { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.lost .digits { display: flex; gap: .02em; justify-content: center; user-select: none; -webkit-user-select: none; }
.lost .digits span { display: inline-block; cursor: default; }
.lost #l-main { min-height: 1.5em; }
.lost .hint { color: var(--faint); font-family: var(--mono); font-size: .85em; text-decoration: none; transition: color .2s; }
.lost .hint:hover { color: var(--fg); }
.lost .ghost { min-height: 1.6em; font-size: 16px; color: var(--fg); opacity: .8; }
.cursor { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -.15em; background: currentColor; }
.lost #l-sugg { width: min(520px, 100%); }
.lost .sugg { margin-top: 28px; width: 100%; display: flex; flex-direction: column; text-align: left; }
.lost .sugg .eyebrow { margin-bottom: 8px; font-size: 13px; }
.lost .sugg a { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); transition: opacity .2s; }
.lost .sugg a:hover { opacity: .7; }
.lost .sugg b { font-weight: 600; min-width: 0; }
.lost .sugg small { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.lost .l-kbd { margin-top: 24px; font-size: 13.5px; color: var(--faint); }
.k-search { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); z-index: 60; width: min(560px, calc(100vw - 32px)); padding: 6px; border-radius: 22px; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border: 1px solid var(--line); box-shadow: 0 24px 60px -16px rgba(0,0,0,.5); transform: translate(-50%, calc(100% + 40px)); opacity: 0; transition: transform .45s var(--ease-out), opacity .3s; }
.k-search.on { transform: translate(-50%, 0); opacity: 1; }
.k-search input { width: 100%; height: 44px; border: 0; border-radius: 16px; padding: 0 16px; background: var(--surface); color: var(--fg); font-size: 16px; outline: none; }
.k-res { display: flex; flex-direction: column; }
.k-res a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; font-size: 15px; }
.k-res a.on, .k-res a:hover { background: var(--surface-2); }
.k-res small { color: var(--muted); white-space: nowrap; }
.k-none { padding: 10px 14px; color: var(--muted); font-size: 14px; }

/* Page to page: the whole page crossfades (the header stays inside it, so its blur is kept) and
   the clicked image flies into the cover of the next page (view-transition-name: morph) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .28s var(--ease) both; }
::view-transition-new(root) { animation: vtIn .42s var(--ease-out) both; }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn { from { opacity: 0; } }
::view-transition-group(morph) { animation-duration: .8s; animation-timing-function: var(--ease-out); z-index: 2; border-radius: 20px; overflow: clip; }
::view-transition-old(morph), ::view-transition-new(morph) { height: 100%; object-fit: cover; overflow: clip; animation-duration: .8s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Theme switch: circular reveal (same-document view transition) */
html.vt-theme::view-transition-old(root), html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
  [data-rv] { opacity: 1; transform: none; filter: none; }
  .showcase { height: auto; } .showcase .stick { position: static; height: auto; padding-block: 24px; } .showcase { --p: 1 !important; }
}
