.es2-entity-active {
  margin: 0;
  color: var(--es2-ink);
  background:
    radial-gradient(circle at 72% 8%, rgba(54, 124, 157, 0.1), transparent 28rem),
    linear-gradient(180deg, #05090d 0%, #071017 54%, #05090d 100%);
}

.es2-entity-shell {
  width: min(100%, 1440px);
  min-height: 100vh;
  margin: 0 auto;
  background: transparent;
}

.es2-entity-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.entity-hero {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: end;
  padding: 54px clamp(24px, 4vw, 64px) 38px;
  overflow: hidden;
  border-bottom: 1px solid var(--es2-border);
  background:
    linear-gradient(90deg, rgba(3, 7, 11, 0.98) 0%, rgba(3, 8, 13, 0.82) 42%, rgba(3, 9, 14, 0.28) 100%),
    radial-gradient(circle at 78% 45%, rgba(38, 123, 164, 0.2), transparent 24rem),
    url("/generated/ai/library/library-campaign-action-010.webp") center 44% / cover no-repeat;
}

.entity-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  width: min(100%, 960px);
}

.entity-logo-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(126, 167, 190, 0.24);
  border-radius: 12px;
  background: rgba(3, 8, 12, 0.82);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.entity-logo-wrap img {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: contain;
}

.entity-logo-fallback {
  color: var(--es2-blue-light);
  font: 700 1.7rem/1 var(--es2-font-sans, sans-serif);
  letter-spacing: 0.08em;
}

