/**
 * NC.EL.75 — CCU News electronic magazine (NYT-inspired layout)
 * Fonts: Libre Baskerville (headlines) + Inter (UI) — loaded via news.php headExtra
 */

body.nc-el-university-theme .nc-mag {
  --nc-mag-ink: #121212;
  --nc-mag-muted: #5c5c5c;
  --nc-mag-rule: #e2e2e2;
  --nc-mag-accent: #1a3a5c;
  --nc-mag-crimson: #c41e3a;
  --nc-mag-paper: #fafafa;
  --nc-mag-gold: #b8860b;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--nc-mag-ink);
  background: var(--nc-mag-paper);
  margin: 0 auto 2rem;
  max-width: none;
  width: 100%;
  padding: 0 clamp(1rem, 3vw, 2.5rem) 2rem;
  box-sizing: border-box;
}

/* Masthead */
.nc-mag-masthead {
  text-align: center;
  border-bottom: 2px solid var(--nc-mag-ink);
  padding: 1.25rem 0 0.75rem;
  margin-bottom: 0.5rem;
}
.nc-mag-masthead-top {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nc-mag-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.65rem;
}
.nc-mag-masthead-top a {
  color: var(--nc-mag-accent);
  text-decoration: none;
  font-weight: 600;
}
.nc-mag-masthead-sep { opacity: 0.45; }
.nc-mag-datetime {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--nc-mag-ink);
  letter-spacing: 0.04em;
}
.nc-mag-title {
  font-family: 'Libre Baskerville', 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
}
.nc-mag-title a {
  color: var(--nc-mag-ink);
  text-decoration: none;
}
.nc-mag-tagline {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nc-mag-muted);
  margin: 0.5rem 0 0.65rem;
}

/* Engagement strip — columns under tagline (replaces sidebar) */
.nc-mag-engagement {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
  gap: 0.75rem 1.25rem;
  align-items: start;
  text-align: left;
  border-top: 1px solid var(--nc-mag-rule);
  border-bottom: 1px solid var(--nc-mag-rule);
  padding: 0.75rem 0 0.85rem;
  margin: 0 0 0.85rem;
}
.nc-mag-engagement-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
}
.nc-mag-engagement-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0.5rem;
  border-left: 3px solid var(--nc-mag-accent);
  background: #fff;
}
.nc-mag-engagement-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nc-mag-muted);
}
.nc-mag-engagement-value {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--nc-mag-ink);
  line-height: 1.1;
}
.nc-mag-engagement-online { color: #15803d; }
.nc-mag-engagement-countries-title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nc-mag-muted);
  margin: 0 0 0.35rem;
}
.nc-mag-engagement-country-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nc-mag-engagement-country-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  background: #fff;
  border: 1px solid var(--nc-mag-rule);
  border-radius: 2px;
}
.nc-mag-engagement-country-list .ccu-news-stats-country-views {
  font-weight: 700;
  color: var(--nc-mag-accent);
}
.nc-mag-engagement-note {
  font-size: 0.68rem;
  margin: 0.35rem 0 0;
  line-height: 1.35;
}
.nc-mag-engagement-empty { font-size: 0.78rem; margin: 0; }
.nc-mag-masthead-live {
  color: var(--nc-mag-crimson);
  font-weight: 600;
}

