/* ==========================================================================
   Druk.help — journal styles
   Shared by the journal index and every post page. Design tokens mirror the
   landing page, so the journal always looks like part of the same site.
   ========================================================================== */

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F6F0E4;
  --panel: #EFE7D8;
  --ink: #231A12;
  --muted: #5E5648;
  --faint: #8C816F;
  --line: #DCD2C0;
  --line-strong: #C8BCA6;
  --accent: #8E2B1F;
  --accent-dark: #6E1F15;
  --gold: #D9A62E;
  --dark: #22170F;
  --dark-ink: #F3EDE2;
  --dark-muted: #B3A897;
  --serif: "Bodoni Moda", Georgia, serif;
  --sans: "Albert Sans", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1180px;
  --measure: 720px;
}

*, *::before, *::after { box-sizing: border-box; }

/* the hidden attribute must win over any display we set later */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
::selection { background: rgba(217, 166, 46, 0.35); }
img { max-width: 100%; height: auto; }

.dh-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 0 0 8px 0;
}
.dh-skip:focus { left: 0; color: var(--bg); }

/* ---- Header (mirrors the landing page navbar) ---- */
.dh-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 240, 228, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.dh-bar {
  max-width: var(--wrap); margin: 0 auto; padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px;
}
.dh-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); flex-shrink: 0; }
.dh-brand:hover { color: var(--ink); }
.dh-flagmark {
  width: 14px; height: 18px; display: inline-block; flex-shrink: 0;
  background: linear-gradient(90deg, #F3ECDD 0 20%, #D9A62E 20% 40%, #8E2B1F 40% 60%, #4E7A46 60% 80%, #3F6E9D 80%);
  box-shadow: inset 0 0 0 1px rgba(35, 26, 18, 0.2);
}
.dh-wordmark { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: 0.005em; }
.dh-wordmark span { color: var(--accent); }
.dh-nav { display: flex; align-items: center; flex-wrap: nowrap; gap: 22px; }
.dh-nav > a { color: var(--ink); font-size: 14.5px; font-weight: 500; }
.dh-nav > a:hover { color: var(--accent); }
.dh-nav > a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -1.5px 0 var(--accent); padding-bottom: 3px; }
.dh-gh {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--ink);
}
.dh-nav > a.dh-gh { color: var(--ink); }
.dh-gh:hover { background: rgba(35, 26, 18, 0.06); border-color: var(--line-strong); }
.dh-cta {
  background: var(--accent); color: #FFFFFF !important;
  font-size: 14px; font-weight: 600; padding: 9px 18px; border-radius: 999px; white-space: nowrap;
}
.dh-cta:hover { filter: brightness(0.9); }

/* ---- Mobile menu (mirrors the landing page's burger + panel) ---- */
.dh-burger { display: none; }
.dh-panel { display: none; }
.dh-bars { position: relative; display: block; width: 20px; height: 14px; }
.dh-bars i {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .28s cubic-bezier(.2,.6,.2,1), top .28s cubic-bezier(.2,.6,.2,1);
}
.dh-bars i:nth-child(1) { top: 3px; }
.dh-bars i:nth-child(2) { top: 9px; }

@media (max-width: 1024px) {
  .dh-bar { padding: 12px 20px; }
  .dh-wordmark { font-size: 20px; }
  .dh-nav { display: none; }

  .dh-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -6px; padding: 0;
    background: transparent; border: 1px solid var(--line); border-radius: 12px;
    color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background .2s ease, border-color .2s ease;
  }
  .dh-burger:active { background: rgba(35, 26, 18, 0.06); }
  .dh-burger[aria-expanded="true"] { background: rgba(35, 26, 18, 0.06); border-color: var(--line-strong); }
  .dh-burger[aria-expanded="true"] .dh-bars i:nth-child(1) { top: 6px; transform: rotate(45deg); }
  .dh-burger[aria-expanded="true"] .dh-bars i:nth-child(2) { top: 6px; transform: rotate(-45deg); }

  .dh-panel {
    display: block; overflow: hidden; max-height: 0; opacity: 0;
    border-top: 1px solid transparent;
    transition: max-height .34s cubic-bezier(.2,.6,.2,1), opacity .22s ease, border-color .22s ease;
  }
  .dh-panel[data-open="true"] { max-height: min(74vh, 560px); opacity: 1; border-top-color: var(--line); overflow-y: auto; }
  .dh-panel-inner { display: flex; flex-direction: column; padding: 6px 20px 20px; }
  .dh-panel-inner > a {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 15px 2px; font-size: 17px; font-weight: 500; color: var(--ink);
    border-bottom: 1px solid rgba(35, 26, 18, 0.09); -webkit-tap-highlight-color: transparent;
  }
  .dh-panel-inner > a:active,
  .dh-panel-inner > a[aria-current="page"] { color: var(--accent); }
  .dh-panel-idx { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; color: #A2957F; }
  .dh-panel-cta {
    justify-content: center !important; margin-top: 18px; padding: 15px 22px !important;
    background: var(--accent); color: #FFFFFF !important; font-size: 16px !important;
    font-weight: 600 !important; border: 0 !important; border-radius: 999px;
  }
  .dh-panel-gh {
    justify-content: center !important; gap: 10px !important; margin-top: 10px;
    padding: 13px 22px !important; border: 1.5px solid var(--line) !important; border-radius: 999px;
    font-size: 15px !important; font-weight: 600 !important;
  }
}
@media (max-width: 380px) {
  .dh-bar { padding: 11px 16px; }
  .dh-panel-inner { padding: 6px 16px 18px; }
}

/* ---- Rainbow rule, as on the landing page ---- */
.dh-rule {
  height: 8px;
  background: repeating-linear-gradient(90deg, #8E2B1F 0 22px, #D9A62E 22px 27px, #231A12 27px 29px, #3F6E9D 29px 49px, #F3ECDD 49px 53px, #4E7A46 53px 71px, #D9A62E 71px 75px, #231A12 75px 77px);
}

/* ---- Shared bits ---- */
.dh-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.dh-eyebrow {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.14em;
  color: var(--accent); margin: 0; display: flex; align-items: center; gap: 10px;
  text-transform: uppercase;
}
.dh-eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); display: inline-block; flex-shrink: 0; }
.dh-meta { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--faint); }