.entity-eyebrow {
  margin: 0 0 8px;
  color: var(--es2-orange);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.entity-hero h1 {
  max-width: 880px;
  margin: 0;
  font-family: var(--es2-font-display);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.entity-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 0;
  color: var(--es2-ink-secondary);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.entity-hero-meta strong {
  color: var(--es2-ink);
  font-weight: 600;
}

.entity-loading {
  color: var(--es2-ink-muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.entity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  padding: 28px clamp(20px, 3vw, 42px) 48px;
}

.entity-main,
.entity-sidebar {
  min-width: 0;
}

.entity-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.entity-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.entity-section-head,
.entity-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.entity-section-head {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--es2-border);
}

.entity-section-head h2,
.entity-panel-head h2 {
  margin: 0;
  font-family: var(--es2-font-display);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.entity-section-head span {
  color: var(--es2-ink-muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entity-panel {
  overflow: hidden;
  border: 1px solid var(--es2-border);
  border-radius: 8px;
  background: rgba(7, 13, 18, 0.84);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.entity-panel-head {
  margin: 0;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--es2-border);
}

.entity-panel-body {
  padding: 14px 16px;
}

.entity-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.entity-story-card {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--es2-border);
  border-radius: 8px;
  background: rgba(8, 14, 19, 0.9);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.entity-story-card:hover {
  transform: translateY(-2px);
  border-color: rgba(230, 126, 34, 0.45);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.entity-story-image {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #101923, #070c11);
  overflow: hidden;
}

.entity-story-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 300ms ease;
}

.entity-story-card:hover img {
  transform: scale(1.035);
}

.entity-story-copy {
  min-height: 178px;
  padding: 14px 15px 16px;
}

.entity-story-image + .entity-story-copy {
  min-height: 0;
}

.entity-kind {
  color: var(--es2-blue-light);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.entity-story-copy h3 {
  min-height: 2.4em;
  margin: 7px 0 8px;
  font-family: var(--es2-font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.entity-story-copy p {
  margin: 0;
  color: var(--es2-ink-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.entity-campaign-grid,
.entity-overlap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.entity-campaign-card,
.entity-overlap-card {
  padding: 16px;
  border: 1px solid var(--es2-border);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(15, 23, 30, 0.84), rgba(6, 11, 16, 0.94));
}

.entity-campaign-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.entity-status {
  padding: 3px 7px;
  border: 1px solid rgba(230, 126, 34, 0.28);
  border-radius: 3px;
  color: var(--es2-orange);
  background: rgba(230, 126, 34, 0.08);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entity-momentum {
  color: var(--es2-blue-light);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entity-campaign-card h3,
.entity-overlap-card h3 {
  margin: 0 0 5px;
  font: 600 1.02rem/1.25 var(--es2-font-display);
}

.entity-campaign-card p,
.entity-overlap-card p {
  margin: 0;
  color: var(--es2-ink-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.entity-campaign-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--es2-border);
}

.entity-campaign-stats span {
  color: var(--es2-ink-muted);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entity-campaign-stats strong {
  display: block;
  margin-bottom: 3px;
  color: var(--es2-ink);
  font-size: 0.84rem;
  font-weight: 600;
}

.entity-overlap-card {
  border-left: 2px solid var(--es2-blue);
}

.entity-overlap-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 11px 0;
}

.entity-overlap-participants span {
  padding: 3px 7px;
  border: 1px solid rgba(70, 145, 180, 0.2);
  border-radius: 999px;
  color: var(--es2-blue-light);
  background: rgba(42, 118, 154, 0.08);
  font-size: 0.58rem;
}

.entity-battle-list,
.entity-timeline,
.entity-panel-list,
.entity-alliance-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entity-battle-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(100px, 0.7fr) repeat(2, minmax(80px, 0.55fr));
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--es2-border);
  border-radius: 7px;
  background: rgba(8, 14, 19, 0.76);
}

.entity-battle-row strong {
  display: block;
  font: 600 0.9rem/1.25 var(--es2-font-display);
}

.entity-battle-row small,
.entity-battle-metric span {
  color: var(--es2-ink-muted);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entity-battle-metric strong {
  color: var(--es2-orange);
  font-family: inherit;
  font-size: 0.78rem;
}

.entity-timeline-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 12px;
  border-left: 2px solid var(--es2-blue);
  background: rgba(255, 255, 255, 0.018);
  color: var(--es2-ink-secondary);
  font-size: 0.7rem;
}

.entity-timeline-item.campaign { border-left-color: var(--es2-orange); }
.entity-timeline-item.escalation { border-left-color: var(--es2-red); }
.entity-timeline-item time { color: var(--es2-ink-muted); font-size: 0.62rem; }

.entity-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.entity-metric {
  padding: 11px;
  border: 1px solid var(--es2-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.018);
}

.entity-metric strong {
  display: block;
  margin-bottom: 4px;
  color: var(--es2-ink);
  font: 500 1.05rem/1 var(--es2-font-display);
}

.entity-metric span {
  color: var(--es2-ink-muted);
  font-size: 0.54rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.entity-isk-note {
  margin: 11px 0 0;
  color: var(--es2-ink-muted);
  font-size: 0.6rem;
  line-height: 1.45;
}

.entity-panel-row,
.entity-alliance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  color: var(--es2-ink-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--es2-border);
  font-size: 0.68rem;
}

.entity-panel-row:last-child,
.entity-alliance-row:last-child { border-bottom: 0; }
.entity-panel-row:hover,
.entity-alliance-row:hover { color: var(--es2-orange); background: rgba(230, 126, 34, 0.04); }

.entity-alliance-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.entity-alliance-logo {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--es2-border);
  border-radius: 5px;
  color: var(--es2-blue-light);
  background: #071018;
  font-size: 0.6rem;
  font-weight: 700;
}

.entity-alliance-logo img {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  object-fit: contain;
}

.entity-alliance-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-source-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entity-source-links a {
  display: flex;
  justify-content: space-between;
  padding: 9px 10px;
  color: var(--es2-blue-light);
  text-decoration: none;
  border: 1px solid var(--es2-border);
  border-radius: 5px;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.entity-source-links a:hover { color: var(--es2-orange); border-color: rgba(230, 126, 34, 0.35); }

.entity-empty {
  padding: 22px;
  border: 1px dashed var(--es2-border);
  border-radius: 7px;
  color: var(--es2-ink-muted);
  background: rgba(255, 255, 255, 0.012);
  font-size: 0.72rem;
  line-height: 1.5;
}

.entity-footer { margin-top: 0; }

@media (max-width: 1080px) {
  .entity-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}

@media (max-width: 820px) {
  .entity-layout { grid-template-columns: 1fr; }
  .entity-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-sidebar .entity-panel:first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .entity-hero { min-height: 220px; padding: 38px 20px 28px; }
  .entity-hero-content { grid-template-columns: 1fr; gap: 15px; }
  .entity-logo-wrap { width: 76px; height: 76px; }
  .entity-layout { padding: 22px 16px 36px; }
  .entity-story-grid,
  .entity-campaign-grid,
  .entity-overlap-grid,
  .entity-sidebar { grid-template-columns: 1fr; }
  .entity-sidebar .entity-panel:first-child { grid-column: auto; }
  .entity-battle-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .entity-battle-row > :nth-child(2) { display: none; }
  .entity-timeline-item { grid-template-columns: 72px minmax(0, 1fr); }
}
