/* BLANK Journal — jainbz-grade editorial system in the BLANK palette */

:root {
  --bg: #fdf8f4;
  --bg-elevated: #fffdfb;
  --bg-inset: #f7f2ec;
  --fg: #2b211b;
  --fg-muted: #5f5347;
  --fg-subtle: #8a7b6d;
  --accent: #00754a;
  --accent-hover: #005c3a;
  --accent-fg: #ffffff;
  --gold: #cba258;
  --border: #ede4dc;
  --border-strong: #d9ccc0;
  --code-bg: #f4efe9;
  --mark-bg: #f6e7c6;
  --focus-ring: #0b63c4;
  --ink-band: #2b211b;

  --font-serif: 'Lora', Charter, Georgia, serif;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
  --step-4: clamp(2.3rem, 1.7rem + 2.6vw, 3.4rem);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-1: 0 1px 2px rgb(43 33 27 / 0.06), 0 2px 8px rgb(43 33 27 / 0.05);
  --shadow-2: 0 4px 14px rgb(43 33 27 / 0.09), 0 14px 36px rgb(43 33 27 / 0.08);

  --dur-fast: 150ms;
  --dur-med: 220ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.5;
  font-optical-sizing: auto;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }
::selection { background: var(--mark-bg); color: var(--fg); }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: 1.5rem; }
.measure { max-width: var(--measure); margin-inline: auto; padding-inline: 1.25rem; }

/* ---------- masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.masthead-inner {
  max-width: 72rem; margin-inline: auto; padding: 0.8rem 1.5rem;
  display: flex; align-items: center; gap: 1.25rem;
}
.masthead .brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--fg); }
.masthead .brand img { width: 30px; height: 30px; }
.masthead .brand b { font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem; letter-spacing: 0.01em; }
.masthead .brand small { font-family: var(--font-sans); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.masthead nav { margin-inline-start: auto; display: flex; gap: 1.3rem; align-items: center; }
.masthead nav a {
  color: var(--fg-muted); text-decoration: none; font-size: var(--step--1); font-weight: 700;
  transition: color var(--dur-fast) var(--ease);
}
.masthead nav a:hover { color: var(--accent); }
.masthead .shop-cta {
  background: var(--ink-band); color: #fff; border-radius: 999px;
  padding: 0.5rem 1.1rem; font-size: 0.8rem; font-weight: 800;
}
.masthead .shop-cta:hover { background: var(--accent); color: #fff; }

/* ---------- journal index ---------- */
.blog-hero { padding: 4.5rem 0 2.8rem; border-bottom: 1px solid var(--border); }
.blog-hero .kicker {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1rem;
}
.blog-hero h1 {
  font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.015em;
  font-size: var(--step-4); line-height: 1.05; margin: 0 0 1rem; text-wrap: balance;
}
.blog-hero p { color: var(--fg-muted); font-size: 1.15rem; max-width: 36rem; margin: 0; line-height: 1.6; }

.boards-row { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 1.4rem 0 0.4rem; }
.boards-row a {
  border: 1px solid var(--border); background: var(--bg-elevated); border-radius: 999px;
  padding: 0.42rem 1rem; font-size: 0.8rem; font-weight: 700; color: var(--fg-muted);
  text-decoration: none; transition: all var(--dur-fast) var(--ease);
}
.boards-row a:hover { border-color: var(--accent); color: var(--accent); }
.boards-row a.active { background: var(--ink-band); border-color: var(--ink-band); color: #fff; }

/* featured card */
.featured-card {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; margin: 2.2rem 0;
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-elevated); text-decoration: none; color: var(--fg);
  box-shadow: var(--shadow-1); transition: box-shadow var(--dur-med) var(--ease), transform var(--dur-med) var(--ease);
}
.featured-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.featured-card img { width: 100%; height: 100%; object-fit: cover; min-height: 20rem; }
.featured-card .fc-body { padding: 2.2rem 2.4rem; display: flex; flex-direction: column; justify-content: center; gap: 0.9rem; }
.featured-card h2 { font-family: var(--font-serif); font-size: var(--step-2); line-height: 1.15; margin: 0; font-weight: 600; text-wrap: balance; }
.featured-card p { margin: 0; color: var(--fg-muted); line-height: 1.6; }
.board-tag { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.card-meta { font-size: 0.8rem; color: var(--fg-subtle); display: flex; gap: 0.7rem; align-items: center; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.75rem; padding-bottom: 4.5rem; }
.post-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--fg);
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.post-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; background: var(--bg-inset); }
.post-card .card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.post-card h2 { font-family: var(--font-serif); font-size: 1.28rem; line-height: 1.25; margin: 0; font-weight: 600; text-wrap: balance; }
.post-card p { margin: 0; color: var(--fg-muted); font-size: 0.9rem; line-height: 1.6; flex: 1; }

