/* grid — auto-split from content-blocks.css */

/* ── Item Grid (Flush, Cards, Tick variants)
   Usage: <div class="ig-flush"><div class="ig-item">...</div>...</div>
── */

.article-body .ig-item {
  background: #fff;
  padding: 1.25rem 1.5rem;
}

.article-body .ig-item strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.375rem;
}

.article-body .ig-item p {
  margin: 0;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.55;
}

.article-body .ig-icon-head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}

.article-body .ig-icon-head strong {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-primary);
}

.article-body .ig-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: var(--color-primary-50);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.0625rem;
  line-height: 1;
}

.article-body .ig-flush {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-neutral-200);
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.article-body .ig-flush--2 {
  grid-template-columns: repeat(2, 1fr);
}

.article-body .ig-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}

.article-body .ig-cards--2 {
  grid-template-columns: repeat(2, 1fr);
}

.article-body .ig-card {
  background: #fff;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  transition: border-color 150ms, box-shadow 150ms;
}

.article-body .ig-card:hover {
  border-color: var(--color-primary-100);
  box-shadow: 0 2px 8px rgba(3,33,105,0.07);
}

.article-body .ig-card strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.375rem;
}

.article-body .ig-card p {
  margin: 0;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.55;
}

.article-body .ig-card .ig-icon {
  margin-bottom: 0.75rem;
}

/* Tick Grid — compact dots */
.article-body .ig-tick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem 2rem;
  margin-bottom: 1.5rem;
}

.article-body .ig-tick--2 {
  grid-template-columns: repeat(2, 1fr);
}

.article-body .ig-tick-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5625rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--color-text-body);
  line-height: 1.45;
}

