/* Mori journal. Editorial layout for long-form posts. Uses the site tokens (styles.css), so dark mode follows html[data-theme]. Logical properties keep it RTL-safe. */
.bp-progress { position: fixed; inset-block-start: 0; inset-inline: 0; height: 3px; z-index: 150; pointer-events: none; background: transparent; }
.bp-progress i { display: block; height: 100%; width: 100%; transform-origin: left center; transform: scaleX(var(--p, 0)); background: var(--signature); }
[dir="rtl"] .bp-progress i { transform-origin: right center; }

/* ---------------------------------------------------------------- hero */
.bp-hero { --bp-grad: var(--feature); position: relative; margin: var(--edge); border-radius: var(--r-xl); overflow: hidden; background: var(--bp-grad); padding: clamp(110px, 14vw, 150px) 0 clamp(36px, 5vw, 64px); isolation: isolate; }
.bp-hero[data-tone="sky"] { --bp-grad: linear-gradient(160deg, #cfdbe8, #e6ecf1); }
.bp-hero[data-tone="apricot"] { --bp-grad: linear-gradient(160deg, #f6d3b6, #fbe9d8); }
.bp-hero[data-tone="lime"] { --bp-grad: linear-gradient(160deg, #e4f7b0, #f3fad8); }
.bp-hero[data-tone="signature"] { --bp-grad: var(--signature); }
.bp-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(20px, 4vw, 64px); align-items: center; }
.bp-hero h1 { font-family: var(--serif); font-weight: 300; letter-spacing: -0.02em; font-size: clamp(36px, 5vw, 66px); line-height: 1.04; margin: 14px 0 20px; text-wrap: balance; color: #2b2926; }
.bp-hero .lede { font-size: clamp(17px, 1.6vw, 21px); max-width: 52ch; color: #3a3835; margin: 0; }
.bp-hero .crumbs { color: #4a4742; }
.bp-hero .bp-art { display: grid; place-items: center; min-height: 240px; }
.bp-hero .bp-art svg { width: min(340px, 100%); height: auto; overflow: visible; filter: drop-shadow(0 22px 28px rgba(43, 41, 38, 0.16)); }
.bp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 22px; }
.bp-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 1px rgba(43, 41, 38, 0.1) inset; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: #2b2926; text-decoration: none; }
a.bp-chip:hover { background: rgba(255, 255, 255, 0.85); }
[data-theme="dark"] .bp-hero { --bp-grad: linear-gradient(135deg, #2a3a1f, #24303c); }
[data-theme="dark"] .bp-hero[data-tone="sky"] { --bp-grad: linear-gradient(160deg, #26303d, #1f2630); }
[data-theme="dark"] .bp-hero[data-tone="apricot"] { --bp-grad: linear-gradient(160deg, #4a3322, #2c2018); }
[data-theme="dark"] .bp-hero[data-tone="lime"] { --bp-grad: linear-gradient(160deg, #2d3c20, #222c1a); }
[data-theme="dark"] .bp-hero[data-tone="signature"] { --bp-grad: linear-gradient(150deg, #3a4757, #35505a 45%, #4a6a3a 85%); }
[data-theme="dark"] .bp-chip { background: rgba(255, 255, 255, 0.08); color: #f0ede6; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset; }
[data-theme="dark"] .bp-hero .bp-art svg { filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.45)); }
[data-theme="dark"] .bp-hero h1, [data-theme="dark"] .bp-hero .lede { color: #f8f6f2; }
[data-theme="dark"] .bp-hero .lede, [data-theme="dark"] .bp-hero .crumbs { color: #e4e0d8; }

/* ---------------------------------------------------------------- layout */
.bp-shell { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); max-width: 1120px; margin: 0 auto; padding: clamp(36px, 5vw, 72px) var(--gutter) 40px; align-items: start; }
.bp-toc { position: sticky; inset-block-start: 110px; display: grid; gap: 14px; font-size: 14.5px; max-height: calc(100vh - 140px); overflow: auto; padding-inline-end: 6px; }
.bp-toc h2 { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); margin: 0; font-weight: 500; }
.bp-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-inline-start: 1px solid var(--line); }
.bp-toc a { display: block; padding: 7px 0 7px 14px; margin-inline-start: -1px; border-inline-start: 2px solid transparent; color: var(--stone); text-decoration: none; line-height: 1.35; transition: color 0.2s, border-color 0.2s; }
[dir="rtl"] .bp-toc a { padding: 7px 14px 7px 0; }
.bp-toc a:hover { color: var(--ink); }
.bp-toc a[aria-current="true"] { color: var(--ink); border-inline-start-color: var(--ink); }
.bp-share { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-share a, .bp-share button { height: 36px; padding: 0 14px; border-radius: 999px; background: transparent; box-shadow: 0 0 0 1px var(--soft) inset; font-family: var(--mono); font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; border: 0; }
.bp-share > * { flex: none; white-space: nowrap; }
.bp-share a:hover, .bp-share button:hover { box-shadow: 0 0 0 1px var(--ink) inset; }

/* ---------------------------------------------------------------- article */
.bp-article { min-width: 0; max-width: 68ch; font-size: 19px; line-height: 1.72; color: var(--prose); }
.bp-article > * + * { margin-block-start: 1.15em; }
.bp-article h2 { font-family: var(--serif); font-weight: 300; letter-spacing: -0.015em; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.12; color: var(--ink); margin-block-start: 2.1em; scroll-margin-block-start: 110px; text-wrap: balance; }
.bp-article h3 { font-size: 22px; line-height: 1.3; color: var(--ink); font-weight: 600; margin-block-start: 1.7em; scroll-margin-block-start: 110px; }
.bp-article h2 + p { font-size: 1.06em; color: var(--ink); }
.bp-article a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.bp-article a:hover { text-decoration-thickness: 2px; }
.bp-article ul, .bp-article ol { padding-inline-start: 1.25em; display: grid; gap: 0.55em; }
.bp-article li::marker { color: var(--faint); }
.bp-article strong { color: var(--ink); font-weight: 600; }
.bp-article table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.bp-article th, .bp-article td { text-align: start; padding: 12px 14px; border-block-end: 1px solid var(--line); vertical-align: top; }
.bp-article th { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone); font-weight: 500; }
.bp-scroll { overflow-x: auto; border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--line) inset; }
.bp-take { margin-block: 0 2.2em; padding: 26px 28px; border-radius: var(--r-md); background: var(--feature); color: #2b2926; font-size: 17px; line-height: 1.6; }
.bp-take h2 { font-family: var(--mono) !important; font-size: 11.5px !important; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500 !important; margin: 0 0 12px !important; color: #2b2926 !important; }
.bp-take ul { margin: 0; padding-inline-start: 1.2em; gap: 0.5em; }
.bp-take li, .bp-take strong { color: #2b2926; }
[data-theme="dark"] .bp-take { background: linear-gradient(135deg, #2d3c20, #26303d); }
[data-theme="dark"] .bp-take, [data-theme="dark"] .bp-take * { color: #f0ede6 !important; }
.bp-pull { margin-inline: 0; padding: 8px 0 8px 26px; border-inline-start: 3px solid transparent; border-image: var(--signature) 1; font-family: var(--serif); font-weight: 300; font-size: clamp(25px, 3vw, 34px); line-height: 1.22; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
[dir="rtl"] .bp-pull { padding: 8px 26px 8px 0; }
.bp-tip { display: grid; gap: 6px; padding: 20px 24px; border-radius: var(--r-sm); background: var(--tag-bg); font-size: 17px; line-height: 1.6; box-shadow: 0 0 0 1px var(--hair) inset; }
.bp-tip b { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); font-weight: 500; }
.bp-tip.warn { background: #f6e3d0; color: #6b431b; }
.bp-tip.warn b { color: #8a5a2b; }
[data-theme="dark"] .bp-tip.warn { background: #3b2b19; color: #f1c999; }
[data-theme="dark"] .bp-tip.warn b { color: #f1c999; }
.bp-note { font-size: 15px; color: var(--stone); }

/* faq + sources */
.bp-faq { margin-block-start: 2.4em; display: grid; gap: 0; border-block-start: 1px solid var(--line); }
.bp-faq details { border-block-end: 1px solid var(--line); padding: 18px 0; }
.bp-faq summary { cursor: pointer; font-family: var(--serif); font-weight: 300; font-size: 24px; line-height: 1.25; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 18px; align-items: baseline; }
.bp-faq summary::-webkit-details-marker { display: none; }
.bp-faq summary::after { content: "+"; font-family: var(--mono); font-size: 22px; color: var(--stone); flex: none; transition: transform 0.25s var(--ease); }
.bp-faq details[open] summary::after { transform: rotate(45deg); }
.bp-faq details p { margin: 12px 0 0; font-size: 18px; }
.bp-sources { margin-block-start: 2.4em; padding: 26px 28px; border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--line) inset; font-size: 15.5px; line-height: 1.55; }
.bp-sources h2 { font-size: 24px !important; margin: 0 0 12px !important; }
.bp-sources ul { padding-inline-start: 1.1em; gap: 0.4em; }
.bp-sources .fine { margin-block-start: 14px; color: var(--stone); font-size: 14px; }

/* related + cta */
.bp-related { max-width: 1240px; margin: 0 auto; padding: 24px var(--gutter) 70px; }
.bp-related > h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3.6vw, 44px); margin: 0 0 26px; letter-spacing: -0.02em; }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 22px; }
.bp-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--white); box-shadow: 0 0 0 1px var(--line) inset; text-decoration: none; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.bp-card:hover { transform: translateY(-5px); box-shadow: 0 0 0 1px var(--line) inset, 0 28px 56px rgba(43, 41, 38, 0.1); }
.bp-card .cover { height: 210px; display: grid; place-items: center; background: var(--feature); }
.bp-card .cover[data-tone="sky"] { background: linear-gradient(160deg, #cfdbe8, #e6ecf1); }
.bp-card .cover[data-tone="apricot"] { background: linear-gradient(160deg, #f6d3b6, #fbe9d8); }
.bp-card .cover[data-tone="lime"] { background: linear-gradient(160deg, #e4f7b0, #f3fad8); }
.bp-card .cover[data-tone="signature"] { background: var(--signature); }
.bp-card .cover svg { width: 190px; height: auto; overflow: visible; }
[data-theme="dark"] .bp-card .cover, [data-theme="dark"] .bp-feature .cover { background: linear-gradient(135deg, #2a3a1f, #24303c); }
[data-theme="dark"] .bp-card .cover[data-tone="sky"], [data-theme="dark"] .bp-feature .cover[data-tone="sky"] { background: linear-gradient(160deg, #26303d, #1f2630); }
[data-theme="dark"] .bp-card .cover[data-tone="apricot"], [data-theme="dark"] .bp-feature .cover[data-tone="apricot"] { background: linear-gradient(160deg, #4a3322, #2c2018); }
[data-theme="dark"] .bp-card .cover[data-tone="lime"] { background: linear-gradient(160deg, #2d3c20, #222c1a); }
[data-theme="dark"] .bp-card .cover[data-tone="signature"], [data-theme="dark"] .bp-feature .cover[data-tone="signature"] { background: linear-gradient(150deg, #3a4757, #35505a 45%, #4a6a3a 85%); }
.bp-card .info { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bp-card h3 { font-family: var(--serif); font-weight: 300; font-size: 27px; line-height: 1.14; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
.bp-card p { margin: 0; color: var(--stone); font-size: 16px; line-height: 1.5; }
.bp-meta { font-family: var(--mono); font-size: 12px; color: var(--stone); letter-spacing: 0.06em; text-transform: uppercase; }
.bp-card .more { margin-block-start: auto; padding-block-start: 6px; font-family: var(--mono); font-size: 13px; }

/* ---------------------------------------------------------------- index */
.bp-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); border-radius: var(--r-xl); overflow: hidden; background: var(--white); box-shadow: 0 0 0 1px var(--line) inset; text-decoration: none; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.bp-feature:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line) inset, 0 34px 70px rgba(43, 41, 38, 0.12); }
.bp-feature .cover { min-height: 340px; display: grid; place-items: center; background: var(--feature); }
.bp-feature .cover[data-tone="sky"] { background: linear-gradient(160deg, #cfdbe8, #e6ecf1); }
.bp-feature .cover[data-tone="apricot"] { background: linear-gradient(160deg, #f6d3b6, #fbe9d8); }
.bp-feature .cover[data-tone="signature"] { background: var(--signature); }
.bp-feature .cover svg { width: min(300px, 70%); height: auto; overflow: visible; }
.bp-feature .info { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.bp-feature h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 4vw, 52px); line-height: 1.06; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.bp-feature p { margin: 0; color: var(--stone); font-size: 18px; }
.bp-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.bp-topics a { height: 40px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; font-family: var(--mono); font-size: 13px; text-decoration: none; box-shadow: 0 0 0 1px var(--outline) inset; }
.bp-topics a:hover, .bp-topics a[aria-current="page"] { background: var(--fill); color: var(--on-fill); }

/* ---------------------------------------------------------------- end cta */
.bp-cta { margin: 0 var(--edge) var(--edge); border-radius: var(--r-xl); background: var(--signature); padding: clamp(40px, 6vw, 84px) var(--gutter); text-align: center; color: #2b2926; }
.bp-cta h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 4.4vw, 58px); line-height: 1.06; letter-spacing: -0.02em; margin: 0 auto 14px; max-width: 18ch; text-wrap: balance; }
.bp-cta p { margin: 0 auto 26px; max-width: 46ch; font-size: 18px; color: #3a3835; }
.bp-cta .hero-cta { justify-content: center; }
[data-theme="dark"] .bp-cta { background: linear-gradient(150deg, #3a4757, #35505a 45%, #4a6a3a 85%); color: #f8f6f2; }
[data-theme="dark"] .bp-cta p { color: #e4e0d8; }

/* ---------------------------------------------------------------- loading skeleton (progressive: only with JS) */
.js .bp-art:not(.is-ready) svg { opacity: 0; }
.js .bp-art:not(.is-ready)::before { content: ""; width: min(300px, 80%); aspect-ratio: 6 / 5; border-radius: 40% 60% 55% 45%; background: linear-gradient(100deg, var(--skel-a) 30%, var(--skel-b) 50%, var(--skel-a) 70%); background-size: 200% 100%; animation: bpSkel 1.3s linear infinite; }
.bp-art svg { transition: opacity 0.5s var(--ease); }
@keyframes bpSkel { to { background-position: -200% 0; } }

@media (max-width: 960px) {
  .bp-hero .wrap { grid-template-columns: 1fr; }
  .bp-hero .bp-art { order: -1; min-height: 190px; }
  .bp-hero .bp-art svg { width: min(240px, 70%); }
  .bp-shell { grid-template-columns: 1fr; }
  .bp-toc { position: static; max-height: none; padding: 20px 22px; border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--line) inset; }
  .bp-toc ol { border: 0; }
  .bp-toc a { padding: 6px 0; border: 0; margin: 0; }
  .bp-toc a[aria-current="true"] { color: var(--stone); }
  .bp-feature { grid-template-columns: 1fr; }
  .bp-feature .cover { min-height: 240px; }
  .bp-article { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-card, .bp-feature { transition: none; }
  .bp-card:hover, .bp-feature:hover { transform: none; }
  .js .bp-art:not(.is-ready)::before { animation: none; }
  .bp-progress i { transition: none; }
}
