/* ── Fonts (self-hosted, latin + latin-ext for ș ț ă â î) ─────── */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 400 800; font-stretch: 100%; font-display: swap;
  src: url(/fonts/bricolage-latin-ext.woff2) format('woff2');
  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: 'Bricolage Grotesque'; font-style: normal; font-weight: 400 800; font-stretch: 100%; font-display: swap;
  src: url(/fonts/bricolage-latin.woff2) format('woff2');
  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: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  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: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  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; }

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --ink: #17151b;
  --muted: #6c6673;
  --line: rgb(23 21 27 / .09);
  --accent: #ff4f2e;
  --accent-2: #ffb800;
  --on-accent: #ffffff;
  --c-video: #ff4f2e;
  --c-image: #7a5cff;
  --c-news: #0b9e8a;
  --shadow: 0 1px 2px rgb(23 21 27 / .04), 0 8px 24px -8px rgb(23 21 27 / .12);
  --shadow-lg: 0 2px 4px rgb(23 21 27 / .05), 0 24px 48px -16px rgb(23 21 27 / .22);
  --radius: 22px;
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0e12; --surface: #18171d; --surface-2: #222029; --ink: #f4f1ec; --muted: #a39fac;
    --line: rgb(255 255 255 / .08); --accent: #ff6a4d; --c-video: #ff6a4d; --c-image: #9d86ff; --c-news: #2cc7b0;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -8px rgb(0 0 0 / .5);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / .3), 0 24px 48px -16px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0e12; --surface: #18171d; --surface-2: #222029; --ink: #f4f1ec; --muted: #a39fac;
  --line: rgb(255 255 255 / .08); --accent: #ff6a4d; --c-video: #ff6a4d; --c-image: #9d86ff; --c-news: #2cc7b0;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -8px rgb(0 0 0 / .5);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / .3), 0 24px 48px -16px rgb(0 0 0 / .7);
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 400 1rem/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1; }
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
svg { width: 1em; height: 1em; flex: none; }
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 999px; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
  view-transition-name: header;
}
.site-header__inner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 24px;
  min-height: 68px; padding-block: 10px;
}
.logo { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.035em; }
.logo__mark { display: block; width: 50px; height: 50px; margin: -6px -2px -6px -6px; transition: transform .4s var(--ease); }
.logo__mark svg { width: 100%; height: 100%; overflow: visible; }
.logo:hover .logo__mark { transform: rotate(-4deg) scale(1.06); }
/* Logo animation on hover: the crank turns, the eyes look at you, the notes bounce */
.lm-crank { transform-box: view-box; transform-origin: 96px 66px; }
.lm-pupils { transition: transform .3s var(--ease); }
.lm-note { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .logo:hover .lm-crank { animation: lm-crank .7s linear infinite; }
  .logo:hover .lm-pupils { transform: translate(-4px, 1px); }
  .logo:hover .lm-note { animation: lm-note .7s var(--ease) infinite alternate; }
  .logo:hover .lm-note--2 { animation-delay: .35s; }
}
@keyframes lm-crank { to { transform: rotate(360deg); } }
@keyframes lm-note { to { transform: translateY(-5px) rotate(12deg); } }
.nav { display: flex; gap: 6px; justify-content: center; }
.nav a {
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; color: var(--muted); white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav a svg { font-size: .95em; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.header-actions { display: flex; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px;
  border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; transition: background .2s, transform .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.92); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
@media (max-width: 760px) {
  .site-header__inner { grid-template-columns: 1fr auto; padding-bottom: 0; }
  .nav {
    grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 10px;
    mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
}

/* ── Pills, buttons ───────────────────────────────────────── */
.pill {
  --c: var(--accent);
  display: inline-flex; align-items: center; gap: .35rem; width: fit-content;
  padding: .28rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
}
.pill svg { font-size: 1.05em; }
.pill--video { --c: var(--c-video); }
.pill--image { --c: var(--c-image); }
.pill--news { --c: var(--c-news); }
a.pill:hover { background: color-mix(in srgb, var(--c) 22%, transparent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.4rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  background: var(--ink); color: var(--bg); font-weight: 650; line-height: 1;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; text-align: left; }

/* ── Hero & feed ──────────────────────────────────────────── */
.hero { padding-top: clamp(20px, 4vw, 40px); }
.list-head { padding-top: clamp(28px, 5vw, 56px); padding-bottom: 8px; }
.list-head h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: -.035em; }
.list-head p { margin: .6rem 0 0; font-size: 1.1rem; max-width: 60ch; }
.section-title { font-size: 1.5rem; font-weight: 750; margin: 0 0 20px; display: flex; align-items: center; gap: .6rem; }
.section-title::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }
.feed-wrap { padding-block: clamp(24px, 4vw, 44px) 56px; }
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: clamp(16px, 2vw, 26px); }

/* ── Card ─────────────────────────────────────────────────── */
.card {
  position: relative; background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__link { display: flex; flex-direction: column; height: 100%; }
.card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
/* YouTube thumbnails (hqdefault) are 4:3 with baked-in black bars: zoom past them */
.card__media img[src*="i.ytimg.com"] { --yt: 1.13; transform: scale(var(--yt)); }
.card:hover .card__media img[src*="i.ytimg.com"] { transform: scale(calc(var(--yt) * 1.04)); }
.mini__img img[src*="i.ytimg.com"] { transform: scale(1.34); }
.card__media--text {
  display: grid; place-items: center;
  background:
    radial-gradient(120% 90% at 0% 0%, hsl(var(--h) 95% 66%), transparent 60%),
    radial-gradient(120% 90% at 100% 100%, hsl(calc(var(--h) + 50) 95% 58%), transparent 60%),
    hsl(calc(var(--h) + 25) 85% 60%);
}
.card__media--text span { font-size: 4rem; color: rgb(255 255 255 / .55); display: grid; }
.card__play {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 999px;
  display: grid; place-items: center; font-size: 1.5rem; color: #fff;
  background: rgb(0 0 0 / .38); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgb(255 255 255 / .5); transition: transform .3s var(--ease), background .3s;
}
.card__play svg { transform: translateX(2px); }
.card:hover .card__play { transform: scale(1.12); background: var(--accent); border-color: transparent; }
.card__count {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #fff;
  background: rgb(0 0 0 / .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.card__body { display: flex; flex-direction: column; gap: .6rem; padding: 18px 20px 20px; flex: 1; }
.card__title { font-size: 1.22rem; font-weight: 700; line-height: 1.18; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__summary { margin: 0; color: var(--muted); font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .82rem; color: var(--muted); }
.card__meta > * + *::before { content: '•'; margin-right: .9rem; opacity: .5; }

.card--hero .card__title { font-size: clamp(1.7rem, 3.6vw, 3rem); font-weight: 800; letter-spacing: -.03em; -webkit-line-clamp: 4; }
.card--hero .card__summary { font-size: 1.08rem; -webkit-line-clamp: 3; }
.card--hero .card__body { padding: clamp(20px, 3vw, 40px); gap: .9rem; justify-content: center; }
.card--hero .card__play { width: 78px; height: 78px; font-size: 2rem; }
@media (min-width: 860px) {
  .card--hero .card__link { display: grid; grid-template-columns: 1.45fr 1fr; }
  .card--hero .card__media { aspect-ratio: auto; min-height: 400px; }
  .card--hero .card__media img[src*="i.ytimg.com"] { --yt: 1.36; }
  .card--hero .card__meta { margin-top: .4rem; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .feed > * { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(28px) scale(.98); } }

/* ── Ads ──────────────────────────────────────────────────── */
.ad { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ad__label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); opacity: .8; }
.ad .ad-slot, .ad__ph { width: 100%; }
.ad--feed {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; justify-content: center; min-height: 300px; box-shadow: var(--shadow);
}
.ad--inArticle { margin: 2.2rem 0; min-height: 280px; padding-block: 12px; border-block: 1px solid var(--line); }
.ad--display { margin: 2rem 0 0; min-height: 250px; }
.ad--sidebar { min-height: 630px; }
.ad--sidebar .ad-slot, .ad--sidebar .ad__ph { width: 300px; max-width: 100%; }
.ad--multiplex { margin: 0 0 56px; }
.ad__ph {
  flex: 1; display: grid; place-items: center; min-height: 250px; border-radius: 14px; font-size: .85rem; color: var(--muted);
  border: 2px dashed color-mix(in srgb, var(--muted) 40%, transparent);
  background: repeating-linear-gradient(45deg, transparent 0 12px, color-mix(in srgb, var(--muted) 6%, transparent) 12px 24px);
}
.ad--sidebar .ad__ph { min-height: 600px; }
/* Collapse slots Google leaves empty, so there are no blank holes */
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }

/* ── Post ─────────────────────────────────────────────────── */
.post-layout { display: grid; gap: 56px; padding-block: clamp(24px, 4vw, 48px) 40px; }
@media (min-width: 1100px) {
  .post-layout { grid-template-columns: minmax(0, 780px) 300px; justify-content: center; }
}
@media (max-width: 1099px) { .post-aside { display: none; } }
.post-aside__sticky { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 28px; }
.post__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.post__title { font-size: clamp(2rem, 5.2vw, 3.5rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.post__lede { margin: 0; font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); line-height: 1.5; }
.post__meta { display: flex; gap: .9rem; font-size: .9rem; color: var(--muted); }
.post__meta > * + *::before { content: '•'; margin-right: .9rem; opacity: .5; }
.post__media { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); margin-bottom: 28px; }
.post__media > img { width: 100%; height: auto; }
.post__gallery { display: flex; flex-direction: column; gap: 16px; background: none; overflow: visible; }
.post__gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.post__gallery img { width: 100%; height: auto; }

.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: inherit; overflow: hidden; }
.player--vertical { aspect-ratio: 9 / 16; max-height: 82vh; width: min(100%, 460px); margin-inline: auto; }
.post__media:has(.player--vertical) { background: #000; }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__facade { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: #000; }
.player__facade img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .3s; }
.player__facade svg { position: absolute; inset: 0; margin: auto; width: 76px; height: 54px; transition: transform .25s var(--ease); }
.player__facade .pb { fill: #212121; fill-opacity: .82; transition: fill .2s, fill-opacity .2s; }
.player__facade .pt { fill: #fff; }
.player__facade:hover img { opacity: 1; }
.player__facade:hover svg { transform: scale(1.08); }
.player__facade:hover .pb { fill: #ff0033; fill-opacity: 1; }

.prose { font-size: 1.125rem; line-height: 1.75; max-width: 70ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.75rem; margin: 2.2em 0 .6em; }
.prose h3 { font-size: 1.35rem; margin: 1.8em 0 .5em; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose img { border-radius: 16px; height: auto; }
.prose figure { margin: 2rem 0; }
.prose figcaption { margin-top: .6rem; font-size: .9rem; color: var(--muted); text-align: center; }
.prose blockquote { margin: 1.8rem 0; padding: .4rem 0 .4rem 1.4rem; border-left: 4px solid var(--accent); font-size: 1.2rem; font-family: var(--font-display); }
.prose blockquote p { margin: .4rem 0; }
.prose code { font-size: .88em; padding: .15em .4em; border-radius: 6px; background: var(--surface-2); }
.prose pre { padding: 1rem 1.2rem; border-radius: 14px; background: var(--surface-2); overflow-x: auto; }
.prose pre code { padding: 0; background: none; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.5rem 0; }
.prose .player { margin: 2rem 0; border-radius: 16px; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .35rem 0; }

.source-card {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 16px; margin: 32px 0 0;
  padding: 18px 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color .2s, transform .2s var(--ease);
}
.source-card strong { grid-column: 1; font-size: 1.1rem; font-family: var(--font-display); }
.source-card svg { grid-column: 2; grid-row: 1 / span 2; font-size: 1.4rem; color: var(--accent); transition: transform .2s var(--ease); }
.source-card:hover { border-color: var(--accent); }
.source-card:hover svg { transform: translateX(4px); }

.tags { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { display: inline-block; padding: .35rem .8rem; border-radius: 999px; background: var(--surface-2); font-size: .88rem; font-weight: 600; color: var(--muted); transition: color .2s, background .2s; }
.tags a:hover { color: var(--ink); background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); }

.share { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.share .btn { margin-right: 8px; }

.side-title { font-size: 1.05rem; margin-bottom: 12px; }
.side-list { display: flex; flex-direction: column; gap: 4px; }
.mini { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 8px; margin-inline: -8px; border-radius: 14px; font-size: .92rem; font-weight: 600; line-height: 1.3; transition: background .2s; }
.mini:hover { background: var(--surface-2); }
.mini__img, .mini__ph { width: 72px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.mini__img img { width: 100%; height: 100%; object-fit: cover; }
.mini__ph { display: grid; place-items: center; color: #fff; font-size: 1.4rem; background: linear-gradient(135deg, hsl(var(--h) 95% 64%), hsl(calc(var(--h) + 50) 95% 56%)); }
.mini span:last-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.related { padding-block: 32px 48px; border-top: 1px solid var(--line); margin-top: 16px; }

.page { padding-block: clamp(28px, 5vw, 56px) 64px; max-width: 820px; }

/* ── Pager ────────────────────────────────────────────────── */
.pager { display: flex; justify-content: center; gap: 12px; margin-top: 44px; }

/* ── Search ───────────────────────────────────────────────── */
.search {
  display: flex; align-items: center; gap: 12px; margin-top: 24px; max-width: 720px;
  padding: 6px 8px 6px 22px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 1.3rem; color: var(--muted);
}
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.1rem; padding: .8rem 0; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
[data-search-status] { margin-top: 14px; min-height: 1.2em; }
mark { background: color-mix(in srgb, var(--accent-2) 45%, transparent); color: inherit; border-radius: 3px; padding: 0 .1em; }

/* ── 404 ──────────────────────────────────────────────────── */
.notfound { padding-block: 80px 100px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.notfound__code {
  margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(6rem, 22vw, 12rem); line-height: .9; letter-spacing: -.06em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.notfound h1 { font-size: 2rem; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); padding-block: 44px 28px; background: var(--surface); }
.site-footer__inner { display: grid; gap: 28px; grid-template-columns: 1fr; margin-bottom: 28px; }
@media (min-width: 760px) { .site-footer__inner { grid-template-columns: 1.2fr 2fr; } }
.site-footer p { max-width: 42ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; align-content: start; font-weight: 600; }
.footer-links a, .footer-links button { color: var(--muted); transition: color .2s; }
.footer-links a:hover, .footer-links button:hover { color: var(--ink); }
.social { display: flex; gap: 4px; margin-left: -10px; }

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: .8rem 1.2rem; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: var(--shadow-lg);
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
