/* ============================================================
   ATTENTION IS — theme stylesheet
   Paper for the filed work. Yellow for attention itself.
   Meadow for where the mind goes when you let it off the leash.
   ============================================================ */

:root {
  color-scheme: light only;
  --paper: #FDFBF6;
  --ink: #201C17;
  --ink-soft: #5C5344;
  --hairline: #E5DECE;
  --highlight: #FFD84D;
  --wander-bg: #E9EEE1;
  --wander-ink: #29372A;
  --wander-soft: #66785F;
  --wander-body: #3C4E3A;
  --leaf: #7BA05B;
  --human: #5B7FA6;
  --max: 1080px;
  --measure: 720px;
  --display: 'Schibsted Grotesk', sans-serif;
  --serif: 'Literata', Georgia, serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
img { max-width: 100%; height: auto; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0 14px;
  border-bottom: 2px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-arbor { display: block; color: var(--ink); }
.mark {
  font-family: var(--display);
  font-weight: 700; font-size: 20px; letter-spacing: -0.01em;
}
.sitenav { display: flex; gap: 28px; }
.sitenav a {
  font-family: var(--display);
  font-size: 13px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft);
}
.sitenav a:hover, .sitenav a:focus-visible { color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 44px 0 38px; border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px) auto;
  gap: 32px 48px;
  align-items: end;
}
.hero-arbor {
  color: var(--ink);
  display: block;
  align-self: center;
}
.hero h1 {
  position: relative;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.hero .blank {
  display: inline-block;
  min-width: 4.8em;
  white-space: nowrap;
  font-weight: 400;
  color: var(--ink-soft);
  border-bottom: 4px solid var(--highlight);
  padding-bottom: 0.03em;
}
.hero-side { position: relative; max-width: 420px; }
.hero .dek { font-size: 16.5px; color: var(--ink-soft); line-height: 1.6; }
.hero .dek b { color: var(--ink); font-weight: 600; }

/* ---------- subscribe (Ghost members form) ---------- */
.subscribe { margin-top: 18px; display: flex; max-width: 420px; }
.subscribe input {
  flex: 1; font-family: var(--display); font-size: 14px;
  padding: 11px 16px; border: 1.5px solid var(--ink); background: var(--paper);
  border-right: none; color: var(--ink); border-radius: 999px 0 0 999px;
}
.subscribe input::placeholder { color: var(--ink-soft); }
.subscribe button {
  font-family: var(--display); font-size: 14px; font-weight: 600;
  padding: 11px 24px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); cursor: pointer;
  border-radius: 0 999px 999px 0;
}
.subscribe button:hover { background: var(--highlight); color: var(--ink); }
.subscribe.loading button { opacity: 0.6; pointer-events: none; }
.subscribe-note { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-top: 10px; }
form.success + .subscribe-note[data-members-success] { display: block !important; }
form.error + .subscribe-note[data-members-success] + .subscribe-note[data-members-error] { display: block !important; }

/* ---------- shared bits ---------- */
.hl {
  font-family: var(--display);
  font-size: 13px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  background: linear-gradient(180deg, transparent 8%, var(--highlight) 8%, var(--highlight) 88%, transparent 88%);
  padding: 2px 6px;
}
.meta {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.07em; color: var(--ink-soft); text-transform: uppercase;
  display: flex; gap: 16px; align-items: center;
}
.meander-glyph { flex: none; color: var(--wander-soft); }
.rule { height: 3px; width: 64px; background: var(--highlight); margin: 16px 0 18px; }
.standfirst {
  font-size: 18px; font-style: italic; color: var(--ink-soft); margin: 10px 0 6px; max-width: 640px;
}

/* ---------- feed ---------- */
.feed { padding: 44px 0 48px; display: grid; gap: 56px; }

/* whole-card clickability: the title link stretches over the card */
.post-essay, .post-wander { position: relative; }
.post-essay h2 a::after, .post-wander h2 a::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
}
.post-essay:hover h2 a, .post-wander:hover h2 a {
  text-decoration: underline;
}
.post-essay:hover h2 a { text-decoration-thickness: 3px; text-decoration-color: var(--highlight); }
.post-wander:hover h2 a { text-decoration-thickness: 1.5px; }
.post-wander { transition: background 0.18s ease; }
.post-wander:hover { background: #E2E9D7; }

.post-essay { max-width: var(--measure); }
.post-essay h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(27px, 3.9vw, 38px); line-height: 1.12; letter-spacing: -0.018em;
  margin: 14px 0 6px;
}
.post-essay h2 a { text-decoration: none; }
.post-essay h2 a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--highlight); }
.post-essay .excerpt { max-width: 640px; }

