/* AI FYD News & Insights - main stylesheet (no framework) */
:root {
  --bg: #faf7ff;
  --surface: #ffffff;
  --surface-strong: #f3e8ff;
  --ink: #171421;
  --ink-soft: #6b6575;
  --ink-faint: #8b8495;
  --line: #e9ddf5;
  --line-hover: #d9c7f2;
  --accent: #7c3aed;
  --accent-dark: #5b21b6;
  --accent-soft: #f3e8ff;
  --gradient: linear-gradient(135deg, #7c3aed 0%, #d946ef 55%, #ec4899 100%);
  --warn: #d97706;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 14px;
  --maxw: 1280px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--gradient);
}
.site-header .bar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  max-width: var(--maxw); margin: 0 auto; padding: 10px 18px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { height: 44px; width: auto; }
.brand .name {
  font-size: 20px; font-weight: 700; letter-spacing: .2px;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--accent-dark);
}
.brand .tagline { font-size: 12px; color: var(--ink-faint); margin-top: -2px; }
.site-header .brand { flex: 0 1 270px; flex-direction: column; align-items: flex-start; gap: 6px; }
.site-header .brand .tagline { margin: 0; line-height: 1.4; }

.main-nav { display: flex; gap: 4px; flex: 1 0 auto; flex-wrap: nowrap; overflow-x: auto; min-width: 0; }
.main-nav a {
  padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: var(--ink-soft); white-space: nowrap; flex: none;
}
.main-nav a:hover { background: var(--accent-soft); text-decoration: none; color: var(--accent); }
.main-nav a.current { background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 -2px 0 0 var(--accent); }

.searchbox { display: flex; }
.site-header .searchbox { flex: 1 1 230px; max-width: 340px; }
.site-header .searchbox input { width: 100%; min-width: 0; }
.searchbox input {
  border: 1px solid var(--line); border-right: none; border-radius: 8px 0 0 8px;
  padding: 8px 12px; font-size: 14px; min-width: 170px;
}
.searchbox button {
  border: 1px solid var(--line); border-radius: 0 8px 8px 0;
  background: var(--surface); padding: 8px 12px; cursor: pointer; font-size: 14px;
}
.searchbox button:hover { background: var(--accent-soft); }

/* ---------- Topic / profile nav strip ---------- */
.strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.strip .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 8px 18px;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.strip .inner::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--accent-soft);
  color: var(--accent-dark); background: var(--accent-soft);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover {
  background: #ddd6fe; border-color: var(--accent); color: var(--accent-dark);
  text-decoration: none;
}
.chip.current {
  background: var(--gradient); border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, .25);
}
.chip.group-label {
  background: var(--accent); border: none; color: #fff;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: 5px 10px;
}

/* ---------- Ad slots ---------- */
.ad-slot { max-width: var(--maxw); margin: 0 auto; padding: 12px 18px; }
.ad-slot .ad-frame {
  position: relative; overflow: hidden; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line);
  min-height: 90px;
}
.ad-slot.leaderboard .ad-frame { min-height: 100px; }
.ad-slot.below .ad-frame { min-height: 120px; }
.ad-slot .ad { display: none; }
.ad-slot .ad.active { display: block; }
.ad-slot .ad img { max-width: 100%; height: auto; display: block; }
.ad-text { padding: 30px 16px; color: var(--ink-faint); font-size: 14px; font-weight: 600; }
.ad-label {
  position: absolute; top: 4px; right: 6px; font-size: 10px;
  color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em;
}

