/*
 * nd-blog-post.css — ニコルデジマ Blog Post Template
 * ====================================================
 * Loaded conditionally on single posts only (is_singular('post')).
 *
 * SECTIONS:
 *  1.  Reading progress bar
 *  2.  Article header
 *  3.  Cover image
 *  4.  Author box (top, compact)
 *  5.  TOC (boxed, in-content)
 *  6.  Body typography
 *  7.  Highlighter system
 *  8.  Lead paragraph + drop cap
 *  9.  Callout
 *  9b  Key Takeaway
 *  9c  Bullet List 
 * 10.  Block Quote
 * 11.  Checklist
 * 12.  Tool card
 * 13.  Tipbox (code/tip)
 * 14.  Figure (image + caption)
 * 15.  Simple Table
 * 15a. FAQ
 * 16.  Article footer (tags + share)
 * 17.  Author full (bottom, heavy)
 * 18.  Related posts
 * 19.  Comments
 * 20.  Layout: with-side overrides
 * 21.  Sidebar
 * 22.  Responsive
 *
 * DEPENDS ON: nd-tokens.css, nd-base.css, nd-global.css
 */


/* ═══════════════════════════════════════════════
   1. READING PROGRESS BAR
   ═══════════════════════════════════════════════ */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: var(--z-progress);        /* 100 */
  pointer-events: none;
}

.progress-fill {
  height: 100%;
  background: var(--kaki);
  width: 0;
  transition: width 0.08s linear;
}

/* Admin bar offset */
.admin-bar .progress {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .progress {
    top: 46px;
  }
}


/* ═══════════════════════════════════════════════
   2. ARTICLE HEADER
   ═══════════════════════════════════════════════ */

.art-head {
  padding: var(--s-8) 0 var(--s-10);  /* 32px 0 40px */
}

.art-pillar-row {
  display: flex;
  align-items: center;
  gap: var(--s-2_5);                   /* 10px */
  margin-bottom: var(--s-6);          /* 24px */
  flex-wrap: wrap;
}

.art-pillar-row .feature-label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 2px;
}

.art-h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 48px;
  line-height: 1.45;
  letter-spacing: 0.3px;
  color: var(--ink);
  margin: 0 0 var(--s-6);             /* 0 0 24px */
  text-wrap: pretty;
}

.art-h1 .matcha { color: var(--matcha); }
.art-h1 .kaki   { color: var(--kaki); }

.art-dek {
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink-2);
  margin: 0 0 var(--s-7);             /* 0 0 28px */
  max-width: 680px;
}

.art-meta {
  display: flex;
  align-items: center;
  gap: var(--s-4_5);                   /* 18px */
  font-size: 12px;
  color: var(--ink-3);
  flex-wrap: wrap;
  padding-top: var(--s-5);            /* 20px */
  border-top: 1px solid var(--hairline);
}

.art-meta .item {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1_5);                   /* 6px */
  white-space: nowrap;
}

.art-meta svg { color: var(--ink-3); }
.art-meta .updated { color: var(--matcha); }


/* ═══════════════════════════════════════════════
   3. COVER IMAGE
   ═══════════════════════════════════════════════ */

.cover-wrap {
  margin: 0 0 var(--s-11);            /* 0 0 44px */
}

.cover {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-card);        /* 8px */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  position: relative;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-cap {
  margin-top: var(--s-2_5);           /* 10px */
  font-size: 11px;
  color: var(--ink-3);
  font-style: italic;
  font-family: var(--serif);
}


/* ═══════════════════════════════════════════════
   4. AUTHOR BOX (top, compact)
   ═══════════════════════════════════════════════ */

.author-box {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);        /* 8px */
  padding: var(--s-5) var(--s-6);      /* 20px 24px */
  display: flex;
  align-items: flex-start;
  gap: var(--s-4_5);                   /* 18px */
  background: var(--paper);
  margin: 0 0 var(--s-14);            /* 0 0 56px */
}

.author-box .portrait {
  width:56px;
  height:56px;
  border-radius:50%;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  flex-shrink:0;
  overflow:hidden;
  position:relative;
}
.author-box .portrait::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.author-box .info { flex: 1; min-width: 0; }