.article-body .ig-tick-dot {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.article-body .ig-tick-dot::after {
  content: "";
  display: block;
  width: 0.35rem;
  height: 0.22rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

@media (max-width: 860px) {
  .article-body .ig-flush {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-body .ig-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-body .ig-tick {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .article-body .ig-flush,
  .article-body .ig-flush--2,
  .article-body .ig-cards,
  .article-body .ig-cards--2,
  .article-body .ig-tick,
  .article-body .ig-tick--2 {
    grid-template-columns: 1fr;
  }
}


/* ══════════════════════════════════════════════════════════════════
   ITEM GRID v2 — itemgrid
   5 themes: flush · cards · striped · ghost · dark
   2–4 columns via itemgrid--{N}col modifier classes.
   Items: label (required) + icon + details + badge + link
   Badge/link positions: label (inline) · below (after details) · aside (right column)
   ══════════════════════════════════════════════════════════════════ */

/* ── Column count — sets --itemgrid-cols consumed by each theme ── */
.article-body .itemgrid--2col { --itemgrid-cols: 2; }
.article-body .itemgrid--3col { --itemgrid-cols: 3; }
.article-body .itemgrid--4col { --itemgrid-cols: 4; }

/* ── Shared item atoms ── */
.article-body .itemgrid__item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 0.75rem;
  align-items: flex-start;
}
.article-body .itemgrid__item--no-icon { grid-template-columns: 1fr; gap: 0; }
.article-body .itemgrid__item--aside   { grid-template-columns: 32px 1fr auto; }
.article-body .itemgrid__item--aside.itemgrid__item--no-icon { grid-template-columns: 1fr auto; }

.article-body .itemgrid__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
  align-self: center;
}

.article-body .itemgrid__icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.article-body .itemgrid__label-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.article-body .itemgrid__label       { font-size: 0.875rem; font-weight: 700; line-height: 1.3; }
.article-body .itemgrid__label-after { margin-top: 0.2rem; margin-bottom: 0.05rem; }
.article-body .itemgrid__detail      { font-size: 0.75rem;  line-height: 1.5; margin-top: 0.1rem; }
.article-body .itemgrid__link   {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
  display: inline-block;
}

/* ── Badge atoms ── */
.article-body .itemgrid__badge {
  display: inline-block;
  font-size: 0.525rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 0.2em 0.55em;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}
.article-body .itemgrid__badge--new     { background: #cb003e;                        color: #fff; }
.article-body .itemgrid__badge--navy    { background: var(--color-primary);            color: #fff; }
.article-body .itemgrid__badge--muted   { background: var(--color-neutral-200);        color: var(--color-neutral-600); }
.article-body .itemgrid__badge--stable  { background: rgba(22,163,74,0.1);             color: #15803d; }
.article-body .itemgrid__badge--beta    { background: rgba(217,119,6,0.1);             color: #d97706; }
.article-body .itemgrid__badge--pro     { background: rgba(3,33,105,0.09);             color: var(--color-primary); }
.article-body .itemgrid__badge--sky     { background: rgba(3,105,161,0.09);            color: #0369a1; }
.article-body .itemgrid__badge--outline { background: transparent; border: 1px solid var(--color-neutral-300); color: var(--color-neutral-500); }

/* ── THEME 1: Flush — shared-border table feel ── */
.article-body .itemgrid--flush {
  display: grid;
  grid-template-columns: repeat(var(--itemgrid-cols, 3), 1fr);
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.article-body .itemgrid--flush .itemgrid__item {
  padding: 0.75rem 1rem;
  border-right:  1px solid var(--color-neutral-200);
  border-bottom: 1px solid var(--color-neutral-200);
}
.article-body .itemgrid--flush .itemgrid__icon   { background: var(--color-neutral-100); border: 1px solid var(--color-neutral-200); }
.article-body .itemgrid--flush .itemgrid__label  { color: var(--color-text-primary); }
.article-body .itemgrid--flush .itemgrid__detail { color: var(--color-text-muted); }
.article-body .itemgrid--flush .itemgrid__link   { color: var(--color-primary); }
/* Trailing right borders */
.article-body .itemgrid--flush.itemgrid--2col .itemgrid__item:nth-child(2n)         { border-right: none; }
.article-body .itemgrid--flush.itemgrid--3col .itemgrid__item:nth-child(3n)         { border-right: none; }
.article-body .itemgrid--flush.itemgrid--4col .itemgrid__item:nth-child(4n)         { border-right: none; }
/* Last row bottom borders */
.article-body .itemgrid--flush.itemgrid--2col .itemgrid__item:nth-last-child(-n+2)  { border-bottom: none; }
.article-body .itemgrid--flush.itemgrid--3col .itemgrid__item:nth-last-child(-n+3)  { border-bottom: none; }
.article-body .itemgrid--flush.itemgrid--4col .itemgrid__item:nth-last-child(-n+4)  { border-bottom: none; }

/* ── THEME 2: Cards — gapped white cards ── */
.article-body .itemgrid--cards {
  display: grid;
  grid-template-columns: repeat(var(--itemgrid-cols, 3), 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.article-body .itemgrid--cards .itemgrid__item {
  background: #fff;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: border-color 150ms, box-shadow 150ms;
}
.article-body .itemgrid--cards .itemgrid__item:hover {
  border-color: var(--color-primary-100);
  box-shadow: 0 4px 16px rgba(3,33,105,0.09);
}
.article-body .itemgrid--cards .itemgrid__icon   { background: rgba(3,33,105,0.07); border: none; }
.article-body .itemgrid--cards .itemgrid__label  { color: var(--color-primary); }
.article-body .itemgrid--cards .itemgrid__detail { color: var(--color-text-muted); }
.article-body .itemgrid--cards .itemgrid__link   { color: var(--color-primary); }

/* ── THEME 3: Striped — alternating row background ── */
.article-body .itemgrid--striped {
  display: grid;
  grid-template-columns: repeat(var(--itemgrid-cols, 3), 1fr);
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.article-body .itemgrid--striped .itemgrid__item       { padding: 0.75rem 1rem; background: #fff; }
/* 2-col: every other row */
.article-body .itemgrid--striped.itemgrid--2col .itemgrid__item:nth-child(4n+3),
.article-body .itemgrid--striped.itemgrid--2col .itemgrid__item:nth-child(4n+4)  { background: var(--color-neutral-50); }
/* 3-col: default */
.article-body .itemgrid--striped.itemgrid--3col .itemgrid__item:nth-child(6n+4),
.article-body .itemgrid--striped.itemgrid--3col .itemgrid__item:nth-child(6n+5),
.article-body .itemgrid--striped.itemgrid--3col .itemgrid__item:nth-child(6n+6)  { background: var(--color-neutral-50); }
/* 4-col */
.article-body .itemgrid--striped.itemgrid--4col .itemgrid__item:nth-child(8n+5),
.article-body .itemgrid--striped.itemgrid--4col .itemgrid__item:nth-child(8n+6),
.article-body .itemgrid--striped.itemgrid--4col .itemgrid__item:nth-child(8n+7),
.article-body .itemgrid--striped.itemgrid--4col .itemgrid__item:nth-child(8n+8)  { background: var(--color-neutral-50); }
.article-body .itemgrid--striped .itemgrid__icon   { background: var(--color-neutral-100); border: 1px solid var(--color-neutral-200); }
.article-body .itemgrid--striped .itemgrid__label  { color: var(--color-text-primary); }
.article-body .itemgrid--striped .itemgrid__detail { color: var(--color-text-muted); }
.article-body .itemgrid--striped .itemgrid__link   { color: var(--color-primary); }

/* ── THEME 4: Ghost / Minimal — only bottom rules ── */
.article-body .itemgrid--ghost {
  display: grid;
  grid-template-columns: repeat(var(--itemgrid-cols, 3), 1fr);
  gap: 0 2.5rem;
  margin-bottom: 1.5rem;
}
.article-body .itemgrid--ghost .itemgrid__item       { padding: 0.75rem 0; border-bottom: 1px solid var(--color-neutral-100); }
.article-body .itemgrid--ghost.itemgrid--2col .itemgrid__item:nth-last-child(-n+2) { border-bottom: none; }
.article-body .itemgrid--ghost.itemgrid--3col .itemgrid__item:nth-last-child(-n+3) { border-bottom: none; }
.article-body .itemgrid--ghost.itemgrid--4col .itemgrid__item:nth-last-child(-n+4) { border-bottom: none; }
.article-body .itemgrid--ghost .itemgrid__icon   { background: transparent; border: none; font-size: 1.25rem; }
.article-body .itemgrid--ghost .itemgrid__label  { color: var(--color-text-primary); }
.article-body .itemgrid--ghost .itemgrid__detail { color: var(--color-text-muted); }
.article-body .itemgrid--ghost .itemgrid__link   { color: var(--color-primary); }

/* ── THEME 5: Dark (Navy) — flush on navy background ── */
.article-body .itemgrid--dark {
  display: grid;
  grid-template-columns: repeat(var(--itemgrid-cols, 3), 1fr);
  background: var(--color-primary);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.article-body .itemgrid--dark .itemgrid__item {
  padding: 0.875rem 1rem;
  border-right:  1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
/* Trailing right borders */
.article-body .itemgrid--dark.itemgrid--2col .itemgrid__item:nth-child(2n)        { border-right: none; }
.article-body .itemgrid--dark.itemgrid--3col .itemgrid__item:nth-child(3n)        { border-right: none; }
.article-body .itemgrid--dark.itemgrid--4col .itemgrid__item:nth-child(4n)        { border-right: none; }
/* Last row bottom borders */
.article-body .itemgrid--dark.itemgrid--2col .itemgrid__item:nth-last-child(-n+2) { border-bottom: none; }
.article-body .itemgrid--dark.itemgrid--3col .itemgrid__item:nth-last-child(-n+3) { border-bottom: none; }
.article-body .itemgrid--dark.itemgrid--4col .itemgrid__item:nth-last-child(-n+4) { border-bottom: none; }
.article-body .itemgrid--dark .itemgrid__icon   { background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.12); }
.article-body .itemgrid--dark .itemgrid__label  { color: rgba(255,255,255,0.9); }
.article-body .itemgrid--dark .itemgrid__detail { color: rgba(255,255,255,0.42); }
.article-body .itemgrid--dark .itemgrid__link   { color: #7dd3fc; }
/* Dark badge overrides */
.article-body .itemgrid--dark .itemgrid__badge--muted   { background: rgba(255,255,255,0.1);  color: rgba(255,255,255,0.55); }
.article-body .itemgrid--dark .itemgrid__badge--stable  { background: rgba(74,222,128,0.15);  color: #4ade80; }
.article-body .itemgrid--dark .itemgrid__badge--beta    { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.article-body .itemgrid--dark .itemgrid__badge--pro     { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); }
.article-body .itemgrid--dark .itemgrid__badge--navy    { background: rgba(255,255,255,0.18); color: #fff; }
.article-body .itemgrid--dark .itemgrid__badge--outline { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.5); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .article-body .itemgrid--flush,
  .article-body .itemgrid--cards,
  .article-body .itemgrid--striped,
  .article-body .itemgrid--dark   { grid-template-columns: repeat(2, 1fr); }
  .article-body .itemgrid--ghost  { grid-template-columns: repeat(2, 1fr); gap: 0 1.5rem; }
}
@media (max-width: 560px) {
  .article-body .itemgrid--flush,
  .article-body .itemgrid--cards,
  .article-body .itemgrid--striped,
  .article-body .itemgrid--ghost,
  .article-body .itemgrid--dark   { grid-template-columns: 1fr; }
}
