/* Nuvle — site styles. Light by default, dark via system or the toggle (data-theme). */
@font-face { font-family: 'Bricolage'; src: url('/assets/fonts/bricolage-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/assets/fonts/manrope-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/assets/fonts/manrope-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/assets/fonts/manrope-700.woff2') format('woff2'); font-weight: 700 800; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #fbfafd;
  --surface: #ffffff;
  --ink: #16132a;
  --muted: #5e5975;
  --subtle: #8a849e;
  --line: #ece9f2;
  --violet: #6b5bd2;
  --apricot: #ffb38a;
  --lilac: #efecfa;
  --peach: #fff1e8;
  --btn: #2a2550;
  --btn-ink: #ffffff;
  --glow: rgba(255, 179, 138, .38);
  --shadow: 0 30px 60px -28px rgba(42, 37, 80, .35);
  --display: 'Bricolage', 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --text: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max: 1160px;
  --r: 28px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0e0c16; --surface: #171424; --ink: #f4f2f8; --muted: #a6a0bc; --subtle: #7d7795; --line: #26213a;
    --violet: #b6aef2; --lilac: #1b1730; --peach: #231916; --btn: #f4f2f8; --btn-ink: #16132a;
    --glow: rgba(182, 174, 242, .22); --shadow: 0 30px 60px -28px rgba(0, 0, 0, .7);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0e0c16; --surface: #171424; --ink: #f4f2f8; --muted: #a6a0bc; --subtle: #7d7795; --line: #26213a;
  --violet: #b6aef2; --lilac: #1b1730; --peach: #231916; --btn: #f4f2f8; --btn-ink: #16132a;
  --glow: rgba(182, 174, 242, .22); --shadow: 0 30px 60px -28px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--violet); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--btn); color: var(--btn-ink); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { height: 64px; display: flex; align-items: center; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -0.03em; margin-right: auto; }