.author-box .label {
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 2.5px;
  font-weight: 500;
  margin-bottom: var(--s-1);          /* 4px */
}

.author-box .name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: var(--s-1);          /* 4px */
  display: flex;
  align-items: center;
  gap: var(--s-2_5);                   /* 10px */
  flex-wrap: wrap;
}

.author-box .name .role {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-2);
  font-weight: 400;
}

.author-box .bio {
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-2);
  margin: var(--s-1_5) 0 var(--s-2);  /* 6px 0 8px */
}

.author-box .link {
  font-size: 11px;
  color: var(--kaki);
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);                     /* 4px */
  font-weight: 500;
}


/* ═══════════════════════════════════════════════
   5. TOC (boxed, in-content)
   ═══════════════════════════════════════════════ */

.toc {
  background: var(--paper-2);
  border-radius: var(--r-card);        /* 8px */
  padding: var(--s-7) var(--s-8);      /* 28px 32px */
  margin: 0 0 var(--s-12);            /* 0 0 48px */
  position: relative;
}

.toc::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 3px;
  background: var(--matcha);
  border-radius: 0 2px 2px 0;
}

.toc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-4_5);        /* 18px */
  flex-wrap: wrap;
  gap: var(--s-2);                     /* 8px */
}

.toc-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 14px;
  margin: 0;
  letter-spacing: 1px;
  display: flex;
  align-items: baseline;
  gap: var(--s-2_5);                   /* 10px */
}

.toc-head h2 .en {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 2px;
  font-weight: 500;
}

.toc-head .toggle {
  font-size: 11px;
  color: var(--ink-2);
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);                     /* 4px */
  cursor: pointer;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: toc;
}

.toc-item {
  padding: 9px 0;
  border-top: 1px dashed var(--hairline);
  display: grid;
  grid-template-columns: 32px 1fr 50px;
  gap: var(--s-3);                     /* 12px */
  align-items: baseline;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s;
}

.toc-item:first-child { border-top: none; }
.toc-item:hover { color: var(--kaki); }

.toc-item .num {
  font-family: var(--serif);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 1px;
}

.toc-item .text { color: var(--ink); }

.toc-item .time {
  font-size: 10px;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
}

.toc-item.sub {
  padding-left: 32px;
  font-size: 12px;
}

.toc-item.sub .text { color: var(--ink-2); }


/* ═══════════════════════════════════════════════
   6. BODY TYPOGRAPHY
   ═══════════════════════════════════════════════ */

.body {
  font-size: 15px;
  line-height: 2;
  color: var(--ink);
  font-feature-settings: "palt";
}

.body > p {
  margin: 0 0 26px;
}

/* Tighten gap when paragraph is followed by h2 */
.body > p:has(+ h2) {
  margin-bottom: 0;
}

/* H2 — section divider (editor blocks only) */
.body h2.wp-block-heading {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.55;
  color: var(--ink);
  margin: var(--s-16) 0 var(--s-5);   /* 64px 0 20px */
  padding-top: var(--s-6);            /* 24px */
  border-top: 1px solid var(--hairline);
  position: relative;
  letter-spacing: 0.3px;
}

.body h2 .num {
  font-family: var(--sans);
  font-size: 10px;
  color: var(--matcha);
  letter-spacing: 2px;
  font-weight: 500;
  display: block;
  margin-bottom: var(--s-2);          /* 8px */
}

/* H3 — subsection with matcha bar */
.body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  margin: var(--s-10) 0 var(--s-3_5); /* 40px 0 14px */
  display: flex;
  align-items: baseline;
  gap: var(--s-2_5);                   /* 10px */
}

.body h3::before {
  content: "";
  width: 4px;
  height: 14px;
  background: var(--matcha);
  border-radius: 1px;
  display: inline-block;
  flex-shrink: 0;
  transform: translateY(2px);
}

/* Inline styles */
.body strong {
  font-weight: 700;
  color: var(--ink);
}

.body a {
  color: var(--kaki);
  border-bottom: 1px solid var(--kaki-soft);
  transition: border-color 0.15s;
}

.body a:hover {
  border-color: var(--kaki);
}


/* ═══════════════════════════════════════════════
   7. HIGHLIGHTER SYSTEM
   ═══════════════════════════════════════════════ */