/* ---- Shared small pieces ---- */
.journal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.journal-tag {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.journal-tag:hover { border-color: var(--line-strong); background: rgba(35, 26, 18, 0.04); }
.journal-tag[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.card-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}
.journal-empty { padding: 56px 0; color: var(--muted); font-size: 17px; }

/* ==========================================================================
   Journal & Stories (journal/index.html), Stories (stories/index.html) and
   Share your story (stories/share.html)
   ========================================================================== */

:root {
  --surface: #FBF7EF;
  --surface-line: #E4DACA;
  --topic-health: #4E7A46;
  --topic-care: #3F6E9D;
  --topic-disability: #B8861B;
  --topic-palliative: #8E2B1F;
  --topic-other: #8C816F;
}

/* ---- hero ---- */
.jx-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.jx-hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px 56px; align-items: end;
  padding-top: 56px; padding-bottom: 44px;
}
.jx-hero-art {
  position: absolute; right: 0; bottom: 0; width: min(760px, 70%); height: 100%;
  color: #CDBFA6; pointer-events: none;
}
.jx-hero-art svg { position: absolute; right: 0; bottom: 0; width: 100%; height: auto; }
.jx-eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.jx-eyebrow svg { color: var(--accent); flex-shrink: 0; }
.jx-hero h1 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 5vw, 58px);
  line-height: 1.06; letter-spacing: -0.005em; margin: 16px 0 0; max-width: 20ch; text-wrap: balance;
}
.jx-hero .lede {
  font-size: clamp(16.5px, 1.7vw, 18px); line-height: 1.6; color: var(--muted);
  max-width: 56ch; margin: 16px 0 0; text-wrap: pretty;
}
.jx-quote {
  margin: 0 0 6px; padding: 0; border: 0;
  font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.4; color: var(--ink);
}
.jx-quote::after { content: ""; display: block; width: 28px; height: 2px; background: var(--accent); margin-top: 14px; }
.jx-hero .jx-actions { margin-top: 24px; }

/* ---- Journal / Stories switch ---- */
.jx-switch {
  display: inline-flex; gap: 4px; padding: 5px; margin: 32px 0 0;
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: 999px;
}
.jx-switch a {
  display: flex; align-items: center; gap: 12px; padding: 9px 26px 9px 16px;
  border-radius: 999px; color: var(--ink); transition: background .2s ease, color .2s ease;
}
.jx-switch a:hover { background: rgba(35, 26, 18, 0.05); color: var(--ink); }
.jx-switch a[aria-current="page"] { background: var(--accent); color: #FFFFFF; }
.jx-switch svg { flex-shrink: 0; opacity: 0.9; }
.jx-switch b { display: block; font-weight: 600; font-size: 15px; line-height: 1.2; }
.jx-switch small { display: block; font-size: 12.5px; line-height: 1.3; opacity: 0.75; }

/* ---- two columns: reading + side panels ---- */
.jx-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px 48px;
  align-items: start; padding: 32px 0 0;
}
.jx-main { min-width: 0; }
.jx-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 92px; }

.jx-panel {
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: 16px; padding: 22px;
}
.jx-panel h2 {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.2;
}
.jx-panel h2 svg { color: var(--accent); }
.jx-panel > p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.jx-panel-foot {
  margin: 14px 0 0 !important; text-align: center; font-family: var(--serif);
  font-style: italic; font-size: 14px !important;
}

.jx-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.jx-section-head h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.2; margin: 0; }
.jx-panel .jx-section-head h2 { font-size: 21px; }
.jx-link {
  font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink);
  background: none; border: 0; padding: 4px 0; cursor: pointer; white-space: nowrap;
}
.jx-link:hover { color: var(--accent); }

.jx-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: #FFFFFF !important; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  padding: 13px 22px; border-radius: 999px; margin-top: 18px;
  transition: background .2s ease, box-shadow .3s ease;
}
.jx-btn:hover { background: var(--accent-dark); box-shadow: 0 12px 24px -16px rgba(142, 43, 31, 0.9); }
.jx-btn[disabled] { opacity: 0.6; cursor: progress; }
.jx-btn--inline { display: inline-flex; margin-top: 0; }

/* an option row: icon, title + note, arrow */
.jx-option {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  margin-top: 16px; padding: 14px 16px; border: 1px solid var(--surface-line); border-radius: 12px;
  background: #FFFDF8; color: var(--ink); transition: border-color .2s ease, box-shadow .3s ease;
}
.jx-option:hover { color: var(--ink); border-color: var(--line-strong); box-shadow: 0 12px 24px -20px rgba(35, 26, 18, 0.5); }
.jx-option-icon {
  width: 44px; height: 44px; border-radius: 999px; background: var(--panel);
  display: grid; place-items: center; color: var(--accent);
}
.jx-option b { display: block; font-size: 15px; font-weight: 600; }
.jx-option small { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); margin-top: 2px; }
.jx-option .jx-arrow { color: var(--muted); }
.jx-note { display: flex; align-items: center; gap: 8px; font-size: 13px !important; color: var(--faint) !important; margin-top: 14px !important; }

/* ---- the featured entry ---- */
.jx-feature {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: stretch;
  padding: 0 0 36px; border-bottom: 1px solid var(--line);
}
.jx-feature-media {
  display: block; position: relative; border-radius: 14px; overflow: hidden; background: var(--panel); min-height: 280px;
}
.jx-feature-media img, .jx-feature-media svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.jx-kind {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.jx-kind svg { color: var(--accent); }
.jx-feature h2 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.7vw, 34px);
  line-height: 1.12; margin: 12px 0 0; text-wrap: balance;
}
.jx-feature p.jx-excerpt { color: var(--muted); font-size: 16.5px; line-height: 1.6; margin: 14px 0 0; text-wrap: pretty; }
.jx-feature .dh-meta { display: block; margin-top: 16px; }
.jx-read {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 0 0 4px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--ink);
  background: none; border: 0; border-bottom: 1.5px solid var(--accent); cursor: pointer;
}
.jx-read:hover { color: var(--accent); }

