/* ============================================================
   ENTRY2EXIT — BLOG COMPONENT LIBRARY  v1
   Loaded only on posts that use a component.
   Every component root carries .e2e-raw, so the blog template's
   article rules stop at its boundary and these rules govern.
   ============================================================ */

.e2e-c {
  --c-blue: #0057d8;
  --c-blue-dark: #00409f;
  --c-ink: #101828;
  --c-navy: #12224a;
  --c-body: #3d4654;
  --c-muted: #6b7280;
  --c-line: #e4e8ef;
  --c-tint: #eef3fb;
  --c-pro: #0f7a45;
  --c-pro-bg: #eef8f2;
  --c-con: #c0342b;
  --c-con-bg: #fdf1f0;
  --c-warn: #b4690e;
  --c-warn-bg: #fdf6ec;
  --c-r: 10px;
  --c-r-sm: 6px;

  display: block;
  width: 100%;
  margin: 36px 0;
  padding: 0;
  box-sizing: border-box;
  color: var(--c-body);
  font-size: 16px;
  line-height: 1.7;
}

.e2e-c *, .e2e-c *::before, .e2e-c *::after { box-sizing: border-box; }
.e2e-c p { margin: 0 0 12px; font-size: 16px; line-height: 1.7; color: var(--c-body); }
.e2e-c p:last-child { margin-bottom: 0; }
.e2e-c ul, .e2e-c ol { margin: 0; padding: 0; list-style: none; }
.e2e-c strong { font-weight: 600; color: var(--c-ink); }
.e2e-c a { color: var(--c-blue); text-decoration: underline; text-underline-offset: 3px; }
.e2e-c a:hover { color: var(--c-blue-dark); }

/* shared eyebrow label */
.e2e-c__label {
  display: inline-block;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* shared heading */
.e2e-c__title {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-ink);
}

/* ============================================================
   1. KEY TAKEAWAYS
   ============================================================ */

.e2e-takeaways {
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-blue);
  border-radius: var(--c-r);
  background: #fbfcfe;
  padding: 26px 30px;
}

.e2e-takeaways ul { display: flex; flex-direction: column; gap: 10px; }

.e2e-takeaways li {
  position: relative;
  padding-left: 28px;
  font-size: 16px;
  line-height: 1.65;
}

.e2e-takeaways li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M2.2 7V2.2h4.8' stroke='%230033ff' stroke-width='2.4' stroke-linecap='square'/%3E%3Cpath d='M13.8 9v4.8H9' stroke='%230033ff' stroke-width='2.4' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ============================================================
   2. CALLOUT  (note / tip / warning / critical)
   ============================================================ */

.e2e-callout {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 14px;
  border-radius: var(--c-r);
  padding: 20px 24px;
  background: var(--c-tint);
  border: 1px solid #dbe5f4;
}

.e2e-callout::before {
  content: "";
  width: 22px;
  height: 22px;
  margin-top: 1px;
  background: center / contain no-repeat;
}

.e2e-callout__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-ink);
}

.e2e-callout--note::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9.5' stroke='%230057d8' stroke-width='1.6'/%3E%3Cpath d='M12 10.5v6M12 7.6v.9' stroke='%230057d8' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.e2e-callout--tip {
  background: var(--c-pro-bg);
  border-color: #cfe8da;
}

.e2e-callout--tip::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9.2 17.5h5.6M10 20.5h4' stroke='%230f7a45' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M12 3.5a5.8 5.8 0 0 0-3.4 10.5c.6.5.9 1 .9 1.5h5c0-.5.3-1 .9-1.5A5.8 5.8 0 0 0 12 3.5Z' stroke='%230f7a45' stroke-width='1.6'/%3E%3C/svg%3E");
}

.e2e-callout--warning {
  background: var(--c-warn-bg);
  border-color: #f0dcc0;
}

.e2e-callout--warning::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3.8 2.9 19.5h18.2L12 3.8Z' stroke='%23b4690e' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M12 9.8v4.4M12 16.6v.9' stroke='%23b4690e' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.e2e-callout--critical {
  background: var(--c-con-bg);
  border-color: #f2d2ce;
}

.e2e-callout--critical::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9.5' stroke='%23c0342b' stroke-width='1.6'/%3E%3Cpath d='M12 7.4v6M12 15.9v.9' stroke='%23c0342b' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.e2e-callout--tip .e2e-callout__title { color: var(--c-pro); }
.e2e-callout--warning .e2e-callout__title { color: var(--c-warn); }
.e2e-callout--critical .e2e-callout__title { color: var(--c-con); }

/* ============================================================
   3. PROS AND CONS
   ============================================================ */