.body .hl-kaki,
.hl-kaki {
  background: linear-gradient(transparent 60%, var(--kaki-soft) 60%);
  padding: 0 2px;
}

.body .hl-matcha,
.hl-matcha {
  background: linear-gradient(transparent 60%, var(--matcha-soft) 60%);
  padding: 0 2px;
}

.body .hl-yellow,
.hl-yellow {
  background: linear-gradient(transparent 60%, var(--yellow-soft) 60%);
  padding: 0 2px;
}


/* ═══════════════════════════════════════════════
   8. LEAD PARAGRAPH + DROP CAP
   ═══════════════════════════════════════════════ */

.body .lead {
  font-size: 16px;
  line-height: 2.05;
  color: var(--ink);
  margin: 0 0 var(--s-9);             /* 0 0 36px */
  font-family: var(--serif);
  font-weight: 400;
}

.body .lead::first-letter {
  font-size: 36px;
  font-family: var(--serif);
  font-weight: 500;
  color: var(--kaki);
  float: left;
  line-height: 1;
  padding: 6px 8px 0 0;
}


/* ─── CALLOUT ─── label-tab over paper panel ─── */

.callout {
  position: relative;
  margin: 56px 0 44px;
  padding: 30px 30px 26px;
  background: var(--paper-2);
  border: none;
  border-radius: 0;
  display: block;
}

.callout-body .label {
  position: absolute;
  top: -13px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  height: 26px;
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.callout-body .label::before {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
  flex-shrink: 0;
}

.callout-body p {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.95;
  letter-spacing: .015em;
  color: var(--ink);
}

.callout-body p strong {
  font-weight: 700;
  color: var(--ink);
}

/* ── variants ── */
.callout.kaki .callout-body .label {
  background: var(--kaki);
  color: #fff;
}

.callout.matcha .callout-body .label {
  background: var(--matcha);
  color: #fff;
}

.callout.yellow .callout-body .label {
  background: var(--yellow-soft);
  color: #9a7a1a;
}

/* ═══════════════════════════════════════════════
   9b. KEY TAKEAWAYS
   ═══════════════════════════════════════════════ */

.takeaway {
  margin: 0 0 48px;
  padding: 22px 28px 24px;
  background: var(--paper-2);
}

.body .takeaway-head {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 13px;
  margin: 0 0 14px;
  letter-spacing: 1px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.body .takeaway-head .en {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 2px;
  font-weight: 500;
}

.list-bullet {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-bullet li {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink);
  padding-left: 18px;
  position: relative;
  letter-spacing: 0.01em;
  text-wrap: pretty;
}

.list-bullet li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.list-bullet li strong {
  font-weight: 700;
  color: var(--ink);
}

.list-bullet li .src {
  font-size: 11px;
  color: var(--ink-3);
  font-style: italic;
  margin-left: 4px;
}

/* ═══════════════════════════════════════════════
   10. BLOCKQUOTE
   ═══════════════════════════════════════════════ */
blockquote.pq {
  margin: var(--s-12) 0;
  padding: var(--s-6) var(--s-8);
  background: var(--paper-2);
  border-left: 3px solid var(--kaki);
  font-family: var(--serif);
  font-weight: 400;
  font-size: inherit;
  line-height: 1.85;
  color: var(--ink);
  letter-spacing: 0.015em;
}

blockquote.pq p {
  margin: 0;
}

blockquote.pq cite {
  display: block;
  text-align: right;
  margin-top: var(--s-3_5);
  font-size: 11px;
  color: var(--ink-3);
  font-style: normal;
  letter-spacing: 1px;
}

blockquote.pq::before,
blockquote.pq::after {
  content: none;
}

/* ═══════════════════════════════════════════════
   11. CHECKLIST
   ═══════════════════════════════════════════════ */

.checklist {
  list-style: none;
  padding: var(--s-6) var(--s-7);      /* 24px 28px */
  margin: var(--s-6) 0;                /* 24px 0 */
  display: flex;
  flex-direction: column;
  gap: var(--s-3);                     /* 12px */
  background: var(--paper-2);
  border-radius: var(--r-card);        /* 8px */
}

.checklist .head {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--s-1_5);        /* 6px */
  display: flex;
  align-items: center;
  gap: var(--s-2);                     /* 8px */
  padding-left: 0;
}

.checklist .head::before { display: none; }

.checklist .head .badge {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--matcha);
  background: var(--matcha-soft);
  padding: 2px 6px;
  border-radius: var(--r-pill);        /* 3px */
  font-family: var(--sans);
  font-weight: 500;
}