/* ---- the entries row, strung on a thread like prayer flags ---- */
.jx-entries { padding: 32px 0 0; }
.jx-timeline {
  list-style: none; margin: 22px 0 0; padding: 22px 0 0; position: relative;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px;
}
.jx-timeline::before {
  content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--line-strong);
}
.jx-timeline > li { position: relative; min-width: 0; }
.jx-timeline > li::before {
  content: ""; position: absolute; left: 0; top: -22px; width: 9px; height: 9px;
  border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.jx-card {
  display: flex; flex-direction: column; width: 100%; height: 100%; text-align: left;
  padding: 16px; border: 1px solid var(--surface-line); border-radius: 14px; background: var(--surface);
  font: inherit; color: var(--ink); cursor: pointer;
  transition: border-color .2s ease, box-shadow .3s ease, transform .3s cubic-bezier(.2,.6,.2,1);
}
.jx-card:hover { border-color: var(--line-strong); box-shadow: 0 16px 30px -24px rgba(35, 26, 18, 0.55); transform: translateY(-2px); }
.jx-card .dh-meta { font-size: 11.5px; }
.jx-card h3 {
  font-family: var(--serif); font-weight: 500; font-size: 18px; line-height: 1.25; margin: 10px 0 0; text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.jx-card p {
  margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.jx-card-media {
  display: block; margin-top: auto; padding-top: 14px;
}
.jx-card-media img, .jx-card-media svg {
  display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: var(--panel);
}

.jx-topic {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 8px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.jx-topic::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--dot, var(--accent)); }

/* ---- stories in the side panel ---- */
.jx-voice {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start;
  margin-top: 16px; width: 100%; padding: 0; background: none; border: 0; text-align: left;
  font: inherit; color: var(--ink); cursor: pointer;
}
.jx-voice-media img, .jx-voice-media svg { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.jx-voice blockquote {
  margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.35; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.jx-voice blockquote::before { content: "\201C"; display: block; font-size: 30px; line-height: 0.8; color: var(--accent); }
.jx-voice .dh-meta { display: block; margin-top: 8px; font-size: 11.5px; }
.jx-voice:hover blockquote { color: var(--accent); }

.jx-more-voices { margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--surface-line); }
.jx-more-voices > p { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.jx-more-voices ol { list-style: none; margin: 0; padding: 0; }
.jx-mini {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center;
  width: 100%; padding: 9px 0; background: none; border: 0; text-align: left;
  font: inherit; color: var(--ink); cursor: pointer;
}
.jx-mini img, .jx-mini svg { display: block; width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.jx-mini b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.jx-mini small { display: block; font-size: 12px; color: var(--faint); }
.jx-mini:hover b { color: var(--accent); }

.jx-empty-note {
  margin: 16px 0 0; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 12px;
  font-size: 14.5px; line-height: 1.55; color: var(--muted); text-align: center;
}
.jx-empty-note svg { display: block; margin: 0 auto 10px; color: var(--accent); }

.jx-closing {
  display: flex; align-items: center; justify-content: center; gap: 16px; text-align: center;
  margin: 56px 0 0; padding: 26px 0 0; border-top: 1px solid var(--line);
  font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted);
}
.jx-closing svg { color: var(--accent); flex-shrink: 0; }

/* ---- Stories page ---- */
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip {
  font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink);
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.st-chip:hover { border-color: var(--line-strong); }
.st-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }

.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.st-card {
  display: flex; flex-direction: column; min-width: 0; text-align: left;
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: 16px; overflow: hidden;
  padding: 0; font: inherit; color: var(--ink); cursor: pointer;
  transition: border-color .2s ease, box-shadow .3s ease, transform .3s cubic-bezier(.2,.6,.2,1);
}
.st-card:hover { border-color: var(--line-strong); box-shadow: 0 18px 32px -26px rgba(35, 26, 18, 0.6); transform: translateY(-2px); }
.st-card-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--panel); }
.st-card-media img, .st-card-media svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.st-badge {
  position: absolute; left: 12px; top: 12px; padding: 5px 11px; border-radius: 999px;
  background: rgba(251, 247, 239, 0.94); color: var(--ink); font-size: 12px; font-weight: 600;
}
.st-card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.st-card h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.22; margin: 0; text-wrap: balance; }
.st-card p {
  margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.st-card .dh-meta { margin-top: 12px; font-size: 11.5px; }
.st-card .jx-read-label { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent); }

.st-more { display: flex; justify-content: center; margin-top: 28px; }
.st-more button {
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 22px; cursor: pointer;
}
.st-more button:hover { border-color: var(--ink); }

.st-empty {
  margin-top: 24px; padding: 48px 28px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 16px;
}
.st-empty svg { color: var(--accent); }
.st-empty h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 14px 0 0; }
.st-empty p { color: var(--muted); max-width: 44ch; margin: 10px auto 0; }
.st-empty .jx-btn { display: inline-flex; }

.st-cta { text-align: center; }
.st-cta svg.st-sprout { display: block; margin: 0 auto 6px; color: var(--topic-health); }
.st-cta h2 { justify-content: center; }
.st-cta .st-cta-alt { display: inline-block; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.st-cta .st-cta-alt:hover { color: var(--accent); }
.jx-option + .jx-option { margin-top: 10px; }

.st-topics { list-style: none; margin: 12px 0 0; padding: 0; }
.st-topics button {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  width: 100%; padding: 10px 0; background: none; border: 0; border-top: 1px solid var(--surface-line);
  font: inherit; font-size: 14.5px; color: var(--ink); text-align: left; cursor: pointer;
}
.st-topics li:first-child button { border-top: 0; }
.st-topics button:hover, .st-topics button[aria-pressed="true"] { color: var(--accent); }
.st-topics .st-topic-icon {
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--dot) 14%, transparent); color: var(--dot);
}
.st-topics .st-count { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.st-topics-empty { padding: 10px 0 2px; font-size: 14px; color: var(--muted); }

.jx-quote-card { text-align: center; }
.jx-quote-card blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.45; }
.jx-quote-card p { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 12px !important; }