/* IAB medium rectangle (300x250) in the right column */
.ad-slot.mpu { max-width: none; margin: 0; padding: 0; }
.ad-slot.mpu .ad-frame {
  width: 300px; max-width: 100%; aspect-ratio: 300 / 250; min-height: 0;
}
.ad-slot.mpu .ad img { width: 100%; height: 100%; object-fit: cover; }
.promo-frame {
  position: relative; display: block; width: 300px; max-width: 100%; aspect-ratio: 300 / 250;
  overflow: hidden; border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 85% 0%, rgba(217, 70, 239, .18) 0%, rgba(124, 58, 237, 0) 55%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 0 0 2px transparent;
  transition: box-shadow .15s ease, transform .15s ease;
}
.promo-frame::before {
  content: ""; position: absolute; inset: 0; padding: 2px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  border-radius: var(--radius);
  opacity: .9; pointer-events: none;
}
.promo-frame:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(124, 58, 237, .18); }
.promo-frame .promo-logo {
  position: absolute; top: 18px; left: 18px; height: 40px; width: auto;
  border-radius: 8px; box-shadow: 0 4px 10px rgba(23, 20, 33, .18);
}
.promo-frame .promo-copy {
  position: absolute; left: 18px; right: 18px; bottom: 16px; top: 68px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 5px;
}
.promo-frame .promo-copy strong {
  font-size: 17px; font-weight: 700;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--accent-dark);
}
.promo-frame .promo-copy span { font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.promo-frame .promo-copy em {
  font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--accent);
}

/* Hot (most clicked) badge */
.hot-badge {
  display: inline-block; height: 20px; width: auto; vertical-align: -3px;
  margin-left: 6px; border-radius: 0; box-shadow: none;
}
.hot-badge-lg { height: 28px; vertical-align: -4px; }

/* Profile filter rows (inside pages) */
.filter-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 20px; padding: 10px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  border-radius: 12px;
}
.filter-row .filter-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent-dark); margin-right: 2px;
}
.profile-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-chips .chip.current {
  background: var(--gradient); border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, .25);
}

/* ---------- Home layout ---------- */
.home-grid {
  max-width: var(--maxw); margin: 18px auto 30px; padding: 0 18px;
  display: grid; grid-template-columns: 1fr 320px; gap: 22px;
}
.home-main { min-width: 0; }
.home-side { min-width: 0; }