.checklist li {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  position: relative;
  padding-left: 24px;
}

.checklist li::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--matcha);
  border-radius: var(--r-pill);        /* 3px */
  background: var(--paper);
  position: absolute;
  left: 0;
  top: 7px;
  flex-shrink: 0;
}

.checklist li > strong {
  color: var(--ink);
  font-weight: 600;
}

.checklist li.done::before {
  background: var(--matcha);
}

.checklist li.done::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 4px;
  border-left: 1.5px solid var(--on-accent);
  border-bottom: 1.5px solid var(--on-accent);
  transform: translate(3px, -7px) rotate(-45deg);
}

.checklist li.done {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--ink-3);
}


/* ═══════════════════════════════════════════════
   12. TOOL CARD
   ═══════════════════════════════════════════════ */

.toolcard {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);        /* 8px */
  padding: 0;
  margin: var(--s-8) 0;                /* 32px 0 */
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 0;
  align-items: stretch;
  overflow: hidden;
}

.toolcard .logo {
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 32px;
  color: var(--ink-2);
  font-weight: 500;
  border-right: 1px solid var(--hairline);
}

.toolcard .logo.kaki   { background: var(--kaki-soft);   color: var(--kaki); }
.toolcard .logo.matcha  { background: var(--matcha-soft);  color: var(--matcha-ink); }

.toolcard .info {
  padding: var(--s-4_5) var(--s-5_5);  /* 18px 22px */
  min-width: 0;
}

.toolcard .info .row {
  display: flex;
  align-items: baseline;
  gap: var(--s-2_5);                   /* 10px */
  margin-bottom: var(--s-1_5);        /* 6px */
  flex-wrap: wrap;
}

.toolcard .info .name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.toolcard .info .price {
  font-size: 11px;
  color: var(--ink-3);
}

.toolcard .info p {
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-2);
  margin: 0;
}

.toolcard .cta {
  padding: var(--s-4_5) var(--s-6);    /* 18px 24px */
  border-left: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
  background: var(--paper);
}


/* ═══════════════════════════════════════════════
   13. TIPBOX (code/tip)
   ═══════════════════════════════════════════════ */

.tipbox {
  background: var(--ink);
  color: #e8e3d4;
  border-radius: var(--r-card);        /* 8px */
  padding: var(--s-5_5) var(--s-6);    /* 22px 26px — closest tokens */
  margin: var(--s-8) 0;                /* 32px 0 */
  font-size: 13px;
  line-height: 1.85;
  font-family: var(--mono);
}

.tipbox .label {
  font-size: 9px;
  letter-spacing: 2.5px;
  color: var(--yellow);
  margin-bottom: var(--s-2_5);        /* 10px */
  font-family: var(--sans);
  font-weight: 500;
}

.tipbox code {
  color: var(--yellow);
  font-family: inherit;
}


/* ═══════════════════════════════════════════════
   14. FIGURE (image + caption)
   ═══════════════════════════════════════════════ */

.figure {
  margin: var(--s-9) 0;                /* 36px 0 */
}

.figure .img {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--placeholder-from), var(--placeholder-to));
  border-radius: var(--r-ctrl);        /* 6px */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  margin-bottom: var(--s-2_5);        /* 10px */
  overflow: hidden;
}

.figure .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure figcaption {
  font-size: 11px;
  color: var(--ink-3);
  font-style: italic;
  font-family: var(--serif);
  padding-left: var(--s-3_5);         /* 14px */
  border-left: 2px solid var(--hairline);
}

/* ═══════════════════════════════════════════════
   15. SIMPLE TABLE
   ═══════════════════════════════════════════════ */