/* ---- Share your story ---- */
.sh-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px 48px; align-items: start; padding-top: 36px; }
.sh-form { background: var(--surface); border: 1px solid var(--surface-line); border-radius: 18px; padding: 30px; }
.sh-form h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0; }
.sh-form > p { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.sh-form .editor-form { margin-top: 24px; }
.sh-form .field input[type="text"], .sh-form .field textarea, .sh-form .field select { background: #FFFDF8; }
.sh-form select {
  font-family: var(--sans); font-size: 15.5px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #FFFDF8;
}
.sh-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.sh-choice { display: flex; flex-wrap: wrap; gap: 10px; }
.sh-choice label {
  display: flex; align-items: center; gap: 10px; flex: 1 1 200px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #FFFDF8;
  font-weight: 500 !important; cursor: pointer;
}
.sh-choice label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sh-choice input { accent-color: var(--accent); }
.sh-kind label { align-items: flex-start; }
.sh-kind input { margin-top: 4px; }
.sh-kind b { display: block; font-weight: 600; }
.sh-kind small { display: block; font-weight: 400; font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
.sh-count { font-family: var(--mono); font-size: 12px; color: var(--faint); text-align: right; }
.sh-photo { display: flex; align-items: center; gap: 14px; }
.sh-photo img { width: 88px; height: 66px; object-fit: cover; border-radius: 8px; }
.sh-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.sh-consent input { margin-top: 4px; accent-color: var(--accent); }
.sh-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sh-status { font-size: 14.5px; margin: 12px 0 0; min-height: 1em; color: var(--muted); }
.sh-status.is-error { color: var(--accent); }

.sh-steps { list-style: none; counter-reset: step; margin: 14px 0 0; padding: 0; }
.sh-steps li { counter-increment: step; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 10px 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.sh-steps li::before {
  content: counter(step); width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: #FFFFFF; font-family: var(--mono); font-size: 12.5px;
}
.sh-steps b { display: block; color: var(--ink); font-weight: 600; }
.sh-list { margin: 10px 0 0; padding-left: 18px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.sh-list li { margin: 4px 0; }
.sh-list li::marker { color: var(--accent); }

.sh-done { text-align: center; padding: 36px 12px; }
.sh-done svg { color: var(--topic-health); }
.sh-done h2 { margin-top: 12px !important; }
.sh-done p { color: var(--muted); max-width: 46ch; margin: 10px auto 0; }

/* the journal template's parts */
.sh-group { display: flex; flex-direction: column; gap: 22px; }
.sh-group[hidden] { display: none; }
.sh-reflect { margin: 0; padding: 18px 18px 20px; border: 1px solid var(--surface-line); border-radius: 14px; background: #FFFDF8; }
.sh-reflect legend { padding: 0 8px; font-family: var(--serif); font-size: 19px; color: var(--ink); }
.sh-reflect .sh-group { gap: 16px; }
.sh-count.is-over { color: var(--accent); font-weight: 600; }
.field input[type="date"] {
  font-family: var(--sans); font-size: 15.5px; color: var(--ink); max-width: 220px;
  background: #FFFDF8; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
}

.sh-template { margin: 12px 0 0; padding-left: 20px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.sh-template li { margin: 5px 0; }
.sh-template li::marker { color: var(--accent); font-family: var(--mono); font-size: 12.5px; }
.sh-template ul { margin: 4px 0 0; padding-left: 18px; }
.sh-template ul li { margin: 2px 0; list-style: circle; }

/* the review step: the entry as it will appear */
.sh-review-label { margin: 0 0 16px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.sh-preview { background: #FFFDF8; border: 1px solid var(--surface-line); border-radius: 14px; padding: 28px 30px 30px; }
.sh-preview h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.2vw, 38px); line-height: 1.1; margin: 10px 0 0; text-wrap: balance; }
.sh-preview figure { margin: 22px 0 0; }
.sh-preview figure img { display: block; width: 100%; border-radius: 12px; }
.sh-preview figcaption { display: flex; align-items: baseline; gap: 10px; font-size: 14px; line-height: 1.55; color: var(--muted); margin-top: 12px; }
.sh-preview figcaption::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; background: var(--gold); transform: translateY(-2px) rotate(45deg); }
.sh-preview .post-body { padding-top: 22px; font-size: 17px; max-width: none; }
.sh-preview .post-body h2 { font-size: clamp(22px, 2.4vw, 27px); margin: 30px 0 12px; }
.sh-preview .sh-words { margin: 6px 0 0; }
.sh-review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 22px; }
.sh-edit { background: none; border: 0; padding: 6px 2px; cursor: pointer; font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--muted); }
.sh-edit:hover { color: var(--ink); }
.sh-note { margin: 10px 0 0; font-size: 13.5px; color: var(--faint); }
@media (max-width: 620px) { .sh-preview { padding: 22px 18px; } }

@media (max-width: 1080px) {
  .jx-layout, .sh-layout { grid-template-columns: minmax(0, 1fr); }
  .jx-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .jx-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .jx-hero-inner { grid-template-columns: minmax(0, 1fr); padding-top: 40px; padding-bottom: 32px; }
  .jx-hero-art { width: 100%; opacity: 0.5; }
  .jx-feature { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .jx-feature-media { min-height: 0; aspect-ratio: 4 / 3; }
}

@media (max-width: 720px) {
  .dh-wrap { padding: 0 20px; }
  /* after .dh-wrap, whose shorthand would otherwise zero these */
  .jx-hero-inner { padding-top: 36px; padding-bottom: 30px; }
  .sh-layout { padding-top: 24px; }
  .jx-switch { display: flex; }
  .jx-switch a { flex: 1; padding: 9px 12px; }
  .st-grid, .jx-timeline { grid-template-columns: minmax(0, 1fr); }
  .jx-timeline::before, .jx-timeline > li::before { display: none; }
  .jx-timeline { padding-top: 0; }
  .sh-form { padding: 22px 18px; }
  .jx-closing { flex-direction: column; gap: 8px; }
  .journal-tag { padding: 10px 16px; font-size: 12px; }
}


/* ==========================================================================
   Article pages (journal/<slug>.html and stories/<slug>.html)
   The title beside an illustration of Bhutan; then the photo and the text,
   with a side panel beside them; then more to read.
   ========================================================================== */

:root {
  /* the lotus that marks each section heading */
  --lotus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8321F' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4.5c2.3 2.3 3.2 4.8 3.2 7s-1.3 4.3-3.2 5.6c-1.9-1.3-3.2-3.4-3.2-5.6s.9-4.7 3.2-7z'/%3E%3Cpath d='M8.9 10.2c-2-.4-3.9 0-5.2 1 .9 3.2 4 5.4 8.3 5.9'/%3E%3Cpath d='M15.1 10.2c2-.4 3.9 0 5.2 1-.9 3.2-4 5.4-8.3 5.9'/%3E%3Cpath d='M5.5 15.3C4 15 2.6 15.3 1.6 16c1.6 2 4.8 2.9 8.2 2.4'/%3E%3Cpath d='M18.5 15.3c1.5-.3 2.9 0 3.9.7-1.6 2-4.8 2.9-8.2 2.4'/%3E%3Cpath d='M8 20.5h8'/%3E%3C/svg%3E");
  --lotus-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23DDAE80' stroke-width='.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4.5c2.3 2.3 3.2 4.8 3.2 7s-1.3 4.3-3.2 5.6c-1.9-1.3-3.2-3.4-3.2-5.6s.9-4.7 3.2-7z'/%3E%3Cpath d='M8.9 10.2c-2-.4-3.9 0-5.2 1 .9 3.2 4 5.4 8.3 5.9'/%3E%3Cpath d='M15.1 10.2c2-.4 3.9 0 5.2 1-.9 3.2-4 5.4-8.3 5.9'/%3E%3Cpath d='M5.5 15.3C4 15 2.6 15.3 1.6 16c1.6 2 4.8 2.9 8.2 2.4'/%3E%3Cpath d='M18.5 15.3c1.5-.3 2.9 0 3.9.7-1.6 2-4.8 2.9-8.2 2.4'/%3E%3C/svg%3E");
}

/* reading progress, drawn along the bottom edge of the sticky header */
.post-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.post-progress span {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

/* ---- title block, with the illustration beside it ---- */
.post-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); column-gap: 16px;
  align-items: center; padding-top: 28px;
}
.post-head-text { position: relative; z-index: 1; padding: 8px 0 4px; }
.post-head-art { display: block; width: 100%; height: auto; margin: -6px 0 -26px; pointer-events: none; }
.post-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13.5px; color: var(--muted); }
.post-crumbs a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.post-crumbs a svg { color: var(--accent); }
.post-crumbs a:hover { color: var(--accent); }
.post-crumbs-sep { color: var(--faint); font-size: 16px; line-height: 1; }
.post-kicker {
  display: flex; align-items: center; gap: 8px; margin: 26px 0 0;
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.post-head h1 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.06; letter-spacing: -0.01em; margin: 12px 0 0; text-wrap: balance;
}
.post-head .standfirst {
  font-size: clamp(17px, 1.7vw, 18.5px); line-height: 1.6; color: var(--muted);
  max-width: 62ch; margin: 16px 0 0; text-wrap: pretty;
}
.post-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 20px 0 0; padding: 0; font-size: 14px; color: var(--muted); }
.post-meta li { display: inline-flex; align-items: center; gap: 8px; }
.post-meta svg { color: var(--faint); flex-shrink: 0; }

/* ---- the photo and text on the left, the side panel on the right ---- */
.post-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 56px;
  /* a side panel taller than the text grows the last row, never the gap above the text */
  grid-template-rows: auto auto 1fr;
  align-items: start; padding-top: 28px;
}
.post-layout > .post-hero { grid-column: 1; grid-row: 1; }
.post-layout > .post-body { grid-column: 1; grid-row: 2; }
.post-layout > .post-foot { grid-column: 1; grid-row: 3; }
.post-layout > .post-rail { grid-column: 2; grid-row: 1 / span 3; }

.post-hero { margin: 0 0 30px; }
.post-hero img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 35%;
  border-radius: 16px; background: var(--panel);
  box-shadow: 0 28px 50px -38px rgba(35, 26, 18, 0.55);
}
.post-hero figcaption {
  display: flex; align-items: baseline; gap: 10px; margin-top: 12px;
  font-size: 14px; line-height: 1.55; color: var(--muted);
}
.post-hero figcaption::before {
  content: ""; width: 6px; height: 6px; flex-shrink: 0;
  background: var(--gold); transform: translateY(-2px) rotate(45deg);
}