.section-title {
  font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent-dark); margin: 0 0 10px; display: flex; align-items: center; gap: 10px;
  padding-left: 10px; border-left: 4px solid transparent; border-image: var(--gradient) 1;
}
.section-title .link { margin-left: auto; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--accent); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 14px;
}
.card:hover { border-color: var(--line-hover); }
.card .kicker { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.card h2 { font-size: 21px; line-height: 1.28; margin: 0 0 8px; }
.card h2 a { color: var(--ink); }
.card .meta { font-size: 12.5px; color: var(--ink-faint); display: flex; gap: 10px; flex-wrap: wrap; }
.card .summary { margin: 10px 0 0; padding: 0; }
.card .summary li { font-size: 14.5px; margin-bottom: 3px; }
.card .summary li::marker { color: var(--accent); }

.compact-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px;
}
.compact-card:hover { border-color: var(--line-hover); text-decoration: none; }
.compact-card .t { font-weight: 600; font-size: 15px; color: var(--ink); line-height: 1.3; }
.compact-card .m { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; vertical-align: middle;
}
.badge.imp-high { background: #fdecec; color: var(--danger); }
.badge.imp-mid { background: #fff3e4; color: var(--warn); }
.badge.imp-low { background: #eef1f5; color: var(--ink-soft); }
.badge.source { background: var(--accent-soft); color: var(--accent); }
.badge.topic { background: #e9f4ef; color: var(--ok); }
.badge.flag { background: #fff3e4; color: var(--warn); }
.badge.relevance { background: #eef1f5; color: var(--ink-soft); }

/* ---------- Article page ---------- */
.article-wrap { max-width: 860px; margin: 24px auto 40px; padding: 0 18px; }
.article-hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; }
.article-hero .kicker { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.article-hero h1 { font-size: 32px; line-height: 1.2; margin: 10px 0 14px; }
.article-hero .meta { font-size: 13.5px; color: var(--ink-faint); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.article-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-top: 16px; }
.article-block h2 { font-size: 16px; margin: 0 0 12px; color: var(--ink-soft); }
.article-block .summary ul { margin: 0; padding-left: 20px; }
.article-block .summary li { margin-bottom: 6px; font-size: 16.5px; }
.why { font-size: 15.5px; color: var(--ink-soft); }
.tags-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tags-row a {
  font-size: 13px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.profile-chip { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 6px; color: var(--ink-soft); }
.profile-chip .bar-meter { flex: 0 0 110px; height: 6px; background: var(--surface-strong); border-radius: 999px; overflow: hidden; }
.profile-chip .bar-meter i { display: block; height: 100%; background: var(--gradient); }

.related { margin-top: 24px; }

/* ---------- Listing / pagination ---------- */
.listing-wrap { max-width: 960px; margin: 22px auto 40px; padding: 0 18px; }
.video-list-thumbnail { width: clamp(100px, 24vw, 160px); height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; }
.breadcrumb { font-size: 13px; color: var(--ink-faint); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-soft); }
.page-heading { margin-bottom: 18px; }
.page-heading h1 { font-size: 26px; line-height: 1.25; margin: 0 0 6px; }
.page-heading p { color: var(--ink-faint); font-size: 14px; margin: 0; }
.pagination { display: flex; gap: 14px; align-items: center; margin-top: 22px; }
.pagination .page-info { color: var(--ink-faint); font-size: 13px; }
.pagination .page-link { font-weight: 600; font-size: 14px; }

/* ---------- Video ---------- */
.video-embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; margin-bottom: 16px; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- 404 / errors ---------- */
.empty-state { text-align: center; padding: 60px 18px; color: var(--ink-faint); }
.empty-state h1 { font-size: 26px; color: var(--ink); }
.fatal { padding: 20px; font-size: 13px; white-space: pre-wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; }
.site-footer .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 26px 18px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 26px;
  font-size: 13.5px; color: var(--ink-soft);
}
.site-footer a { color: var(--ink-soft); }
.site-footer .col { min-width: 180px; }
.site-footer h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 0 0 8px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 5px; }

/* ---------- Forms (admin) ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 720px; margin: 24px auto; }
.form-card label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 14px 0 4px; }
.form-card input[type=text], .form-card input[type=password], .form-card input[type=email],
.form-card input[type=url], .form-card input[type=number], .form-card input[type=datetime-local],
.form-card select, .form-card textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14.5px; background: #fff; font-family: inherit;
}
.form-card textarea { min-height: 90px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; }
.btn {
  display: inline-block; border: 1px solid var(--line); background: var(--surface);
  border-radius: 8px; padding: 8px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--ink);
}
.btn:hover { background: var(--accent-soft); text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--gradient); border-color: transparent; color: #fff; }
.btn.primary:hover { background: var(--gradient); filter: brightness(0.92); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: #fdecec; border-color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert.error { background: #fdecec; color: var(--danger); }
.alert.ok { background: #e9f4ef; color: var(--ok); }

/* ---------- Admin shell ---------- */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-shell-login { grid-template-columns: minmax(0, 1fr); }
.admin-shell-login .admin-main { display: flex; align-items: center; justify-content: center; padding: 18px; }
.admin-login { width: 100%; max-width: 380px; }
.admin-side {
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 18px 12px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.admin-side .brand { margin-bottom: 22px; flex-shrink: 0; }
.admin-side nav { flex: 1; min-height: 0; overflow-y: auto; }
.admin-side-account { flex-shrink: 0; padding-top: 16px; overflow-wrap: anywhere; }
.admin-side nav a {
  display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: var(--ink-soft);
}
.admin-side nav a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.admin-side nav a.current { background: var(--accent-soft); color: var(--accent); }
.admin-side .sep { margin: 14px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); }
.admin-main { padding: 26px 30px; min-width: 0; }
.admin-main h1 { font-size: 24px; margin: 0 0 18px; }

/* ---------- Tables ---------- */
table.data { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
table.data th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-faint); padding: 10px 12px; background: #faf7ff; border-bottom: 1px solid var(--line);
}
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { font-size: 12.5px; color: var(--ink-faint); }
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filters a {
  font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft);
}
.filters a.current { background: var(--gradient); border-color: transparent; color: #fff; }

/* ---------- Job queue monitoring ---------- */
.jobs-health {
  display: flex; align-items: center; gap: 16px; margin: 0 0 18px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--ok);
  border-radius: var(--radius);
}
.jobs-health-yellow { border-left-color: var(--warn); }
.jobs-health-red { border-left-color: var(--danger); }
.jobs-health-copy { min-width: 0; }
.jobs-health-copy h2, .jobs-chart h2 { margin: 0 0 5px; font-size: 16px; }
.jobs-health-copy p { margin: 0; font-size: 12.5px; color: var(--ink-faint); }
.jobs-health-copy ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-soft); }
.jobs-traffic-light {
  display: flex; flex: 0 0 auto; flex-direction: column; justify-content: center; gap: 5px;
  width: 30px; padding: 7px; border-radius: 999px; background: #282632;
}
.jobs-light { width: 16px; height: 16px; border-radius: 50%; background: #666; opacity: .35; }
.jobs-light-red.active { background: #ef4444; opacity: 1; box-shadow: 0 0 8px #ef4444; }
.jobs-light-yellow.active { background: #facc15; opacity: 1; box-shadow: 0 0 8px #facc15; }
.jobs-light-green.active { background: #22c55e; opacity: 1; box-shadow: 0 0 8px #22c55e; }
.jobs-monitoring { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(360px, 1.2fr); gap: 14px; margin-bottom: 18px; }
.jobs-chart { min-width: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.jobs-status-bars { display: grid; gap: 9px; margin-top: 12px; }
.jobs-status-row { display: grid; grid-template-columns: 76px minmax(40px, 1fr) 40px; align-items: center; gap: 9px; font-size: 12.5px; }
.jobs-status-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.jobs-status-track { height: 10px; overflow: hidden; border-radius: 999px; background: #f1eef5; }
.jobs-status-fill { display: block; height: 100%; min-width: 0; border-radius: inherit; background: #a78bfa; }
.jobs-status-fill-running { background: #7c3aed; }
.jobs-status-fill-done { background: #22c55e; }
.jobs-status-fill-failed, .jobs-status-fill-dead { background: #ef4444; }
.jobs-chart-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; color: var(--ink-faint); font-size: 11.5px; }
.jobs-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.jobs-chart-legend i { width: 9px; height: 9px; border-radius: 2px; background: #a78bfa; }
.jobs-chart-legend .legend-done { background: #22c55e; }
.jobs-chart-legend .legend-failed { background: #ef4444; }
.jobs-daily-chart { display: grid; grid-template-columns: repeat(7, minmax(24px, 1fr)); gap: 8px; align-items: end; min-height: 126px; }
.jobs-day { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: end; gap: 5px; }
.jobs-day-bars { display: flex; align-items: end; justify-content: center; gap: 3px; height: 90px; }
.jobs-day-bar { width: clamp(5px, 1vw, 11px); min-height: 0; border-radius: 3px 3px 0 0; background: #a78bfa; }
.jobs-day-bar-done { background: #22c55e; }
.jobs-day-bar-failed { background: #ef4444; }
.jobs-day-label { color: var(--ink-faint); font-size: 10.5px; white-space: nowrap; }

/* ---------- Kicker links ---------- */
.article-hero .kicker a { color: var(--accent); }

/* ---------- Status badges (admin) ---------- */
.badge.status-review { background: #fff3e4; color: var(--warn); }
.badge.status-pending, .badge.status-queued { background: #eef1f5; color: var(--ink-soft); }
.badge.status-processing, .badge.status-running { background: var(--accent-soft); color: var(--accent); }
.badge.status-published, .badge.status-done { background: #e9f4ef; color: var(--ok); }
.badge.status-rejected, .badge.status-failed, .badge.status-dead, .badge.status-error { background: #fdecec; color: var(--danger); }

/* ---------- Duplicates ---------- */
.dup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.dup-card { margin-bottom: 0; }
.dup-card .dup-side h3 { font-size: 15.5px; line-height: 1.3; margin: 4px 0 4px; }
.dup-card .dup-side h3 a { color: var(--ink); }
.dup-card .dup-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.dup-card .dup-meta { font-size: 12.5px; color: var(--ink-faint); }
.dup-card .dup-arrow { align-self: center; font-size: 20px; color: var(--ink-faint); text-align: center; }
.dup-card .dup-side { min-width: 0; }

/* ---------- Flags list ---------- */
.flags { margin: 0; padding-left: 20px; font-size: 14.5px; color: var(--warn); }
.flags li { margin-bottom: 4px; }

/* ---------- Generic forms (login, inline cards) ---------- */
.card label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 12px 0 4px; }
.card input[type=text], .card input[type=password], .card input[type=email],
.card input[type=url], .card input[type=number], .card input[type=date],
.card input[type=search], .card select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14.5px; background: #fff; font-family: inherit;
}
.form-card input[type=date] { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14.5px; background: #fff; font-family: inherit; }

/* ---------- Consent / GDPR banner ---------- */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px rgba(23,20,33,.14);
  padding: 14px 0; font-size: 13.5px;
}
.consent-banner .inner { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.consent-body { flex: 1 1 340px; }
.consent-body strong { font-size: 15px; }
.consent-body p { margin: 6px 0 0; color: var(--ink-soft); }
.consent-links { font-size: 12.5px; }
.consent-actions { display: flex; gap: 8px; margin-left: auto; }
.consent-actions .btn { white-space: nowrap; }
@media (max-width: 560px) {
  .consent-banner { position: static; }
  .consent-actions { margin-left: 0; }
}

/* ---------- Events ---------- */
.event-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px;
}
.event-card:hover { border-color: var(--line-hover); text-decoration: none; }
.event-date {
  flex: 0 0 auto; width: 62px; text-align: center;
  background: var(--accent-soft); border-radius: 10px; padding: 8px 4px;
  display: flex; flex-direction: column;
}
.event-date .month { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--accent-dark); letter-spacing: .04em; }
.event-date .day { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.event-date .year { font-size: 11px; color: var(--ink-faint); }
.event-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.event-title { font-weight: 650; font-size: 15.5px; color: var(--ink); line-height: 1.3; }
.event-card:hover .event-title { color: var(--accent-dark); }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }
.kind-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 9px; border-radius: 999px; background: var(--surface-strong); color: var(--accent-dark);
  text-transform: capitalize;
}
.kind-badge.featured { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.kind-congress { background: #e0e7ff; color: #3730a3; }
.kind-fair { background: #dcfce7; color: #166534; }
.kind-webinar { background: #cffafe; color: #155e75; }
.kind-workshop { background: #fce7f3; color: #9d174d; }
.kind-hackathon { background: #ffedd5; color: #9a3412; }
.kind-meetup { background: #f1f5f9; color: #334155; }
.event-profiles { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-faint); }
.event-filter-form { display: flex; gap: 8px; margin-bottom: 14px; }
.event-filter-form input[type=search] {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; font-family: inherit;
}
.course-search { flex-wrap: wrap; }
.course-search input[type=search] { flex: 1 1 240px; min-width: 0; }
.course-list { display: grid; gap: 10px; }
.course-card {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.course-copy { min-width: 0; }
.course-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--ink-soft); }
.course-level-badge {
  display: inline-flex; align-items: center; padding: 5px 11px; border: 1px solid #a7d7bc;
  border-radius: 999px; background: #e9f4ef; color: #17633d; font-size: 13px; font-weight: 750;
}
.course-card h2 { margin: 8px 0 2px; font-size: 17px; line-height: 1.35; color: var(--ink); }
.course-provider, .course-description { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; }
.course-description { max-width: 760px; line-height: 1.5; }
.course-details { margin-top: 8px; }
.course-link { flex: 0 0 auto; text-align: center; }
.course-pagination { flex-wrap: wrap; }
.course-pagination .page-info:first-child { margin-right: auto; }
.course-source-note { margin: 14px 0; font-size: 12px; color: var(--ink-faint); }
.event-wrap { max-width: 980px; margin: 24px auto 40px; padding: 0 18px; overflow-wrap: anywhere; }
.event-head-meta { display: flex; align-items: center; gap: 12px; }
.event-date-lg {
  width: 70px; text-align: center; background: var(--accent-soft); border-radius: 12px; padding: 10px 4px;
  display: inline-flex; flex-direction: column;
}
.event-date-lg .month { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--accent-dark); letter-spacing: .04em; }
.event-date-lg .day { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.event-date-lg .year { font-size: 12px; color: var(--ink-faint); }
.event-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; margin-top: 22px; align-items: start; }
.event-side .card { margin-bottom: 18px; }
.event-facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13.5px; }
.event-facts dt { color: var(--ink-faint); font-weight: 600; }
.event-facts dd { margin: 0; color: var(--ink); }
@media (max-width: 900px) {
  .event-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .event-card { flex-direction: column; gap: 8px; }
  .event-date { flex-direction: row; gap: 6px; width: auto; padding: 4px 10px; }
  .event-date-lg { display: none; }
  .course-card { align-items: stretch; flex-direction: column; gap: 12px; }
  .course-link { width: 100%; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-side { order: 2; }
  .site-header .brand { flex: 1 1 100%; }
  .main-nav { flex: 1 1 100%; }
  .site-header .searchbox { order: 3; flex-basis: 100%; width: 100%; max-width: none; }
  .site-header .searchbox input { flex: 1; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .jobs-monitoring { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .article-hero h1 { font-size: 25px; }
  .card h2 { font-size: 18px; }
  .main-nav a { padding: 6px 8px; font-size: 13px; }
  .jobs-health { align-items: flex-start; padding: 13px; }
  .jobs-chart { padding: 13px; }
}

/* ---------- Home digest strip ("trafiletto") ---------- */
.digest-strip {
  max-width: var(--maxw);
  margin: 0 auto 22px;
  padding: 14px 18px 15px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(217, 70, 239, 0.06) 55%, rgba(236, 72, 153, 0.06) 100%);
  border: 1px solid var(--line-hover);
  box-shadow: 0 1px 2px rgba(23, 20, 33, 0.04);
}
.digest-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 7px;
}
.digest-kicker .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  animation: digest-pulse 2.4s ease-out infinite;
}
@keyframes digest-pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
.digest-text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .ad-slot, .strip, .related, .pagination { display: none !important; }
  body { background: #fff; }
  .article-wrap { max-width: 100%; }
}

/* ---------- FYD Game (quiz) ---------- */
.quiz-wrap { width: calc(100% - 40px); max-width: 720px; margin: 26px auto 48px; }
.quiz-head { margin-bottom: 18px; }
.quiz-title { font-size: 30px; margin: 0 0 4px; }
.quiz-sub { color: var(--ink-soft); margin: 0 0 14px; font-size: 14.5px; }
.quiz-progress { height: 8px; background: var(--accent-soft); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.quiz-progress-fill { height: 100%; background: var(--gradient); border-radius: 999px; transition: width .35s ease; }
.quiz-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-faint); margin-bottom: 14px; }
.quiz-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: 0 1px 2px rgba(23,20,33,.04); }
.quiz-question { font-size: 19px; line-height: 1.4; margin: 0 0 16px; }
.quiz-option { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; cursor: pointer; font-size: 15px; color: var(--ink); transition: border-color .15s ease, background .15s ease; }
.quiz-option:hover { border-color: var(--accent); }
.quiz-option input[type="radio"] { margin-top: 3px; accent-color: var(--accent); }
.quiz-card form:not(.quiz-actions) > .btn { display: block; margin-top: 14px; }
.opt-letter { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; font-size: 13px; flex: none; }
.quiz-option.chosen { border-color: var(--accent); background: var(--accent-soft); }
.quiz-option.right { border-color: #16a34a; background: #f0fdf4; }
.quiz-option.right .opt-letter { background: #16a34a; color: #fff; }
.quiz-option.wrong { border-color: var(--danger); background: #fef2f2; }
.quiz-option.wrong .opt-letter { background: var(--danger); color: #fff; }
.quiz-feedback { border-radius: var(--radius); padding: 12px 16px; margin: 14px 0; font-weight: 600; }
.quiz-feedback p { margin: 6px 0 0; font-weight: 400; color: var(--ink-soft); font-size: 14.5px; }
.fb-right { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.fb-wrong { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.quiz-src { display: inline-block; font-size: 13.5px; color: var(--accent-dark); margin: 4px 0 16px; }
.quiz-score { font-size: 44px; font-weight: 800; text-align: center; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 6px; }
.quiz-final-title { text-align: center; font-size: 20px; margin: 0 0 16px; }
.quiz-recap { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.quiz-recap li { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.quiz-recap li.ok { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.quiz-recap li.no { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.quiz-actions { display: flex; gap: 10px; justify-content: center; }
.quiz-empty { padding: 70px 18px; }
@media (max-width: 560px) {
  .quiz-card { padding: 18px 16px; }
  .quiz-title { font-size: 25px; }
}

/* ---------- AI Radar ---------- */
.radar-wrap { max-width: 1180px; }
.radar-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.radar-meta { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; font-size: 12px; color: var(--ink-faint); }
.radar-updated {
  background: var(--accent-soft); color: var(--accent-dark);
  padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 11.5px;
}
.radar-updated--empty { background: #fff7ed; color: var(--warn); }
.radar-counts { font-size: 11.5px; }

.radar-controls { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.radar-controls .radar-ranges,
.radar-controls .radar-trends,
.radar-controls .radar-cats {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.radar-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
}

.radar-grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 18px; align-items: start;
}
.radar-board-wrap { position: relative; }
.radar-board-frame { position: relative; padding: 26px 6px 34px 32px; }
.radar-board {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 10% 10%;
  background-color: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.radar-axis { position: absolute; font-size: 11px; color: var(--ink-faint); font-weight: 600; display: flex; }
.radar-axis-x { left: 32px; right: 6px; bottom: 5px; justify-content: space-between; }
.radar-axis-y { top: 26px; bottom: 34px; left: 4px; flex-direction: column; justify-content: space-between; align-items: center; }
.radar-axis-y span { writing-mode: vertical-rl; }

.radar-bubble {
  position: absolute;
  left: calc(var(--x) * 100%);
  top: calc(var(--y) * 100%);
  width: var(--size); height: var(--size);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--trend) 16%, #fff);
  border: 2px solid var(--trend);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--trend) 30%, transparent);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  z-index: 1;
}
.radar-bubble:hover {
  transform: translate(-50%, -50%) scale(1.06);
  z-index: 3;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--trend) 45%, transparent);
}
.radar-bubble-label {
  font-size: 12px; font-weight: 700; line-height: 1.1;
  max-width: 92%; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.radar-bubble-value { display: flex; align-items: baseline; gap: 5px; }
.radar-bubble-value strong { font-size: 15px; }
.radar-bubble-value em { font-style: normal; font-size: 10.5px; font-weight: 700; }
.radar-bubble .up { color: var(--ok); }
.radar-bubble .down { color: var(--danger); }

.radar-legend {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-top: 26px; font-size: 12px; color: var(--ink-soft);
}
.radar-legend-note { margin-left: auto; font-size: 11px; color: var(--ink-faint); }

.radar-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
  position: sticky; top: 12px;
}
.radar-list-title { font-size: 14px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.radar-ranking { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 640px; overflow-y: auto; }
.radar-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px; border-radius: 10px; color: var(--ink);
}
.radar-row:hover { background: var(--accent-soft); text-decoration: none; }
.radar-rank { font-size: 12px; font-weight: 700; color: var(--ink-faint); width: 18px; text-align: right; }
.radar-row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.radar-row-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radar-row-cat { font-size: 11px; color: var(--ink-faint); }
.radar-row-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.radar-signal { font-size: 15px; font-weight: 700; }
.radar-change { font-size: 11.5px; font-weight: 700; }
.radar-change.up { color: var(--ok); }
.radar-change.down { color: var(--danger); }

.radar-empty {
  background: var(--surface); border: 1px dashed var(--line-hover);
  border-radius: var(--radius); padding: 48px 24px; text-align: center; color: var(--ink-soft);
}

/* Drawer */
body.radar-modal { overflow: hidden; }
.radar-drawer-backdrop {
  position: fixed; inset: 0; background: rgba(23, 20, 33, .45);
  z-index: 40; backdrop-filter: blur(2px);
}
.radar-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(440px, 92vw); background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(23, 20, 33, .18);
  z-index: 41; display: flex;
}
.radar-drawer[hidden], .radar-drawer-backdrop[hidden] { display: none; }
.radar-drawer-body { padding: 52px 24px 26px; overflow-y: auto; flex: 1; min-width: 0; }
.radar-drawer-close {
  position: absolute; top: 12px; right: 12px;
  border: none; background: transparent; font-size: 24px; line-height: 1;
  color: var(--ink-faint); cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.radar-drawer-close:hover { background: var(--accent-soft); color: var(--ink); }
.radar-d-title { font-size: 20px; font-weight: 700; margin-bottom: 2px; display: flex; align-items: center; }
.radar-d-sub { font-size: 12px; color: var(--ink-faint); margin-bottom: 16px; }
.radar-d-scores { display: flex; gap: 10px; margin-bottom: 16px; }
.radar-score {
  flex: 1; background: var(--accent-soft); border-radius: 10px;
  padding: 10px; text-align: center;
}
.radar-score-n { display: block; font-size: 20px; font-weight: 700; color: var(--accent-dark); }
.radar-score-l { font-size: 11px; color: var(--ink-faint); }
.radar-why { background: #f8f5ff; border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 10px 10px 0; margin-bottom: 16px; }
.radar-why h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-dark); }
.radar-why p { margin: 0; font-size: 13.5px; line-height: 1.55; }
.radar-bars { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.radar-bar-row { display: grid; grid-template-columns: 130px 1fr 34px; gap: 8px; align-items: center; font-size: 12px; }
.radar-bar-label { color: var(--ink-soft); }
.radar-bar-track { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.radar-bar-fill { display: block; height: 100%; background: var(--gradient); border-radius: 999px; }
.radar-bar-val { text-align: right; font-weight: 700; color: var(--ink); }
.radar-hype {
  background: #fff7ed; color: var(--warn); font-weight: 700; font-size: 12.5px;
  padding: 8px 12px; border-radius: 8px; margin-bottom: 8px;
}
.radar-hype-reasons { margin: 0 0 12px; padding-left: 18px; font-size: 12.5px; color: var(--ink-soft); }
.radar-metrics {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
  font-size: 11.5px; color: var(--ink-soft);
}
.radar-metrics span { background: var(--surface-strong); border-radius: 999px; padding: 3px 9px; }
.radar-d-h { font-size: 14px; margin: 14px 0 8px; }
.radar-stories { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.radar-stories a { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.radar-stories a:hover { color: var(--accent-dark); text-decoration: none; }
.radar-story-src { display: block; font-size: 11px; color: var(--ink-faint); margin-top: 1px; }
.radar-related { display: flex; flex-wrap: wrap; gap: 6px; }

.method-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.method-table th, .method-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.method-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.method-table td:first-child { font-weight: 600; }

@media (max-width: 900px) {
  .radar-grid { grid-template-columns: 1fr; }
  .radar-list { position: static; }
  .radar-board { aspect-ratio: 4 / 3.4; }
}
@media (max-width: 560px) {
  .radar-bubble-label { font-size: 10.5px; }
  .radar-bubble-value strong { font-size: 12.5px; }
  .radar-score-n { font-size: 16px; }
  .radar-drawer-body { padding: 52px 16px 20px; }
}