/* ---------- article ---------- */
.post-wrap { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.post-main { min-width: 0; }
.post-rail { display: none; }

.action-rail { display: flex; align-items: center; gap: 0.3rem; order: 2; padding-inline: 1.25rem; }
.action-rail .rail-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-elevated); color: var(--fg-muted);
  text-decoration: none; transition: all var(--dur-fast) var(--ease);
}
.action-rail .rail-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.action-rail .rail-btn.pin:hover { border-color: #e60023; color: #e60023; }
.action-rail .rail-btn svg { width: 17px; height: 17px; }
.action-rail .rail-label { font-size: 0.72rem; font-weight: 700; color: var(--fg-subtle); letter-spacing: 0.08em; text-transform: uppercase; margin-inline-end: 0.4rem; }

@media (min-width: 1180px) {
  .post-wrap { grid-template-columns: 4rem minmax(0, var(--measure)) 14rem; justify-content: center; }
  .action-rail { position: sticky; top: 6rem; align-self: start; flex-direction: column; gap: 0.4rem; order: 0; padding-inline: 0; }
  .action-rail .rail-label { writing-mode: initial; margin: 0 0 0.3rem; }
  .post-rail { display: block; }
  .post-rail .toc { position: sticky; top: 6rem; font-size: 0.82rem; }
  .post-rail .toc b { display: block; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-subtle); margin-bottom: 0.7rem; }
  .post-rail .toc a { display: block; color: var(--fg-muted); text-decoration: none; padding: 0.28rem 0 0.28rem 0.9rem; border-left: 2px solid var(--border); line-height: 1.4; }
  .post-rail .toc a:hover { color: var(--accent); border-left-color: var(--accent); }
}

.post-head { padding: 3.6rem 0 1.4rem; }
.post-head .crumbs { font-size: 0.78rem; color: var(--fg-subtle); margin-bottom: 1.3rem; }
.post-head .crumbs a { color: var(--fg-subtle); text-decoration: none; }
.post-head .crumbs a:hover { color: var(--accent); }
.post-head h1 {
  font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.015em;
  font-size: var(--step-4); line-height: 1.08; margin: 0 0 1.1rem; text-wrap: balance;
}
.post-head .dek { font-size: 1.18rem; color: var(--fg-muted); line-height: 1.55; margin: 0 0 1.5rem; text-wrap: pretty; }
.byline { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: var(--fg-muted); flex-wrap: wrap; }
.byline .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--ink-band); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em; }
.byline b { color: var(--fg); font-weight: 800; }
.byline .dot { opacity: 0.4; }

.disclosure-box {
  margin-top: 1.2rem; background: var(--bg-inset); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 0.75rem 1rem; font-size: 0.8rem; color: var(--fg-muted); line-height: 1.55;
}

.post-hero { margin: 0.5rem 0 0; }
.post-hero img { width: 100%; max-height: 34rem; object-fit: cover; border-radius: var(--radius-lg); }

/* prose */
.prose {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.02rem + 0.3vw, 1.28rem);
  line-height: 1.68;
  padding-block: 2rem 3.5rem;
  hyphens: auto;
  text-wrap: pretty;
  orphans: 3; widows: 3;
}
.prose > * + * { margin-block-start: 1.4em; margin-block-end: 0; }
.prose > p:first-of-type::first-letter {
  font-family: var(--font-serif); font-weight: 600; float: left;
  font-size: 3.4em; line-height: 0.82; padding: 0.08em 0.12em 0 0; color: var(--ink-band);
}
.prose .answer-box + p::first-letter { float: none; font-size: inherit; padding: 0; line-height: inherit; }
.prose h2, .prose h3 { font-family: var(--font-sans); font-weight: 800; letter-spacing: -0.015em; margin-block-start: 2.3em; hyphens: none; text-wrap: balance; }
.prose h2 { font-size: var(--step-1); }
.prose h3 { font-size: 1.12rem; }
.prose h2 + *, .prose h3 + * { margin-block-start: 0.8em; }
.prose blockquote {
  margin-inline: 0; padding-inline-start: 1.25em; border-inline-start: 3px solid var(--gold);
  font-style: italic; font-size: 1.1em; color: var(--fg-muted);
}
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-block-start: 0.45em; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose strong { color: var(--fg); }
.prose figure { margin-inline: 0; }
.prose figcaption { margin-block-start: 0.6em; font-family: var(--font-sans); font-size: var(--step--1); color: var(--fg-muted); text-align: center; hyphens: none; }
.prose hr { border: 0; margin-block: 3em; text-align: center; }
.prose hr::after { content: '···'; letter-spacing: 0.6em; color: var(--fg-subtle); }
.prose mark { background: var(--mark-bg); color: inherit; padding-inline: 0.15em; border-radius: 2px; }

/* AEO answer box */
.prose .answer-box, .answer-box {
  background: var(--bg-inset); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius-md); padding: 1.1rem 1.35rem; font-family: var(--font-sans); font-size: 0.98rem; line-height: 1.6;
}
.answer-box .ab-label { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 0.4rem; }