.post-body { font-size: 17px; line-height: 1.8; color: #3A3026; }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 22px; text-wrap: pretty; }
.post-body h2 {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2.5vw, 29px);
  line-height: 1.2; color: var(--ink); margin: 44px 0 14px; text-wrap: balance; scroll-margin-top: 96px;
}
.post-body h2::before { content: ""; flex: 0 0 34px; height: 34px; background: var(--lotus) center / contain no-repeat; }
/* a section's text sits in line with its heading, past the lotus */
.post-body > h2 ~ :not(h2):not(.post-reflect), .post-reflect > h2 ~ * { margin-left: 50px; }
.post-body h3 {
  font-family: var(--sans); font-weight: 700; font-size: 19px; line-height: 1.35;
  color: var(--ink); margin: 32px 0 10px; scroll-margin-top: 96px;
}
.post-body ul, .post-body ol { margin-top: 0; margin-bottom: 22px; padding-left: 22px; }
.post-body li { margin: 0 0 10px; }
.post-body li::marker { color: var(--accent); }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-body blockquote {
  margin-top: 32px; margin-bottom: 32px; padding: 4px 0 4px 24px; border-left: 3px solid var(--gold);
  font-family: var(--serif); font-size: 23px; line-height: 1.4; color: var(--ink);
}
.post-body blockquote p { margin: 0; }
.post-body figure { margin-top: 32px; margin-bottom: 32px; }
.post-body figure img { display: block; width: 100%; border-radius: 14px; }
.post-body figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin-top: 40px; margin-bottom: 40px; }
.post-body code {
  font-family: var(--mono); font-size: 0.88em; background: var(--panel);
  border: 1px solid var(--line); border-radius: 5px; padding: 1.5px 6px;
}
.post-body pre {
  background: var(--dark); color: var(--dark-ink); border-radius: 12px;
  padding: 20px 22px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin-top: 0; margin-bottom: 22px;
}
.post-body pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.post-table-wrap { overflow-x: auto; margin: 0 0 22px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 16px; }
.post-body th, .post-body td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body th { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.post-callout {
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: 16px;
  padding: 24px 26px; margin-top: 32px; margin-bottom: 32px;
}
.post-callout p { margin: 0 0 12px; font-size: 16.5px; }
.post-callout p:last-child { margin: 0; }
.post-callout .dh-eyebrow { margin-bottom: 12px; }

/* a journal entry's personal reflection: the three questions as a card */
.post-reflect {
  margin-top: 40px; padding: 26px 30px 6px; border-radius: 18px;
  background: #FBF8F2; border: 1px solid var(--surface-line);
}
.post-body .post-reflect h2 { margin: 0 0 18px; font-size: clamp(22px, 2.3vw, 26px); }
.post-reflect p { font-size: 16.5px; line-height: 1.7; margin-top: 0; margin-bottom: 20px; scroll-margin-top: 96px; }
.post-reflect p > strong:first-child {
  display: block; margin-bottom: 2px;
  font-family: var(--serif); font-weight: 500; font-size: 18.5px; color: var(--accent);
}

/* topics as hashtags, then the way back */
.post-foot { margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line); }
.post-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.post-tags:empty { display: none; }
.post-tags .card-tag {
  font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none;
  color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 14px;
}
.post-tags .card-tag::before { content: "#"; }
.post-back { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--accent); }
.post-back:hover { color: var(--accent-dark); }