/* Classified sections (NYT-style zones) */
.nc-mag-classified {
  margin: 0 0 2rem;
  border-bottom: 3px double var(--nc-mag-ink);
  padding-bottom: 1.5rem;
}
.nc-mag-classified-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--nc-mag-ink);
}
.nc-mag-classified-tab {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--nc-mag-ink);
  color: var(--nc-mag-ink);
  text-decoration: none;
  background: #fff;
}
.nc-mag-classified-tab:hover { background: #f0f0f0; }
.nc-mag-classified-tab.is-active {
  background: var(--nc-mag-ink);
  color: #fff;
}
.nc-mag-classified-tab--sponsor {
  margin-left: auto;
  border-color: var(--nc-mag-gold);
  color: var(--nc-mag-gold);
  background: #fffbeb;
}
.nc-mag-classified-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.nc-mag-classified-zone {
  border-top: 4px solid var(--nc-mag-ink);
  padding-top: 0.65rem;
  min-width: 0;
}
.nc-mag-classified-zone--video { border-top-color: #7c3aed; }
.nc-mag-classified-zone--audio { border-top-color: #0d9488; }
.nc-mag-classified-zone--writing { border-top-color: var(--nc-mag-crimson); }
.nc-mag-classified-zone-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 0.95rem;
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nc-mag-classified-zone-dek {
  font-size: 0.78rem;
  color: var(--nc-mag-muted);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}
.nc-mag-classified-zone-dek a { color: var(--nc-mag-accent); font-weight: 600; }
.nc-mag-classified-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nc-mag-accent);
  text-decoration: none;
}
.nc-mag-classified-empty { font-size: 0.82rem; margin: 0; }

/* Sponsor placements */
.nc-mag-sponsor {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid var(--nc-mag-gold);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  text-align: center;
}
.nc-mag-sponsor[data-nc-sponsor-slot="classified-rail"] {
  grid-column: auto;
  align-self: start;
  margin: 0;
  padding: 0.85rem;
  text-align: left;
}
.nc-mag-sponsor-kicker {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nc-mag-gold);
  margin-bottom: 0.35rem;
}
.nc-mag-sponsor-headline {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #78350f;
}
.nc-mag-sponsor-copy {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #92400e;
  margin: 0 0 0.65rem;
}
.nc-mag-sponsor-cta {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--nc-mag-gold);
  padding: 0.45rem 0.85rem;
  border-radius: 2px;
  text-decoration: none;
}
.nc-mag-sponsor-cta:hover { background: #996515; }

.nc-mag-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  border-top: 1px solid var(--nc-mag-rule);
  padding-top: 0.65rem;
}
.nc-mag-nav-item {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.65rem;
  color: var(--nc-mag-ink);
  text-decoration: none;
  border-radius: 2px;
}
.nc-mag-nav-item:hover { background: #eee; }
.nc-mag-nav-item.is-active {
  background: var(--nc-mag-ink);
  color: #fff;
}

/* Course rail */
.nc-mag-course-rail {
  border-bottom: 1px solid var(--nc-mag-rule);
  padding: 0.65rem 0 0.85rem;
  margin-bottom: 1.25rem;
}
.nc-mag-course-rail-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nc-mag-muted);
  margin-bottom: 0.45rem;
}
.nc-mag-course-rail-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}
.nc-mag-course-chip {
  flex: 0 0 auto;
  font-size: 0.72rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--nc-mag-rule);
  border-radius: 999px;
  color: var(--nc-mag-ink);
  text-decoration: none;
  white-space: nowrap;
  background: #fff;
}
.nc-mag-course-chip:hover { border-color: var(--nc-mag-accent); color: var(--nc-mag-accent); }
.nc-mag-course-chip.is-active {
  background: var(--nc-mag-accent);
  border-color: var(--nc-mag-accent);
  color: #fff;
}
.nc-mag-course-chip--propose {
  border-style: dashed;
  color: var(--nc-mag-crimson);
}

/* Section head */
.nc-mag-section-head {
  border-bottom: 1px solid var(--nc-mag-rule);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.nc-mag-section-head h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.65rem;
  margin: 0 0 0.35rem;
}
.nc-mag-section-head p {
  color: var(--nc-mag-muted);
  margin: 0 0 0.5rem;
  max-width: 52rem;
}

/* Degree badges */
.nc-mag-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  margin-right: 0.35rem;
}
.nc-mag-badge--aa { background: #e0f2fe; color: #0c4a6e; }
.nc-mag-badge--bba { background: #ede9fe; color: #4c1d95; }
.nc-mag-badge--mba { background: #fef3c7; color: #92400e; }
.nc-mag-badge--product { background: #fce7f3; color: #9d174d; }
.nc-mag-badge--general { background: #f1f5f9; color: #475569; }

/* Layout body */
.nc-mag-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
.nc-mag-main { min-width: 0; }

/* Lead story */
.nc-mag-lead {
  border-bottom: 1px solid var(--nc-mag-rule);
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
}
.nc-mag-card--lead .nc-mag-card-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  line-height: 1.15;
  margin: 0.5rem 0 0.65rem;
}
.nc-mag-card--lead .nc-mag-card-dek {
  font-size: 1.12rem;
  line-height: 1.55;
  color: #333;
}

/* Card grid */
.nc-mag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
  margin-bottom: 2rem;
}
.nc-mag-card {
  border-top: 1px solid var(--nc-mag-ink);
  padding-top: 0.75rem;
}
.nc-mag-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.72rem;
  color: var(--nc-mag-muted);
  margin-bottom: 0.35rem;
}
.nc-mag-card-section {
  font-weight: 600;
  color: var(--nc-mag-accent);
}
.nc-mag-card-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0 0 0.45rem;
}
.nc-mag-card-title a {
  color: var(--nc-mag-ink);
  text-decoration: none;
}
.nc-mag-card-title a:hover { text-decoration: underline; }
.nc-mag-card-dek {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #444;
  margin: 0;
}
.nc-mag-card-format {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nc-mag-muted);
}
.nc-mag-card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 0.65rem;
  border-radius: 2px;
}
.nc-mag-card--compact {
  border-top: none;
  padding-top: 0;
  margin-bottom: 0.85rem;
}
.nc-mag-card--compact .nc-mag-card-title { font-size: 1rem; }

