/* Build Log 006 v2: centred reading column, accent colour and image styling.
   Scope: post 3175 only (https://darjarihla.com/build-log-006-darja-rihla-shield/).
   File name stays dr-build-log-006.css. It is loaded by the existing append-only
   block in functions.php. No PHP change is needed for this version.

   Rules of this file:
   - Only existing theme tokens are used (--dr-accent, --dr-accent-2, --dr-heading,
     --dr-text, --dr-text-soft, --dr-text-muted, --dr-panel, --dr-border, --dr-radius
     and the font tokens). Light and dark mode therefore keep working.
   - Reading column is centred. Headings, lead, meta line, flow line, quote,
     captions and the sign-off are centred. Long paragraphs and lists stay
     left aligned for readability. To centre paragraphs too, change
     --dr-bl006-prose-align from left to center below.
   - Every selector starts with body.postid-3175.
*/

body.postid-3175 {
  --dr-bl006-font-body: var(--dr-font-ui, var(--dr-font-family-ui, "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif));
  --dr-bl006-font-display: var(--dr-font-display, var(--dr-font-family-display, "Playfair Display", Georgia, serif));
  --dr-bl006-font-mono: var(--dr-font-mono, var(--dr-font-family-mono, "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace));

  --dr-bl006-accent: var(--dr-accent, #245b64);
  --dr-bl006-warm: var(--dr-accent-2, #9b7a28);
  --dr-bl006-ink: var(--dr-heading, var(--dr-text));
  --dr-bl006-soft: var(--dr-text-soft, var(--dr-text));
  --dr-bl006-muted: var(--dr-text-muted, var(--dr-muted, #6d6253));
  --dr-bl006-panel: var(--dr-panel, rgba(255, 251, 243, 0.94));
  --dr-bl006-tint: color-mix(in srgb, var(--dr-bl006-accent) 8%, transparent);
  --dr-bl006-tint-strong: color-mix(in srgb, var(--dr-bl006-accent) 16%, transparent);
  --dr-bl006-line: color-mix(in srgb, var(--dr-bl006-accent) 30%, transparent);
  --dr-bl006-glow: color-mix(in srgb, var(--dr-bl006-accent) 22%, transparent);
  --dr-bl006-warm-tint: color-mix(in srgb, var(--dr-bl006-warm) 14%, transparent);
  --dr-bl006-rule: linear-gradient(90deg, transparent, var(--dr-bl006-accent), var(--dr-bl006-warm), transparent);

  --dr-bl006-prose-align: left;
  --dr-bl006-column: 46rem;
  --dr-bl006-wide: 68rem;
  --dr-bl006-radius: var(--dr-radius, 16px);
  --dr-bl006-radius-lg: var(--dr-radius-lg, 24px);
}

body.postid-3175 ::selection {
  background: var(--dr-bl006-tint-strong);
}

/* 1. Page glow behind the article */

body.postid-3175 .dr-single-content-wrap {
  background: radial-gradient(ellipse 55% 14rem at 50% 14rem, var(--dr-bl006-tint-strong), transparent 100%);
  background-repeat: no-repeat;
}

/* 2. Masthead: title and deck centred */

body.postid-3175 .dr-single-masthead {
  text-align: center;
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

body.postid-3175 .dr-single-masthead::before {
  content: "Startup Lab \00b7  Build Log 006";
  display: block;
  width: fit-content;
  margin: 0 auto 1.25rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--dr-bl006-line);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dr-bl006-tint), var(--dr-bl006-warm-tint));
  color: var(--dr-bl006-accent);
  font-family: var(--dr-bl006-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

body.postid-3175 h1.wp-block-post-title.dr-single-title {
  max-width: min(100% - 32px, 20ch);
  margin-inline: auto;
  color: var(--dr-bl006-ink);
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  line-height: 1.04;
  text-align: center;
  text-wrap: balance;
}

body.postid-3175 .dr-single-deck {
  max-width: 44rem;
  margin-inline: auto;
  color: var(--dr-bl006-soft);
  text-align: center;
}

body.postid-3175 .dr-single-deck p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-family: var(--dr-bl006-font-body);
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.6;
}

body.postid-3175 .dr-single-masthead::after {
  content: "";
  display: block;
  width: min(14rem, 60%);
  height: 2px;
  margin: 1.75rem auto 0;
  background: var(--dr-bl006-rule);
}

/* 3. Featured image (set in the post sidebar) */

body.postid-3175 .dr-single-featured-image {
  margin-block: clamp(1.5rem, 3vw, 2.5rem);
}

body.postid-3175 .dr-single-featured-image img {
  border: 1px solid var(--dr-bl006-line);
  border-radius: var(--dr-bl006-radius-lg);
  box-shadow: 0 28px 80px var(--dr-bl006-glow), 0 4px 18px rgba(0, 0, 0, 0.12);
}

/* 4. Centred reading column */

body.postid-3175 .wp-block-post-content {
  counter-reset: dr-bl006-section;
}

body.postid-3175 .wp-block-post-content > :where(p, h2, h3, h4, ul, ol, blockquote, pre, .wp-block-paragraph, .wp-block-heading, .wp-block-list, .wp-block-quote) {
  width: 100%;
  max-width: var(--dr-bl006-column);
  margin-inline: auto;
}

body.postid-3175 .wp-block-post-content > :where(figure.wp-block-image, figure.wp-block-table, figure.wp-block-embed, .wp-block-gallery) {
  width: 100%;
  max-width: var(--dr-bl006-wide);
  margin-inline: auto;
}

body.postid-3175 .wp-block-post-content > figure.wp-block-table {
  max-width: var(--dr-bl006-column);
}

body.postid-3175 .wp-block-post-content,
body.postid-3175 .wp-block-post-content p,
body.postid-3175 .wp-block-post-content li,
body.postid-3175 .wp-block-post-content td,
body.postid-3175 .wp-block-post-content th,
body.postid-3175 .wp-block-post-content figcaption {
  font-family: var(--dr-bl006-font-body);
}

body.postid-3175 .wp-block-post-content p,
body.postid-3175 .wp-block-post-content li,
body.postid-3175 .wp-block-post-content td {
  font-size: 1.04rem;
  font-weight: 400;
  line-height: 1.8;
}

body.postid-3175 .wp-block-post-content p {
  color: var(--dr-bl006-soft);
  text-align: var(--dr-bl006-prose-align);
}

body.postid-3175 .wp-block-post-content > p + p {
  margin-top: 1.1rem;
}

/* 5. Lead, meta and flow line */

body.postid-3175 .wp-block-post-content .dr-buildlog-lead {
  max-width: 42rem;
  margin: clamp(1rem, 2vw, 1.75rem) auto 1.25rem;
  color: var(--dr-bl006-ink);
  font-size: clamp(1.18rem, 1.9vw, 1.5rem);
  font-weight: 400;
  line-height: 1.55;
  text-align: center;
  text-wrap: balance;
}

body.postid-3175 .wp-block-post-content .dr-buildlog-meta {
  margin: 0 auto 1.5rem;
  color: var(--dr-bl006-accent);
  font-family: var(--dr-bl006-font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.8;
  text-align: center;
  text-transform: uppercase;
}

body.postid-3175 .wp-block-post-content .dr-buildlog-meta::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin: 0 auto 0.8rem;
  background: var(--dr-bl006-warm);
}

body.postid-3175 .wp-block-post-content .dr-buildlog-flow {
  width: fit-content;
  max-width: 100%;
  margin: 1.5rem auto 2.5rem;
  padding: 0.7rem 1.6rem;
  border: 1px solid var(--dr-bl006-line);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dr-bl006-tint), var(--dr-bl006-warm-tint), var(--dr-bl006-tint));
  color: var(--dr-bl006-accent);
  font-family: var(--dr-bl006-font-mono);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}

/* 6. Headings */

body.postid-3175 .wp-block-post-content h2,
body.postid-3175 .wp-block-post-content h3,
body.postid-3175 .wp-block-post-content h4 {
  font-family: var(--dr-bl006-font-display);
  text-align: center;
  text-wrap: balance;
}

body.postid-3175 .wp-block-post-content h2 {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  margin-bottom: 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 0;
  color: var(--dr-bl006-ink);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.12;
  position: relative;
  counter-increment: dr-bl006-section;
}

body.postid-3175 .wp-block-post-content h2::before {
  content: counter(dr-bl006-section, decimal-leading-zero);
  display: block;
  margin-bottom: 0.65rem;
  color: var(--dr-bl006-accent);
  font-family: var(--dr-bl006-font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  line-height: 1;
}

body.postid-3175 .wp-block-post-content h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 5rem;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--dr-bl006-accent), var(--dr-bl006-warm));
  transform: translateX(-50%);
}

body.postid-3175 .wp-block-post-content h3 {
  margin-top: clamp(2.25rem, 4vw, 3rem);
  margin-bottom: 0.75rem;
  color: var(--dr-bl006-accent);
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  line-height: 1.2;
}

body.postid-3175 .wp-block-post-content h3::before,
body.postid-3175 .wp-block-post-content h3::after {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  margin: 0 0.8rem;
  background: var(--dr-bl006-warm);
  vertical-align: middle;
  opacity: 0.8;
}

/* 7. Strong, emphasis, links, code */

body.postid-3175 .wp-block-post-content strong,
body.postid-3175 .wp-block-post-content b {
  color: var(--dr-bl006-ink);
  font-weight: 700;
}

body.postid-3175 .wp-block-post-content li > strong:first-child {
  color: var(--dr-bl006-accent);
}

body.postid-3175 .wp-block-post-content em {
  color: var(--dr-bl006-soft);
}

body.postid-3175 .wp-block-post-content a {
  color: var(--dr-bl006-accent);
  text-decoration-color: var(--dr-bl006-warm);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

body.postid-3175 .wp-block-post-content a:hover,
body.postid-3175 .wp-block-post-content a:focus-visible {
  color: var(--dr-bl006-warm);
}

body.postid-3175 .wp-block-post-content code,
body.postid-3175 .wp-block-post-content kbd,
body.postid-3175 .wp-block-post-content samp {
  padding: 0.12em 0.45em;
  border: 1px solid var(--dr-bl006-line);
  border-radius: 6px;
  background: var(--dr-bl006-tint);
  color: var(--dr-bl006-accent);
  font-family: var(--dr-bl006-font-mono);
  font-size: 0.9em;
  font-weight: 500;
  overflow-wrap: anywhere;
}

body.postid-3175 .wp-block-post-content pre {
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--dr-bl006-line);
  border-left: 4px solid var(--dr-bl006-accent);
  border-radius: var(--dr-bl006-radius);
  background: var(--dr-bl006-tint);
  color: var(--dr-bl006-ink);
  font-family: var(--dr-bl006-font-mono);
  overflow-x: auto;
}

body.postid-3175 .wp-block-post-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

/* 8. Lists */

body.postid-3175 .wp-block-post-content ul.wp-block-list,
body.postid-3175 .wp-block-post-content ol.wp-block-list {
  margin-block: 1.5rem;
  padding: 1.15rem 1.5rem 1.15rem 2.75rem;
  border: 1px solid var(--dr-bl006-line);
  border-left: 4px solid var(--dr-bl006-accent);
  border-radius: var(--dr-bl006-radius);
  background: linear-gradient(135deg, var(--dr-bl006-tint), transparent 70%);
  text-align: left;
}

body.postid-3175 .wp-block-post-content ol.wp-block-list {
  border-left-color: var(--dr-bl006-warm);
  background: linear-gradient(135deg, var(--dr-bl006-warm-tint), transparent 70%);
}

body.postid-3175 .wp-block-post-content li {
  margin-bottom: 0.6rem;
  color: var(--dr-bl006-soft);
}

body.postid-3175 .wp-block-post-content li:last-child {
  margin-bottom: 0;
}

body.postid-3175 .wp-block-post-content ul.wp-block-list li::marker {
  color: var(--dr-bl006-accent);
  font-size: 1.1em;
}

body.postid-3175 .wp-block-post-content ol.wp-block-list li::marker {
  color: var(--dr-bl006-warm);
  font-family: var(--dr-bl006-font-mono);
  font-weight: 700;
}

/* 9. Quote callout */

body.postid-3175 .wp-block-post-content blockquote.dr-buildlog-question {
  position: relative;
  margin-block: clamp(2.5rem, 5vw, 3.5rem);
  padding: 2.4rem clamp(1.25rem, 4vw, 2.75rem) 2rem;
  border: 1px solid var(--dr-bl006-line);
  border-top: 4px solid var(--dr-bl006-accent);
  border-left: 1px solid var(--dr-bl006-line);
  border-radius: var(--dr-bl006-radius-lg);
  background:
    radial-gradient(ellipse 70% 100% at 50% 0, var(--dr-bl006-tint-strong), transparent 72%),
    linear-gradient(180deg, var(--dr-bl006-warm-tint), transparent 60%),
    var(--dr-bl006-panel);
  box-shadow: 0 18px 50px var(--dr-bl006-glow);
  text-align: center;
}

body.postid-3175 .wp-block-post-content blockquote.dr-buildlog-question::before {
  content: "\201C";
  position: absolute;
  top: -0.2rem;
  left: 50%;
  color: var(--dr-bl006-warm);
  font-family: var(--dr-bl006-font-display);
  font-size: 5rem;
  line-height: 1;
  opacity: 0.55;
  transform: translateX(-50%);
}

body.postid-3175 .wp-block-post-content blockquote.dr-buildlog-question p {
  margin: 0 0 0.75rem;
  color: var(--dr-bl006-ink);
  font-family: var(--dr-bl006-font-body);
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  font-style: normal;
  line-height: 1.6;
  text-align: center;
}

body.postid-3175 .wp-block-post-content blockquote.dr-buildlog-question p:first-child {
  margin-top: 1.4rem;
  color: var(--dr-bl006-accent);
  font-family: var(--dr-bl006-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body.postid-3175 .wp-block-post-content blockquote.dr-buildlog-question p:first-child strong {
  color: inherit;
  font-weight: 700;
}

body.postid-3175 .wp-block-post-content blockquote.dr-buildlog-question p:last-child {
  margin-bottom: 0;
}

/* 10. Tables */

body.postid-3175 .wp-block-post-content figure.wp-block-table {
  margin-block: 2rem;
  overflow-x: auto;
  border: 1px solid var(--dr-bl006-line);
  border-radius: var(--dr-bl006-radius);
  background: var(--dr-bl006-panel);
  box-shadow: 0 14px 40px var(--dr-bl006-glow);
}

body.postid-3175 .wp-block-post-content .wp-block-table table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  font-family: var(--dr-bl006-font-body);
  font-size: 0.95rem;
  line-height: 1.55;
}

body.postid-3175 .wp-block-post-content .wp-block-table thead {
  border-bottom: 0;
}

body.postid-3175 .wp-block-post-content .wp-block-table th {
  padding: 0.85rem 1.1rem;
  border: 0;
  border-bottom: 3px solid var(--dr-bl006-accent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--dr-bl006-accent) 24%, transparent), var(--dr-bl006-warm-tint));
  color: var(--dr-bl006-ink);
  font-family: var(--dr-bl006-font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: left;
  text-transform: uppercase;
}

body.postid-3175 .wp-block-post-content .wp-block-table td {
  padding: 0.8rem 1.1rem;
  border: 0;
  border-bottom: 1px solid var(--dr-bl006-line);
  background: transparent;
  color: var(--dr-bl006-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
}

body.postid-3175 .wp-block-post-content .wp-block-table tbody tr,
body.postid-3175 .wp-block-post-content .wp-block-table.is-style-stripes tbody tr {
  background: transparent;
}

body.postid-3175 .wp-block-post-content .wp-block-table tbody tr:nth-child(odd),
body.postid-3175 .wp-block-post-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
  background: var(--dr-bl006-tint);
}

body.postid-3175 .wp-block-post-content .wp-block-table.is-style-stripes {
  border-bottom: 1px solid var(--dr-bl006-line);
}

body.postid-3175 .wp-block-post-content .wp-block-table tbody tr:last-child td {
  border-bottom: 0;
}

body.postid-3175 .wp-block-post-content .wp-block-table td:first-child {
  color: var(--dr-bl006-accent);
  font-weight: 600;
}

/* 11. Images and captions */

body.postid-3175 .wp-block-post-content figure.wp-block-image {
  margin-block: clamp(2.5rem, 5vw, 4rem);
  padding: 0;
  text-align: center;
}

body.postid-3175 .wp-block-post-content figure.wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--dr-bl006-line);
  border-radius: var(--dr-bl006-radius-lg);
  box-shadow: 0 26px 70px var(--dr-bl006-glow), 0 3px 14px rgba(0, 0, 0, 0.12);
}

body.postid-3175 .wp-block-post-content figure.wp-block-image figcaption {
  max-width: var(--dr-bl006-column);
  margin: 1rem auto 0;
  color: var(--dr-bl006-soft);
  font-family: var(--dr-bl006-font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  line-height: 1.65;
  text-align: center;
}

body.postid-3175 .wp-block-post-content figure.wp-block-image figcaption::before {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin: 0 auto 0.7rem;
  background: var(--dr-bl006-rule);
}

/* 12. Sign-off line */

body.postid-3175 .wp-block-post-content > p:last-child {
  margin-top: 1.5rem;
  color: var(--dr-bl006-muted);
  font-family: var(--dr-bl006-font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

/* 13. Small screens */

@media (max-width: 782px) {
  body.postid-3175 .wp-block-post-content ul.wp-block-list,
  body.postid-3175 .wp-block-post-content ol.wp-block-list {
    padding: 1rem 1rem 1rem 2.25rem;
  }

  body.postid-3175 .wp-block-post-content h3::before,
  body.postid-3175 .wp-block-post-content h3::after {
    width: 0.9rem;
    margin: 0 0.45rem;
  }
}

@media (max-width: 640px) {
  body.postid-3175 .wp-block-post-content p,
  body.postid-3175 .wp-block-post-content li,
  body.postid-3175 .wp-block-post-content td {
    font-size: 1rem;
    line-height: 1.75;
  }

  body.postid-3175 .wp-block-post-content .dr-buildlog-flow {
    padding: 0.6rem 1.1rem;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  body.postid-3175 .wp-block-post-content .wp-block-table th,
  body.postid-3175 .wp-block-post-content .wp-block-table td {
    padding: 0.7rem 0.8rem;
  }

  body.postid-3175 .wp-block-post-content figure.wp-block-image img {
    border-radius: var(--dr-bl006-radius);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.postid-3175 * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
