/**
 * IBRAM Analytics Central — Public/Front Styles
 */

:root {
	--ibram-p: #0E4C92;
	--ibram-s: #1FA774;
	--ibram-a: #E8A33D;
	--ibram-bg: #F4F6F9;
	--ibram-text: #1A2332;
	--ibram-muted: #64748B;
	--ibram-border: #E2E8F0;
}

/* Body class applied while plugin pages are showing — used for scoped tweaks
   without forcing a full bleed (theme header/footer wrap our content). */
.ibram-public-page .ibram-public-page-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, system-ui, sans-serif;
	color: var(--ibram-text);
}
.ibram-public-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}
.ibram-public-header {
	background: linear-gradient(135deg, #0E4C92 0%, #0a3a70 100%);
	color: #fff;
	padding: 36px 0;
	margin-bottom: 24px;
}
.ibram-public-header h1 {
	margin: 0 0 6px;
	font-size: 28px;
	font-weight: 600;
	color: #fff !important;
}
.ibram-public-header p { margin: 0; opacity: .85; font-size: 15px; }

.ibram-public-footer {
	margin-top: 40px;
	padding: 24px 0;
	color: var(--ibram-muted);
	font-size: 13px;
	text-align: center;
	border-top: 1px solid var(--ibram-border);
}

.ibram-public-dashboard {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ibram-public-filterbar {
	background: #fff;
	padding: 16px 20px;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
}
.ibram-public-filterbar label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--ibram-muted);
	margin-bottom: 4px;
}
.ibram-public-filterbar select {
	padding: 8px 12px;
	border: 1px solid var(--ibram-border);
	border-radius: 8px;
	background: #fff;
	min-width: 180px;
	font-size: 13px;
}

.ibram-public-kpis {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
}

.ibram-kpi-card {
	background: #fff;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
	border-left: 4px solid var(--ibram-p);
}
.ibram-kpi-card .ibram-kpi-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--ibram-muted);
	margin-bottom: 6px;
}
.ibram-kpi-card .ibram-kpi-value {
	font-size: 28px;
	font-weight: 700;
	color: var(--ibram-text);
}
.ibram-kpi-card .ibram-kpi-period {
	font-size: 11px;
	color: var(--ibram-muted);
	margin-top: 4px;
}

.ibram-public-charts {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 20px;
}
@media (max-width: 900px) {
	.ibram-public-charts { grid-template-columns: 1fr; }
}

.ibram-chart-wrap {
	background: #fff;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.ibram-chart-title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 600;
}
.ibram-chart {
	min-height: 280px;
	width: 100%;
}

.ibram-data-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
	font-size: 13px;
}
.ibram-data-table th, .ibram-data-table td {
	padding: 10px 14px;
	text-align: left;
	border-bottom: 1px solid var(--ibram-border);
}
.ibram-data-table th {
	background: #F8FAFC;
	color: var(--ibram-muted);
	font-size: 11px;
	text-transform: uppercase;
	font-weight: 600;
}
.ibram-data-table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   Registration page (/ibram-analytics-cadastro/)
   ============================================================ */

.ibram-register-page .ibram-public-header h1 { font-size: 30px; }

.ibram-register-grid {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 28px;
	align-items: start;
	margin-bottom: 40px;
}
@media (max-width: 900px) { .ibram-register-grid { grid-template-columns: 1fr; } }

.ibram-register-info { display: flex; flex-direction: column; gap: 16px; }

.ibram-register-card {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.ibram-register-card h2 {
	margin: 0 0 12px;
	font-size: 16px;
	color: var(--ibram-p);
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
}
.ibram-register-card p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--ibram-text); }

.ibram-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.ibram-steps li {
	counter-increment: step;
	position: relative;
	padding-left: 44px;
	margin-bottom: 18px;
	font-size: 13.5px;
	line-height: 1.5;
}
.ibram-steps li::before {
	content: counter(step);
	position: absolute;
	left: 0; top: -2px;
	width: 32px; height: 32px;
	background: var(--ibram-p);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
}
.ibram-steps li strong { color: var(--ibram-text); }