.post-wander {
  background: var(--wander-bg); color: var(--wander-ink);
  padding: 44px 44px 40px; border-radius: 14px;
  max-width: var(--measure);
}
.post-wander .meta { color: var(--wander-soft); }
.post-wander h2 {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(26px, 3.6vw, 35px); line-height: 1.2; letter-spacing: -0.008em;
  margin: 16px 0 14px;
}
.post-wander h2 a { text-decoration: none; }
.post-wander h2 a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; }
.post-wander .excerpt { color: var(--wander-body); max-width: 600px; }
.rubric {
  font-family: var(--serif); font-style: italic; font-size: 14px;
  color: var(--wander-soft); margin-top: 22px;
}

/* ---------- figures ---------- */
figure.fig { margin: 22px 0 20px; max-width: 640px; }
figure.fig img { width: 100%; display: block; border-radius: 3px; }
figure.fig figcaption {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-soft); margin-top: 8px; line-height: 1.6;
  padding-left: 10px; border-left: 3px solid var(--highlight);
}
.post-wander figure.fig img { border-radius: 10px; }
.post-wander figure.fig figcaption {
  font-family: var(--serif); font-style: italic; font-size: 13px;
  color: var(--wander-soft); border-left: none; padding-left: 0; text-align: right;
}

/* ---------- single article ---------- */
.article { max-width: var(--measure); margin: 0 auto; padding: 48px 0 24px; }
.article-header .meta { margin-bottom: 14px; }
.article-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(32px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.022em;
  margin-bottom: 8px;
}
.article-feature { max-width: 100%; margin: 26px 0; }
.article-content { max-width: 640px; }
.article-content > * + * { margin-top: 1.15em; }
.article-content h2, .article-content h3 {
  font-family: var(--display); letter-spacing: -0.015em; line-height: 1.2;
  margin-top: 1.8em;
}
.article-content h2 { font-size: 28px; font-weight: 700; }
.article-content h3 { font-size: 21px; font-weight: 600; }
.article-content a { text-decoration-color: var(--highlight); text-decoration-thickness: 2px; }
.article-content a:hover { text-decoration-thickness: 3px; }
.article-content blockquote {
  border-left: 3px solid var(--highlight);
  padding-left: 18px; font-style: italic; color: var(--ink-soft);
}
.article-content hr {
  border: none; height: 3px; width: 64px; background: var(--highlight);
  margin: 2.2em 0;
}
.article-content code {
  font-family: var(--mono); font-size: 0.86em;
  background: var(--hairline); padding: 2px 6px; border-radius: 4px;
}
.article-content pre {
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
  background: var(--ink); color: var(--paper);
  padding: 18px 20px; border-radius: 8px; overflow-x: auto;
}
.article-content pre code { background: none; padding: 0; color: inherit; }
.article-content ul, .article-content ol { padding-left: 1.4em; }
.article-content figure { margin: 1.6em 0; }
.article-content figcaption {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-soft); margin-top: 8px; line-height: 1.6;
  padding-left: 10px; border-left: 3px solid var(--highlight);
}

/* footnotes (Ghost renders these from markdown cards) */
.article-content .footnotes, .article-content .footnotes-sep + section {
  margin-top: 2em; padding-top: 12px; border-top: 1px solid var(--hairline);
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft); line-height: 1.7;
}
.article-content sup { font-family: var(--mono); font-size: 0.65em; color: var(--ink-soft); }

/* ---------- wandering article: the meadow room ---------- */
body:is(.tag-wandering, .tag-wanderings) { background: var(--wander-bg); color: var(--wander-ink); }
body:is(.tag-wandering, .tag-wanderings) .topbar { border-bottom-color: var(--wander-ink); }
body:is(.tag-wandering, .tag-wanderings) .brand-arbor, body:is(.tag-wandering, .tag-wanderings) .mark { color: var(--wander-ink); }
body:is(.tag-wandering, .tag-wanderings) .sitenav a { color: var(--wander-soft); }
body:is(.tag-wandering, .tag-wanderings) .sitenav a:hover { color: var(--wander-ink); }
body:is(.tag-wandering, .tag-wanderings) .article-title {
  font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -0.008em;
}
body:is(.tag-wandering, .tag-wanderings) .meta { color: var(--wander-soft); }
body:is(.tag-wandering, .tag-wanderings) .article-content { color: var(--wander-body); }
body:is(.tag-wandering, .tag-wanderings) .article-content blockquote { border-left-color: var(--wander-soft); color: var(--wander-soft); }
body:is(.tag-wandering, .tag-wanderings) .article-content figcaption {
  font-family: var(--serif); font-style: italic; font-size: 13px;
  color: var(--wander-soft); border-left: none; padding-left: 0; text-align: right;
}
body:is(.tag-wandering, .tag-wanderings) .standfirst { color: var(--wander-soft); }
body:is(.tag-wandering, .tag-wanderings) footer { border-top-color: rgba(41,55,42,0.2); }
body:is(.tag-wandering, .tag-wanderings) footer, body:is(.tag-wandering, .tag-wanderings) footer .readers { color: var(--wander-soft); }

