/* Kinfold — Airbnb marketplace × Notion editorial.
   One sans (Figtree, 2 weights), one house easing, tokens for light + dark. */

:root {
  --font: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --bg: #ffffff;
  --surface: #f7f6f3;          /* Notion warm paper */
  --surface-2: #efede8;
  --ink: #1f1e1c;
  --ink-2: #4a4844;
  --muted: #74716b;
  --line: #e7e5e0;
  --line-strong: #d4d1ca;
  --accent: #b8472f;           /* desert terracotta, 5.6:1 on white */
  --accent-hover: #9c3a25;
  --accent-ink: #ffffff;
  --accent-soft: #fbeee9;
  --sage: #4f6b57;
  --sage-soft: #e9efe9;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --shadow-sm: 0 1px 2px rgba(20, 18, 15, .06);
  --shadow: 0 6px 16px rgba(20, 18, 15, .08), 0 1px 3px rgba(20, 18, 15, .06);
  --shadow-lg: 0 24px 60px rgba(20, 18, 15, .18);
  --radius: 16px;
  --radius-sm: 10px;
  --pill: 999px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --read: 680px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #191919; --surface: #202020; --surface-2: #2a2a29; --ink: #ecebe8; --ink-2: #c9c7c2;
    --muted: #9d9a94; --line: #2f2f2e; --line-strong: #3d3c3a; --accent: #ec7a5e; --accent-hover: #f3927a;
    --accent-ink: #1b1a19; --accent-soft: #3a2621; --sage: #9cc0a5; --sage-soft: #233029; --danger: #ff8a80; --danger-soft: #3b1f1d;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 8px 24px rgba(0,0,0,.45); --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #191919; --surface: #202020; --surface-2: #2a2a29; --ink: #ecebe8; --ink-2: #c9c7c2;
  --muted: #9d9a94; --line: #2f2f2e; --line-strong: #3d3c3a; --accent: #ec7a5e; --accent-hover: #f3927a;
  --accent-ink: #1b1a19; --accent-soft: #3a2621; --sage: #9cc0a5; --sage-soft: #233029; --danger: #ff8a80; --danger-soft: #3b1f1d;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 8px 24px rgba(0,0,0,.45); --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::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 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--pill); }
.skip:focus { top: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Type — tracking tightens as size grows, floored at -0.04em. */
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
.display { font-size: clamp(2.5rem, 1.6rem + 4vw, 5rem); line-height: 1.02; letter-spacing: -0.04em; }
.h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem); line-height: 1.06; letter-spacing: -0.035em; }
.h2 { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.25rem); line-height: 1.12; letter-spacing: -0.025em; }
.h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.012em; }
.lede { font-size: clamp(1.075rem, 1rem + .35vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Header */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand svg { width: 30px; height: 30px; color: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; padding: 10px 14px; border-radius: var(--pill); color: var(--ink-2); font-size: .95rem; transition: background .2s var(--ease); }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a.btn-dark, .nav a.btn-dark:hover { color: var(--bg); background: var(--ink); }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--pill); border: 1px solid var(--line); background: var(--bg); cursor: pointer; transition: box-shadow .2s var(--ease); }
.icon-btn:hover { box-shadow: var(--shadow-sm); }
.icon-btn svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .nav a.hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--pill); border: 0; cursor: pointer; text-decoration: none; font-weight: 600; font-size: 1rem; transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--surface); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn svg { width: 18px; height: 18px; }