.ibram-checklist { list-style: none; padding: 0; margin: 0; }
.ibram-checklist li {
	padding-left: 26px;
	position: relative;
	margin-bottom: 8px;
	font-size: 13.5px;
	line-height: 1.4;
}
.ibram-checklist li::before {
	content: "✓";
	position: absolute;
	left: 0; top: 0;
	color: var(--ibram-s);
	font-weight: 700;
	font-size: 16px;
}

.ibram-register-form-wrap {
	background: #fff;
	border-radius: 12px;
	padding: 32px;
	box-shadow: 0 4px 12px rgba(15,23,42,.08);
}
.ibram-register-form h2 {
	margin: 24px 0 16px;
	font-size: 16px;
	color: var(--ibram-p);
	padding-bottom: 8px;
	border-bottom: 2px solid var(--ibram-border);
}
.ibram-register-form h2:first-of-type { margin-top: 0; }

.ibram-register-form .ibram-form-row { margin-bottom: 18px; }
.ibram-register-form label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 6px;
	color: var(--ibram-text);
}
.ibram-register-form input[type="text"],
.ibram-register-form input[type="url"],
.ibram-register-form input[type="email"],
.ibram-register-form textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--ibram-border);
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
	box-sizing: border-box;
}
.ibram-register-form input:focus,
.ibram-register-form textarea:focus {
	outline: none;
	border-color: var(--ibram-p);
	box-shadow: 0 0 0 3px rgba(14,76,146,.12);
}
.ibram-register-form .required { color: #DC2626; font-weight: 700; }
.ibram-register-form .ibram-help {
	display: block;
	font-size: 12px;
	color: var(--ibram-muted);
	margin-top: 4px;
}
.ibram-register-form select {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--ibram-border);
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	box-sizing: border-box;
}
.ibram-form-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
@media (max-width: 600px) { .ibram-form-grid-2 { grid-template-columns: 1fr; } }

.ibram-email-warning {
	margin-top: 8px;
	padding: 12px 14px;
	background: #FEF3C7;
	border-left: 4px solid #E8A33D;
	border-radius: 6px;
	font-size: 13px;
	line-height: 1.5;
	color: #78350F;
}
.ibram-email-warning strong { color: #78350F; }

.ibram-register-form .ibram-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	font-size: 13.5px;
	line-height: 1.5;
	cursor: pointer;
}
.ibram-register-form .ibram-checkbox input { margin-top: 2px; }

.ibram-btn-submit {
	display: inline-block;
	width: 100%;
	background: linear-gradient(135deg, var(--ibram-p) 0%, #0a3a70 100%);
	color: #fff;
	border: none;
	padding: 14px 24px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: transform .15s, box-shadow .15s;
}
.ibram-btn-submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(14,76,146,.25);
}