/* ---- side panel ---- */
.post-rail { display: flex; flex-direction: column; gap: 18px; }
.post-card { background: #FBF8F2; border: 1px solid var(--surface-line); border-radius: 16px; padding: 20px 22px; }
.post-card-title {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--serif); font-weight: 500; font-size: 18px; line-height: 1.25; color: var(--ink);
}
.post-card-title svg { color: var(--accent); flex-shrink: 0; }

.post-toc ol { list-style: none; margin: 12px 0 0; padding: 0; }
.post-toc a {
  display: flex; align-items: flex-start; gap: 12px; padding: 7px 0;
  font-size: 14px; line-height: 1.4; color: var(--muted); transition: color .2s ease;
}
.post-toc a::before {
  content: ""; flex: 0 0 7px; height: 7px; margin: 5px 2px 0;
  border: 1.5px solid var(--accent); border-radius: 1px; transform: rotate(45deg);
}
.post-toc a:hover { color: var(--ink); }
.post-toc a[aria-current="true"] { color: var(--accent); font-weight: 600; }
.post-toc a[aria-current="true"]::before { background: var(--accent); }
/* points beneath a heading: indented, with a small dot */
.post-toc li.is-sub a { padding: 4px 0 4px 20px; font-size: 13.5px; }
.post-toc li.is-sub a::before { flex-basis: 5px; height: 5px; margin-top: 7px; border-width: 0; border-radius: 50%; background: var(--line-strong); transform: none; }
.post-toc li.is-sub a[aria-current="true"]::before { background: var(--accent); }

/* a journal entry's number beside "Field notes": FIELD NOTES · NO. 05 */
.post-number { color: var(--ink); }
.post-number::before { content: "·"; margin-right: 8px; color: var(--faint); }