/* Hero */
.hero { position: relative; padding: clamp(28px, 5vw, 56px) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero-photo { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 4.4; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge { position: absolute; left: 18px; bottom: 18px; right: 18px; display: flex; gap: 12px; align-items: center; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.hero-badge b { display: block; font-weight: 600; }
.hero-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: #2f9e5b; box-shadow: 0 0 0 5px color-mix(in srgb, #2f9e5b 22%, transparent); flex: none; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, #2f9e5b 6%, transparent); } }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-photo { aspect-ratio: 16 / 11; } }

/* Airbnb search pill */
.search { display: grid; grid-template-columns: 1.2fr 1fr auto; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--pill); box-shadow: var(--shadow); padding: 8px; max-width: 620px; margin-top: 28px; }
.search label { display: block; padding: 8px 22px; border-radius: var(--pill); cursor: pointer; transition: background .2s var(--ease); }
.search label:hover { background: var(--surface); }
.search label + label { border-left: 1px solid var(--line); }
.search span { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .01em; }
.search select, .search input { width: 100%; border: 0; background: transparent; padding: 2px 0; font-size: .95rem; color: var(--ink-2); outline: none; appearance: none; }
.search .btn { height: 52px; padding: 0 24px; }
@media (max-width: 640px) {
  .search { grid-template-columns: 1fr; border-radius: 24px; gap: 4px; }
  .search label + label { border-left: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .search .btn { width: 100%; }
}
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; color: var(--muted); font-size: .9rem; }
.trust-row span { display: inline-flex; gap: 8px; align-items: center; }
.trust-row svg { width: 16px; height: 16px; color: var(--sage); }

/* Category bar (Airbnb) */
.cats { position: sticky; top: 72px; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.hero + .cats { margin-top: clamp(40px, 6vw, 72px); }
.cats .wrap { display: flex; gap: clamp(20px, 3.5vw, 44px); overflow-x: auto; scrollbar-width: none; }
.cats .wrap::-webkit-scrollbar { display: none; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 2px 12px; text-decoration: none; color: var(--muted); font-size: .8rem; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease); }
.cat svg { width: 24px; height: 24px; }
.cat:hover, .cat[aria-current='page'] { color: var(--ink); border-color: var(--line-strong); }
.cat[aria-current='page'] { border-color: var(--ink); }

/* Sections */
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head p { margin: 10px 0 0; }
.link-arrow { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
.tint { background: var(--surface); }

/* Listing cards */
.grid { display: grid; gap: 28px 24px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid-5 { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; } }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { position: relative; text-decoration: none; display: block; }
.card-media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1; background: var(--surface-2); }
.card-media.wide { aspect-ratio: 4 / 3; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-tag { position: absolute; top: 12px; left: 12px; background: var(--bg); color: var(--ink); border-radius: var(--pill); padding: 5px 11px; font-size: .78rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.card-body { padding-top: 12px; }
.card-title { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.card-sub { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.card-meta { display: inline-flex; align-items: center; gap: 4px; font-size: .9rem; font-weight: 400; }
.card-meta svg { width: 14px; height: 14px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step-n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; margin-bottom: 18px; }
.step p { margin: 8px 0 0; color: var(--ink-2); }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* City chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--pill); text-decoration: none; font-size: .95rem; transition: border-color .2s var(--ease), background .2s var(--ease); background: var(--bg); }
.chip:hover { border-color: var(--ink); }
.chip small { color: var(--muted); }

/* Journal (magazine) */
.mag { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.mag-lead .card-media { aspect-ratio: 16 / 10; }
.mag-list { display: grid; gap: 22px; align-content: start; }
.mag-row { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; text-decoration: none; }
.mag-row .card-media { aspect-ratio: 1; border-radius: 12px; }
@media (max-width: 900px) { .mag { grid-template-columns: 1fr; } }
.kicker-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .85rem; margin-top: 10px; flex-wrap: wrap; }
.kicker-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.topic { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: .78rem; font-weight: 600; background: var(--sage-soft); color: var(--sage); }
.post-title { margin-top: 10px; }
.mag-lead .post-title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); letter-spacing: -0.03em; line-height: 1.12; }
.mag-row .post-title { font-size: 1.05rem; line-height: 1.3; letter-spacing: -0.01em; }

/* Split band */
.band { display: grid; grid-template-columns: 1fr 1fr; border-radius: 28px; overflow: hidden; background: var(--surface); }
.band-copy { padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.band-copy p { margin: 0; color: var(--ink-2); max-width: 44ch; }
.band img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
@media (max-width: 860px) { .band { grid-template-columns: 1fr; } }

/* FAQ — Notion toggles */
.toggles { max-width: 820px; }
.toggles details { border-bottom: 1px solid var(--line); }
.toggles summary { list-style: none; cursor: pointer; padding: 20px 0; display: flex; gap: 14px; align-items: baseline; font-weight: 600; font-size: 1.08rem; }
.toggles summary::-webkit-details-marker { display: none; }
.toggles summary::before { content: ''; flex: none; width: 0; height: 0; border-left: 7px solid var(--muted); border-top: 5px solid transparent; border-bottom: 5px solid transparent; transform: translateY(-1px); transition: transform .25s var(--ease); }
.toggles details[open] summary::before { transform: translateY(-1px) rotate(90deg); }
.toggles details p { margin: 0 0 20px 21px; color: var(--ink-2); max-width: 64ch; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 32px; font-size: .9rem; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot h2.foot-h { font-size: .9rem; color: var(--ink); margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.disclaimer { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 92ch; font-size: .82rem; line-height: 1.6; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ———— Listing page (issue × city): Airbnb listing + sticky booking card ———— */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; border-radius: 24px; overflow: hidden; height: clamp(280px, 42vw, 480px); margin-top: 24px; }
.gallery picture:first-child { grid-row: span 2; }
.gallery picture, .gallery img { width: 100%; height: 100%; }
.gallery img { object-fit: cover; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; grid-template-rows: 1fr; height: 300px; } .gallery picture:not(:first-child) { display: none; } }
.listing { display: grid; grid-template-columns: 1fr 400px; gap: clamp(32px, 6vw, 88px); padding: 40px 0 80px; align-items: start; }
@media (max-width: 980px) { .listing { grid-template-columns: 1fr; } }
.props { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 24px 0; font-size: .95rem; }
.props dt { color: var(--muted); display: flex; gap: 8px; align-items: center; }
.props dt svg { width: 16px; height: 16px; }
.props dd { margin: 0; }
.feature-list { display: grid; gap: 22px; margin: 28px 0; }
.feature { display: grid; grid-template-columns: 28px 1fr; gap: 16px; }
.feature svg { width: 26px; height: 26px; color: var(--ink-2); }
.feature b { display: block; font-weight: 600; }
.feature span { color: var(--muted); }
.callout { display: grid; grid-template-columns: 24px 1fr; gap: 12px; background: var(--surface); border-radius: var(--radius-sm); padding: 16px 18px; margin: 24px 0; color: var(--ink-2); }
.callout svg { width: 22px; height: 22px; color: var(--accent); }
.callout p { margin: 0; }

/* Booking-style form card */
.book { position: sticky; top: 96px; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 24px; background: var(--bg); }
.book-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.book-head b { font-size: 1.35rem; letter-spacing: -0.02em; }

/* ———— Match flow (shared by drawer + inline card) ———— */
.flow-progress { height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin: 14px 0 22px; }
.flow-progress i { display: block; height: 100%; width: 20%; background: var(--accent); border-radius: 4px; transition: width .5s var(--ease); }
.flow-step { display: none; }
.flow-step.is-active { display: block; animation: step-in .45s var(--ease) both; }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } }
.flow-step.is-back { animation-name: step-back; }
@keyframes step-back { from { opacity: 0; transform: translateX(-14px); } }
.flow-q { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin: 0 0 6px; }
.flow-hint { margin: 0 0 18px; color: var(--muted); font-size: .92rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; }
.tile input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tile span { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px; font-weight: 600; font-size: .95rem; line-height: 1.25; min-height: 92px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease); }
.tile svg { width: 22px; height: 22px; color: var(--ink-2); }
.tile input:hover + span { border-color: var(--ink); }
.tile input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--surface); }
.tile input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rows { display: grid; gap: 8px; }
.row-opt { position: relative; }
.row-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.row-opt span { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; font-size: .95rem; transition: border-color .15s var(--ease), background .15s var(--ease); }
.row-opt span::after { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; transition: border .15s var(--ease); }
.row-opt input:checked + span { border-color: var(--ink); background: var(--surface); }
.row-opt input:checked + span::after { border: 6px solid var(--ink); }
.row-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px 16px; background: var(--bg); font-size: 1rem; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.field textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field input[aria-invalid='true'], .field textarea[aria-invalid='true'] { border-color: var(--danger); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two .field { margin-top: 0; }
.err { display: block; color: var(--danger); font-size: .85rem; margin-top: 6px; }
.zip-ok { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--sage); font-weight: 600; font-size: .92rem; min-height: 1.4em; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; margin-top: 16px; font-size: .78rem; line-height: 1.5; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }
.consent a { color: var(--ink-2); }
.flow-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.flow-back { background: none; border: 0; padding: 10px 4px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.flow-back[hidden] { visibility: hidden; display: inline; }
.flow-next { flex: 1; max-width: 220px; margin-left: auto; }
.flow-foot { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; color: var(--muted); font-size: .8rem; }
.flow-foot svg { width: 14px; height: 14px; }
.form-error { background: var(--danger-soft); color: var(--danger); padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin-top: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Drawer (right on desktop, bottom sheet on mobile) — never a modal dialog box. */
.drawer-scrim { position: fixed; inset: 0; background: rgba(15, 14, 12, .44); opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); z-index: 80; }
.drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--bg); box-shadow: var(--shadow-lg); transform: translateX(104%); transition: transform .5s var(--ease); display: flex; flex-direction: column; visibility: hidden; }
.drawer.is-open { transform: none; visibility: visible; }
.drawer.is-open + .drawer-scrim, .drawer-scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 8px 24px 28px; overflow-y: auto; flex: 1; }
@media (max-width: 640px) {
  .drawer { top: auto; left: 0; width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; transform: translateY(104%); }
  .drawer::before { content: ''; width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 10px auto 0; }
}
body.lock { overflow: hidden; }