/* Alerts */
.ibram-alert {
	padding: 16px 20px;
	border-radius: 10px;
	margin-bottom: 20px;
	font-size: 14px;
}
.ibram-alert ul { margin: 8px 0 0 20px; padding: 0; }
.ibram-alert-error { background: #FEE2E2; color: #991B1B; border-left: 4px solid #DC2626; }
.ibram-alert-success { background: #DCFCE7; color: #166534; border-left: 4px solid var(--ibram-s); }
.ibram-alert-success h2 { margin: 0 0 8px; font-size: 18px; color: #166534; }

/* Success state */
.ibram-success-card {
	background: #fff;
	border-radius: 12px;
	padding: 28px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.ibram-success-card h2 {
	margin: 0 0 12px;
	color: var(--ibram-p);
	font-size: 18px;
}
.ibram-success-card ol { padding-left: 24px; }
.ibram-success-card ol li { margin-bottom: 14px; line-height: 1.6; }
.ibram-success-card code {
	background: #F1F5F9;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 13px;
	word-break: break-all;
}
.ibram-config-list { list-style: none; padding: 8px 0 0; }
.ibram-config-list li { margin-bottom: 6px; font-size: 13.5px; }

.ibram-token-box {
	background: #1A2332;
	color: #fff;
	padding: 16px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
}
.ibram-token-box code {
	flex: 1;
	background: transparent;
	color: #fff;
	font-size: 13px;
	word-break: break-all;
	font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
}
.ibram-btn-copy {
	background: var(--ibram-s);
	color: #fff;
	border: none;
	padding: 8px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	font-size: 13px;
	white-space: nowrap;
}
.ibram-btn-copy:hover { background: #178a5f; }

/* Print friendly */
@media print {
	.ibram-public-header, .ibram-public-footer { background: #fff !important; color: #000 !important; }
	.ibram-public-header h1 { color: #000 !important; }
	.ibram-btn-submit, .ibram-btn-copy { display: none; }
	.ibram-success-card { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================================
   EXTENDED PUBLIC DASHBOARD
   ============================================================ */

.ibram-public-dashboard { display: flex; flex-direction: column; gap: 28px; }

/* Filter bar enhancements */
.ibram-public-filterbar {
	flex-wrap: wrap;
	gap: 16px;
	padding: 18px 22px;
}
.ibram-public-filter-info {
	margin-left: auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-end;
	font-size: 12px;
	color: var(--ibram-muted);
}
.ibram-public-badge {
	display: inline-block;
	background: var(--ibram-s);
	color: #fff;
	padding: 4px 12px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.ibram-public-freshness { font-style: italic; }

/* Sections */
.ibram-public-section { display: flex; flex-direction: column; gap: 16px; }
.ibram-section-head h2 {
	margin: 0 0 4px;
	font-size: 20px;
	color: var(--ibram-p);
	font-weight: 700;
}
.ibram-section-head h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--ibram-text);
}
.ibram-section-head p {
	margin: 0 0 4px;
	font-size: 13.5px;
	color: var(--ibram-muted);
	line-height: 1.5;
}

/* Grids */
.ibram-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ibram-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) {
	.ibram-grid-2, .ibram-grid-3 { grid-template-columns: 1fr; }
}

/* KPI cards: more breathing room on public page */
.ibram-public-kpis { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ibram-kpi-card { padding: 22px 24px; }
.ibram-kpi-card .ibram-kpi-hint {
	font-size: 11px;
	color: var(--ibram-muted);
	margin-top: 6px;
	text-transform: uppercase;
	letter-spacing: .03em;
}

/* Heatmap (public) */
.ibram-heatmap-public {
	margin-top: 8px;
	overflow-x: auto;
}
.ibram-heatmap-grid {
	display: grid;
	grid-template-columns: 60px repeat(24, 1fr);
	gap: 3px;
	min-width: 640px;
	font-size: 10px;
}
.ibram-heatmap-grid .hm-corner { }
.ibram-heatmap-grid .hm-hour {
	text-align: center;
	color: var(--ibram-muted);
	font-weight: 600;
	font-size: 10px;
	padding: 4px 0;
}
.ibram-heatmap-grid .hm-day {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-right: 8px;
	color: var(--ibram-muted);
	font-weight: 700;
	font-size: 11px;
}
.ibram-heatmap-grid .hm-cell {
	aspect-ratio: 1;
	background: #F1F5F9;
	border-radius: 3px;
	transition: transform .1s;
}
.ibram-heatmap-grid .hm-cell:hover {
	outline: 2px solid var(--ibram-p);
	transform: scale(1.15);
	z-index: 2;
}
.ibram-heatmap-legend {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	font-size: 11px;
	color: var(--ibram-muted);
	justify-content: flex-end;
}
.ibram-heatmap-legend .hm-legend-gradient {
	width: 140px;
	height: 10px;
	border-radius: 5px;
	background: linear-gradient(to right, rgba(14,76,146,.12), rgba(14,76,146,1));
}

/* Museum grid */
.ibram-museum-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 18px;
}
.ibram-museum-card {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .15s, box-shadow .15s;
	border: 1px solid #EEF2F6;
}
.ibram-museum-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(15,23,42,.1);
}
.ibram-museum-logo {
	width: 100%;
	height: 120px;
	object-fit: cover;
	background: linear-gradient(135deg, #0E4C92 0%, #0a3a70 100%);
}
.ibram-museum-logo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 48px;
}
.ibram-museum-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ibram-museum-name {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--ibram-text);
	line-height: 1.3;
}
.ibram-museum-meta {
	margin: 0;
	font-size: 12px;
	color: var(--ibram-muted);
	display: flex;
	gap: 6px;
	align-items: center;
	flex-wrap: wrap;
}
.ibram-museum-type {
	background: #EFF6FF;
	color: #1E40AF;
	padding: 2px 8px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.ibram-museum-desc {
	margin: 0;
	font-size: 13px;
	color: var(--ibram-text);
	line-height: 1.5;
	flex: 1;
}
.ibram-museum-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	margin: 10px 0 0;
	padding-top: 12px;
	border-top: 1px solid #EEF2F6;
}
.ibram-museum-stats div {
	text-align: center;
}
.ibram-museum-stats dt {
	margin: 0;
	font-size: 10px;
	color: var(--ibram-muted);
	text-transform: uppercase;
	letter-spacing: .04em;
	font-weight: 600;
}
.ibram-museum-stats dd {
	margin: 2px 0 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--ibram-p);
}

/* Privacy note */
.ibram-public-privacy {
	margin-top: 20px;
	padding: 18px 22px;
	background: #F0F9FF;
	border-left: 4px solid #0EA5E9;
	border-radius: 10px;
	font-size: 13.5px;
	line-height: 1.6;
	color: #0C4A6E;
}
.ibram-public-privacy strong { color: #0369A1; }

/* ============================================================
   MODERN FULL-WIDTH PUBLIC DASHBOARD
   ============================================================ */

/* Break out of any theme container constraints */
.ibram-public-dashboard.ibram-fullbleed {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 0;
}

.ibram-public-dashboard.ibram-modern {
	--ibram-p: #0E4C92;
	--ibram-p-700: #0a3a70;
	--ibram-s: #1FA774;
	--ibram-a: #E8A33D;
	--ibram-info: #2563EB;
	--ibram-purple: #9333EA;
	--ibram-bg: #F4F6F9;
	--ibram-surface: #FFFFFF;
	--ibram-text: #0F172A;
	--ibram-muted: #64748B;
	--ibram-border: #E2E8F0;

	background: var(--ibram-bg);
	color: var(--ibram-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, system-ui, sans-serif;
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding-bottom: 48px;
}

.ibram-modern * { box-sizing: border-box; }

/* Hero */
.ibram-hero {
	background: linear-gradient(135deg, #0E4C92 0%, #0a3a70 55%, #1FA774 140%);
	color: #fff;
	padding: 40px 0 36px;
}
.ibram-hero-inner {
	max-width: 1600px;
	margin: 0 auto;
	padding: 0 40px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.ibram-hero-text h1 {
	margin: 0 0 6px;
	font-size: 34px;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.1;
	color: #fff !important;
}
.ibram-hero-text p {
	margin: 0;
	font-size: 16px;
	opacity: .88;
	max-width: 720px;
	line-height: 1.5;
}
.ibram-hero-filters {
	display: flex;
	align-items: flex-end;
	gap: 16px;
	flex-wrap: wrap;
	background: rgba(255,255,255,.12);
	backdrop-filter: blur(8px);
	padding: 16px 20px;
	border-radius: 14px;
	border: 1px solid rgba(255,255,255,.2);
}
.ibram-filter { display: flex; flex-direction: column; gap: 6px; }
.ibram-filter label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .08em;
	opacity: .85;
	font-weight: 600;
}
.ibram-filter select {
	padding: 10px 14px;
	background: rgba(255,255,255,.95);
	border: none;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 500;
	color: var(--ibram-text);
	min-width: 200px;
	cursor: pointer;
}
.ibram-filter select:focus { outline: 2px solid #fff; outline-offset: 1px; }

.ibram-hero-meta {
	margin-left: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-end;
}
.ibram-chip {
	display: inline-block;
	background: #fff;
	color: var(--ibram-p);
	padding: 6px 14px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .02em;
}
.ibram-freshness {
	font-size: 11.5px;
	opacity: .8;
	font-style: italic;
}

/* Blocks & cards */
.ibram-block {
	max-width: 1600px;
	margin: 0 auto;
	padding: 0 40px;
	width: 100%;
}
.ibram-block-head { margin-bottom: 18px; }
.ibram-block-head h2 {
	margin: 0 0 4px;
	font-size: 22px;
	font-weight: 700;
	color: var(--ibram-text);
	letter-spacing: -.01em;
	display: flex;
	align-items: center;
	gap: 8px;
}
.ibram-block-head p {
	margin: 0;
	color: var(--ibram-muted);
	font-size: 14px;
	line-height: 1.5;
}

.ibram-card {
	background: var(--ibram-surface);
	border-radius: 16px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.04);
	border: 1px solid rgba(226,232,240,.6);
	transition: box-shadow .2s;
}
.ibram-card:hover { box-shadow: 0 2px 6px rgba(15,23,42,.05), 0 16px 40px rgba(15,23,42,.08); }
.ibram-card-chart { display: flex; flex-direction: column; }
.ibram-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 16px;
}
.ibram-card-head h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--ibram-text);
}
.ibram-muted { color: var(--ibram-muted); }

/* Info button */
.ibram-info-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	color: var(--ibram-muted);
	padding: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background .15s, color .15s;
}
.ibram-info-btn:hover { background: #EFF6FF; color: var(--ibram-p); }
.ibram-info-btn:focus-visible { outline: 2px solid var(--ibram-p); outline-offset: 2px; }
.ibram-info-btn--inline {
	margin-left: 4px;
	width: 22px;
	height: 22px;
}
.ibram-info-btn--inline svg { width: 16px; height: 16px; }

/* Modern KPI cards */
.ibram-kpi-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
}
@media (max-width: 1100px) { .ibram-kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .ibram-kpi-row { grid-template-columns: 1fr; } }

.ibram-kpi-big {
	background: var(--ibram-surface);
	border-radius: 18px;
	padding: 24px 26px;
	box-shadow: 0 2px 6px rgba(15,23,42,.06), 0 12px 32px rgba(15,23,42,.05);
	position: relative;
	overflow: hidden;
	transition: transform .2s, box-shadow .2s;
}
.ibram-kpi-big::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 5px;
	background: var(--_accent, var(--ibram-p));
}
.ibram-kpi-big:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 10px rgba(15,23,42,.08), 0 20px 44px rgba(15,23,42,.1);
}
.ibram-kpi-big.ibram-accent-primary   { --_accent: var(--ibram-p); }
.ibram-kpi-big.ibram-accent-secondary { --_accent: var(--ibram-s); }
.ibram-kpi-big.ibram-accent-accent    { --_accent: var(--ibram-a); }
.ibram-kpi-big.ibram-accent-info      { --_accent: var(--ibram-info); }

.ibram-kpi-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}
.ibram-kpi-icon {
	font-size: 28px;
	line-height: 1;
}
.ibram-kpi-big .ibram-kpi-label {
	font-size: 13px;
	color: var(--ibram-muted);
	font-weight: 600;
	margin-bottom: 6px;
	text-transform: none;
	letter-spacing: 0;
}
.ibram-kpi-big .ibram-kpi-value {
	font-size: 36px;
	font-weight: 800;
	color: var(--ibram-text);
	letter-spacing: -.02em;
	line-height: 1.1;
}