.e2e-proscons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.e2e-proscons__col {
  border: 1px solid var(--c-line);
  border-radius: var(--c-r);
  padding: 22px 24px;
}

.e2e-proscons__col--pro { background: var(--c-pro-bg); border-color: #cfe8da; }
.e2e-proscons__col--con { background: var(--c-con-bg); border-color: #f2d2ce; }

.e2e-proscons__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .02em;
}

.e2e-proscons__col--pro .e2e-proscons__title { color: var(--c-pro); }
.e2e-proscons__col--con .e2e-proscons__title { color: var(--c-con); }

.e2e-proscons__title::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: none;
  background: center / 11px no-repeat;
}

.e2e-proscons__col--pro .e2e-proscons__title::before {
  background-color: var(--c-pro);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='white' stroke-width='1.9' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.e2e-proscons__col--con .e2e-proscons__title::before {
  background-color: var(--c-con);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.2 3.2l5.6 5.6M8.8 3.2l-5.6 5.6' stroke='white' stroke-width='1.9' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.e2e-proscons ul { display: flex; flex-direction: column; gap: 10px; }

.e2e-proscons li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-body);
}

.e2e-proscons li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 15px;
  height: 15px;
  background: center / contain no-repeat;
}

.e2e-proscons__col--pro li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.4l3.2 3.2L13 5' stroke='%230f7a45' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.e2e-proscons__col--con li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4.2 4.2l7.6 7.6M11.8 4.2l-7.6 7.6' stroke='%23c0342b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ============================================================
   4. CASE STUDY CARD
   ============================================================ */

.e2e-case {
  border: 1px solid var(--c-line);
  border-radius: var(--c-r);
  overflow: hidden;
  background: #fff;
}

.e2e-case__head {
  padding: 26px 30px 22px;
  background: var(--c-tint);
  border-bottom: 1px solid #dbe5f4;
}

.e2e-case__head .e2e-c__label { color: var(--c-blue); margin-bottom: 8px; }

.e2e-case__title {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.32;
  color: var(--c-ink);
}

.e2e-case__meta {
  margin: 0;
  font-size: 14px;
  color: var(--c-muted);
}

.e2e-case__meta span + span::before {
  content: "·";
  margin: 0 8px;
  color: #a9b4c4;
}

.e2e-case__body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  padding: 26px 30px;
}

.e2e-case__h {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-blue);
}

.e2e-case__block p { font-size: 15px; line-height: 1.65; }

.e2e-case__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 22px 30px;
  border-top: 1px solid var(--c-line);
  background: #fbfcfe;
}

.e2e-case__stat strong {
  display: block;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--c-blue);
}

.e2e-case__stat span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--c-muted);
}

.e2e-case__foot { padding: 0 30px 26px; }

.e2e-case__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-blue);
  text-decoration: none;
}

.e2e-case__link::after {
  content: "";
  width: 13px;
  height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.25 12.75 12.75 3.25M5 3.25h7.75V11' stroke='%230057d8' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s ease;
}

.e2e-case__link:hover::after { transform: translate(2px, -2px); }

/* ============================================================
   5. STAT STRIP
   ============================================================ */

.e2e-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--c-line);
  border: 1px solid var(--c-line);
  border-radius: var(--c-r);
  overflow: hidden;
}

.e2e-stats__item { background: #fff; padding: 24px 22px; }

.e2e-stats__item strong {
  display: block;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.025em;
  color: var(--c-ink);
}

.e2e-stats__item span {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--c-muted);
}

/* ============================================================
   6. STEPS
   ============================================================ */

.e2e-steps { counter-reset: e2estep; }

.e2e-steps__item {
  position: relative;
  counter-increment: e2estep;
  padding: 0 0 26px 56px;
}

.e2e-steps__item::before {
  content: counter(e2estep);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.e2e-steps__item::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: 6px;
  width: 1px;
  background: var(--c-line);
}

.e2e-steps__item:last-child { padding-bottom: 0; }
.e2e-steps__item:last-child::after { display: none; }

.e2e-steps__title {
  margin: 5px 0 6px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-ink);
}

/* ============================================================
   7. CHECKLIST
   ============================================================ */

.e2e-checklist {
  border: 1px solid var(--c-line);
  border-radius: var(--c-r);
  padding: 24px 28px;
}

.e2e-checklist ul { display: flex; flex-direction: column; gap: 12px; }

.e2e-checklist li {
  position: relative;
  padding-left: 32px;
  font-size: 16px;
  line-height: 1.6;
}