/* Mobile sticky CTA bar (listing pages) */
.mbar { display: none; }
@media (max-width: 980px) {
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; justify-content: space-between; align-items: center; gap: 12px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
  .mbar b { display: block; }
  .book.inline-hide { display: none; }
}

/* ———— Article (Notion doc) ———— */
.cover { height: clamp(220px, 34vw, 420px); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.doc { max-width: var(--read); margin: 0 auto; padding: 0 var(--gutter); }
.doc-icon { width: 78px; height: 78px; border-radius: 18px; display: grid; place-items: center; background: var(--bg); box-shadow: var(--shadow); margin-top: -39px; position: relative; color: var(--accent); }
.doc-icon svg { width: 38px; height: 38px; }
.doc h1 { margin: 26px 0 0; }
.doc .lede { margin-top: 16px; max-width: none; }
.doc-props { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 28px 0; padding-bottom: 24px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.doc-props dt { color: var(--muted); display: flex; gap: 8px; align-items: center; }
.doc-props dt svg { width: 15px; height: 15px; }
.doc-props dd { margin: 0; }
.toc { background: var(--surface); border-radius: var(--radius-sm); padding: 16px 20px; margin: 0 0 32px; font-size: .92rem; }
.toc b { display: block; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.prose { font-size: 1.075rem; line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.6rem; letter-spacing: -0.022em; line-height: 1.2; margin-top: 2.1em; scroll-margin-top: 96px; }
.prose h3 { font-size: 1.2rem; letter-spacing: -0.01em; margin-top: 1.7em; }
.prose p, .prose li { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose blockquote { margin-left: 0; padding: 18px 20px; background: var(--surface); border-radius: var(--radius-sm); border: 0; display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.prose blockquote::before { content: '💡'; font-size: 1.1rem; line-height: 1.6; }
.prose blockquote p { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; background: var(--surface); }
.prose code { background: var(--surface); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.sources { font-size: .85rem; color: var(--muted); }
.sources ol { padding-left: 1.2em; }
.sources a { color: var(--muted); word-break: break-word; }
.article-cta { margin: 48px 0; border-radius: 20px; padding: 28px; background: var(--accent-soft); display: grid; gap: 14px; }
.article-cta p { margin: 0; color: var(--ink-2); }
.reading-bar { position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 60; }

/* Reveal — clip-path, honours reduced motion */
.reveal { clip-path: inset(0 0 12% 0); opacity: 0; transform: translateY(12px); transition: clip-path .9s var(--ease), opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { clip-path: inset(0 0 0 0); opacity: 1; transform: none; }
.no-js .reveal { clip-path: none; opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { clip-path: none; opacity: 1; transform: none; }
}

/* Thanks */
.thanks { max-width: 640px; margin: 0 auto; padding: clamp(48px, 9vw, 120px) var(--gutter); text-align: left; }
.check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage); margin-bottom: 24px; }
.check svg { width: 30px; height: 30px; }
.timeline { list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding-bottom: 22px; position: relative; }
.timeline li::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); margin: 6px 0 0 8px; }
.timeline li.done::before { background: var(--sage); }
.timeline li:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 22px; bottom: 2px; width: 2px; background: var(--line); }
.timeline b { display: block; }
.timeline span { color: var(--muted); font-size: .95rem; }
