/* ==========================================================================
   The ATT&CK series (/b/) — codein.ca
   Built on the marketing tokens in styles.css. No new colours: the series is
   the same site, so it reads as one system with the reader, not a separate
   product bolted onto the domain.
   ========================================================================== */

.blog-body { background: var(--paper); }

/* --------------------------------------------------------------- the head */
.blog-head {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: var(--rule);
}
.blog-head .kicker { margin-bottom: 1.25rem; color: var(--red); }
.blog-head h1 {
  font-size: var(--text-h2);
  color: var(--ink);
  letter-spacing: -.028em;
  line-height: 1.08;
  max-width: 22ch;
  margin-bottom: .75rem;
}
.blog-head .lede { max-width: 62ch; margin-bottom: 1.5rem; }

.blog-tactic { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.blog-tactic-name {
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  padding: .3rem .6rem;
}
.blog-tactic-id {
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--red);
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-meta span { display: flex; align-items: center; gap: .5rem; }
.blog-meta span::before { content: ''; width: 4px; height: 4px; background: var(--line-strong); flex: none; }

/* ------------------------------------------------------------- the toggle */
.lang-toggle-bar { display: inline-flex; border: 1px solid var(--line-strong); overflow: hidden; margin: 1.25rem auto 0; }
.lang-toggle-btn {
  background: var(--wash);
  border: none;
  padding: .5rem .9rem;
  min-height: 44px;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--steel);
}
.lang-toggle-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.blog-lang-toggle { display: flex; justify-content: center; padding-top: 1.25rem; }
.blog-lang-toggle .lang-toggle-bar { margin: 0; }
.blog-body > .lang-toggle-bar { display: block; width: max-content; }

/* ---------------------------------------------------------- the sections */
.blog-section { padding-block: clamp(2.25rem, 5vw, 3.75rem); border-bottom: var(--rule); }
.blog-section--exec { background: var(--canvas); }
.blog-section--exec:first-of-type { border-top: var(--rule); }
.blog-section--product { background: var(--wash); }
.blog-section > .wrap { max-width: 860px; }

.blog-eyebrow {
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--ink);
}
.blog-section--exec .blog-eyebrow { border-bottom-color: var(--ink); }
.blog-section--tech .blog-eyebrow { color: var(--steel); }
.blog-section--product .blog-eyebrow { color: var(--steel); }

.blog-section h2 { font-size: var(--text-h3); color: var(--ink); letter-spacing: -.018em; margin: 2.25rem 0 .75rem; }
.blog-section h2:first-of-type { margin-top: 0; }
.blog-section h3 { font-size: 1rem; color: var(--ink); margin: 1.75rem 0 .5rem; }
.blog-section p { color: var(--ink-2); margin-bottom: .9rem; max-width: 68ch; }
.blog-section ul, .blog-section ol { padding-left: 1.35rem; margin: .5rem 0 1rem; max-width: 68ch; }
.blog-section ul { list-style: disc; }
.blog-section ol { list-style: decimal; }
.blog-section li { color: var(--ink-2); margin-bottom: .4rem; }
.blog-section li::marker { color: var(--red); }
.blog-section strong { color: var(--ink); font-weight: 600; }
.blog-section code {
  font-family: var(--font-mono);
  font-size: .8125rem;
  background: var(--canvas);
  border: 1px solid var(--line);
  padding: .1rem .3rem;
}
.blog-section pre {
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
}
.blog-section pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--dk-text);
  font-size: .8125rem;
  line-height: 1.6;
}
.blog-section a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); }
.blog-section a:hover { color: var(--red); text-decoration-color: var(--red); }
.blog-section hr { border: 0; border-top: var(--rule); margin: 2rem 0; }
.blog-section blockquote { border-left: 3px solid var(--red); padding: .25rem 0 .25rem 1.15rem; margin: 1.25rem 0; }
.blog-section blockquote p { color: var(--steel); font-size: var(--text-small); }

/* A real table, scrollable on a phone rather than overflowing the page. */
.table-scroll { overflow-x: auto; margin: 1.25rem 0 1.5rem; }
.blog-section table { width: 100%; border-collapse: collapse; border: 1px solid var(--line-strong); font-size: .875rem; }
.blog-section thead th {
  background: var(--ink);
  color: var(--dk-strong);
  text-align: left;
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .6rem .75rem;
  white-space: nowrap;
}
.blog-section tbody td { padding: .55rem .75rem; border-top: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.blog-section tbody tr:nth-child(even) { background: var(--wash); }
.blog-section tbody td:first-child { font-family: var(--font-mono); font-size: .8125rem; color: var(--ink); white-space: nowrap; }

/* ------------------------------------------------------------- the series */
.blog-index .blog-head { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.blog-index .blog-head h1 { max-width: 26ch; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.blog-card { background: var(--paper); }
.blog-card-link {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  height: 100%;
  padding: 1.15rem 1.25rem 1.35rem;
  text-decoration: none;
}
.blog-card-link:hover { background: var(--wash); }
.blog-card-label {
  font-family: var(--font-mono);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
}
.blog-card-title { font-size: 1rem; font-weight: 600; color: var(--ink); letter-spacing: -.012em; line-height: 1.3; }
.blog-card-link:hover .blog-card-title { color: var(--red); }
.blog-card-lede { font-size: .8125rem; line-height: 1.5; color: var(--muted); }

/* ---------------------------------------------------------------- the CTA */
.blog-cta {
  background: var(--ink);
  color: var(--dk-text);
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-block: clamp(2rem, 4vw, 3rem);
}
.blog-cta h2 { color: var(--dk-strong); font-size: var(--text-h3); letter-spacing: -.02em; margin-bottom: .5rem; }
.blog-cta p { color: #b6c2d2; max-width: 56ch; margin-bottom: 1.5rem; }
.blog-cta .btn-outline { border-color: rgba(255,255,255,.4); color: var(--dk-strong); }
.blog-cta .btn-outline:hover { background: var(--dk-strong); color: var(--ink); }

/* --------------------------------------------------------------- the pager */
.blog-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  border-top: var(--rule);
}
.blog-pager-side--end { text-align: right; }
.blog-pager-link { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; }
.blog-pager-link span {
  font-family: var(--font-mono);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-pager-link strong { font-size: .9375rem; font-weight: 600; color: var(--ink); }
.blog-pager-link:hover strong { color: var(--red); }

@media (max-width: 640px) {
  .blog-pager { grid-template-columns: 1fr; }
  .blog-pager-side--end { text-align: left; }
  .blog-head h1 { max-width: none; }
}
