/* ============================================================
   i2X - Article reader page
   Deep-navy + teal palette matching News & Events.
   `.ar-body-inner` descendant selectors style plain WordPress
   HTML content (p, h2, ul, li, blockquote) without class injection.
   ============================================================ */

.ar-root {
  --ar-bg:               #0B1220;
  --ar-bg-alt:           #0E1828;
  --ar-surface:          #111C30;
  --ar-surface-2:        #142239;
  --ar-border:           #1E2D45;
  --ar-border-soft:      rgba(30,45,69,0.6);
  --ar-accent:           #0D7A8A;
  --ar-accent-bg-strong: #0D2A2E;
  --ar-highlight:        #4DC8D4;
  --ar-text:             #C8D4E8;
  --ar-text-strong:      #E7EEF9;
  --ar-muted:            #6B7FA0;
  --ar-white:            #FFFFFF;

  font-family: "Inter", system-ui, sans-serif;
  color: var(--ar-text);
  background: var(--ar-bg);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden; overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
.ar-root *, .ar-root *::before, .ar-root *::after { box-sizing: border-box; }
.ar-root img, .ar-root video, .ar-root svg { max-width: 100%; height: auto; }
.ar-root a { color: var(--ar-highlight); text-decoration: none; }
.ar-root a:hover { text-decoration: underline; }

/* ── Breadcrumb ────────────────────────────────────────────── */
.ar-topbar {
  padding: 32px 40px 0;
  background: var(--ar-bg);
}
.ar-topbar-inner { max-width: 760px; margin: 0 auto; }
.ar-crumb {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px; font-size: 13px; color: var(--ar-muted); line-height: 1.4;
}
.ar-crumb a {
  color: var(--ar-muted); font-weight: 500; text-decoration: none; transition: color 140ms;
}
.ar-crumb a:hover { color: var(--ar-highlight); text-decoration: underline; }
.ar-crumb-sep { color: var(--ar-muted); opacity: 0.55; }
.ar-crumb-current {
  color: var(--ar-text); font-weight: 500;
  max-width: 52ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Hero ──────────────────────────────────────────────────── */
.ar-hero { padding: 32px 40px 0; background: var(--ar-bg); }
.ar-hero-inner { max-width: 760px; margin: 0 auto; }
.ar-cat {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ar-highlight);
  background: var(--ar-accent-bg-strong);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 20px;
}
.ar-title {
  font-size: 44px; font-weight: 600;
  color: var(--ar-white);
  letter-spacing: -0.02em; line-height: 1.1;
  margin: 0 0 18px; text-wrap: balance;
}
.ar-deck {
  font-size: 19px; font-weight: 400;
  color: var(--ar-text); line-height: 1.55;
  margin: 0 0 32px; max-width: 60ch; text-wrap: pretty;
}
.ar-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--ar-border-soft);
  border-bottom: 1px solid var(--ar-border-soft);
  margin: 0 0 36px;
}
.ar-wp-badge {
  display: inline-flex; align-items: center; gap: 8px;
}
.ar-wp-code {
  font-family: "Red Hat Mono", monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--ar-highlight);
  background: rgba(77,200,212,0.14);
  padding: 3px 9px; border-radius: 4px;
}
.ar-wp-title {
  font-size: 13px; font-weight: 500;
  color: var(--ar-text);
}
.ar-meta-info {
  font-size: 13px; color: var(--ar-muted);
}
.ar-meta-info strong { color: var(--ar-text); font-weight: 500; }