/* Grids */
.ibram-modern .ibram-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ibram-modern .ibram-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1100px) {
	.ibram-modern .ibram-grid-2, .ibram-modern .ibram-grid-3 { grid-template-columns: 1fr; }
}

/* Heatmap polish in modern theme */
.ibram-modern .ibram-heatmap-public { overflow-x: auto; }
.ibram-modern .ibram-heatmap-grid { gap: 4px; min-width: 720px; }
.ibram-modern .ibram-heatmap-grid .hm-hour {
	font-size: 10.5px;
	padding: 6px 0;
	font-weight: 600;
}
.ibram-modern .ibram-heatmap-grid .hm-cell {
	border-radius: 4px;
	min-height: 22px;
	cursor: default;
}

/* Museum cards in modern theme */
.ibram-modern .ibram-museum-grid {
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
}
.ibram-modern .ibram-museum-card {
	border-radius: 16px;
	border: none;
	box-shadow: 0 2px 6px rgba(15,23,42,.06), 0 10px 28px rgba(15,23,42,.05);
}
.ibram-modern .ibram-museum-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 10px rgba(15,23,42,.08), 0 20px 44px rgba(15,23,42,.12);
}
.ibram-modern .ibram-museum-logo { height: 140px; }
.ibram-modern .ibram-museum-stats dd { font-size: 20px; }