.tbl {
  margin: var(--s-8) 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
  font-size: 12px;
}
.tbl table {
  width: 100%;
  border-collapse: collapse;
  border: none;
  table-layout: auto;
}
.tbl tr {
  border: none;
}
.tbl th,
.tbl td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--hairline-2);
  border-left: none;
  border-right: none;
  border-bottom: none;
}
.tbl thead {
  border-bottom: none;
}
.tbl thead th {
  background: var(--paper-2);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 1.5px;
  border-top: none;
  border-bottom: 1px solid var(--hairline);
}
.tbl thead th strong {
  font-weight: 500;
  color: var(--ink-3);
}
.tbl td {
  color: var(--ink-2);
  line-height: 1.7;
  background: var(--paper);
}

/* ═══════════════════════════════════════════════
   TABLE — ROW HEADER VARIANT
   How to use：class fill in "tbl tbl-row-header"
   ═══════════════════════════════════════════════ */
.tbl-row-header tbody td:first-child {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: 13px;
  background: var(--paper);
}


/* ═══════════════════════════════════════════════
   15a. FAQ — RankMath block (blog post)
   ═══════════════════════════════════════════════ */

#rank-math-faq .rank-math-list {
  border-top: 1px solid var(--hairline);
  counter-reset: faq;
}

#rank-math-faq .rank-math-list-item {
  border-bottom: 1px solid var(--hairline);
  padding: var(--s-5_5) 0;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--s-4);
  counter-increment: faq;
}

#rank-math-faq .rank-math-list-item::before {
  content: "Q." counter(faq, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 11px;
  color: var(--kaki);
  font-weight: 500;
  letter-spacing: 1px;
  padding-top: 2px;
}

#rank-math-faq .rank-math-question {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
  display: block;
}

#rank-math-faq .rank-math-question::before {
  display: none;
}

#rank-math-faq .rank-math-answer {
  grid-column: 2;
  margin-top: var(--s-3);
}

#rank-math-faq .rank-math-answer p {
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: 0;
}
/* ═══════════════════════════════════════════════
   16. ARTICLE FOOTER (tags + share)
   ═══════════════════════════════════════════════ */

.art-foot {
  margin: var(--s-16) 0 0;            /* 64px 0 0 */
  padding: var(--s-8) 0;              /* 32px 0 */
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.art-tags {
  display: flex;
  align-items: center;
  gap: var(--s-2);                     /* 8px */
  margin-bottom: var(--s-5);          /* 20px */
  flex-wrap: wrap;
}

.art-tags .label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 2px;
  margin-right: var(--s-1_5);         /* 6px */
  font-weight: 500;
}

.art-tags .tag {
  font-size: 11px;
  color: var(--ink-2);
  background: var(--paper-2);
  padding: 5px 10px;
  border-radius: var(--r-pill);        /* 3px */
}

.art-share {
  display: flex;
  align-items: center;
  gap: var(--s-3_5);                   /* 14px */
  flex-wrap: wrap;
}

.art-share .label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 2px;
  font-weight: 500;
}


/* ═══════════════════════════════════════════════
   17. AUTHOR FULL (bottom, heavy)
   ═══════════════════════════════════════════════ */

.author-full {
  margin: var(--s-14) 0;               /* 56px 0 */
  padding: var(--s-9) var(--s-10);     /* 36px 40px */
  background: var(--paper-2);
  border-radius: var(--r-card);        /* 8px */
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--s-8);                     /* 32px */
  align-items: start;
}

.author-full .portrait {
  width:120px;
  height:120px;
  border-radius:50%;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  overflow:hidden;
  position:relative;
}

.author-full .portrait::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.author-full .label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 2.5px;
  font-weight: 500;
  margin-bottom: var(--s-2);          /* 8px */
}

.author-full h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 var(--s-1);             /* 0 0 4px */
  letter-spacing: 0.5px;
}

.author-full .role {
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: var(--s-3_5);        /* 14px */
}

.author-full p {
  font-size: 13px;
  line-height: 1.95;
  color: var(--ink-2);
  margin: 0 0 var(--s-4);             /* 0 0 16px */
}

.author-full .ctas {
  display: flex;
  align-items: center;
  gap: var(--s-3_5);                   /* 14px */
  flex-wrap: wrap;
}

.author-full .meta {
  font-size: 11px;
  color: var(--ink-3);
}


/* ═══════════════════════════════════════════════
   18. RELATED POSTS
   ═══════════════════════════════════════════════ */

.related {
  padding: var(--s-20) 0 var(--s-12);  /* 80px 0 48px */
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-8);                     /* 32px */
}