.e2e-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: 20px;
  height: 20px;
  border-radius: var(--c-r-sm);
  background: var(--c-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='white' stroke-width='1.9' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ============================================================
   8. SPEC LIST  (at a glance)
   ============================================================ */

.e2e-spec {
  border: 1px solid var(--c-line);
  border-radius: var(--c-r);
  overflow: hidden;
}

.e2e-spec__row {
  display: grid;
  grid-template-columns: minmax(140px, 34%) minmax(0, 1fr);
  gap: 20px;
  padding: 15px 24px;
  border-bottom: 1px solid var(--c-line);
}

.e2e-spec__row:last-child { border-bottom: 0; }
.e2e-spec__row:nth-child(odd) { background: #fbfcfe; }

.e2e-spec__row dt {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-muted);
}

.e2e-spec__row dd { margin: 0; font-size: 15px; color: var(--c-ink); }

/* ============================================================
   9. EXPERT QUOTE
   ============================================================ */

.e2e-expert {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  border-radius: var(--c-r);
  background: var(--c-tint);
  padding: 26px 30px;
}

.e2e-expert__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.e2e-expert__quote {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--c-navy);
}

.e2e-expert__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-ink);
}

.e2e-expert__role { margin: 2px 0 0; font-size: 14px; color: var(--c-muted); }

/* ============================================================
   10. SOURCES
   ============================================================ */

.e2e-sources {
  border-top: 2px solid var(--c-ink);
  padding-top: 22px;
}

.e2e-sources .e2e-c__title { margin-bottom: 16px; }

.e2e-sources ol { counter-reset: e2esrc; display: flex; flex-direction: column; gap: 14px; }

.e2e-sources li {
  position: relative;
  counter-increment: e2esrc;
  padding-left: 34px;
  font-size: 15px;
  line-height: 1.55;
}

.e2e-sources li::before {
  content: counter(e2esrc);
  position: absolute;
  left: 0;
  top: 1px;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid var(--c-line);
  border-radius: var(--c-r-sm);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-muted);
}

.e2e-sources__pub { display: block; margin-top: 2px; font-size: 13px; color: var(--c-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 860px) {
  .e2e-case__body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .e2e-case__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .e2e-case__stat strong { font-size: 23px; }
}

@media (max-width: 640px) {
  .e2e-c { margin: 28px 0; }
  .e2e-c p, .e2e-checklist li, .e2e-takeaways li { font-size: 15px; }

  .e2e-takeaways { padding: 22px 20px; }
  .e2e-callout { padding: 18px 18px; gap: 12px; }

  .e2e-proscons { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .e2e-proscons__col { padding: 20px; }

  .e2e-case__head { padding: 22px 20px 18px; }
  .e2e-case__title { font-size: 19px; }
  .e2e-case__body { padding: 22px 20px; }
  .e2e-case__stats { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px; }
  .e2e-case__stat strong { font-size: 26px; }
  .e2e-case__foot { padding: 0 20px 22px; }

  .e2e-stats__item { padding: 20px 18px; }
  .e2e-stats__item strong { font-size: 27px; }

  .e2e-steps__item { padding-left: 46px; padding-bottom: 22px; }
  .e2e-steps__item::before { width: 30px; height: 30px; font-size: 14px; }
  .e2e-steps__item::after { left: 15px; top: 36px; }

  .e2e-checklist { padding: 20px; }

  .e2e-spec__row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 18px; }

  .e2e-expert { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 22px 20px; }
  .e2e-expert__avatar { width: 52px; height: 52px; }
  .e2e-expert__quote { font-size: 16px; }
}

/* ---- Gutenberg block adjustments ---- */
.e2e-c .wp-block-list { margin: 0; padding: 0; list-style: none; }
.e2e-takeaways .wp-block-list { display: flex; flex-direction: column; gap: 10px; }
.e2e-proscons .wp-block-list { display: flex; flex-direction: column; gap: 10px; }
.e2e-checklist .wp-block-list { display: flex; flex-direction: column; gap: 12px; }
.e2e-c .block-editor-block-list__layout { display: contents; }
.e2e-sources__list { counter-reset: e2esrc; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.e2e-sources__item { position: relative; counter-increment: e2esrc; padding-left: 34px; font-size: 15px; line-height: 1.55; }
.e2e-sources__item::before {
  content: counter(e2esrc);
  position: absolute; left: 0; top: 1px;
  width: 23px; height: 23px; display: grid; place-items: center;
  border: 1px solid var(--c-line); border-radius: var(--c-r-sm);
  background: #fff; font-size: 12px; font-weight: 600; color: var(--c-muted);
}
.e2e-sources__link { display: block; color: var(--c-blue); }
.e2e-expert__placeholder { align-self: start; }
.e2e-stats { align-items: stretch; }
