/* Chronicle Insights: dashboard, shared reports and the audience page. */
.ci, .ci-public, .ci-dialog, .ci-tip {
	--ink: #15171e;
	--ink-2: #4a4e5c;
	--muted: #6b6f7c;
	--line: #e4e2db;
	--grid: #ecebe6;
	--paper: #ffffff;
	--page: #f6f5f1;
	--brand: #23306b;
	--gold: #e8a317;
	--s1: #4058c8;
	--s2: #b97a00;
	--up: #1d7a3e;
	--down: #b42318;
	--r: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--ink);
}
.ci [hidden], .ci-public [hidden], .ci-dialog [hidden] { display: none !important; }
.ci * , .ci-public *, .ci-dialog * { box-sizing: border-box; }
.ci-wrap { margin-right: 20px; }
.ci { max-width: 1280px; padding: 8px 0 60px; }

/* Header */
.ci-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 14px; }
.ci-kicker { margin: 0 0 2px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ci-head h1 { margin: 0; padding: 0; font-size: 28px; line-height: 1.15; font-weight: 700; color: var(--ink); }
.ci-range { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }
.ci-head__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ci-head__tools select, .ci-head__tools input[type="date"] { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--paper); font-size: 14px; }

/* Buttons */
.ci-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid #c9c7bf; border-radius: 8px; background: var(--paper); color: var(--ink) !important; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.ci-btn:hover { border-color: var(--brand); }
.ci-btn--p { background: var(--brand); border-color: var(--brand); color: #fff !important; }
.ci-btn--p:hover { background: #1a2556; }
.ci-btn:disabled { opacity: .6; cursor: default; }
.ci-link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.ci-link--danger { color: var(--down); }
.ci-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.ci-menu { position: relative; }
.ci-menu__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 240px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(21, 23, 30, .14); padding: 6px; }
.ci-menu__list a, .ci-menu__list button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.ci-menu__list a:hover, .ci-menu__list button:hover { background: var(--page); }

/* Tabs */
.ci-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; scrollbar-width: none; }
.ci-tabs button { flex: none; border: 0; background: none; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.ci-tabs button.is-on { color: var(--brand); border-bottom-color: var(--gold); }
.ci-body.is-busy { opacity: .55; transition: opacity .2s; }

/* Tiles */
.ci-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ci-tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 4px; min-height: 108px; }
.ci-tile__l { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.ci-tile__v { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ci-tile__c { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ci-tile__c.is-up { color: var(--up); }
.ci-tile__c.is-down { color: var(--down); }
.ci-tile__c small { font-weight: 400; color: var(--muted); }
.ci-tile__n { font-size: 12px; color: var(--muted); }

/* Cards and grid */
.ci-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; margin-bottom: 16px; }
.ci-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 14px; min-width: 0; }
.ci-card--wide { margin-bottom: 16px; }
.ci-card__t { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.ci-card__s { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.ci-card__t + .ci-fig, .ci-card__t + .ci-bars { margin-top: 12px; }
.ci-empty { color: var(--muted); font-size: 14px; margin: 8px 0; }
.ci-note { color: var(--muted); font-size: 13px; line-height: 1.5; max-width: 900px; }
.ci-error { background: #fdecea; color: var(--down); padding: 10px 14px; border-radius: 8px; }

/* Charts */
.ci-fig { margin: 0; }
.ci-chart { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.ci-gl { stroke: var(--grid); stroke-width: 1; }
.ci-axis { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ci-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ci-line.s1 { stroke: var(--s1); }
.ci-line.s2 { stroke: var(--s2); }
.ci-area.s1 { fill: var(--s1); opacity: .1; }
.ci-area.s2 { fill: var(--s2); opacity: .1; }
.ci-dot { stroke: var(--paper); stroke-width: 2; }
.ci-dot.s1 { fill: var(--s1); }
.ci-dot.s2 { fill: var(--s2); }
.ci-cross { stroke: #b9b7af; stroke-width: 1; }
.ci-bar { fill: var(--s1); }
.ci-bar.is-hl { fill: var(--s2); }
.ci-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.ci-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ci-legend i, .ci-tip i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--s1); }
.ci-legend i.s2, .ci-tip i.s2 { background: var(--s2); }
.ci-tip { position: fixed; z-index: 100000; pointer-events: none; background: #15171e; color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; line-height: 1.5; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: 320px; }
.ci-tip b { font-weight: 700; }
.ci-tip span { display: flex; align-items: center; gap: 6px; }
.ci-tip i { width: 10px; height: 10px; border-radius: 50%; }

/* Ranked bars */
.ci-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ci-bars li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) auto; gap: 10px; align-items: center; font-size: 13.5px; padding: 3px 0; }
.ci-bars__l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.ci-bars__l a { color: var(--ink); text-decoration: none; }
.ci-bars__l a:hover { color: var(--brand); text-decoration: underline; }
.ci-bars__t { height: 10px; background: var(--page); border-radius: 0 4px 4px 0; overflow: hidden; }
.ci-bars__t i { display: block; height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }
.ci-bars__v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.ci-bars__v small { display: inline-block; min-width: 46px; margin-left: 6px; color: var(--muted); font-weight: 400; }

/* Tables */
.ci-table { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; overflow: hidden; }
.ci-table__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px 8px; }
.ci-table__head h3 { margin: 0; font-size: 15px; }
.ci-table__tools { display: flex; gap: 10px; }
.ci-dl { font-size: 12.5px; font-weight: 600; color: var(--brand) !important; text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.ci-dl:hover { border-color: var(--brand); }
.ci-table__scroll { overflow-x: auto; }
.ci-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ci-table th { text-align: left; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); padding: 0; white-space: nowrap; }
.ci-table th button { width: 100%; text-align: inherit; background: none; border: 0; padding: 8px 12px; font: inherit; color: inherit; cursor: pointer; }
.ci-table th.num, .ci-table td.num { text-align: right; }
.ci-table td { padding: 8px 12px; border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; max-width: 520px; overflow: hidden; text-overflow: ellipsis; }
.ci-table td a { color: var(--brand); text-decoration: none; }
.ci-table tr:last-child td { border-bottom: 0; }
.ci-table tbody tr:hover { background: #faf9f6; }
.ci-more { display: block; width: 100%; padding: 10px; border: 0; border-top: 1px solid var(--grid); background: #fbfaf7; font: inherit; font-size: 13px; font-weight: 600; color: var(--brand); cursor: pointer; }
.ci-adbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.ci-adbar select { min-height: 36px; border-radius: 8px; border: 1px solid var(--line); padding: 0 10px; }

/* Forms and dialog */
.ci-form { max-width: 760px; }
.ci-form h3 { margin: 24px 0 10px; font-size: 16px; }
.ci-form h3:first-child { margin-top: 0; }
.ci-f { display: grid; gap: 4px; margin: 0 0 14px; font-weight: 600; font-size: 14px; }
.ci-f input, .ci-f select, .ci-f textarea { font: inherit; font-weight: 400; min-height: 38px; border: 1px solid #c9c7bf; border-radius: 8px; padding: 6px 10px; max-width: 520px; width: 100%; }
.ci-f small, .ci-check small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.ci-f--s { display: inline-grid; width: 150px; margin-right: 10px; }
.ci-check { display: block; margin: 0 0 12px; font-size: 14px; }
.ci-check small { display: block; margin: 2px 0 0 24px; }
.ci-check--i { display: inline-block; margin-right: 16px; }
.ci-form fieldset, .ci-dialog fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.ci-form legend, .ci-dialog legend { font-weight: 600; font-size: 14px; padding: 0 4px; }
.ci-saved { color: var(--up); font-weight: 600; }
.ci-dialog { border: 0; border-radius: 16px; padding: 24px; width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.ci-dialog::backdrop { background: rgba(21, 23, 30, .45); }
.ci-dialog h2 { margin: 0 0 16px; font-size: 20px; }
.ci-dialog fieldset label { display: inline-block; margin: 4px 14px 4px 0; font-size: 14px; }
.ci-sharebox { background: #f1f6ff; border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.ci-sharebox input { width: 100%; font: inherit; padding: 8px; border: 1px solid #c9d6ef; border-radius: 6px; }
.ci-facts { margin: 0 0 12px; padding-left: 18px; line-height: 1.8; }
.ci-progress { height: 10px; background: var(--page); border-radius: 5px; overflow: hidden; margin: 8px 0; max-width: 520px; }
.ci-progress i { display: block; height: 100%; background: var(--s1); transition: width .3s; }

/* Public pages */
.ci-public { margin: 0; background: var(--page); }
.ci-public .ci { margin: 0 auto; padding: 24px 16px 40px; }
.ci-foot { margin-top: 24px; color: var(--muted); font-size: 12.5px; line-height: 1.6; max-width: 900px; }
.ci-msg { max-width: 520px; margin: 12vh auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.ci-msg h1 { margin: 0 0 10px; font-size: 22px; }
.ci-brand { margin: 0 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ci-pw { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ci-pw input { font: inherit; padding: 8px 10px; border: 1px solid #c9c7bf; border-radius: 8px; }
.ci-pw button { font: inherit; font-weight: 600; padding: 9px 14px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; cursor: pointer; }

/* Audience page (media kit) */
.kit { max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; }
.kit-hero { background: radial-gradient(120% 90% at 85% 0%, #3446a0 0%, #23306b 45%, #182152 100%); color: #fff; border-radius: 0 0 22px 22px; padding: 36px 28px 30px; margin: 0 -16px 22px; }
.kit-brand { margin: 0 0 8px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.kit-hero h1 { margin: 0; font-size: clamp(30px, 6vw, 48px); line-height: 1.05; }
.kit-hero p { margin: 10px 0 0; max-width: 680px; color: rgba(255, 255, 255, .86); }
.kit-meta { font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.kit-print { font: inherit; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .5); background: none; color: #fff; cursor: pointer; }
.kit-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 22px; }
.kit-tiles div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.kit-tiles b { font-size: 32px; line-height: 1.05; color: var(--brand); font-variant-numeric: tabular-nums; }
.kit-tiles span { font-size: 14px; color: var(--ink-2); }
.kit-tiles em { font-style: normal; font-size: 12.5px; font-weight: 600; }
.kit-tiles em.up { color: var(--up); }
.kit-tiles em.down { color: var(--down); }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.kit-sec { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.kit-sec h2 { margin: 0 0 12px; font-size: 17px; }
.kit-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.kit-bars li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(60px, 1fr) 44px; gap: 10px; align-items: center; font-size: 14px; }
.kit-bars__l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kit-bars__t { height: 10px; background: var(--page); border-radius: 0 4px 4px 0; overflow: hidden; }
.kit-bars__t i { display: block; height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }
.kit-bars__v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.kit-months { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 180px; }
.kit-months__c { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.kit-months__c i { display: block; width: min(24px, 80%); background: var(--s1); border-radius: 4px 4px 0 0; }
.kit-months__c span { font-size: 11.5px; color: var(--muted); }
.kit-note { color: var(--muted); font-size: 13px; margin: -4px 0 12px; }
.kit-table { overflow-x: auto; }
.kit-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kit-table th, .kit-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--grid); }
.kit-table td + td, .kit-table th + th { text-align: right; font-variant-numeric: tabular-nums; }
.kit-social { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.kit-social li { background: var(--page); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; }
.kit-social b { font-size: 22px; color: var(--brand); }
.kit-social span { font-size: 13px; color: var(--ink-2); }
.kit-foot { color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.kit-cta { display: inline-block; background: var(--gold); color: #182152; font-weight: 700; text-decoration: none; padding: 12px 22px; border-radius: 999px; }
.kit-small { font-size: 12px; color: var(--muted); }

@media (max-width: 782px) {
	.ci-wrap { margin-right: 10px; }
	.ci-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.ci-tile { min-height: 0; padding: 12px; }
	.ci-card { padding: 14px 12px 10px; }
	.ci-head h1 { font-size: 24px; }
	.ci-tile__v { font-size: 24px; }
	.ci-bars li { grid-template-columns: minmax(0, 1fr) 70px auto; }
}

@media print {
	#adminmenumain, #wpadminbar, #wpfooter, .ci-head__tools, .ci-tabs, .ci-more, .ci-table__tools, .ci-adbar, .notice, .kit-print, .update-nag { display: none !important; }
	#wpcontent, #wpbody-content { margin: 0 !important; padding: 0 !important; }
	html.wp-toolbar { padding-top: 0 !important; }
	body, .ci-public { background: #fff !important; }
	.ci-card, .ci-tile, .kit-sec, .kit-tiles div { break-inside: avoid; border-color: #ddd; }
	.ci-table { break-inside: auto; border-color: #ddd; }
	.ci-table tr { break-inside: avoid; }
	.ci-table table { font-size: 10.5px; table-layout: auto; }
	.ci-table td, .ci-table th button { padding: 4px 6px; }
	.ci-table td:first-child { min-width: 38%; white-space: normal; }
	.ci-table__scroll { overflow: visible; }
	.ci-tiles { grid-template-columns: repeat(4, 1fr); }
	.kit-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 0; }
	.ci-bars__t i, .kit-bars__t i, .kit-months__c i, .ci-bar, .ci-line, .ci-area { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.ci-print-h { display: block !important; margin: 18px 0 10px; font-size: 18px; border-bottom: 2px solid var(--gold); padding-bottom: 4px; break-after: avoid; }
	.ci-print-part { break-before: page; }
	.ci-print-part:first-child { break-before: auto; }
}
.ci-print-h { display: none; }