.rel-art { cursor: pointer; }

.rel-art .cover {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--placeholder-from), var(--placeholder-to));
  border-radius: var(--r-ctrl);        /* 6px */
  margin-bottom: var(--s-3_5);        /* 14px */
  border: none;
  display: block;
  overflow: hidden;
}

.rel-art .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rel-art .meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);                     /* 8px */
  margin-bottom: var(--s-2);          /* 8px */
  flex-wrap: nowrap;
}

.rel-art .date {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.rel-art h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 var(--s-1_5);           /* 0 0 6px */
  color: var(--ink);
}

.rel-art .read {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}


/* ═══════════════════════════════════════════════
   19. COMMENTS
   ═══════════════════════════════════════════════ */

.comments {
  padding: var(--s-12) 0 var(--s-16);  /* 48px 0 64px */
}

.comments-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-6);          /* 24px */
  flex-wrap: wrap;
  gap: var(--s-2);                     /* 8px */
}

.comments-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  margin: 0;
  letter-spacing: 0.5px;
}

.comments-head .count {
  font-size: 12px;
  color: var(--ink-3);
}

.comment-form {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);        /* 8px */
  padding: var(--s-5);                 /* 20px */
  margin-bottom: var(--s-8);          /* 32px */
  background: var(--paper);
}

.comment-form textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  resize: vertical;
  min-height: 80px;
  line-height: 1.7;
}

.comment-form textarea::placeholder { color: var(--ink-3); }

.comment-form .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s-3_5);          /* 14px */
  border-top: 1px solid var(--hairline-2);
  gap: var(--s-3);                     /* 12px */
  flex-wrap: wrap;
}

.comment-form .row .name {
  font-size: 11px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: var(--s-1_5);                   /* 6px */
}

.comment-form .submit {
  background: var(--kaki);
  color: var(--on-accent);
  border: none;
  padding: 9px 18px;
  border-radius: var(--r-ctrl);        /* 6px */
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);                     /* 24px */
}

.comment {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--s-4);                     /* 16px */
  padding: var(--s-5) 0;              /* 20px 0 */
  border-top: 1px solid var(--hairline-2);
}

.comment:first-child {
  border-top: none;
  padding-top: 0;
}

.comment .ava {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.comment .ava.k { background: linear-gradient(135deg, var(--kaki-soft), var(--kaki-portrait)); }
.comment .ava.m { background: linear-gradient(135deg, var(--matcha-soft), var(--matcha-portrait)); }
.comment .ava.i { background: linear-gradient(135deg, var(--ink-soft), #bfb9aa); }

.comment .head {
  display: flex;
  align-items: baseline;
  gap: var(--s-2_5);                   /* 10px */
  margin-bottom: var(--s-1_5);        /* 6px */
  flex-wrap: wrap;
}

.comment .name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}

.comment .date {
  font-size: 11px;
  color: var(--ink-3);
}

/* Comment body — scoped to avoid conflict with article .body */
.comment .comment-body {
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: 0 0 var(--s-2);             /* 0 0 8px */
}

.comment .actions {
  display: flex;
  align-items: center;
  gap: var(--s-3_5);                   /* 14px */
  font-size: 11px;
  color: var(--ink-3);
}

.comment .actions a {
  transition: color 0.15s;
}

.comment .actions a:hover {
  color: var(--kaki);
}

.comment.reply {
  padding-left: var(--s-12);          /* 48px */
}


/* ═══════════════════════════════════════════════
   20. LAYOUT: with-side overrides
   ═══════════════════════════════════════════════ */

.with-side .main { min-width: 0; }

.with-side .main .wrap-narrow {
  max-width: none;
  padding: 0;
  margin: 0;
}


/* ═══════════════════════════════════════════════
   21. SIDEBAR
   ═══════════════════════════════════════════════ */

.side {
  align-self: stretch;
  font-size: 13px;
  padding-top: var(--s-8);            /* 32px */
}

.side-block {
  padding-bottom: var(--s-8);         /* 32px */
  margin-bottom: var(--s-8);          /* 32px */
  border-bottom: 1px solid var(--hairline-2);
}

.side-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Sidebar TOC is sticky */
.side-toc {
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-2) transparent;
}

.side-toc::-webkit-scrollbar { width: 4px; }
.side-toc::-webkit-scrollbar-thumb { background: var(--hairline-2); border-radius: 2px; }
.side-toc::-webkit-scrollbar-track { background: transparent; }

/* Admin bar offset for sticky TOC */
.admin-bar .side-toc {
  top: 144px;
}

.side-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--ink-3);
  margin: 0 0 var(--s-4_5);           /* 0 0 18px */
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-1);                     /* 4px */
}