/* Tables in modern theme */
.ibram-modern .ibram-data-table { font-size: 13.5px; }
.ibram-modern .ibram-data-table th {
	background: #F8FAFC;
	color: var(--ibram-muted);
	padding: 12px 14px;
	font-weight: 700;
}
.ibram-modern .ibram-data-table td { padding: 12px 14px; }
.ibram-modern .ibram-data-table tbody tr:hover { background: #F8FAFC; }

/* Privacy note (modern) */
.ibram-modern .ibram-public-privacy {
	max-width: 1600px;
	margin: 0 auto;
	padding: 20px 24px;
	margin-left: 40px;
	margin-right: 40px;
}

/* ========== INFO MODAL ========== */
.ibram-modal-bg {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15,23,42,.6);
	backdrop-filter: blur(4px);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: ibramFade .2s;
}
.ibram-modal-bg.is-open { display: flex; }
@keyframes ibramFade {
	from { opacity: 0; } to { opacity: 1; }
}
.ibram-modal-content {
	background: #fff;
	border-radius: 18px;
	max-width: 560px;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 25px 80px rgba(0,0,0,.35);
	animation: ibramPop .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes ibramPop {
	from { transform: scale(.9); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}
.ibram-modal-top {
	padding: 22px 26px 16px;
	border-bottom: 1px solid var(--ibram-border);
	display: flex;
	align-items: center;
	gap: 14px;
}
.ibram-modal-icon { font-size: 32px; line-height: 1; }
.ibram-modal-top h2 {
	flex: 1;
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	color: var(--ibram-text);
}
.ibram-modal-close {
	background: #F1F5F9;
	border: none;
	cursor: pointer;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-size: 24px;
	color: var(--ibram-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	transition: background .15s, color .15s;
}
.ibram-modal-close:hover { background: #E2E8F0; color: var(--ibram-text); }
.ibram-modal-body {
	padding: 20px 26px 26px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.ibram-modal-body section h4 {
	margin: 0 0 6px;
	font-size: 13px;
	color: var(--ibram-p);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
}
.ibram-modal-body section p {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--ibram-text);
}

/* Responsive tweaks */
@media (max-width: 720px) {
	.ibram-hero { padding: 28px 0 24px; }
	.ibram-hero-inner { padding: 0 20px; }
	.ibram-hero-text h1 { font-size: 26px; }
	.ibram-hero-meta { margin-left: 0; align-items: flex-start; }
	.ibram-block { padding: 0 20px; }
	.ibram-modern .ibram-public-privacy { margin-left: 20px; margin-right: 20px; }
	.ibram-kpi-big .ibram-kpi-value { font-size: 30px; }
}

/* ============================================================
   Page links (top pages table) and clickable museum cards
   ============================================================ */

.ibram-page-link {
	color: var(--ibram-p, #0E4C92);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
	transition: color .15s;
	border-bottom: 1px solid transparent;
}
.ibram-page-link:hover,
.ibram-page-link:focus {
	color: var(--ibram-s, #1FA774);
	border-bottom-color: currentColor;
}
.ibram-page-link:visited { color: var(--ibram-p, #0E4C92); }
.ibram-link-icon {
	flex-shrink: 0;
	opacity: .55;
	transition: opacity .15s, transform .15s;
}
.ibram-page-link:hover .ibram-link-icon {
	opacity: 1;
	transform: translate(1px, -1px);
}

/* Clickable museum card — preserves card visuals while making the whole tile a link */
a.ibram-museum-card,
.ibram-museum-card--link {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	cursor: pointer;
}
a.ibram-museum-card:hover,
.ibram-museum-card--link:hover {
	transform: translateY(-4px);
	box-shadow: 0 6px 14px rgba(15,23,42,.1), 0 24px 50px rgba(14,76,146,.18);
	border-color: rgba(14,76,146,.3);
}
a.ibram-museum-card:focus-visible,
.ibram-museum-card--link:focus-visible {
	outline: 3px solid var(--ibram-p, #0E4C92);
	outline-offset: 3px;
}
a.ibram-museum-card .ibram-museum-name,
.ibram-museum-card--link .ibram-museum-name {
	display: flex;
	align-items: center;
	gap: 6px;
}
a.ibram-museum-card .ibram-link-icon,
.ibram-museum-card--link .ibram-link-icon {
	color: var(--ibram-p, #0E4C92);
	opacity: .5;
}
a.ibram-museum-card:hover .ibram-link-icon,
.ibram-museum-card--link:hover .ibram-link-icon {
	opacity: 1;
	transform: translate(2px, -2px);
}

/* ============================================================
   Top countries — ranked list with flag + progress bar
   ============================================================ */

.ibram-country-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-height: 240px;
}

.ibram-country-item {
	display: grid;
	grid-template-columns: 32px 1fr;
	gap: 14px;
	align-items: center;
	padding: 10px 4px;
	border-radius: 6px;
	transition: background .15s;
}
.ibram-country-item:hover { background: #F8FAFC; }

.ibram-country-flag {
	font-size: 26px;
	line-height: 1;
	text-align: center;
	font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", system-ui, sans-serif;
	/* Trick to coerce emoji rendering on Windows where regional indicators
	   default to letters: nudge with text-rendering hint. Best-effort. */
}

.ibram-country-info { min-width: 0; }
.ibram-country-name {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 5px;
	font-weight: 600;
	font-size: 13.5px;
	color: var(--ibram-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ibram-country-code {
	font-family: "Cascadia Code", Consolas, monospace;
	font-size: 10px;
	font-weight: 500;
	color: var(--ibram-muted);
	background: #F1F5F9;
	padding: 1px 5px;
	border-radius: 3px;
}

.ibram-country-bar {
	height: 6px;
	background: #F1F5F9;
	border-radius: 3px;
	overflow: hidden;
}
.ibram-country-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--ibram-p, #0E4C92) 0%, #1FA774 100%);
	border-radius: 3px;
	transition: width .4s ease-out;
}

.ibram-country-count {
	text-align: right;
	min-width: 70px;
}
.ibram-country-count strong {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: var(--ibram-text);
	line-height: 1.1;
}
.ibram-country-count small {
	display: block;
	font-size: 11px;
	color: var(--ibram-muted);
	margin-top: 2px;
}

.ibram-country-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 240px;
	text-align: center;
	color: var(--ibram-muted);
	padding: 24px;
}
.ibram-country-empty-icon { font-size: 48px; margin-bottom: 12px; }
.ibram-country-empty p { margin: 0 0 6px; max-width: 360px; line-height: 1.5; }
.ibram-country-empty p strong { color: var(--ibram-text); }

/* ============================================================
   Clickable KPI cards (drill-down)
   ============================================================ */

.ibram-kpi-clickable {
	cursor: pointer;
	border: none;
	width: 100%;
	text-align: left;
	font: inherit;
	color: inherit;
	background: var(--ibram-surface, #fff);
	display: block;
	position: relative;
}
.ibram-kpi-clickable:hover {
	transform: translateY(-4px);
	box-shadow: 0 6px 14px rgba(15,23,42,.08), 0 24px 50px rgba(15,23,42,.12);
}
.ibram-kpi-clickable:focus-visible {
	outline: 3px solid var(--ibram-p, #0E4C92);
	outline-offset: 3px;
}
.ibram-kpi-clickable .ibram-kpi-actions {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.ibram-kpi-info-btn {
	color: var(--ibram-muted, #64748B);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
	border-radius: 50%;
	transition: background .15s, color .15s;
	cursor: help;
}
.ibram-kpi-info-btn:hover { background: #EFF6FF; color: var(--ibram-p, #0E4C92); }
.ibram-kpi-drill-icon {
	color: var(--_accent, var(--ibram-p, #0E4C92));
	opacity: .35;
	transition: opacity .2s, transform .2s;
	display: inline-flex;
}
.ibram-kpi-clickable:hover .ibram-kpi-drill-icon {
	opacity: 1;
	transform: translateX(3px);
}
.ibram-kpi-hint-drill {
	margin-top: 8px;
	font-size: 11px;
	color: var(--ibram-muted, #64748B);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	opacity: .6;
	transition: opacity .15s, color .15s;
}
.ibram-kpi-clickable:hover .ibram-kpi-hint-drill {
	opacity: 1;
	color: var(--_accent, var(--ibram-p, #0E4C92));
}

/* ============================================================
   KPI Drill-down modal
   ============================================================ */

.ibram-kpi-modal-bg {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15,23,42,.7);
	backdrop-filter: blur(6px);
	z-index: 100002;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: ibramFade .2s;
}
.ibram-kpi-modal-bg.is-open { display: flex; }

.ibram-kpi-modal-content {
	background: #fff;
	border-radius: 20px;
	max-width: 1000px;
	width: 100%;
	max-height: 92vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 30px 90px rgba(0,0,0,.4);
	animation: ibramPop .25s cubic-bezier(.2,.8,.2,1);
}

.ibram-kpi-modal-top {
	padding: 22px 28px 18px;
	border-bottom: 1px solid var(--ibram-border, #E2E8F0);
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}
.ibram-kpi-modal-icon { font-size: 36px; line-height: 1; }
.ibram-kpi-modal-titles { flex: 1; min-width: 0; }
.ibram-kpi-modal-titles h2 {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: var(--ibram-text, #0F172A);
	line-height: 1.2;
}
.ibram-kpi-modal-subtitle {
	margin: 4px 0 0;
	font-size: 13.5px;
	color: var(--ibram-muted, #64748B);
}
.ibram-kpi-modal-close {
	background: #F1F5F9;
	border: none;
	cursor: pointer;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 24px;
	color: var(--ibram-muted, #64748B);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	transition: background .15s, color .15s;
	flex-shrink: 0;
}
.ibram-kpi-modal-close:hover { background: #E2E8F0; color: var(--ibram-text, #0F172A); }

.ibram-kpi-modal-body {
	padding: 24px 28px 28px;
	overflow-y: auto;
	flex: 1;
}

.ibram-kpi-modal-loading {
	text-align: center;
	padding: 40px 20px;
	color: var(--ibram-muted, #64748B);
}
.ibram-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid #E2E8F0;
	border-top-color: var(--ibram-p, #0E4C92);
	border-radius: 50%;
	margin: 0 auto 14px;
	animation: ibramSpin .8s linear infinite;
}
@keyframes ibramSpin { to { transform: rotate(360deg); } }

.ibram-kpi-modal-charts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}
@media (max-width: 720px) {
	.ibram-kpi-modal-charts { grid-template-columns: 1fr; }
}

.ibram-kpi-chart-block {
	background: #F8FAFC;
	border-radius: 12px;
	padding: 16px 18px;
	border: 1px solid #EEF2F6;
}
.ibram-kpi-chart-block h3 {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	color: var(--ibram-text, #0F172A);
	text-transform: uppercase;
	letter-spacing: .03em;
}
.ibram-kpi-chart-block .ibram-chart {
	min-height: 240px;
	width: 100%;
}
.ibram-kpi-chart-block.span-2 { grid-column: span 2; }
@media (max-width: 720px) {
	.ibram-kpi-chart-block.span-2 { grid-column: span 1; }
}
.ibram-kpi-chart-block table {
	width: 100%;
	font-size: 13px;
	border-collapse: collapse;
}
.ibram-kpi-chart-block table th,
.ibram-kpi-chart-block table td {
	padding: 8px 6px;
	text-align: left;
	border-bottom: 1px solid #E2E8F0;
}
.ibram-kpi-chart-block table th {
	font-size: 11px;
	color: var(--ibram-muted, #64748B);
	text-transform: uppercase;
	font-weight: 600;
}
.ibram-kpi-chart-block table td.num {
	text-align: right;
	font-weight: 600;
}

.ibram-kpi-modal-error {
	text-align: center;
	padding: 40px 20px;
	color: var(--ibram-danger, #DC2626);
}