/* comparison tables */
.prose table { width: 100%; border-collapse: collapse; margin-block: 1.8em; font-family: var(--font-sans); font-size: 0.88rem; }
.prose caption { text-align: left; font-size: 0.78rem; color: var(--fg-subtle); padding-bottom: 0.5rem; font-family: var(--font-sans); }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.65rem 0.85rem; text-align: left; vertical-align: top; }
.prose thead th { background: var(--bg-inset); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.02em; }
.prose tbody th { font-weight: 700; }
.prose .cite { font-family: var(--font-sans); font-size: 0.75em; color: var(--fg-subtle); text-decoration: none; vertical-align: super; }
.prose .cite:hover { color: var(--accent); }

/* sidenotes */
.prose { counter-reset: sidenote; }
.prose .sidenote { font-family: var(--font-sans); font-size: var(--step--1); line-height: 1.5; color: var(--fg-muted); }
.prose .sidenote::before { counter-increment: sidenote; content: counter(sidenote) '. '; font-weight: 700; color: var(--accent); }
@media (max-width: 1179px) {
  .prose .sidenote { display: block; border-inline-start: 2px solid var(--border-strong); padding-inline-start: 1em; margin-block: 1em; }
}
@media (min-width: 1180px) {
  .prose { position: relative; }
  .prose .sidenote { position: absolute; left: calc(100% + 2.25rem); width: 13rem; margin: 0; }
}

/* product cards */
.product-card {
  display: flex; gap: 1.1rem; align-items: center; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem 1.25rem;
  margin-block: 1.6em; text-decoration: none; color: var(--fg); font-family: var(--font-sans);
  box-shadow: var(--shadow-1); transition: all var(--dur-fast) var(--ease);
}
.product-card:hover { border-color: var(--accent); box-shadow: var(--shadow-2); }
.product-card img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--radius-md); background: var(--bg-inset); flex-shrink: 0; }
.product-card .pc-body { flex: 1; min-width: 0; }
.product-card .pc-tag { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); }
.product-card h4 { margin: 0.2rem 0 0.25rem; font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; }
.product-card p { margin: 0; font-size: 0.82rem; color: var(--fg-muted); line-height: 1.5; }
.product-card .pc-price { font-weight: 800; font-size: 0.95rem; color: var(--accent-hover); white-space: nowrap; }
.product-card .pc-cta { display: inline-block; margin-top: 0.35rem; font-size: 0.78rem; font-weight: 800; color: var(--accent); }

/* faq */
.faq { margin-block: 3em 1em; }
.faq h2 { font-family: var(--font-sans); font-size: var(--step-1); font-weight: 800; letter-spacing: -0.015em; }
.faq details { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.faq summary {
  cursor: pointer; font-family: var(--font-sans); font-weight: 700; font-size: 1rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 0.8rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; font-weight: 700; flex-shrink: 0; transition: transform var(--dur-fast) var(--ease); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0.65rem 0 0.3rem; color: var(--fg-muted); font-size: 0.95rem; font-family: var(--font-sans); }

/* footer blocks */
.disclaimer { border-top: 1px solid var(--border); margin-top: 3.5em; padding-top: 1.4em; font-family: var(--font-sans); font-size: 0.78rem; color: var(--fg-subtle); line-height: 1.65; }

.post-nav { display: flex; gap: 1.2rem; margin: 2.5rem auto 4rem; padding-inline: 1.25rem; max-width: var(--measure); }
.post-nav a {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem 1.3rem;
  text-decoration: none; color: var(--fg); background: var(--bg-elevated); transition: all var(--dur-fast) var(--ease);
}
.post-nav a:hover { border-color: var(--accent); transform: translateY(-1px); }
.post-nav a small { display: block; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-subtle); margin-bottom: 0.45rem; font-weight: 800; }
.post-nav a span { font-family: var(--font-serif); font-size: 1rem; font-weight: 600; line-height: 1.35; }
.post-nav a.next { text-align: right; }

.site-footer { border-top: 1px solid var(--border); background: var(--bg-elevated); padding: 2.6rem 0 3rem; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 2.4rem; justify-content: space-between; align-items: flex-start; }
.site-footer .fcol { font-size: 0.82rem; color: var(--fg-muted); max-width: 26rem; line-height: 1.65; }
.site-footer .fcol b { color: var(--fg); display: block; font-family: var(--font-serif); font-size: 1rem; margin-bottom: 0.55rem; }
.site-footer nav { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.site-footer nav a { color: var(--fg-muted); text-decoration: none; font-size: 0.82rem; font-weight: 700; }
.site-footer nav a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .post-nav { flex-direction: column; }
  .product-card img { width: 68px; height: 68px; }
  .masthead nav a:not(.shop-cta) { display: none; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-card img { min-height: 13rem; }
  .blog-hero { padding: 3rem 0 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