/* By degree blocks */
.nc-mag-by-degree {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  border-top: 3px double var(--nc-mag-rule);
  padding-top: 1.5rem;
}
.nc-mag-degree-heading {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--nc-mag-ink);
  padding-bottom: 0.35rem;
  margin: 0 0 0.85rem;
}
.nc-mag-more {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--nc-mag-accent);
  text-decoration: none;
}
.nc-mag-empty {
  text-align: center;
  padding: 2rem;
  color: var(--nc-mag-muted);
}

/* Article page */
.nc-mag--article .nc-mag-article {
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}
.nc-mag-back {
  font-size: 0.82rem;
  color: var(--nc-mag-accent);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1rem;
}
.nc-mag-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}
.nc-mag-section-link,
.nc-mag-course-link {
  color: var(--nc-mag-accent);
  font-weight: 600;
  text-decoration: none;
}
.nc-mag-byline { color: var(--nc-mag-muted); }
.nc-mag-date {
  display: block;
  font-size: 0.82rem;
  color: var(--nc-mag-muted);
  margin-bottom: 0.5rem;
}
.nc-mag-headline {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.12;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.nc-mag-dek {
  font-size: 1.15rem !important;
  line-height: 1.55 !important;
  color: #333 !important;
  border-bottom: 1px solid var(--nc-mag-rule);
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem !important;
}

.nc-mag-article-hero,
.nc-mag-article-body .nc-mag-article-hero,
.nc-mag-article-body .nc-el-write-hero {
  margin: 0 0 1.25rem;
}

.nc-mag-article-hero img,
.nc-mag-article-body .nc-el-write-hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 4px;
}

.nc-mag-card-media img {
  object-fit: cover;
}

/* Submit form */
.nc-mag-submit-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
}
.nc-mag-submit-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 2rem;
  margin: 0 0 0.5rem;
}
.nc-mag-submit-lead {
  color: var(--nc-mag-muted);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}
.nc-mag-submit-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.nc-mag-submit-form input,
.nc-mag-submit-form textarea,
.nc-mag-submit-form select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font: inherit;
}
.nc-mag-submit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.nc-mag-submit-result { margin-top: 1rem; font-weight: 600; }
.nc-mag-submit-result--ok { color: #15803d; }
.nc-mag-submit-result--err { color: #b91c1c; }

/* Analytics — full-width magazine (sidebar removed NC.EL.75.2) */
body.nc-el-university-theme [data-nc-news-subscriber-sync] {
  width: 100%;
  max-width: none;
}
body.nc-el-university-theme [data-nc-news-subscriber-sync] > .nc-mag {
  max-width: none;
  width: 100%;
}
body.nc-el-university-theme .ccu-news-stats-footer {
  display: none;
}

@media (min-width: 1101px) {
  .nc-mag-classified-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(200px, 240px);
  }
  .nc-mag-sponsor[data-nc-sponsor-slot="classified-rail"] {
    grid-column: 5;
    grid-row: 1 / span 3;
  }
}

@media (max-width: 1100px) {
  .nc-mag-classified-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nc-mag-sponsor[data-nc-sponsor-slot="classified-rail"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .nc-mag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nc-mag-by-degree { grid-template-columns: 1fr; }
  .nc-mag-engagement {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nc-mag-grid { grid-template-columns: 1fr; }
  .nc-mag-classified-grid { grid-template-columns: 1fr; }
  .nc-mag-engagement-metrics { grid-template-columns: 1fr; }
  .nc-mag-submit-row { grid-template-columns: 1fr; }
  .nc-mag-nav { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .nc-mag-classified-tab--sponsor { margin-left: 0; }
}
.nc-mag .ccu-news-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--nc-mag-rule);
}
.nc-mag .ccu-news-topic {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--nc-mag-rule);
  border-radius: 2px;
  text-decoration: none;
  color: var(--nc-mag-ink);
}
.nc-mag .ccu-news-topic.is-active {
  background: var(--nc-mag-ink);
  color: #fff;
  border-color: var(--nc-mag-ink);
}

/* Subscriber badge on index */
body.nc-el-university-theme [data-nc-news-subscriber-sync] > .ccu-news-subscriber-badge {
  text-align: center;
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
}

/* Topic filter inside magazine */

/* NC.EL.80.1 — embedded video in article body */
.nc-mag .nc-mag-video-embed,
.nc-mag-article-body .nc-mag-video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.25rem 0;
  background: #0a1628;
  border-radius: 4px;
}
.nc-mag .nc-mag-video-embed iframe,
.nc-mag-article-body .nc-mag-video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* NC.EL.80.2 — tables from Word-style editor */
.nc-mag-article-body table,
.nc-mag .nc-mag-article-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}
.nc-mag-article-body th,
.nc-mag-article-body td,
.nc-mag .nc-mag-article-body th,
.nc-mag .nc-mag-article-body td {
  border: 1px solid #c8c8c8;
  padding: 0.45rem 0.65rem;
  vertical-align: top;
}
.nc-mag-article-body th,
.nc-mag .nc-mag-article-body th {
  background: #f4f4f4;
  font-weight: 600;
}