/* Hero gradient image */
.ar-hero-media {
  height: 320px; border-radius: 18px;
  background: linear-gradient(135deg, #1a2747, #0d2a2e);
  position: relative; overflow: hidden; margin: 0 0 48px;
}
.ar-hero-media[data-tone="teal"]   { background: linear-gradient(135deg, #0d2a2e, #0D7A8A); }
.ar-hero-media[data-tone="navy"]   { background: linear-gradient(135deg, #0B1220, #1a2747); }
.ar-hero-media[data-tone="mixed"]  { background: linear-gradient(135deg, #142239, #0D7A8A); }
.ar-hero-media[data-tone="purple"] { background: linear-gradient(135deg, #1f1c40, #3a3573); }
.ar-hero-media[data-tone="amber"]  { background: linear-gradient(135deg, #2a1c10, #6b3e1b); }
.ar-hero-media::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 25% 30%, rgba(77,200,212,0.20), transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(13,122,138,0.25), transparent 50%);
}
.ar-hero-media::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, transparent 49%, rgba(255,255,255,0.04) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(255,255,255,0.04) 50%, transparent 51%);
  background-size: 72px 72px;
  mask-image: linear-gradient(135deg, black, transparent);
}
/* When a featured image is set */
.ar-hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 0;
}
.ar-hero-media.has-image::before,
.ar-hero-media.has-image::after { display: none; }
.ar-hero-media.has-image {
  background: #0D1226;
  height: 460px;
  border-radius: 12px;
}

/* ── Article body ──────────────────────────────────────────── */
.ar-body { background: var(--ar-bg); padding: 0 40px; }
.ar-body-inner { max-width: 720px; margin: 0 auto; padding-bottom: 64px; }

/* Style plain WordPress content elements AND explicit classes */
.ar-p,
.ar-body-inner > p {
  font-size: 17px; line-height: 1.75;
  color: var(--ar-text); margin: 0 0 22px;
  font-weight: 400; text-wrap: pretty;
}
.ar-h2,
.ar-body-inner h2 {
  font-size: 26px; font-weight: 600;
  color: var(--ar-white);
  letter-spacing: -0.015em; line-height: 1.25;
  margin: 40px 0 18px; text-wrap: balance;
}
.ar-ul,
.ar-body-inner ul {
  list-style: none; padding: 0; margin: 0 0 26px;
  display: flex; flex-direction: column; gap: 12px;
}
.ar-li,
.ar-body-inner li {
  position: relative; padding-left: 24px;
  font-size: 17px; line-height: 1.65; color: var(--ar-text);
}
.ar-li::before,
.ar-body-inner li::before {
  content: "";
  position: absolute; left: 0; top: 11px;
  width: 7px; height: 7px;
  border-radius: 2px; background: var(--ar-accent);
}
.ar-quote,
.ar-body-inner blockquote {
  margin: 36px 0; padding: 28px 32px 28px 36px;
  border-left: 3px solid var(--ar-accent);
  background: var(--ar-surface);
  border-radius: 0 14px 14px 0;
  font-size: 22px; font-weight: 500;
  color: var(--ar-white);
  letter-spacing: -0.01em; line-height: 1.4;
  font-style: italic; position: relative;
}
.ar-quote::before,
.ar-body-inner blockquote::before {
  content: "\201C";
  position: absolute; top: 4px; left: 14px;
  font-size: 48px; line-height: 1;
  color: var(--ar-accent); opacity: 0.55;
  font-family: Georgia, serif; font-style: normal;
}
.ar-quote p,
.ar-body-inner blockquote p { margin: 0; }
.ar-body-inner strong,
.ar-body-inner b { color: var(--ar-white); font-weight: 600; }

/* ── YouTube embed ─────────────────────────────────────────── */
.ar-youtube {
  position: relative; margin: 36px 0;
  padding-bottom: 56.25%; height: 0;
  border-radius: 14px; overflow: hidden;
  background: var(--ar-surface);
}
.ar-youtube iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: none;
}

/* ── Related articles ──────────────────────────────────────── */
.ar-related {
  background: var(--ar-bg);
  padding: 64px 40px 80px;
  border-top: 1px solid var(--ar-border-soft);
  margin-top: 64px;
}
.ar-related-inner { max-width: 1180px; margin: 0 auto; }
.ar-related-h {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ar-accent); margin: 0 0 12px;
}
.ar-related-t {
  font-size: 26px; font-weight: 600;
  color: var(--ar-white); letter-spacing: -0.015em; margin: 0 0 28px;
}
.ar-related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.ar-rel-card {
  background: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 160ms, transform 160ms; text-decoration: none;
}
.ar-rel-card:hover { border-color: var(--ar-accent); transform: translateY(-2px); }
.ar-rel-media {
  height: 120px;
  background: linear-gradient(135deg, #1a2747, #0d2a2e);
  position: relative;
}
.ar-rel-media[data-tone="teal"]   { background: linear-gradient(135deg, #0d2a2e, #0D7A8A); }
.ar-rel-media[data-tone="navy"]   { background: linear-gradient(135deg, #0B1220, #1a2747); }
.ar-rel-media[data-tone="mixed"]  { background: linear-gradient(135deg, #142239, #0D7A8A); }
.ar-rel-media[data-tone="purple"] { background: linear-gradient(135deg, #1f1c40, #3a3573); }
.ar-rel-media[data-tone="amber"]  { background: linear-gradient(135deg, #2a1c10, #6b3e1b); }
.ar-rel-media::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.10), transparent 55%);
}
.ar-rel-media-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.ar-rel-media.has-image::before { display: none; }
.ar-rel-media.has-image { background: #0D1226; }
.ar-rel-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.ar-rel-meta {
  font-size: 11px; color: var(--ar-muted); font-weight: 500;
  letter-spacing: 0.04em; display: flex; align-items: center; gap: 8px;
}
.ar-rel-meta strong {
  color: var(--ar-highlight); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.ar-rel-t {
  font-size: 14.5px; font-weight: 600;
  color: var(--ar-white); letter-spacing: -0.005em;
  line-height: 1.35; margin: 0; text-wrap: balance;
}
.ar-rel-foot { margin-top: auto; font-size: 12px; color: var(--ar-muted); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 840px) {
  .ar-title { font-size: 36px; }
  .ar-deck { font-size: 17px; }
  .ar-hero-media { height: 220px; }
  .ar-hero-media.has-image { height: 340px; }
  .ar-related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .ar-topbar, .ar-hero, .ar-body, .ar-related { padding-left: 24px; padding-right: 24px; }
  .ar-title { font-size: 30px; }
  .ar-quote, .ar-body-inner blockquote { font-size: 18px; padding: 22px 22px 22px 28px; }
  .ar-related-grid { grid-template-columns: 1fr; }
  .ar-hero-media.has-image { height: 260px; }
}