/* "Journal contents": every entry by number, under the month it is dated */
.post-contents-list {
  position: relative; max-height: min(64vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  margin: 8px -10px 0; padding: 0 10px; scrollbar-width: thin;
}
.post-contents-month {
  margin: 14px 0 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
}
.post-contents-month:first-child { margin-top: 6px; }
.post-contents-group { list-style: none; margin: 0; padding: 0; }
.post-contents-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px;
  margin: 0 -8px; padding: 7px 8px; border-radius: 10px; color: var(--muted);
  transition: background .2s ease, color .2s ease;
}
a.post-contents-row:hover { background: rgba(35, 26, 18, 0.05); color: var(--ink); }
.post-contents-num { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--accent); padding-top: 2px; }
.post-contents-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.post-contents-title {
  font-size: 14px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-contents-date { font-size: 12px; color: var(--faint); }
.post-contents-row[aria-current] { background: #F5E9D6; color: var(--ink); }
.post-contents-row[aria-current] .post-contents-title { font-weight: 600; }

.post-quote {
  position: relative; overflow: hidden; margin: 0;
  background: #F5E9D6; border: 1px solid #EBD9BD; border-radius: 16px; padding: 24px 26px 24px 62px;
}
.post-quote::before {
  content: "\201C"; position: absolute; left: 18px; top: 12px;
  font-family: var(--serif); font-size: 62px; line-height: 1; color: var(--accent);
}
.post-quote::after {
  content: ""; position: absolute; right: -16px; bottom: -22px; width: 92px; height: 92px; opacity: 0.6;
  background: var(--lotus-soft) center / contain no-repeat;
}
.post-quote blockquote { position: relative; z-index: 1; margin: 0; }
.post-quote p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: var(--ink); }
.post-quote p::after { content: ""; display: block; width: 36px; height: 2px; margin-top: 14px; background: var(--accent); opacity: 0.75; }

.post-share > p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.post-share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.post-share-btn {
  width: 40px; height: 40px; padding: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: #FFFFFF; border: 1px solid var(--line);
  transition: border-color .2s ease, box-shadow .25s ease;
}
.post-share-btn:hover { border-color: var(--line-strong); box-shadow: 0 8px 16px -10px rgba(35, 26, 18, 0.45); }
.post-share-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.post-share-btn.is-done { border-color: #4E7A46; box-shadow: 0 0 0 3px rgba(78, 122, 70, 0.15); }
.post-share-note { margin: 10px 0 0; font-size: 12.5px; color: #4E7A46; }
.post-share-note:empty { display: none; }

.post-join {
  position: relative; overflow: hidden; text-align: center;
  background: #ECE8DC; border: 1px solid #DED7C5; border-radius: 16px; padding: 18px 22px 24px;
}
/* a faint ridge line along the foot of the card */
.post-join::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 46' preserveAspectRatio='none'%3E%3Cpath d='M0 46V30l40-14 30 10 46-22 40 18 34-12 50 20 30-10 30 12v14z' fill='%23DCD5C1' opacity='.55'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
.post-join > * { position: relative; z-index: 1; }
.post-join-art { display: block; margin: 0 auto; }
.post-join h2 { margin: 6px 0 0; font-family: var(--serif); font-weight: 500; font-size: 19px; color: var(--ink); }
.post-join p { margin: 8px auto 0; max-width: 24ch; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.post-join-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  background: #A8321F; color: #FFFFFF; font-size: 14.5px; font-weight: 600; padding: 11px 26px; border-radius: 999px;
  transition: background .2s ease, box-shadow .3s ease;
}
.post-join-btn:hover { background: #C2431C; color: #FFFFFF; box-shadow: 0 12px 22px -14px rgba(194, 67, 28, 0.8); }

/* ---- more from the journal ---- */
.post-more { margin-top: 64px; }
.post-more-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding-top: 36px; border-top: 1px solid var(--line);
}
.post-more-head h2 {
  display: flex; align-items: center; gap: 14px; margin: 0;
  font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; color: var(--ink);
}
.post-more-head h2 svg { color: var(--accent); flex-shrink: 0; }
.post-more-all { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.post-more-all svg { color: var(--accent); }
.post-more-all:hover { color: var(--accent); }

.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.more-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.more-grid[data-count="1"] { grid-template-columns: minmax(0, 560px); }
.more-card {
  position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start;
  min-height: 160px; padding: 10px; color: var(--ink);
  background: #FBF8F2; border: 1px solid var(--surface-line); border-radius: 14px;
}
.more-card:hover { border-color: var(--line-strong); color: var(--ink); }
.more-card-media { display: block; width: 112px; height: 112px; overflow: hidden; border-radius: 10px; background: var(--panel); }
.more-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.more-card-media.is-empty { display: grid; place-items: center; }
.more-card-media.is-empty .dh-flagmark { width: 22px; height: 28px; }
.more-card-media.is-invite { display: grid; place-items: center; background: #F5E9D6; }
.more-card-media.is-invite::before { content: ""; width: 54px; height: 54px; background: var(--lotus) center / contain no-repeat; }
.more-card-text { display: flex; flex-direction: column; min-width: 0; padding: 4px 30px 6px 0; }
.more-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: var(--faint); }
.more-card-meta i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.more-card-num { font-weight: 600; color: var(--accent); }
.more-card h3 {
  margin: 6px 0 0; font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.22;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.more-card p {
  margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.more-card-go {
  position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: #FFFFFF; color: var(--accent);
  box-shadow: 0 2px 8px rgba(35, 26, 18, 0.1); transition: background .2s ease, color .2s ease;
}
.more-card:hover .more-card-go { background: var(--accent); color: #FFFFFF; }
.more-card--invite { background: transparent; border-style: dashed; border-color: var(--line-strong); }

@media (max-width: 1024px) {
  .post-head { grid-template-columns: minmax(0, 1fr); }
  .post-head-art { grid-row: 1; justify-self: end; width: min(100%, 460px); margin: 0 0 -70px; }
  .post-head-text { grid-row: 2; }
  .post-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .post-layout > .post-rail {
    grid-column: 1; grid-row: 4; margin-top: 36px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: start;
  }
  .post-toc { display: none !important; }
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .post-head { padding-top: 16px; }
  .post-head-art { width: 100%; margin-bottom: -48px; }
  .post-kicker { margin-top: 18px; }
  .post-meta { gap: 8px 18px; font-size: 13px; }
  .post-layout { padding-top: 22px; }
  .post-hero { margin-bottom: 24px; }
  .post-hero img { border-radius: 12px; }
  .post-body { font-size: 16.5px; line-height: 1.75; }
  .post-body h2 { gap: 12px; margin: 36px 0 12px; }
  .post-body h2::before { flex-basis: 26px; height: 26px; }
  .post-body > h2 ~ :not(h2):not(.post-reflect), .post-reflect > h2 ~ * { margin-left: 0; }
  .post-body blockquote { padding-left: 18px; font-size: 20px; }
  .post-body pre { padding: 16px 18px; }
  .post-reflect { padding: 22px 18px 4px; border-radius: 14px; }
  .post-layout > .post-rail { grid-template-columns: minmax(0, 1fr); margin-top: 30px; }
  .post-more { margin-top: 52px; }
  .post-more-head { padding-top: 28px; }
  .more-grid, .more-grid[data-count] { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .more-card { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; min-height: 0; }
  .more-card-media { width: 96px; height: 96px; }
}

/* ---- CTA band + footer (mirrors the landing page) ---- */
.journal-cta { background: var(--dark); color: var(--dark-ink); padding: 88px 0; margin-top: 96px; }
.journal-cta h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; margin: 18px 0 0; max-width: 18ch; text-wrap: balance; }
.journal-cta p { color: var(--dark-muted); font-size: 17.5px; line-height: 1.65; max-width: 56ch; margin: 22px 0 0; }
.journal-cta .dh-eyebrow { color: var(--gold); }
.journal-cta .dh-eyebrow::before { background: var(--gold); }
.journal-cta .btn-row { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 36px; }
/* wide screens: the words on the left, the buttons level with them on the right */
@media (min-width: 900px) {
  .journal-cta .dh-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 64px; align-items: end; }
  .journal-cta .dh-wrap > * { grid-column: 1; }
  .journal-cta .btn-row { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
}
/* White label on the site's brighter red (the flag red), with a light rim so
   the button still reads as a shape against the near-black band. */
.btn-solid {
  background: #A8321F; color: #FFFFFF !important;
  border: 1.5px solid rgba(243, 237, 226, 0.35);
  font-size: 15.5px; font-weight: 600; padding: 13px 28px; border-radius: 999px;
  transition: transform .35s cubic-bezier(.2,.6,.2,1), box-shadow .35s ease, background .2s ease, border-color .2s ease;
}
.btn-solid:hover {
  background: #C2431C; color: #FFFFFF !important;
  border-color: rgba(243, 237, 226, 0.75);
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -14px rgba(194, 67, 28, 0.8);
}
.btn-ghost { transition: transform .35s cubic-bezier(.2,.6,.2,1), background .2s ease, border-color .2s ease; }
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(243, 237, 226, 0.7); }
.btn-ghost { border: 1.5px solid rgba(243, 237, 226, 0.4); color: var(--dark-ink) !important; font-size: 15.5px; font-weight: 600; padding: 13px 28px; border-radius: 999px; }
.btn-ghost:hover { background: rgba(243, 237, 226, 0.08); }

.dh-footer { background: var(--dark); color: var(--dark-ink); border-top: 1px solid rgba(243, 237, 226, 0.16); padding: 44px 0 0; }
.dh-footer .inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 32px 44px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
}
.dh-footer p { font-size: 14.5px; color: var(--dark-muted); margin: 0; }
.dh-footer a { color: var(--gold); font-weight: 600; }
.dh-footer a:hover { color: var(--dark-ink); }
.dh-footer .brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 600; font-size: 20px; }
.dh-footer .legal { font-family: var(--mono); font-size: 12.5px; color: #8C816F; }
.dh-footer .stripe {
  height: 10px;
  background: repeating-linear-gradient(90deg, #8E2B1F 0 22px, #D9A62E 22px 27px, #22170F 27px 29px, #3F6E9D 29px 49px, #F3ECDD 49px 53px, #4E7A46 53px 71px, #D9A62E 71px 75px, #22170F 75px 77px);
}
@media (max-width: 720px) {
  .dh-footer .inner { padding: 0 20px 36px; }
  .journal-cta { padding: 72px 0; margin-top: 72px; }
}

/* ---- Motion ----
   Kept flat and simple: content fades up as it enters the viewport, and
   interactive elements shift colour or shadow. No 3D transforms anywhere. */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .6, .2, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* Cards and images are flat: hover changes colour and shadow only. */
.more-card { transition: border-color .25s ease, box-shadow .35s ease; }
.more-card:hover { box-shadow: 0 16px 30px -22px rgba(35, 26, 18, 0.35); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn-solid:hover, .btn-ghost:hover, .more-card:hover { transform: none; }
}

@media print {
  .dh-header, .journal-cta, .post-more, .post-rail, .post-foot, .post-head-art, .dh-footer, .dh-rule { display: none !important; }
  .post-layout { display: block; }
  body { background: #fff; font-size: 12pt; }
  .post-body { max-width: none; }
}

/* ==========================================================================
   Form fields (Share your journal or story, stories/share.html)
   ========================================================================== */

.editor-form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font-weight: 400; color: var(--faint); font-size: 13px; }

.field input[type="text"], .field textarea {
  font-family: var(--sans); font-size: 15.5px; color: var(--ink);
  background: #FFFDF8; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; width: 100%;
}
.field textarea { line-height: 1.6; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field input[type="file"] { font-size: 14px; color: var(--muted); }

.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 13px; color: var(--accent); text-decoration: underline;
}

@media (max-width: 620px) {
  .field input[type="text"], .field textarea { font-size: 16px; }  /* 16px stops iOS zooming on focus */
}


/* ---- listing page: use the screen, trim the dead space ---- */
.jx-hero .dh-wrap, .jx-hero ~ .dh-wrap { max-width: var(--wrap); }
.jx-hero-inner { padding-top: 32px; padding-bottom: 28px; gap: 20px 48px; }
.jx-hero h1 { font-size: clamp(34px, 4vw, 48px); margin-top: 12px; max-width: none; }
.jx-hero .lede { margin-top: 12px; }
.jx-switch { margin-top: 22px; }
.jx-layout { padding-top: 22px; gap: 32px 40px; grid-template-columns: minmax(0, 1fr) 340px; }
.jx-feature { gap: 28px; padding-bottom: 28px; }
.jx-entries { padding-top: 26px; }
.jx-timeline { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (max-width: 1080px) { .jx-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .jx-hero-inner { padding-top: 28px; padding-bottom: 22px; } }


/* ---- journal entries as an open list, not boxed cards ---- */
.jx-timeline { display: block; margin: 8px 0 0; padding: 0; }
.jx-timeline::before, .jx-timeline > li::before { display: none; }
.jx-timeline > li { border-bottom: 1px solid var(--line); }
.jx-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 190px; grid-template-rows: auto auto auto 1fr;
  column-gap: 28px; align-items: start; width: 100%; height: auto;
  padding: 24px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.jx-card:hover { border: 0; box-shadow: none; transform: none; }
.jx-card > * { grid-column: 1; min-width: 0; }
.jx-card .dh-meta { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.jx-card .jx-topic { margin-top: 6px; }
.jx-card h3 { font-size: 24px; line-height: 1.2; margin: 8px 0 0; transition: color .2s ease; -webkit-line-clamp: 2; line-clamp: 2; }
.jx-card:hover h3 { color: var(--accent); }
.jx-card p { font-size: 15px; margin: 10px 0 0; max-width: 62ch; }
.jx-card-media { grid-column: 2; grid-row: 1 / -1; margin: 0; padding: 0; align-self: center; overflow: hidden; border-radius: 12px; }
.jx-card-media img, .jx-card-media svg { aspect-ratio: 4 / 3; border-radius: 12px; transition: transform .5s cubic-bezier(.2,.6,.2,1); }
.jx-card:hover .jx-card-media img { transform: scale(1.05); }
@media (max-width: 720px) {
  .jx-card { grid-template-columns: minmax(0, 1fr) 96px; column-gap: 16px; padding: 18px 0; }
  .jx-card h3 { font-size: 19px; }
  .jx-card p { display: none; }
}


/* ---- header: exactly the landing page's navbar ----
   the landing page has no page-wide line-height or font-size, so the bar
   is the same height there; and no underline on the current page */
.dh-header { line-height: normal; font-size: 16px; }
.dh-nav > a[aria-current="page"] { box-shadow: none; padding-bottom: 0; }


/* ---- listing page: fill the screen, header and content together ---- */
:root:has(.jx-hero) { --wrap: 1400px; }
@media (min-width: 1500px) { .jx-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 32px 56px; } }

/* Journal / Stories switch, centred */
.jx-switch { display: flex; width: fit-content; margin-left: auto; margin-right: auto; }
@media (max-width: 720px) { .jx-switch { width: auto; } }


/* the personal reflection reads as plain paragraphs: the three questions
   stay in the writing form (and in older entries' HTML) but are not shown,
   and the text is spaced exactly like the rest of the entry */
.post-reflect p > strong:first-child { display: none; }
.post-reflect p { font-size: 17px; line-height: 1.8; margin-bottom: 22px; color: #3A3026; }
.post-body .post-reflect { padding: 28px 30px 6px; }


/* ---- article header: tighter, so the photo starts sooner ---- */
@media (min-width: 1025px) { .post-head { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); } .post-head-art { margin: -4px 0 -14px; } }
.post-head { padding-top: 14px; }
.post-head-text { padding: 0; }
.post-kicker { margin-top: 18px; }
.post-head h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; margin-top: 8px; }
.post-head .standfirst { margin-top: 12px; }
.post-meta { margin-top: 14px; }


/* ---- article body: fill the screen, tighter rhythm ---- */
:root:has(.post-head) { --wrap: 1400px; }
.post-layout { grid-template-columns: minmax(0, 1fr) 340px; column-gap: 48px; }
.post-body h2 { margin: 30px 0 10px; }
.post-body > h2 ~ :not(h2):not(.post-reflect), .post-reflect > h2 ~ * { margin-left: 0; }
.post-body p { margin-bottom: 18px; }
.post-hero { margin-bottom: 22px; }
.post-body .post-reflect { margin-top: 28px; }
@media (max-width: 1024px) { .post-layout { grid-template-columns: minmax(0, 1fr); } }
