/* The Journal — server-rendered pages. Same palette, type and spacing as the React site
   (tailwind.config.js / src/index.css), written as plain CSS so the pages need no bundle. */
:root {
  --limestone: #F3F1EC; --paper: #FBFAF7; --mist: #E7E4DD; --line: #D8D4CB;
  --ink: #1E211E; --ink-2: #555A52; --muted: #6F6B63;
  --sage: #5E6A4C; --sage-deep: #4A5440; --sage-wash: #E6E8DE;
  --terra: #A9512F; --terra-deep: #8E4126; --terra-soft: #E9C9B8; --terra-wash: #F4E6DD;
  --display: Cormorant, Georgia, serif; --sans: Jost, system-ui, sans-serif;
  --lux: cubic-bezier(.22, 1, .36, 1);
  --soft: 0 1px 2px rgba(30,33,30,.04), 0 12px 32px -12px rgba(30,33,30,.14);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--limestone); color: var(--ink); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--terra-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 4px; }
.grain::after {
  content: ''; position: fixed; inset: -50%; pointer-events: none; z-index: 60; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap, .wrap-narrow { padding: 0 32px; } }
@media (min-width: 1024px) { .wrap { padding: 0 48px; } }

.eyebrow { font-size: .72rem; line-height: 1; letter-spacing: .28em; text-transform: uppercase; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--terra); }
.eyebrow.light { color: var(--terra-soft); }
.eyebrow.light::before { background: var(--terra-soft); }
.display { font-size: clamp(2.8rem, 6.4vw, 6.2rem); line-height: .95; letter-spacing: -.02em; color: var(--ink); margin-top: 18px; }
.display em, .display-sm em { color: var(--terra); }
.display-sm { font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.02; letter-spacing: -.01em; }
.lede { margin-top: 24px; max-width: 40rem; font-size: 1.12rem; line-height: 1.7; color: var(--ink-2); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 24px; font: 500 .82rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; border: 0; cursor: pointer; transition: all .3s var(--lux); }
.btn:disabled { opacity: .6; pointer-events: none; }
.btn-ink { background: var(--ink); color: var(--limestone); }
.btn-ink:hover { background: var(--sage-deep); }
.btn-terra { background: var(--terra); color: #fff; }
.btn-terra:hover { background: var(--terra-deep); }
.btn-line { border: 1px solid rgba(243,241,236,.3); color: var(--limestone); }
.btn-line:hover { background: var(--limestone); color: var(--ink); }
.link-arrow { display: inline-flex; gap: 8px; font-size: .8rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 4px; transition: color .2s, border-color .2s; }
.link-arrow:hover { color: var(--terra); border-color: var(--terra); }

/* ---------- wordmark ---------- */
.wm { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; white-space: nowrap; }
.wm-badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(30,33,30,.25); font: italic 1.05rem/1 var(--display); color: var(--terra); }
.wm-text { display: flex; flex-direction: column; line-height: 1; }
.wm-name { font: 500 1.32rem/1 var(--display); letter-spacing: .2em; color: var(--ink); }
.wm-sub { margin-top: 4px; font-size: .58rem; font-weight: 500; letter-spacing: .42em; text-transform: uppercase; color: var(--ink-2); }
.wm-light .wm-badge { border-color: rgba(243,241,236,.4); color: var(--terra-soft); }
.wm-light .wm-name { color: var(--limestone); }
.wm-light .wm-sub { color: rgba(243,241,236,.75); }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 50; padding: 10px 0; }
.hdr-bar { display: flex; align-items: center; justify-content: space-between; border-radius: 999px; padding: 8px 8px 8px 20px; background: rgba(251,250,247,.72); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border: 1px solid rgba(255,255,255,.65); box-shadow: var(--soft); }
.hdr-links { display: none; list-style: none; margin: 0; padding: 0; gap: 2px; }
.hdr-links a { position: relative; display: block; white-space: nowrap; border-radius: 999px; padding: 8px 14px; font-size: .8rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); transition: color .2s; }
.hdr-links a:hover, .hdr-links a.on { color: var(--ink); }
.hdr-links a.on::after { content: ''; position: absolute; left: 50%; bottom: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--terra); transform: translateX(-50%); }
.hdr-end { display: flex; align-items: center; gap: 8px; }
.hdr-cta { display: none; padding: 10px 20px; white-space: nowrap; }
@media (min-width: 640px) { .hdr-cta { display: inline-flex; } }
@media (min-width: 1400px) { .hdr-links { display: flex; } .menu { display: none; } }
.menu summary { list-style: none; display: grid; place-content: center; gap: 5px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(30,33,30,.15); background: rgba(251,250,247,.7); cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform .3s var(--lux); }
.menu[open] summary span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu[open] summary span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.menu-panel { position: fixed; left: 0; right: 0; top: 76px; bottom: 0; background: var(--limestone); padding: 16px 16px 40px; display: flex; flex-direction: column; overflow-y: auto; }
.menu-panel ul { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.menu-panel li a { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 16px 0; font: 2.6rem/1 var(--display); color: var(--ink); }
.menu-panel li a span { font: .75rem/1 var(--sans); letter-spacing: .2em; color: var(--ink-2); }

/* ---------- index ---------- */
.j-hero { padding-top: 80px; padding-bottom: 48px; }
@media (min-width: 640px) { .j-hero { padding-top: 112px; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.chips a { border: 1px solid var(--line); background: rgba(251,250,247,.8); border-radius: 999px; padding: 7px 15px; font-size: .78rem; font-weight: 500; color: var(--ink-2); transition: all .2s; }
.chips a:hover { border-color: rgba(30,33,30,.4); color: var(--ink); }
.chips a.on { background: var(--ink); border-color: var(--ink); color: var(--limestone); }
.empty { border: 1px dashed var(--line); border-radius: 1.25rem; padding: 64px 24px; text-align: center; font: italic 1.6rem/1.3 var(--display); color: var(--ink-2); margin-bottom: 96px; }

.feature a { display: grid; gap: 28px; align-items: center; }
@media (min-width: 1024px) { .feature a { grid-template-columns: 7fr 5fr; gap: 56px; } }
.feature-img, .card-img, .post-cover-img { position: relative; overflow: hidden; border-radius: 1.75rem; background: var(--mist); }
.feature-img { aspect-ratio: 16 / 10; }
.feature-img img, .card-img img, .post-cover-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--lux); }
.feature a:hover .feature-img img, .card a:hover .card-img img { transform: scale(1.04); }
.feature-body h2 { margin-top: 18px; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.02; letter-spacing: -.01em; }
.feature-body .card-dek { margin-top: 18px; font-size: 1.08rem; }
.feature-body .meta { margin-top: 20px; }
.feature-body .link-arrow { margin-top: 28px; }
.feature a:hover h2 { color: var(--terra-deep); }

.grid { display: grid; gap: 40px 28px; padding-top: 72px; padding-bottom: 96px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card-img { aspect-ratio: 4 / 3; border-radius: 1.25rem; }
.card-body { padding-top: 20px; }
.card-body h3 { margin-top: 12px; font-size: 1.85rem; line-height: 1.08; transition: color .2s; }
.card a:hover h3 { color: var(--terra-deep); }
.card-dek { margin-top: 10px; color: var(--ink-2); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-body .meta { margin-top: 14px; font-size: .72rem; }

.cover-type { display: flex; flex-direction: column; justify-content: space-between; padding: 24px; background: var(--ink); background-image: radial-gradient(120% 90% at 100% 0%, rgba(169,81,47,.35), transparent 60%), radial-gradient(90% 70% at 0% 100%, rgba(94,106,76,.45), transparent 60%); color: var(--limestone); }
.ct-mark { font: italic 3.4rem/1 var(--display); color: var(--terra-soft); }
.ct-cat { font-size: .72rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: rgba(243,241,236,.8); }
.pager { display: flex; justify-content: center; align-items: center; gap: 28px; padding-bottom: 96px; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.pager a { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 3px; }

/* ---------- article ---------- */
.draft-bar { background: var(--terra-wash); color: var(--terra-deep); text-align: center; padding: 12px 16px; font-size: .9rem; font-weight: 500; }
.post-head { padding-top: 56px; }
@media (min-width: 640px) { .post-head { padding-top: 88px; } }
.post-head .display { font-size: clamp(2.6rem, 5.4vw, 5rem); line-height: 1; }
.crumbs { display: flex; gap: 10px; font-size: .75rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--terra-soft); font: italic 1.1rem/1 var(--display); }
.avatar.lg { width: 64px; height: 64px; font-size: 1.5rem; }
.by-name { font-weight: 500; color: var(--ink); }
.by-name span { font-weight: 400; color: var(--ink-2); }
.byline .meta { margin-top: 4px; font-size: .72rem; }
.post-cover { margin: 48px auto 0; }
.post-cover-img { aspect-ratio: 16 / 8; }
@media (max-width: 640px) { .post-cover-img { aspect-ratio: 4 / 3; } }

.post-layout { display: grid; gap: 32px; padding-top: 56px; padding-bottom: 72px; }
@media (min-width: 1024px) { .post-layout { grid-template-columns: 1fr minmax(0, 720px) 1fr; } .toc { grid-column: 1; } .prose { grid-column: 2; } }
.toc { align-self: start; }
.toc:empty { display: none; }
@media (min-width: 1024px) { .toc { position: sticky; top: 110px; padding-right: 24px; } .toc:empty { display: block; } }
.toc ol { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: toc; border-left: 1px solid var(--line); }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent; font-size: .9rem; line-height: 1.4; color: var(--ink-2); transition: all .2s; }
.toc a::before { content: counter(toc, decimal-leading-zero) '  '; font-size: .7rem; letter-spacing: .1em; color: var(--terra); }
.toc a:hover { color: var(--ink); border-color: var(--terra); }

.prose { min-width: 0; font-size: 1.12rem; line-height: 1.85; color: #3a3e38; }
.prose > * + * { margin-top: 1.3em; }
.prose > p:first-child::first-letter { float: left; font: 5.2rem/.8 var(--display); color: var(--terra); margin: .08em .1em 0 0; }
.prose h2 { margin-top: 2.2em; font-size: clamp(2rem, 3.2vw, 2.6rem); line-height: 1.08; color: var(--ink); scroll-margin-top: 110px; }
.prose h3 { margin-top: 1.9em; font-size: 1.7rem; line-height: 1.15; color: var(--ink); }
.prose h4 { margin-top: 1.6em; font: 500 .8rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .7em; }
.prose a { color: var(--terra-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }
.prose strong { font-weight: 500; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose ul li::marker { color: var(--terra); }
.prose ol li::marker { color: var(--terra); font-family: var(--display); }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 28px; border-left: 2px solid var(--terra); font: italic clamp(1.6rem, 2.6vw, 2.1rem)/1.3 var(--display); color: var(--ink); }
.prose blockquote p + p { margin-top: .6em; }
.prose img { width: 100%; height: auto; border-radius: 1.25rem; margin: 2em 0 .5em; }
.prose figure { margin: 2em 0; }
.prose figure img { margin: 0; }
.prose figcaption { margin-top: 10px; font-size: .85rem; color: var(--muted); text-align: center; }
.prose hr { border: 0; height: 1px; margin: 2.5em 0; background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent); }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 14px 10px 0; text-align: left; vertical-align: top; }
.prose th { font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2.4em !important; }
.tags span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font-size: .78rem; color: var(--ink-2); }
.author { display: flex; gap: 18px; margin-top: 2.6em !important; padding: 28px; border-radius: 1.25rem; background: var(--paper); border: 1px solid var(--line); font-size: 1rem; line-height: 1.65; }
.author p + p { margin-top: 6px; }
.author .meta { margin-top: 10px; font-size: .7rem; }

.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.homes { padding-bottom: 96px; }
.homes-grid { display: grid; gap: 28px; margin-top: 36px; }
@media (min-width: 768px) { .homes-grid { grid-template-columns: repeat(3, 1fr); } }
.home-img { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 1.25rem; background: var(--mist); }
.home-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--lux); }
.home:hover .home-img img { transform: scale(1.05); }
.home-status { position: absolute; left: 12px; top: 12px; border-radius: 999px; background: rgba(251,250,247,.92); padding: 5px 12px; font-size: .68rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.home-status:empty { display: none; }
.home-price { margin-top: 16px; font: 1.7rem/1 var(--display); color: var(--ink); }
.home-title { margin-top: 6px; font-weight: 500; color: var(--ink); }
.home-place, .home-facts { font-size: .88rem; color: var(--ink-2); }

.ask { padding-bottom: 96px; }
.ask-inner { display: grid; gap: 36px; border-radius: 1.75rem; background: var(--ink); color: var(--limestone); padding: 32px 24px; background-image: radial-gradient(80% 120% at 100% 0%, rgba(169,81,47,.28), transparent 60%); }
@media (min-width: 640px) { .ask-inner { padding: 56px; } }
@media (min-width: 1024px) { .ask-inner { grid-template-columns: 5fr 6fr; gap: 64px; } }
.ask-inner h2 { margin-top: 16px; color: var(--limestone); }
.ask-inner > div > p:last-child { margin-top: 18px; max-width: 28rem; color: rgba(243,241,236,.8); line-height: 1.7; }
.ask-form { display: grid; gap: 16px; }
@media (min-width: 640px) { .ask-form { grid-template-columns: 1fr 1fr; } .ask-form .full { grid-column: 1 / -1; } }
.ask-form label span { display: block; margin-bottom: 6px; font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: rgba(243,241,236,.75); }
.ask-form label em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: .7; }
.ask-form input, .ask-form textarea { width: 100%; border-radius: 12px; border: 1px solid rgba(243,241,236,.2); background: rgba(243,241,236,.06); color: var(--limestone); padding: 12px 16px; font: .95rem/1.5 var(--sans); transition: border-color .2s; }
.ask-form input:focus, .ask-form textarea:focus { outline: 0; border-color: var(--terra-soft); }
.ask-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ask-msg { min-height: 1.4em; font-size: .92rem; color: rgba(243,241,236,.8); }
.ask-msg.ok { color: #C9CDBB; }
.ask-msg.err { color: var(--terra-soft); }
.more .grid { padding-top: 36px; }
.more { padding-bottom: 0; }

/* ---------- footer ---------- */
.ftr { background: var(--ink); color: var(--limestone); padding: 80px 0 40px; overflow: hidden; }
.ftr-grid { display: grid; gap: 48px; }
@media (min-width: 1024px) { .ftr-grid { grid-template-columns: 5fr 7fr; } }
.ftr-about p { margin-top: 24px; max-width: 24rem; font-size: .98rem; line-height: 1.7; color: rgba(243,241,236,.8); }
.ftr-about .btn { margin-top: 32px; }
.ftr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (min-width: 640px) { .ftr-cols { grid-template-columns: repeat(3, 1fr); } }
.ftr-h { font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--terra-soft); }
.ftr ul { list-style: none; margin: 20px 0 0; padding: 0; font-size: .95rem; color: rgba(243,241,236,.85); }
.ftr li + li { margin-top: 12px; }
.ftr li a:hover { color: #fff; }
.ftr li.dim { color: rgba(243,241,236,.8); }
.ftr-giant { margin-top: 80px; user-select: none; font: clamp(3rem, 13vw, 13rem)/.8 var(--display); letter-spacing: -.03em; color: rgba(243,241,236,.09); white-space: nowrap; }
.ftr-legal { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(243,241,236,.15); font-size: .78rem; color: rgba(243,241,236,.7); }
@media (min-width: 768px) { .ftr-legal { flex-direction: row; justify-content: space-between; } .ftr-legal p:last-child { max-width: 36rem; text-align: right; } }
.ftr-login { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font-size: .82rem; color: rgba(243,241,236,.75); }
.ftr-login:hover { color: #fff; }

.edit-pill { position: fixed; right: 16px; bottom: 16px; z-index: 70; border-radius: 999px; background: var(--ink); color: var(--limestone); padding: 12px 20px; font-size: .82rem; font-weight: 500; box-shadow: 0 2px 4px rgba(30,33,30,.05), 0 28px 60px -24px rgba(30,33,30,.28); }
.edit-pill:hover { background: var(--terra); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
/* Breathing room above the footer, whatever section ends the page (one-article index, 404). */
#main > section:last-child:not(.more):not(.grid):not(.pager) { padding-bottom: 96px; }
/* A backdrop-filter traps position:fixed children, so drop it while the phone menu is open. */
.hdr-bar:has(.menu[open]) { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--limestone); }
