.meta-page {
  --meta-red: #e62132;
  --meta-ink: #17212b;
  --meta-muted: #65717d;
  --meta-line: #dfe4e8;
  --meta-paper: #ffffff;
  --meta-wash: #f5f7f8;
  --meta-green: #13795b;
  --meta-amber: #9a5b00;
  color: var(--meta-ink);
  max-width: 1480px;
  margin: 0 auto;
  padding: 6px 0 64px;
}

.meta-page * { box-sizing: border-box; }
.meta-page button, .meta-page input { font: inherit; }
.meta-page a { color: inherit; }
.content.meta-content-wide { max-width: 1500px; }
.meta-page .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.meta-account-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(520px, 1.2fr);
  gap: 36px;
  overflow: hidden;
  padding: 32px 34px 30px 40px;
  border: 1px solid var(--meta-line);
  background: var(--meta-paper);
  box-shadow: 0 18px 50px rgba(23, 33, 43, .07);
}

.meta-account-head::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--meta-red);
  content: "";
}

.meta-kicker, .meta-section-label {
  display: block;
  margin-bottom: 8px;
  color: var(--meta-red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.meta-account-copy h1 {
  max-width: 680px;
  margin: 0;
  color: var(--meta-ink);
  font-size: clamp(30px, 3vw, 48px);
  font-weight: 760;
  letter-spacing: -.045em;
  line-height: .98;
}

.meta-account-copy p {
  max-width: 650px;
  margin: 16px 0 0;
  color: var(--meta-muted);
  font-size: 15px;
  line-height: 1.55;
}
.meta-account-copy p strong { color: var(--meta-ink); font-weight: 760; }

.meta-account-strip {
  display: grid;
  grid-template-columns: 1.1fr .7fr 1fr;
  align-items: stretch;
  margin: 0;
  border: 1px solid var(--meta-line);
  background: var(--meta-wash);
}

.meta-account-strip div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 18px 20px;
  border-left: 1px solid var(--meta-line);
}

.meta-account-strip div:first-child { border-left: 0; }
.meta-account-strip dt, .meta-entity-head dt, .meta-facts dt {
  color: var(--meta-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.meta-account-strip dd {
  margin: 8px 0 0;
  color: var(--meta-ink);
  font-size: clamp(20px, 2vw, 30px);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  letter-spacing: -.035em;
}

.meta-account-strip dd.is-date { font-size: 15px; line-height: 1.25; }

.meta-notice {
  margin: 14px 0 0;
  padding: 12px 16px;
  border-left: 4px solid #8a98a5;
  background: #eef2f4;
  color: #4e5b66;
  font-size: 13px;
}

.meta-notice.is-running { border-color: #1677a3; background: #edf7fb; }
.meta-notice.is-error { border-color: var(--meta-red); background: #fff0f1; color: #7d1b25; }

.meta-workbench, .meta-children, .meta-target, .meta-assets {
  margin-top: 26px;
  border: 1px solid var(--meta-line);
  background: var(--meta-paper);
}

.meta-toolbar {
  display: grid;
  grid-template-columns: auto minmax(520px, 1fr);
  gap: 30px;
  align-items: end;
  padding: 24px;
  border-bottom: 1px solid var(--meta-line);
}

.meta-toolbar h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.meta-filter-stack { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }
.meta-filter-line { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--meta-line); background: var(--meta-wash); }
.meta-filter-line button { padding: 7px 10px; border: 0; background: transparent; color: var(--meta-muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.meta-filter-line button:hover { color: var(--meta-ink); }
.meta-filter-line button.is-active { background: var(--meta-ink); color: #fff; box-shadow: 0 3px 8px rgba(23, 33, 43, .18); }

.meta-search { position: relative; min-width: 190px; flex: 1 1 190px; }
.meta-search::before { position: absolute; top: 9px; left: 11px; color: #8b97a1; content: "⌕"; font-size: 18px; }
.meta-search input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--meta-line); outline: 0; color: var(--meta-ink); background: #fff; }
.meta-search input:focus { border-color: var(--meta-red); box-shadow: 0 0 0 3px rgba(230, 33, 50, .12); }

.meta-table-head, .meta-table-row {
  display: grid;
  grid-template-columns: minmax(300px, 1.7fr) minmax(145px, .65fr) minmax(170px, .8fr) minmax(140px, .65fr) 28px;
  gap: 18px;
  align-items: center;
}

.meta-table-head { padding: 11px 20px; background: var(--meta-wash); color: var(--meta-muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.meta-table-row { min-height: 92px; padding: 16px 20px; border-top: 1px solid var(--meta-line); text-decoration: none; transition: background .16s ease, transform .16s ease; }
.meta-table-head + .meta-table-row { border-top: 0; }
.meta-table-row:hover { position: relative; z-index: 1; background: #fafbfc; box-shadow: inset 4px 0 0 var(--meta-red); transform: translateX(2px); }
.meta-name-cell { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.meta-name-cell strong { max-width: 100%; overflow: hidden; margin-top: 6px; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.meta-name-cell small { margin-top: 4px; color: var(--meta-muted); }

.meta-segment { display: inline-flex; padding: 3px 6px; background: #edf0f2; color: #56616b; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.meta-segment.is-mkt { background: #edf4ff; color: #265b9d; }
.meta-segment.is-ecomm { background: #f4edff; color: #6741a5; }
.meta-status-line { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.meta-status { display: inline-flex; align-items: center; gap: 7px; color: #5b6670; font-size: 12px; font-weight: 750; }
.meta-status i { width: 7px; height: 7px; border-radius: 50%; background: #87929b; }
.meta-status.is-active { color: var(--meta-green); }
.meta-status.is-active i { background: #18a875; box-shadow: 0 0 0 4px rgba(24, 168, 117, .12); }
.meta-status.is-archived { color: var(--meta-amber); }
.meta-status.is-archived i { background: #c77d12; }
.meta-raw { display: block; margin-top: 5px; color: #8b969f; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.meta-money { font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 650; }
.meta-money.is-spend { font-size: 15px; font-weight: 780; }
.meta-row-arrow { color: var(--meta-red); font-size: 20px; font-weight: 700; }
.meta-period { margin: 0; padding: 12px 20px; border-top: 1px solid var(--meta-line); color: var(--meta-muted); font-size: 11px; }

.meta-back-link {
  display: inline-flex;
  align-items: center;
  margin-top: 24px;
  color: var(--meta-red);
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
}
.meta-back-link:hover { text-decoration: underline; }

.meta-lineage {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 10px 0 14px;
  overflow-x: auto;
  border: 1px solid var(--meta-line);
  background: #fff;
}

.meta-lineage a, .meta-lineage span { display: flex; min-width: 180px; max-width: 420px; flex: 1 1 240px; flex-direction: column; padding: 12px 16px; text-decoration: none; }
.meta-lineage a:hover { background: var(--meta-wash); }
.meta-lineage small { color: var(--meta-red); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.meta-lineage strong { overflow: hidden; margin-top: 3px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.meta-lineage i { display: flex; align-items: center; color: var(--meta-red); font-size: 25px; font-style: normal; }

.meta-entity-head { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 32px; padding: 28px 30px; border: 1px solid var(--meta-line); border-top: 5px solid var(--meta-red); background: #fff; }
.meta-entity-head h2 { max-width: 900px; margin: 0; font-size: clamp(24px, 3vw, 38px); letter-spacing: -.04em; line-height: 1.08; }
.meta-entity-head dl { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); min-width: 360px; margin: 0; border: 1px solid var(--meta-line); background: var(--meta-wash); }
.meta-entity-head dl div { padding: 16px; border-left: 1px solid var(--meta-line); }
.meta-entity-head dl div:first-child { border-left: 0; }
.meta-entity-head dd { margin: 7px 0 0; font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 760; }

.meta-facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: solid var(--meta-line); border-width: 0 1px 1px; background: var(--meta-wash); }
.meta-facts div { padding: 15px 20px; border-left: 1px solid var(--meta-line); }
.meta-facts div:first-child { border-left: 0; }
.meta-facts dd { margin: 5px 0 0; font-size: 13px; }
.meta-audience-guide { display: flex; gap: 10px 24px; align-items: baseline; padding: 15px 20px; border: solid var(--meta-line); border-width: 0 1px 1px; background: #fff6f7; }
.meta-audience-guide strong { color: var(--meta-red); font-size: 12px; }
.meta-audience-guide span { color: var(--meta-muted); font-size: 12px; }
.meta-section-title { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 22px; border-bottom: 1px solid var(--meta-line); }
.meta-section-title span { font-size: 14px; font-weight: 780; }
.meta-section-title strong { display: grid; min-width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--meta-ink); color: white; font-size: 11px; }
.meta-section-title small { color: var(--meta-muted); }

.meta-child-row { display: grid; grid-template-columns: minmax(240px, 1fr) 180px 24px; gap: 20px; align-items: center; min-height: 76px; padding: 14px 22px; border-top: 1px solid var(--meta-line); text-decoration: none; }
.meta-section-title + .meta-child-row { border-top: 0; }
.meta-child-row:hover { background: var(--meta-wash); box-shadow: inset 4px 0 0 var(--meta-red); }
.meta-child-row > span:first-child { display: flex; min-width: 0; flex-direction: column; }
.meta-child-row strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.meta-child-row small { margin-top: 5px; color: var(--meta-muted); font-variant-numeric: tabular-nums; }
.meta-child-row .meta-child-audience { overflow: hidden; color: #9a2933; text-overflow: ellipsis; white-space: nowrap; }
.meta-child-row b { color: var(--meta-red); font-size: 18px; }

.meta-target-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.meta-target-grid.is-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.meta-target-card { min-height: 170px; padding: 22px; border-left: 1px solid var(--meta-line); }
.meta-target-card:first-child { border-left: 0; }
.meta-target-card > span { color: var(--meta-red); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.meta-target-card strong { display: block; margin-top: 14px; font-size: 15px; line-height: 1.45; }
.meta-target-card small { display: block; margin-top: 10px; color: var(--meta-muted); line-height: 1.45; }
.meta-detailed-targeting { border-top: 1px solid var(--meta-line); background: #fff; }
.meta-detailed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 18px 22px; }
.meta-detailed-head span { font-size: 15px; font-weight: 800; }
.meta-detailed-head small { color: var(--meta-muted); }
.meta-detailed-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--meta-line); }
.meta-audience-group { min-height: 130px; padding: 20px 22px; border-left: 1px solid var(--meta-line); }
.meta-audience-group:first-child { border-left: 0; }
.meta-audience-group small { display: block; color: var(--meta-red); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.meta-audience-group strong { display: block; margin-top: 12px; font-size: 14px; line-height: 1.5; }
.meta-audience-group strong.is-empty { color: var(--meta-muted); font-weight: 560; }
.meta-detailed-targeting > p { margin: 0; padding: 12px 22px; border-top: 1px solid var(--meta-line); color: var(--meta-muted); font-size: 11px; }

.meta-assets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.meta-assets .meta-section-title { grid-column: 1 / -1; }
.meta-asset-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; min-height: 150px; padding: 16px; border: 0; border-right: 1px solid var(--meta-line); border-bottom: 1px solid var(--meta-line); background: #fff; color: inherit; text-align: left; cursor: pointer; }
.meta-asset-card:hover { background: var(--meta-wash); }
.meta-asset-preview { position: relative; display: grid; overflow: hidden; aspect-ratio: 1 / 1; place-items: center; background: #e8ecef; }
.meta-asset-preview img { width: 100%; height: 100%; object-fit: cover; }
.meta-media-fallback { color: #7b8791; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.meta-play { position: absolute; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: rgba(23, 33, 43, .82); color: #fff; font-size: 13px; font-style: normal; }
.meta-asset-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.meta-asset-copy small { color: var(--meta-red); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.meta-asset-copy strong { overflow: hidden; margin-top: 6px; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.meta-asset-copy span { margin-top: 8px; color: var(--meta-muted); font-size: 11px; }

.meta-empty { display: flex; min-height: 220px; flex-direction: column; align-items: center; justify-content: center; padding: 34px; text-align: center; }
.meta-empty strong { font-size: 19px; }
.meta-empty span { margin-top: 7px; color: var(--meta-muted); }
.meta-empty.is-compact { min-height: 110px; }

body.meta-modal-open { overflow: hidden; }
.meta-modal { position: fixed; z-index: 1200; inset: 0; display: grid; grid-template-columns: 70px minmax(0, 1fr) 70px; grid-template-rows: minmax(0, 1fr) auto; background: rgba(10, 15, 20, .96); color: #fff; }
.meta-modal[hidden] { display: none; }
.meta-modal-stage { display: grid; min-width: 0; min-height: 0; grid-column: 2; place-items: center; padding: 32px; }
.meta-modal-stage img, .meta-modal-stage video { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; box-shadow: 0 20px 70px rgba(0, 0, 0, .45); }
.meta-modal-missing { max-width: 420px; color: #c9d0d6; text-align: center; }
.meta-modal-close, .meta-modal-nav { border: 0; background: transparent; color: #fff; cursor: pointer; }
.meta-modal-close { position: absolute; z-index: 2; top: 18px; right: 22px; width: 44px; height: 44px; font-size: 34px; }
.meta-modal-nav { display: grid; grid-row: 1; place-items: center; font-size: 52px; opacity: .72; }
.meta-modal-nav:hover { opacity: 1; }
.meta-modal-nav.is-prev { grid-column: 1; }
.meta-modal-nav.is-next { grid-column: 3; }
.meta-modal-caption { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 30px; padding: 18px 28px; border-top: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.28); }
.meta-modal-caption div { display: flex; min-width: 0; flex-direction: column; }
.meta-modal-caption small { color: #ff7a86; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.meta-modal-caption strong { overflow: hidden; margin-top: 3px; text-overflow: ellipsis; white-space: nowrap; }
.meta-modal-caption > span { color: #b9c1c7; font-size: 12px; white-space: nowrap; }

.meta-page button:focus-visible, .meta-page a:focus-visible, .meta-page input:focus-visible { outline: 3px solid rgba(230, 33, 50, .32); outline-offset: 2px; }

@media (max-width: 1100px) {
  .meta-account-head { grid-template-columns: 1fr; }
  .meta-toolbar { grid-template-columns: 1fr; }
  .meta-filter-stack { justify-content: flex-start; }
  .meta-table-head, .meta-table-row { grid-template-columns: minmax(260px, 1.5fr) 140px 150px 130px 24px; gap: 12px; }
  .meta-target-grid { grid-template-columns: repeat(2, 1fr); }
  .meta-target-grid.is-summary { grid-template-columns: repeat(2, 1fr); }
  .meta-target-card:nth-child(3) { border-left: 0; border-top: 1px solid var(--meta-line); }
  .meta-target-card:nth-child(4) { border-top: 1px solid var(--meta-line); }
  .meta-detailed-grid { grid-template-columns: repeat(2, 1fr); }
  .meta-audience-group:nth-child(3) { border-top: 1px solid var(--meta-line); border-left: 0; }
  .meta-audience-group:nth-child(4) { border-top: 1px solid var(--meta-line); }
  .meta-assets { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .meta-page { padding-top: 58px; }
  .meta-account-head { gap: 24px; padding: 25px 18px 22px 25px; }
  .meta-account-copy h1 { font-size: 32px; }
  .meta-account-strip { grid-template-columns: 1fr; }
  .meta-account-strip div { border-top: 1px solid var(--meta-line); border-left: 0; }
  .meta-account-strip div:first-child { border-top: 0; }
  .meta-filter-stack { display: grid; }
  .meta-filter-line { overflow-x: auto; }
  .meta-table-head { display: none; }
  .meta-table { display: grid; gap: 12px; padding: 12px; background: var(--meta-wash); }
  .meta-table-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px; border: 1px solid var(--meta-line); background: #fff; }
  .meta-table-row > span::before { display: block; margin-bottom: 5px; color: var(--meta-muted); content: attr(data-label); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
  .meta-table-row .meta-name-cell { grid-column: 1 / -1; }
  .meta-table-row .meta-name-cell::before, .meta-row-arrow { display: none; }
  .meta-entity-head { grid-template-columns: 1fr; padding: 24px 18px; }
  .meta-entity-head dl { min-width: 0; }
  .meta-facts { grid-template-columns: repeat(2, 1fr); }
  .meta-facts div:nth-child(3) { border-left: 0; border-top: 1px solid var(--meta-line); }
  .meta-facts div:nth-child(4) { border-top: 1px solid var(--meta-line); }
  .meta-child-row { grid-template-columns: 1fr 20px; }
  .meta-child-status { grid-column: 1; }
  .meta-child-row b { grid-column: 2; grid-row: 1 / span 2; }
  .meta-target-grid, .meta-assets { grid-template-columns: 1fr; }
  .meta-target-grid.is-summary, .meta-detailed-grid { grid-template-columns: 1fr; }
  .meta-target-card { min-height: 0; border-top: 1px solid var(--meta-line); border-left: 0; }
  .meta-target-card:first-child { border-top: 0; }
  .meta-audience-guide, .meta-detailed-head { align-items: flex-start; flex-direction: column; }
  .meta-audience-group { min-height: 0; border-top: 1px solid var(--meta-line); border-left: 0; }
  .meta-audience-group:first-child { border-top: 0; }
  .meta-asset-card { grid-template-columns: 110px minmax(0, 1fr); }
  .meta-modal { grid-template-columns: 46px minmax(0, 1fr) 46px; }
  .meta-modal-stage { padding: 20px 6px; }
  .meta-modal-caption { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .meta-table-row { transition: none; }
}
