/* ekplabz article page — "a design sheet set into the machine's control panel".
   Design source: prototype/article.html. Loaded on single posts and fixed pages (not the home page). */

/* ───────── page background: the machine bed ───────── */
#body_wrap:is(.single, .page, .blog) {
  background:
    linear-gradient(rgba(29, 61, 156, .12) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(29, 61, 156, .12) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(rgba(29, 61, 156, .05) 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(90deg, rgba(29, 61, 156, .05) 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(180deg, #eef1f5, #dfe4ea);
}
:is(.single, .page, .blog) .l-content { padding-top: 26px; }

/* ───────── the sheet (paper inside the machine) ───────── */
/* The paper is drawn on ::after. A filter or clip-path on the sheet itself would trap SWELL's
   position:fixed parts inside it (share buttons, TOC) instead of the viewport. */
:is(.single, .page, .blog) .l-mainContent__inner { position: relative; isolation: isolate; padding: 0 0 34px; }
:is(.single, .page, .blog) .l-mainContent__inner::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #fff;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  box-shadow: 0 0 0 1px var(--steel-300);
  filter: drop-shadow(0 14px 18px rgba(20, 30, 60, .18));
}
:is(.single, .page, .blog) .l-mainContent__inner::before { /* unit colour rail */
  content: ""; position: absolute; left: 0; top: 0; bottom: 22px; width: 5px; z-index: 2;
  background: var(--acc, var(--cyan)); box-shadow: 0 0 10px var(--acc, var(--cyan));
}
:is(.single, .page, .blog) .l-mainContent__inner > .post_content,
:is(.single, .page, .blog) .l-mainContent__inner > .p-articleFoot,
:is(.single, .page, .blog) .l-mainContent__inner > .l-articleBottom,
:is(.single, .page, .blog) .l-mainContent__inner > .c-shareBtns,
:is(.single, .page, .blog) .l-mainContent__inner > .c-prNotation { margin-left: clamp(18px, 3.4vw, 44px); margin-right: clamp(18px, 3.4vw, 44px); }

/* ───────── head: eyecatch + band ───────── */
.hero-shot { position: relative; margin: 0; background: #fff; }
.hero-shot .shot img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-shot .band {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px clamp(18px, 3.4vw, 40px) 16px; color: #fff;
  background: linear-gradient(180deg, rgba(10, 18, 44, .55), rgba(7, 12, 29, .82));
  backdrop-filter: blur(6px) saturate(1.2); -webkit-backdrop-filter: blur(6px) saturate(1.2);
  border-top: 2px solid var(--acc, var(--cyan)); box-shadow: 0 -2px 14px -4px var(--acc, var(--cyan));
}
.hero-shot.-noimg .band { position: static; background: linear-gradient(180deg, #0d1d4f, #070c1d); }
.band-top { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; }
.band-top .no { font-weight: 700; padding: 1px 7px; color: var(--acc, var(--cyan)); border: 1px solid var(--acc, var(--cyan)); background: rgba(0, 0, 0, .35); text-shadow: 0 0 6px var(--acc, var(--cyan)); }
.band-top b { font-family: var(--body); font-size: 13px; letter-spacing: .04em; }
.band-top .fig { margin-left: auto; color: #9aa6bd; }
.hero-shot .c-postTitle__ttl { margin: 8px 0 0; font-size: clamp(21px, 2.8vw, 30px); line-height: 1.4; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.hero-shot .lead { margin: 6px 0 0; font-size: 14px; line-height: 1.75; color: #d5deef; }
@media (max-width: 640px) {
  .hero-shot .band { position: static; backdrop-filter: none; background: linear-gradient(180deg, #0d1d4f, #070c1d); }
}

:is(.single, .page, .blog) .tb-spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--steel-300); background: #fbfcfe; }
:is(.single, .page, .blog) .tb-spec div { padding: 8px 14px; border-left: 1px solid var(--steel-300); font-family: var(--mono); font-size: 12px; }
:is(.single, .page, .blog) .tb-spec div:first-child { border-left: 0; padding-left: clamp(18px, 3.4vw, 34px); }
:is(.single, .page, .blog) .tb-spec small { display: block; font-size: 9.5px; letter-spacing: .14em; color: var(--steel-500); }
@media (max-width: 640px) {
  :is(.single, .page, .blog) .tb-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(.single, .page, .blog) .tb-spec div:nth-child(3) { border-left: 0; padding-left: clamp(18px, 3.4vw, 34px); }
  :is(.single, .page, .blog) .tb-spec div:nth-child(n+3) { border-top: 1px solid var(--steel-300); }
}
:is(.single, .page, .blog) .tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px clamp(18px, 3.4vw, 34px); border-bottom: 1px solid var(--steel-300); }
:is(.single, .page, .blog) .tags a { font-family: var(--mono); font-size: 11px; padding: 2px 8px; color: var(--blue-700); background: #eef2fb; border: 1px solid #c9d5f2; text-decoration: none; }

/* ───────── body typography (calm, readable) ───────── */
:is(.single, .page, .blog) .post_content { margin-top: 28px; font-size: 16.5px; line-height: 1.95; color: #1c2436; counter-reset: sec; }
:is(.single, .page, .blog) .post_content a { color: var(--blue-500); }
:is(.single, .page, .blog) .post_content strong { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--acc, var(--cyan)) 30%, transparent) 62%); }
:is(.single, .page, .blog) .post_content li::marker { color: var(--acc, var(--cyan)); }

/* H2 = machined plate with a section number (overrides SWELL's H2 styles) */
:is(.single, .page, .blog) .post_content h2 {
  position: relative; margin: 2.4em 0 1em; padding: 12px 18px 12px 70px; border: 0; border-radius: 0;
  font-size: 21px; line-height: 1.5; color: #fff; counter-increment: sec;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 1px, rgba(0, 0, 0, .07) 1px 2px, transparent 2px 3px),
    linear-gradient(180deg, #3d63d6 0%, #233f9c 45%, #142a6e 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(0, 0, 0, .4);
}
:is(.single, .page, .blog) .post_content h2::before {
  content: "§" counter(sec, decimal-leading-zero);
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: auto; height: auto; border: 1px solid var(--acc, var(--cyan)); background: rgba(0, 0, 0, .35);
  font-family: var(--mono); font-size: 13px; font-weight: 700; padding: 2px 6px;
  color: var(--acc, var(--cyan)); text-shadow: 0 0 6px var(--acc, var(--cyan));
}
:is(.single, .page, .blog) .post_content h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 2px; border: 0; background: var(--acc, var(--cyan)); box-shadow: 0 0 8px var(--acc, var(--cyan)); }
:is(.single, .page, .blog) .post_content h3 {
  margin: 2em 0 .8em; padding: 2px 0 6px 14px; font-size: 18px; line-height: 1.5; background: none;
  border: 0; border-left: 4px solid var(--acc, var(--cyan)); border-bottom: 1px dashed var(--steel-300);
}
:is(.single, .page, .blog) .post_content h3::before, :is(.single, .page, .blog) .post_content h3::after { content: none; }

/* table = spec sheet */
:is(.single, .page, .blog) .post_content table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
:is(.single, .page, .blog) .post_content th, :is(.single, .page, .blog) .post_content thead td {
  padding: 9px 12px; text-align: left; color: #e9eef6; font-weight: 700; letter-spacing: .04em;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px), linear-gradient(#4a5263, #2a2f3a);
  border: 1px solid #1a1e26;
}
:is(.single, .page, .blog) .post_content td { padding: 8px 12px; border: 1px solid var(--steel-300); }
:is(.single, .page, .blog) .post_content tbody tr:nth-child(even) td { background: #f5f7fa; }

/* code blocks: assets/css/ekp-code.css (shared with the glossary) */
:is(.single, .page, .blog) .post_content :not(pre) > code { font-family: var(--mono); font-size: .88em; padding: 1px 6px; background: #eef1f5; border: 1px solid var(--steel-300); color: #1c2436; }

/* figures and quotes */
:is(.single, .page, .blog) .post_content figure.wp-block-image { padding: 12px; border: 1px solid var(--steel-300); background: #fbfcfe; }
:is(.single, .page, .blog) .post_content figcaption { font-size: 13px; color: var(--ink-soft); }
:is(.single, .page, .blog) .post_content blockquote { border-left: 4px solid var(--steel-500); background: #f5f7fa; }

/* ───────── sidebar widgets = gunmetal panels ───────── */
:is(.single, .page, .blog) .l-sidebar .c-widget {
  color: #dfe6f3; padding: 14px 14px 16px; margin-bottom: 16px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px), linear-gradient(180deg, #474f60, #2a2f3a 40%, #1b1f28);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
/* widgets that render nothing for this post (no related posts, no tags) would leave an empty panel */
:is(.single, .page, .blog) .l-sidebar .c-widget:not(:has(*)),
:is(.single, .page, .blog) .l-sidebar .c-widget:has(.wp-block-tag-cloud:empty) { display: none; }
:is(.single, .page, .blog) .l-sidebar .c-widget a { color: #c8d0df; }
:is(.single, .page, .blog) .l-sidebar .c-widget a:hover { color: #fff; }
:is(.single, .page, .blog) .l-sidebar .c-widget__title, :is(.single, .page, .blog) .l-sidebar .wp-block-heading {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 0; border: 0; background: none;
  font-family: var(--tech); font-size: 15px; letter-spacing: .16em; color: #fff; text-transform: uppercase;
}
:is(.single, .page, .blog) .l-sidebar .c-widget__title::before, :is(.single, .page, .blog) .l-sidebar .wp-block-heading::before {
  content: ""; position: static; width: 8px; height: 8px; border-radius: 50%; background: var(--acc, var(--cyan)); box-shadow: 0 0 8px var(--acc, var(--cyan)); transform: none;
}
:is(.single, .page, .blog) .l-sidebar .c-widget__title::after { content: none; }
:is(.single, .page, .blog) .l-sidebar input[type="search"], :is(.single, .page, .blog) .l-sidebar .c-searchForm__s { background: #11141b; color: #fff; border: 1px solid #000; }

/* ───────── fixed pages (parts/page_head.php): same sheet, a band without an eyecatch ───────── */
.page .tb-spec.-page { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page .hero-shot.-page .band { padding-top: 22px; padding-bottom: 22px; }
@media (max-width: 640px) {
  .page .tb-spec.-page { grid-template-columns: 1fr 1fr; }
}
/* the posts page (/articles/): SWELL's post list inside the sheet */
.blog .l-mainContent__inner > .p-homeContent { margin-left: clamp(18px, 3.4vw, 44px); margin-right: clamp(18px, 3.4vw, 44px); }