.side-title .en {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--ink-3);
  font-weight: 400;
  text-transform: none;
  display: block;
}

/* Condensed sidebar TOC list */
.side-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid var(--hairline);
}

.side-toc-item {
  padding: var(--s-2) 0 var(--s-2) var(--s-3_5);  /* 8px 0 8px 14px */
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
  cursor: pointer;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: all 0.2s;
}

.side-toc-item:hover { color: var(--ink); }

.side-toc-item.active {
  color: var(--kaki);
  border-left-color: var(--kaki);
  font-weight: 500;
}

.side-toc-item.sub {
  padding-left: 28px;
  font-size: 11px;
  color: var(--ink-3);
}

/* Recent posts */
.side-recent {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);                     /* 16px */
}

.side-recent-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--s-3);                     /* 12px */
  align-items: start;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.side-recent-item .thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--placeholder-from), var(--placeholder-to));
  border-radius: var(--r-thumb);       /* 4px */
  flex-shrink: 0;
  overflow: hidden;
  width: 80px;
}

.side-recent-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.side-recent-item h5 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.55;
  margin: 0 0 var(--s-1);             /* 0 0 4px */
  color: var(--ink);
  transition: color 0.15s;
}

.side-recent-item:hover h5 { color: var(--kaki); }

.side-recent-item .date {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.5px;
}

/* Categories */
.side-cats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.side-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);                     /* 12px */
  padding: var(--s-2_5) 0;            /* 10px 0 */
  font-size: 12px;
  color: var(--ink-2);
  border-top: 1px dashed var(--hairline);
  cursor: pointer;
  transition: color 0.15s;
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: normal;
}

.side-cat-item:first-child {
  border-top: none;
  padding-top: 0;
}

.side-cat-item:hover { color: var(--kaki); }

.side-cat-item > span:first-child {
  min-width: 0;
  flex: 1;
}

.side-cat-item .count {
  font-size: 10px;
  color: var(--ink-3);
  font-family: var(--serif);
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════
   22. RESPONSIVE
   ═══════════════════════════════════════════════ */

/* bp-lg: sidebar hidden, single column */
@media (max-width: 1000px) {  /* --bp-lg */
  .with-side {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: var(--container-narrow);
  }

  /* Hide entire sidebar on mobile */
  .side {
    display: none;
  }
}

/* bp-md: compact typography, simplified layouts */
@media (max-width: 880px) {  /* --bp-md */
  .art-h1 {
    font-size: 32px;
  }

  .pq {
    margin: var(--s-9) 0;
    padding: var(--s-7) 0;
    border-radius: 0;
  }

  .pq blockquote {
    font-size: 18px;
  }

  .author-full {
    grid-template-columns: 80px 1fr;
    gap: var(--s-5);                   /* 20px */
    padding: var(--s-6);               /* 24px */
  }

  .author-full .portrait {
    width: 80px;
    height: 80px;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: var(--s-6);                   /* 24px */
  }

  .toolcard {
    grid-template-columns: 80px 1fr;
    gap: 0;
  }

  .toolcard .cta {
    display: none;
  }

  .cmp {
    font-size: 11px;
  }

  .cmp th,
  .cmp td {
    padding: 9px 10px;
  }
}

/* bp-sm: TOC collapse on mobile */
@media (max-width: 767px) {

  /* Collapsed state hides the list */
  .toc.toc--collapsed .toc-list {
    display: none;
  }

  /* Show the toggle button (hidden on desktop via existing .toggle styles implied) */
  .toc-head .toggle {
    display: inline-flex; /* already styled in your .toc-head .toggle rule */
  }
}

/* Hide toggle on desktop */
@media (min-width: 768px) {
  .toc-head .toggle {
    display: none;
  }
}