/* ---------- archive headers ---------- */
.archive-header { padding: 44px 0 6px; }
.archive-wander .meta { color: var(--wander-soft); }
.archive-title-wander {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(24px, 3.4vw, 34px); line-height: 1.25; letter-spacing: -0.008em;
  margin-top: 14px; max-width: 640px; color: inherit;
}
body:is(.tag-wandering, .tag-wanderings) .archive-header { border-bottom: 1px solid rgba(41,55,42,0.15); padding-bottom: 26px; }

/* ---------- about strip ---------- */
.about {
  border-top: 2px solid var(--ink); padding: 48px 0 72px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
}
.about h3 { margin-bottom: 14px; }
.about p { max-width: 460px; color: var(--ink-soft); }
.about p b { color: var(--ink); font-weight: 600; }

/* ---------- post CTA ---------- */
.post-cta {
  max-width: var(--measure); margin: 0 auto; padding: 26px 0 56px;
  border-top: 1px solid var(--hairline);
}
.post-cta > p:first-child { font-size: 16px; color: var(--ink-soft); max-width: 640px; }
body:is(.tag-wandering, .tag-wanderings) .post-cta { border-top-color: rgba(41,55,42,0.15); }
body:is(.tag-wandering, .tag-wanderings) .post-cta > p:first-child { color: var(--wander-soft); }
body:is(.tag-wandering, .tag-wanderings) .subscribe input { background: transparent; border-color: var(--wander-ink); color: var(--wander-ink); }
body:is(.tag-wandering, .tag-wanderings) .subscribe button { background: var(--wander-ink); border-color: var(--wander-ink); color: var(--wander-bg); }
body:is(.tag-wandering, .tag-wanderings) .subscribe button:hover { background: var(--highlight); color: var(--ink); }

/* ---------- pagination ---------- */
.pagination {
  display: flex; justify-content: space-between; align-items: center;
  max-width: var(--measure); padding: 6px 0 40px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-soft);
}
.pagination a { text-decoration: none; }
.pagination a:hover { color: var(--ink); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--hairline); padding: 26px 0 48px;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-soft);
}
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
footer .readers { margin-top: 10px; color: #8A7F6C; }

/* ---------- Koenig cards (Ghost editor content) ---------- */
.kg-width-wide { max-width: var(--max); margin-left: auto; margin-right: auto; }
.kg-width-full { max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.kg-image { margin: 0 auto; }
.kg-card { margin: 1.6em 0; }
.kg-callout-card {
  display: flex; gap: 12px; padding: 18px 20px; border-radius: 10px;
  background: #F4EFE2; font-size: 16px;
}
body:is(.tag-wandering, .tag-wanderings) .kg-callout-card { background: rgba(255,255,255,0.5); }
.kg-callout-card-yellow { background: #FBF0C8; }
.kg-bookmark-card a { text-decoration: none; }
.kg-bookmark-container {
  display: flex; border: 1px solid var(--hairline); border-radius: 8px; overflow: hidden;
  background: #fff;
}
.kg-bookmark-content { padding: 14px 18px; flex: 1; min-width: 0; }
.kg-bookmark-title { font-family: var(--display); font-weight: 600; font-size: 15px; }
.kg-bookmark-description {
  font-size: 13.5px; color: var(--ink-soft); margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kg-bookmark-metadata { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); margin-top: 8px; display: flex; gap: 8px; align-items: center; }
.kg-bookmark-icon { width: 14px; height: 14px; }
.kg-bookmark-thumbnail { flex: 0 0 180px; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-button-card a {
  display: inline-block; font-family: var(--display); font-weight: 600; font-size: 14px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  padding: 11px 24px; border-radius: 999px;
}
.kg-button-card a:hover { background: var(--highlight); color: var(--ink); }
.kg-blockquote-alt {
  font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.5;
  text-align: center; padding: 0.6em 1em; border: none; color: var(--ink);
}
.kg-embed-card { display: flex; justify-content: center; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 8px; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image { flex: 1; }
.kg-gallery-image img { border-radius: 3px; width: 100%; height: 100%; object-fit: cover; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; align-items: start; gap: 22px; }
  .hero-arbor { display: none; }
}
@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; }
  .post-wander { padding: 32px 24px 30px; }
  .sitenav { gap: 14px; }
  .kg-bookmark-thumbnail { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- share row ---------- */
.share-row {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 30px; padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.07em;
  text-transform: uppercase;
}
.share-label { color: var(--ink-soft); }
.share-row a, .share-row .copylink {
  color: inherit; text-decoration: none; cursor: pointer;
  background: none; border: none; font: inherit; letter-spacing: inherit;
  text-transform: inherit; padding: 0;
}
.share-row a:hover, .share-row .copylink:hover {
  text-decoration: underline; text-decoration-thickness: 2px;
  text-decoration-color: var(--highlight);
}
.copylink.copied { color: var(--wander-soft); }
body:is(.tag-wandering, .tag-wanderings) .share-row { border-top-color: rgba(41,55,42,0.15); }
body:is(.tag-wandering, .tag-wanderings) .share-label { color: var(--wander-soft); }