.logo svg { width: 28px; height: 28px; color: var(--ink); }
.links { display: flex; gap: 26px; margin-right: 14px; }
.links a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); }
.links a:hover { color: var(--ink); }
.theme { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.theme svg { width: 18px; height: 18px; }
.theme .moon { display: none; }
:root[data-theme='dark'] .theme .sun { display: none; }
:root[data-theme='dark'] .theme .moon { display: block; }
@media (max-width: 760px) { .links { display: none; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px; font: 700 16px/1 var(--text); text-decoration: none; border: 0; cursor: pointer; white-space: nowrap; transition: transform .18s ease, box-shadow .18s ease, opacity .18s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: .9; }
.btn-primary { background: var(--btn); color: var(--btn-ink); box-shadow: 0 12px 28px -12px rgba(42, 37, 80, .6); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .stack { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; line-height: 1; }
.btn .stack small { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; opacity: .7; text-transform: uppercase; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.fine { color: var(--subtle); font-size: 14px; }

/* ---------- Hero ---------- */
.hero { position: relative; text-align: center; padding: 72px 0 0; overflow: hidden; }
.hero::before { content: ''; position: absolute; left: 50%; top: 52%; width: 900px; height: 900px; translate: -50% 0; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 62%); pointer-events: none; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted); }
.pill b { background: var(--lilac); color: var(--violet); border-radius: 999px; padding: 2px 9px; font-size: 12.5px; }
.hero h1 { font-size: clamp(52px, 10vw, 112px); margin: 22px auto 20px; max-width: 11ch; }
.hero h1 em { font-style: normal; color: var(--violet); }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 34ch; margin: 0 auto 30px; }
.hero .fine { margin: 16px 0 0; }

.phones { position: relative; display: flex; justify-content: center; align-items: flex-end; margin-top: 56px; height: clamp(440px, 62vw, 640px); }
.phones .phone { position: absolute; bottom: -18%; }
.phones .p1 { z-index: 2; width: clamp(240px, 30vw, 330px); }
.phones .p2, .phones .p3 { width: clamp(200px, 25vw, 280px); bottom: -28%; z-index: 1; opacity: .98; }
.phones .p2 { translate: -78% 0; rotate: -7deg; }
.phones .p3 { translate: 78% 0; rotate: 7deg; }
@media (max-width: 640px) {
  .hero { padding-top: 40px; }
  .phones { height: 470px; margin-top: 40px; }
  .phones .p1 { width: 250px; }
  .phones .p2, .phones .p3 { width: 200px; }
  .phones .p2 { translate: -66% 0; }
  .phones .p3 { translate: 66% 0; }
}

/* ---------- Phone frame ---------- */
.phone { border-radius: 44px; padding: 9px; background: #1c1b21; box-shadow: 0 0 0 1px #4a4952, var(--shadow); }
.phone .screen { position: relative; border-radius: 36px; overflow: hidden; background: #f2f0f5; padding-top: 28px; }
.phone .screen::before { content: ''; position: absolute; top: 9px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: #0b0b0d; box-shadow: 0 0 0 2px #1f1f24; }
.phone .screen.dark { background: #000; }
.phone img { width: 100%; }

/* ---------- Sections ---------- */
section { padding: 112px 0; }
.head { text-align: center; max-width: 700px; margin: 0 auto 48px; }
.head h2 { font-size: clamp(38px, 5.6vw, 64px); margin-bottom: 14px; }
.head h2 em { font-style: normal; color: var(--violet); }
.head p { color: var(--muted); font-size: 19px; margin: 0; }
@media (max-width: 640px) { section { padding: 80px 0; } }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { position: relative; overflow: hidden; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); padding: 32px 32px 0; min-height: 520px; display: flex; flex-direction: column; isolation: isolate; }
.tile h3 { font-size: clamp(26px, 2.6vw, 32px); margin-bottom: 10px; letter-spacing: -0.03em; }
.tile p { color: var(--muted); margin: 0; max-width: 34ch; font-size: 16.5px; }
.tile .phone { width: 260px; margin: 32px auto -120px; }
.t-lilac { background: var(--lilac); border-color: transparent; }
.t-peach { background: var(--peach); border-color: transparent; }
.t-night { background: #13111c; border-color: transparent; color: #f4f2f8; }
.t-night p { color: #b9b4cc; }
.t-night h3 em { color: var(--apricot); font-style: normal; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.tile.row { flex-direction: row; align-items: center; gap: 40px; padding: 0 48px; min-height: 460px; }
.tile.row > div:first-child { flex: 1; padding: 48px 0; }
.tile.row .phone { margin: 40px 0 -160px; flex: none; }
.tag { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--violet); background: var(--surface); border-radius: 999px; padding: 5px 11px; margin-bottom: 16px; }
.mini { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-weight: 600; font-size: 15.5px; }
.mini li { display: flex; gap: 10px; align-items: center; }
.mini li::before { content: ''; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--violet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
@media (max-width: 960px) {
  .span-2, .span-3, .span-4 { grid-column: span 3; }
}
@media (max-width: 680px) {
  .bento { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-4, .span-6 { grid-column: auto; }
  .tile { min-height: 500px; padding: 28px 24px 0; }
  .tile.row { flex-direction: column; align-items: stretch; padding: 28px 24px 0; gap: 0; }
  .tile.row > div:first-child { padding: 0; }
  .tile.row .phone { margin: 32px auto -140px; }
}

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 860px; margin: 0 auto; }
.plan { border-radius: var(--r); padding: 32px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.plan.plus { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
.plan.plus .muted, .plan.plus li { color: color-mix(in srgb, var(--btn-ink) 78%, transparent); }
.plan h3 { font-size: 22px; letter-spacing: -0.02em; }
.price { font-family: var(--display); font-weight: 700; font-size: 52px; letter-spacing: -0.04em; line-height: 1; margin: 18px 0 6px; }
.price small { font: 600 16px var(--text); letter-spacing: 0; opacity: .7; }
.plan .muted { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.plan ul { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; font-size: 15.5px; color: var(--muted); }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: '✓'; font-weight: 800; color: var(--violet); }
.plan.plus li::before { color: var(--apricot); }
.plan .btn { margin-top: auto; }
.plan.plus .btn-primary { background: var(--btn-ink); color: var(--btn); box-shadow: none; }
@media (max-width: 680px) { .plans { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 22px 2px; font-weight: 700; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; width: 22px; height: 22px; flex: none; margin-top: 3px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; transition: rotate .2s; color: var(--subtle); }
.faq details[open] summary::after { rotate: 45deg; }
.faq p { margin: 0 0 22px; color: var(--muted); max-width: 64ch; }

/* ---------- Final CTA ---------- */
.final .box { position: relative; overflow: hidden; text-align: center; border-radius: 36px; padding: 88px 24px; background: #2a2550; color: #fff; }
.final .box::before { content: ''; position: absolute; inset: auto -20% -60% -20%; height: 120%; background: radial-gradient(closest-side, rgba(255, 179, 138, .35), transparent); }
.final h2 { position: relative; font-size: clamp(40px, 6vw, 72px); margin-bottom: 16px; }
.final h2 em { color: var(--apricot); font-style: normal; }
.final p { position: relative; color: #d6d2ec; font-size: 19px; margin: 0 auto 30px; }
.final .btn-primary { position: relative; background: #fff; color: #2a2550; }
:root[data-theme='dark'] .final .box { background: #1b1730; }

/* ---------- Footer ---------- */
footer { padding: 48px 0 56px; color: var(--subtle); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { text-decoration: none; font-weight: 600; color: var(--muted); }
footer a:hover { color: var(--ink); }
footer .logo { margin: 0; font-size: 18px; }
footer .logo svg { width: 24px; height: 24px; }

/* ---------- Docs (privacy, terms, support, delete) ---------- */
.doc { max-width: 740px; margin: 0 auto; padding: 56px 20px 32px; }
.doc h1 { font-size: clamp(40px, 6vw, 60px); margin: 0 0 10px; }
.doc .meta { color: var(--subtle); margin: 0 0 36px; }
.doc h2 { font-size: 26px; margin: 44px 0 10px; letter-spacing: -0.02em; }
.doc h3 { font: 700 18px/1.4 var(--text); margin: 26px 0 6px; letter-spacing: 0; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--ink); }
.doc a { color: var(--violet); text-underline-offset: 3px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.summary { background: var(--lilac); border-radius: 22px; padding: 22px 26px; }
.summary ul { margin: 8px 0 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 14px 0; }
th, td { text-align: left; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
th { color: var(--ink); font-weight: 700; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding: 2px 0 14px 46px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--lilac); color: var(--violet); font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.callout { background: var(--peach); border-radius: 20px; padding: 18px 22px; }
.callout p { color: var(--ink); margin: 0; }
button.reveal { font: inherit; font-weight: 700; color: var(--violet); background: var(--lilac); border: 0; border-radius: 999px; padding: 2px 12px; cursor: pointer; }
button.reveal:hover { text-decoration: underline; text-underline-offset: 3px; }
a.revealed { font-weight: 700; word-break: break-all; }

/* ---------- Join / 404 ---------- */
.join { min-height: calc(100svh - 64px - 140px); display: grid; place-items: center; text-align: center; padding: 48px 20px; }
.join h1 { font-size: clamp(40px, 7vw, 64px); margin-bottom: 12px; }
.join p { color: var(--muted); max-width: 40ch; margin: 0 auto 16px; }
.join .code { font-family: var(--display); font-size: clamp(40px, 11vw, 64px); letter-spacing: .14em; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 14px 22px 14px 32px; display: inline-block; margin: 18px 0 26px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .top, .faq summary::after { transition: none; } }
:root[data-theme='dark'] .t-night { border-color: var(--line); }
@media (max-width: 640px) { .hero .cta .btn { min-width: 220px; } }

/* =========================================================================
   Motion. Everything below is off for prefers-reduced-motion and for
   visitors without JavaScript (content is always visible without .js).
   ========================================================================= */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --spring: cubic-bezier(.34, 1.56, .64, 1); }

@media (prefers-reduced-motion: no-preference) {
  /* Logo: the ring draws in, then the apricot dot drops and settles (same as the app's splash). */
  .top .logo .ring { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ring-draw 1s var(--ease-out) .1s forwards; }
  .top .logo .dot { transform-box: fill-box; transform-origin: center; opacity: 0; animation: dot-drop .7s var(--spring) .85s forwards; }
  @keyframes ring-draw { to { stroke-dashoffset: 0; } }
  @keyframes dot-drop { from { opacity: 0; transform: translate(6px, -10px) scale(.2); } to { opacity: 1; transform: none; } }

  /* Hero copy: staggered rise + unblur. */
  .js .hero .rise { opacity: 0; animation: rise .9s var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
  .hero h1 .line { display: block; }

  /* Hero phones: centre rises, side phones fan out from behind it, then the centre floats. */
  .js .phones .p1 { opacity: 0; animation: phone-up 1.1s var(--ease-out) .45s forwards, float 7s ease-in-out 1.8s infinite; }
  .js .phones .p2, .js .phones .p3 { opacity: 0; animation: fan 1.1s var(--ease-out) .8s forwards; }
  @keyframes phone-up { from { opacity: 0; translate: 0 18%; } to { opacity: 1; translate: 0 0; } }
  @keyframes fan { from { opacity: 0; translate: 0 22%; rotate: 0deg; } to { opacity: .98; translate: var(--tx) 0; rotate: var(--rot); } }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
  /* Side phones drift apart a little as you scroll (JS sets --p from 0 to 1). */
  .phones .p2 { transform: translate(calc(var(--p, 0) * -36px), calc(var(--p, 0) * 30px)); }
  .phones .p3 { transform: translate(calc(var(--p, 0) * 36px), calc(var(--p, 0) * 30px)); }

  /* The warm glow behind the phones breathes slowly. */
  .hero::before { animation: breathe 9s ease-in-out infinite; }
  @keyframes breathe { 0%, 100% { opacity: .85; scale: 1; } 50% { opacity: 1; scale: 1.08; } }

  /* Scroll reveal: blocks rise into place; phones inside tiles slide up a beat later. */
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .tile .phone { transform: translateY(70px); transition: transform 1.1s var(--ease-out) calc(var(--i, 0) * 80ms + 120ms); }
  .js .tile.in .phone { transform: none; }

  /* Hover (mouse only): tiles lift their phone, buttons glow. */
  @media (hover: hover) {
    .js .tile.in:hover .phone { transform: translateY(-10px); transition-duration: .5s; transition-delay: 0s; }
    .tile { transition: box-shadow .4s var(--ease-out); }
    .tile:hover { box-shadow: 0 24px 50px -30px rgba(42, 37, 80, .35); }
    .btn-primary:hover { box-shadow: 0 16px 34px -12px rgba(107, 91, 210, .55); }
  }

  /* FAQ answers ease open. */
  .faq details[open] p { animation: rise .5s var(--ease-out); }

  /* Final CTA: the apricot glow drifts. */
  .final .box::before { animation: drift 12s ease-in-out infinite alternate; }
  @keyframes drift { from { translate: -12% 0; } to { translate: 12% 0; } }

  /* Theme toggle icon spins in. */
  .theme svg { transition: rotate .5s var(--spring), opacity .3s; }
  :root[data-theme='dark'] .theme .moon, :root[data-theme='light'] .theme .sun { animation: spin-in .5s var(--spring); }
  @keyframes spin-in { from { rotate: -90deg; opacity: 0; } to { rotate: 0deg; opacity: 1; } }
}
/* Fan-out targets (also used without motion). */
.phones .p2 { --tx: -78%; --rot: -7deg; }
.phones .p3 { --tx: 78%; --rot: 7deg; }
@media (max-width: 640px) { .phones .p2 { --tx: -66%; } .phones .p3 { --tx: 66%; } }
/* Smooth colour change when switching themes. */
.theme-anim, .theme-anim * { transition: background-color .35s ease, color .35s ease, border-color .35s ease !important; }

/* =========================================================================
   Blog
   ========================================================================= */
.blog { padding: 48px 0 96px; }
.blog-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.blog-head h1 { font-size: clamp(46px, 8vw, 84px); margin: 6px 0 14px; }
.blog-head h1 em { font-style: normal; color: var(--violet); }
.blog-head .lede { margin-bottom: 26px; }
.blog-tools { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 10px; width: min(440px, 100%); height: 50px; padding: 0 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--subtle); }
.search:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 18%, transparent); }
.search svg { width: 18px; height: 18px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 16px var(--text); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font: 600 14px var(--text); text-decoration: none; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.chip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--violet) 45%, var(--line)); }
.chip.on { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
.chip svg { width: 15px; height: 15px; }
.chip.rss { height: 50px; padding: 0 18px; }
.crumbs { display: flex; gap: 8px; justify-content: center; font-size: 14px; font-weight: 600; color: var(--subtle); }
.crumbs a { color: var(--violet); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.badge { display: inline-block; vertical-align: middle; font: 800 11px var(--text); letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: var(--peach); color: #a8532a; }

/* Cards */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card { border-radius: 24px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease-out, ease), box-shadow .35s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -32px rgba(42, 37, 80, .45); }
.post-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.post-card-art { aspect-ratio: 1200 / 630; overflow: hidden; background: var(--lilac); }
.post-card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out, ease); }
.post-card:hover .post-card-art img { transform: scale(1.03); }
.post-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h3, .post-card h2 { font-size: 22px; letter-spacing: -0.025em; line-height: 1.15; }
.post-card p { margin: 0; color: var(--muted); font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .post-meta { margin-top: auto; padding-top: 6px; }
.kicker { font: 800 12px var(--text); letter-spacing: .07em; text-transform: uppercase; color: var(--violet); }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--subtle); font-size: 14px; font-weight: 600; }
.post-card.big { margin-bottom: 18px; }
.post-card.big .post-card-link { display: grid; grid-template-columns: 1.2fr 1fr; }
.post-card.big .post-card-art { aspect-ratio: auto; min-height: 340px; }
.post-card.big .post-card-body { padding: 40px; justify-content: center; gap: 12px; }
.post-card.big h2 { font-size: clamp(30px, 3.4vw, 42px); }
.post-card.big p { -webkit-line-clamp: 4; font-size: 17px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; }
@media (max-width: 960px) { .post-grid { grid-template-columns: 1fr 1fr; } .post-card.big .post-card-link { grid-template-columns: 1fr; } .post-card.big .post-card-art { min-height: 0; aspect-ratio: 1200 / 630; } .post-card.big .post-card-body { padding: 24px; } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }
.latest .post-grid { margin-top: 8px; }

/* Article */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--apricot)); transform: scaleX(0); transform-origin: 0 50%; }
.post-page { padding: 40px 0 96px; }
.post-head { max-width: 780px; margin: 0 auto; padding: 0 20px; text-align: center; }
.post-head h1 { font-size: clamp(38px, 6vw, 64px); margin: 18px 0 16px; }
.post-desc { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); margin: 0 auto 20px; max-width: 46ch; }
.post-head .post-meta { justify-content: center; }
.post-cover { max-width: 1080px; margin: 40px auto 0; padding: 0 20px; }
.post-cover img { width: 100%; border-radius: 28px; }
.post-layout { display: grid; grid-template-columns: 220px minmax(0, 700px); gap: 64px; justify-content: center; max-width: 1080px; margin: 48px auto 0; padding: 0 20px; }
.post-layout.no-toc { grid-template-columns: minmax(0, 700px); }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14.5px; max-height: calc(100vh - 120px); overflow: auto; }
.toc summary { list-style: none; font: 800 12px var(--text); letter-spacing: .07em; text-transform: uppercase; color: var(--subtle); margin-bottom: 12px; cursor: pointer; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc li.l3 a { padding-left: 26px; font-size: 13.5px; }
.toc li a:hover { color: var(--ink); }
.toc li a.on { color: var(--violet); border-left-color: var(--violet); font-weight: 700; }
@media (max-width: 1099px) {
  .post-layout { grid-template-columns: minmax(0, 700px); gap: 0; margin-top: 32px; }
  .toc { position: static; max-height: none; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; margin-bottom: 28px; }
  .toc summary { margin: 0; display: flex; justify-content: space-between; }
  .toc summary::after { content: '+'; font-size: 18px; line-height: 1; }
  .toc details[open] summary { margin-bottom: 10px; }
  .toc details[open] summary::after { content: '–'; }
}

/* Prose */
.prose { font-size: 18.5px; line-height: 1.75; color: var(--ink); min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 86%, var(--muted)); }
.prose h2 { font-size: clamp(28px, 3.2vw, 36px); margin: 1.9em 0 .55em; letter-spacing: -0.03em; scroll-margin-top: 90px; }
.prose h3 { font-size: 23px; margin: 1.6em 0 .45em; letter-spacing: -0.02em; scroll-margin-top: 90px; }
.prose h2 .anchor, .prose h3 .anchor { margin-left: 10px; color: var(--subtle); text-decoration: none; opacity: 0; transition: opacity .2s; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose a { color: var(--violet); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--violet); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.5em 0; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--violet); color: var(--muted); font-size: 20px; }
.prose blockquote p { color: inherit; }
.prose figure { margin: 2em 0; }
.prose figure img, .prose > p img { border-radius: 20px; width: 100%; }
.prose figcaption { margin-top: 10px; text-align: center; font-size: 14.5px; color: var(--subtle); }
.prose table { font-size: 16px; }
.prose th { background: var(--lilac); }
.prose th:first-child { border-top-left-radius: 12px; } .prose th:last-child { border-top-right-radius: 12px; }
.prose :not(pre) > code { font: 600 .86em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--lilac); color: var(--ink); padding: .15em .45em; border-radius: 7px; }
.prose iframe, .prose video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 20px; margin: 1.6em 0; }
.prose details { border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px; margin: 1.2em 0; background: var(--surface); }
.prose summary { cursor: pointer; font-weight: 700; }
.prose kbd { font: 600 .8em ui-monospace, monospace; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: .1em .4em; background: var(--surface); }
.prose mark { background: color-mix(in srgb, var(--apricot) 45%, transparent); color: inherit; border-radius: 4px; padding: 0 .15em; }

/* Callouts:  > [!TIP] */
.callout { position: relative; margin: 1.6em 0; padding: 16px 20px 16px 20px; border-radius: 18px; border: 0; font-size: 17px; background: var(--lilac); color: var(--ink); }
.prose .callout { border-left: 0; }
.callout::before { content: attr(data-callout); display: block; font: 800 12px var(--text); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 6px; color: var(--violet); }
.callout p { color: var(--ink) !important; margin: 0 0 .6em; }
.callout p:last-child { margin: 0; }
.callout-tip { background: color-mix(in srgb, #2d7a57 12%, var(--surface)); } .callout-tip::before { color: #2d7a57; }
.callout-important { background: var(--lilac); }
.callout-warning, .callout-caution { background: var(--peach); } .callout-warning::before, .callout-caution::before { color: #b0581f; }
:root[data-theme='dark'] .callout-tip::before { color: #7fd1a9; }
:root[data-theme='dark'] .callout-warning::before, :root[data-theme='dark'] .callout-caution::before { color: var(--apricot); }

/* Footnotes */
.prose .footnotes-sep { margin-top: 3em; }
.prose .footnotes { font-size: 15px; color: var(--muted); }
.prose .footnote-ref a, .prose .footnote-backref { text-decoration: none; }

/* Code blocks */
.prose pre.code { position: relative; margin: 1.6em 0; padding: 20px 22px; border-radius: 18px; background: #16132a; color: #e9e6f5; overflow-x: auto; font: 500 14.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
:root[data-theme='dark'] .prose pre.code { background: #0a0911; border: 1px solid var(--line); }
.prose pre.code::before { content: attr(data-lang); position: absolute; top: 10px; right: 64px; font: 700 11px var(--text); letter-spacing: .06em; text-transform: uppercase; color: #8a849e; }
.prose pre.code .copy { position: absolute; top: 8px; right: 8px; font: 700 12px var(--text); color: #e9e6f5; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; padding: 5px 9px; cursor: pointer; }
.prose pre.code .copy:hover { background: rgba(255, 255, 255, .16); }
.hljs-comment, .hljs-quote { color: #8a849e; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-built_in { color: #b6aef2; }
.hljs-string, .hljs-attr, .hljs-template-string, .hljs-regexp { color: #ffb38a; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #f5c28b; }
.hljs-title, .hljs-title.function_, .hljs-section { color: #8fd3c1; }
.hljs-type, .hljs-title.class_, .hljs-variable.language_ { color: #e4a7d8; }
.hljs-meta, .hljs-tag, .hljs-name, .hljs-attribute { color: #9cc3ff; }
.hljs-addition { color: #8fd3a7; } .hljs-deletion { color: #ff9b9b; }
.hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: 700; }

/* Post footer */
.post-foot { max-width: 700px; margin: 56px auto 0; padding: 0 20px; display: grid; gap: 28px; }
.post-foot .chips { justify-content: flex-start; margin: 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share .fine { margin-right: 4px; font-weight: 700; }
.post-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 26px; border-radius: 24px; background: var(--btn); color: var(--btn-ink); }
.post-cta div { display: flex; flex-direction: column; gap: 4px; }
.post-cta strong { font: 700 22px var(--display); letter-spacing: -0.02em; }
.post-cta span { opacity: .78; font-size: 15.5px; }
.post-cta .btn-primary { background: var(--btn-ink); color: var(--btn); box-shadow: none; }
@media (max-width: 560px) { .post-cta { flex-direction: column; align-items: flex-start; } }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prevnext a { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color .2s; }
.prevnext a:hover { border-color: var(--violet); }
.prevnext a.next { text-align: right; }
.prevnext strong { font-size: 16px; line-height: 1.3; }
@media (max-width: 560px) { .prevnext { grid-template-columns: 1fr; } .prevnext a.next { text-align: left; } }
.related { margin-top: 96px; }
.related h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 24px; }
@media print { .top, footer, .progress, .toc, .share, .post-cta, .prevnext, .related { display: none !important; } .prose { font-size: 12pt; } }
/* Blog fixes: keep generated cover art uncropped; reveal + hover transitions together; tighter footnotes. */
.post-card.big .post-card-art { aspect-ratio: 1200 / 630; min-height: 0; align-self: center; margin: 18px 0 18px 18px; border-radius: 18px; }
@media (max-width: 960px) { .post-card.big .post-card-art { margin: 0; border-radius: 0; } }
.js .post-card.reveal { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), box-shadow .35s; }
.js .post-card.reveal.in:hover { transform: translateY(-3px); }
.prose hr.footnotes-sep { margin: 2.5em 0 1em; }
.prose .footnotes ol { margin: 0; padding-left: 1.2em; }
.prose .footnotes li { font-size: 15px; }
