/* [satm_datasets] — spreadsheet-style catalog + dataset detail. */

.satm-ds {
	--satm-accent: #1a7f83;
	--satm-accent-bright: #32bcc1;
	--satm-gold: #d9b310;
	--satm-dark: #1d2731;
	--satm-border: #cfd4db;
	--satm-muted: #6b7280;
	--satm-radius: 4px;
	--satm-zebra: #f8f9fb;
	--satm-accent-deep: #146d71;
	font-size: 13.5px;
	line-height: 1.45;
}

/* ---------- Toolbar ---------- */

.satm-ds__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 0 0 10px;
}

.satm-ds__search {
	flex: 1;
	min-width: 220px;
	height: 38px;
	border: 1px solid #cfd4db;
	border-radius: var(--satm-radius);
	padding: 0 12px;
	font: inherit;
	background: #fff;
}

.satm-ds__count {
	font-size: 13px;
	color: var(--satm-muted);
	white-space: nowrap;
}

/* One toolbar row on desktop: search (bounded) · count · … · language at the right. */
.satm-ds__search { flex: 0 1 460px; min-width: 220px; }
.satm-ds__langwrap { order: 9; margin-left: auto; display: flex; justify-content: flex-end; }
.satm-ds__results { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 8px 0 10px; }
.satm-ds__results:empty, .satm-ds__results .satm-ds__chips:empty { display: none; }
.satm-ds__results .satm-ds__chips { margin: 0; }
/* From 900px down (where the Filters button appears) the language pill moves above
   the search, right-aligned, and stays there — no jumping between breakpoints. */
@media (max-width: 900px) {
	.satm-ds__langwrap { order: -1; flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 640px) {
	.satm-ds__search { flex: 1 1 0; min-width: 0; }
	.satm-ds .satm-ds__drawerbtn { white-space: nowrap; }
	.satm-ds__count { flex-basis: 100%; }
}

.satm-ds .satm-ds__clear {
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--satm-accent);
	background: #fff;
	border: 1px solid var(--satm-accent);
	border-radius: var(--satm-radius);
	padding: 8px 12px;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
}

.satm-ds .satm-ds__clear:hover { background: var(--satm-accent); color: #fff; }

/* ---------- Sheet ---------- */

.satm-ds__sheet {
	border: 1px solid var(--satm-border);
	border-radius: var(--satm-radius);
	overflow: auto;
	max-height: 75vh;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
	background: #fff;
}

.satm-ds__table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	min-width: 1300px; /* fits a 1366px laptop; narrower screens scroll instead of squeezing columns */
	margin: 0;
	font-size: 12.5px;
}

.satm-ds .satm-ds__table th,
.satm-ds .satm-ds__table td {
	border: none;
	border-right: 1px solid var(--satm-border);
	border-bottom: 1px solid var(--satm-border);
	padding: 6px 9px;
	text-align: left;
	vertical-align: top;
	background: #fff;
}

.satm-ds__table th:last-child,
.satm-ds__table td:last-child { border-right: none; }

.satm-ds .satm-ds__table thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: #eef1f5;
	font-weight: 700;
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #3d434a;
	cursor: pointer;
	user-select: none;
}

.satm-ds__arr { opacity: 0.7; font-size: 10px; margin-left: 3px; }
.satm-ds__table thead th.is-sorted { background: #e2ecec; color: var(--satm-accent-deep); }
.satm-ds__table thead th.is-sorted .satm-ds__arr { opacity: 1; }

/* Autofilter row, sticky under the header. */
.satm-ds .satm-ds__filters th {
	top: 34px;
	background: #f6f7f9;
	padding: 4px 5px;
	cursor: default;
	border-bottom: 2px solid var(--satm-border);
}

.satm-ds__filters select {
	width: 100%;
	height: 27px;
	margin: 0 0 3px;
	border: 1px solid #cfd4db;
	border-radius: 3px;
	font: inherit;
	font-size: 12px;
	background: #fff;
	color: #3d434a;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
	padding: 0 4px;
}

.satm-ds__filters select.is-on { border-color: var(--satm-accent); color: var(--satm-accent); font-weight: 600; }

.satm-ds__table tbody tr:nth-child(4n+1) td,
.satm-ds__table tbody tr:nth-child(4n+2) td { background: var(--satm-zebra); }
.satm-ds__table tbody tr.satm-ds__row:hover td { background: #eaf5f5; }

.satm-ds__tgl { width: 38px; text-align: center; }
.satm-ds__table td.satm-ds__tgl,
.satm-ds__table th.satm-ds__tgl { position: sticky; left: 0; z-index: 1; }
.satm-ds__table thead th.satm-ds__tgl { z-index: 3; }

.satm-ds__name { min-width: 290px; }
.satm-ds .satm-ds__name a { color: var(--satm-accent-deep); font-weight: 600; line-height: 1.35; text-decoration: underline !important; text-decoration-color: rgba(20, 109, 113, 0.35); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.satm-ds .satm-ds__name a:hover { color: var(--satm-dark); text-decoration-color: var(--satm-accent-bright); }
.satm-ds__nw { white-space: nowrap; }
.satm-ds__countries { min-width: 230px; }
.satm-ds__c { text-align: center; }
.satm-ds__ok { color: var(--satm-accent); font-weight: 700; }
.satm-ds__muted { color: var(--satm-muted); }

.satm-ds .satm-ds__toggle {
	background: none;
	border: 1px solid var(--satm-border);
	border-radius: 3px;
	width: 26px;
	height: 26px;
	padding: 0;
	cursor: pointer;
	color: var(--satm-accent);
	font-weight: 700;
	line-height: 1;
	font-size: 12px;
}

/* ---------- Buttons ---------- */

.satm-ds__btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	margin: 1px 3px 1px 0;
	border-radius: var(--satm-radius);
	font-size: 11.5px;
	font-weight: 700;
	text-decoration: none !important;
	border: 1px solid var(--satm-accent);
	color: var(--satm-accent) !important;
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.satm-ds__btn:hover { background: var(--satm-accent); color: #fff !important; }
.satm-ds__btn--primary { background: var(--satm-accent); color: #fff !important; }
.satm-ds__btn--primary:hover { background: #146d71; }
.satm-ds__btn--ghost { border-color: #b9c0c9; color: #50575e !important; }
.satm-ds__btn--ghost:hover { background: #50575e; border-color: #50575e; color: #fff !important; }
.satm-ds__btn small { font-weight: 400; opacity: 1; }

/* ---------- Detail (inline row and single page) ---------- */

.satm-ds__drow[hidden] { display: none; }
.satm-ds__table td .satm-ds__detail--inline { margin: 0; position: sticky; left: 0; box-sizing: border-box; }
.satm-ds__table tr.satm-ds__drow td {
	background: #fbfcf7 !important;
	border-left: 3px solid var(--satm-gold);
	padding: 14px 18px;
	font-size: 13px;
}

.satm-ds__detail {
	font-size: 14px;
	line-height: 1.55;
}

.satm-ds__detail--inline { font-size: 13px; }
.satm-ds__detail p { margin: 0 0 9px; }
.satm-ds__h { font-size: 17px; line-height: 1.3; margin: 0 0 6px; color: var(--satm-dark); text-transform: none; letter-spacing: 0; }
.satm-ds__meta { font-size: 12px; color: var(--satm-muted); }
.satm-ds__dl { margin: 6px 0 10px !important; }
.satm-ds__lang { font-size: 10px; background: var(--satm-accent); color: #fff; border-radius: 3px; padding: 1px 5px; vertical-align: middle; }
.satm-ds__cite { background: #f6f7f9; border-left: 3px solid var(--satm-gold); padding: 8px 10px; border-radius: var(--satm-radius); font-size: 12.5px; }
.satm-ds__more { font-weight: 600; color: var(--satm-accent); text-decoration: none; }
.satm-ds__back { margin: 0 0 14px; }
.satm-ds__back a { color: var(--satm-accent); font-weight: 600; text-decoration: none; }


/* ---------- Catalog page: use (almost) the whole screen ---------- */

body.satm-ds-wide #content-wrap.container {
	width: 96%;
	max-width: 1800px;
}

/* ---------- Dataset page (data.europa.eu-style) ---------- */

.satm-dsp {
	--satm-accent: #1a7f83;
	--satm-accent-bright: #32bcc1;
	--satm-gold: #d9b310;
	--satm-dark: #1d2731;
	--satm-border: #d5d9df;
	--satm-muted: #6b7280;
	--satm-radius: 4px;
	font-size: 15px;
	line-height: 1.6;
}

.satm-dsp__head { padding-bottom: 18px; margin-bottom: 26px; border-bottom: 1px solid var(--satm-border); }
.satm-dsp__kicker { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--satm-accent); margin-bottom: 4px; }
.satm-dsp__sub { font-size: 18px; color: #3d434a; margin: 0 0 6px; }
/* The other-language title under the actions is redundant while the theme's
   page header already shows the title in the active language. Kept in the
   markup; remove this rule to show it again. */
.satm-dsp__sub { display: none; }
.satm-dsp__pub { font-size: 13.5px; color: var(--satm-muted); margin: 0; }
.satm-dsp__pub a { color: var(--satm-accent); text-decoration: none; }
.satm-dsp__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.satm-dsp__actions .satm-ds__btn { font-size: 13px; padding: 7px 14px; font-family: inherit; cursor: pointer; }
.satm-dsp .satm-ds__btn { text-transform: none; letter-spacing: 0; }

.satm-dsp__grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; }
.satm-dsp__section { margin-bottom: 34px; }
.satm-dsp__section h3 {
	font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--satm-dark);
	border-left: 3px solid var(--satm-accent-bright); padding-left: 10px; margin: 0 0 14px;
}
.satm-dsp__n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: #eef4f4; color: #146d71; font-size: 12px; text-align: center; letter-spacing: 0; }

.satm-dsp__tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--satm-border); margin-bottom: 14px; }
.satm-dsp .satm-dsp__tabs button {
	font: inherit; font-size: 14px; font-weight: 600; color: var(--satm-muted);
	background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
	padding: 8px 14px; cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none;
}
.satm-dsp .satm-dsp__tabs button.is-on { color: var(--satm-accent); border-bottom-color: var(--satm-accent); }
.satm-dsp__pane[hidden] { display: none; }
.satm-dsp__pane p { margin: 0 0 12px; }

.satm-dsp .satm-dsp__files { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.satm-dsp .satm-dsp__files th, .satm-dsp .satm-dsp__files td { padding: 10px 10px; border: none; border-bottom: 1px solid var(--satm-border); text-align: left; vertical-align: middle; }
.satm-dsp .satm-dsp__files th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: #50575e; background: #f6f7f9; }
.satm-dsp__fmt { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; color: #fff; background: #50575e; }
.satm-dsp__fmt--xlsx, .satm-dsp__fmt--xls { background: #1d6f42; }
.satm-dsp__fmt--csv { background: var(--satm-accent); }
.satm-dsp__fmt--pdf { background: #b32d2e; }
.satm-dsp__fmt--zip { background: #6b4e9b; }
.satm-dsp__fmt--json, .satm-dsp__fmt--geojson { background: #b45309; }
.satm-dsp__fmt--web { background: #1d2731; }

.satm-dsp__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.satm-dsp__chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #146d71 !important; background: #eef4f4; text-decoration: none !important; }
a.satm-dsp__chip:hover { background: var(--satm-accent); color: #fff !important; }

.satm-dsp__more { list-style: none; margin: 0; padding: 0; }
.satm-dsp__more li { padding: 7px 0; border-bottom: 1px solid var(--satm-border); font-size: 14px; }
.satm-dsp__more li a { color: var(--satm-dark); font-weight: 600; text-decoration: none; }
.satm-dsp__more li a:hover { color: var(--satm-accent); }

.satm-dsp__box { background: #fff; border: 1px solid var(--satm-border); border-top: 3px solid var(--satm-gold); border-radius: var(--satm-radius); padding: 16px 18px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06); }
.satm-dsp__box h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 10px; color: var(--satm-dark); }
.satm-dsp__meta { margin: 0; font-size: 13px; }
.satm-dsp__meta dt { font-weight: 700; color: #3d434a; padding-top: 8px; }
.satm-dsp__meta dd { margin: 0 0 8px; color: #3d434a; border-bottom: 1px solid #eef0f3; padding-bottom: 8px; }
.satm-dsp__meta dd:last-child { border-bottom: none; }
.satm-dsp__id { word-break: break-all; font-size: 12px; }
.satm-dsp__id a { color: var(--satm-accent); }
.satm-dsp__citetext { font-size: 13px; background: #f6f7f9; border-left: 3px solid var(--satm-gold); padding: 8px 10px; border-radius: var(--satm-radius); margin: 0 0 8px; }
.satm-dsp__citetext--es { margin-top: 14px; }
.satm-dsp__box--cite .satm-ds__btn { font-family: inherit; cursor: pointer; }
.satm-dsp [data-satm-copy].is-copied { background: var(--satm-accent); color: #fff !important; }

@media (max-width: 900px) {
	/* Stacked: main and sidebar dissolve so their blocks can interleave in reading order —
	   description, files, metadata, how to cite, keywords, more from this release. */
	.satm-dsp__grid { display: flex; flex-direction: column; }
	.satm-dsp__main, .satm-dsp__side { display: contents; }
	.satm-dsp__desc { order: 1; }
	.satm-dsp__sec-files { order: 2; }
	.satm-dsp__box--meta { order: 3; }
	#satm-cite { order: 4; margin-bottom: 34px; }
	.satm-dsp__sec-keywords { order: 5; }
	.satm-dsp__sec-more { order: 6; }
}

/* ---------- Language switch (both languages ship in the HTML; CSS shows one) ---------- */

[data-lang="en"] .satm-l__es, [data-lang="en"] .satm-lang--es { display: none !important; }
[data-lang="es"] .satm-l__en, [data-lang="es"] .satm-lang--en { display: none !important; }

.satm-lang-switch { display: inline-flex; border: 1px solid var(--satm-border, #d5d9df); border-radius: 999px; overflow: hidden; background: #fff; }
.satm-lang-switch button {
	font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 14px; border: none; background: none;
	color: var(--satm-muted, #6b7280); cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none; line-height: 1.4;
}
.satm-lang-switch button.is-on { background: var(--satm-accent, #1a7f83); color: #fff; }
.satm-lang-switch button:hover:not(.is-on) { color: var(--satm-accent, #1a7f83); background: #eef4f4; }
.satm-dsp__topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Citation box ---------- */

.satm-dsp__citetabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.satm-dsp .satm-dsp__citetabs button {
	font: inherit; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
	border: 1px solid var(--satm-border); background: #fff; color: var(--satm-muted); cursor: pointer;
	text-transform: none; letter-spacing: 0; box-shadow: none; line-height: 1.5;
}
.satm-dsp .satm-dsp__citetabs button.is-on { background: var(--satm-accent); border-color: var(--satm-accent); color: #fff; }
.satm-dsp__citepane[hidden] { display: none; }
.satm-dsp pre.satm-dsp__citetext {
	white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px; line-height: 1.5;
	background: #f6f7f9; border: none; border-left: 3px solid var(--satm-gold); padding: 8px 10px; border-radius: var(--satm-radius); margin: 0 0 10px; color: #2c3338;
}
.satm-dsp pre.satm-dsp__citetext--mono { font-family: Consolas, Menlo, monospace; font-size: 12px; }
.satm-dsp__citeactions { display: flex; flex-wrap: wrap; gap: 6px; }
.satm-dsp__citeactions .satm-ds__btn { font-family: inherit; cursor: pointer; }
.satm-dsp__citenote { font-size: 11.5px; color: var(--satm-muted); margin: 10px 0 0; }
#satm-cite.is-flash .satm-dsp__box--cite { box-shadow: 0 0 0 3px rgba(50, 188, 193, 0.45); transition: box-shadow 0.3s; }

/* ---------- Menu mode: header funnels, popover, chips, mobile drawer ---------- */

.satm-ds .satm-ds__hf {
	float: right; margin: -2px -4px 0 6px; width: 28px; height: 28px; padding: 0;
	border: 1px solid transparent; border-radius: 3px; background: none; color: #5b6770; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; line-height: 1; box-shadow: none;
}
.satm-ds .satm-ds__hf:hover, .satm-ds .satm-ds__hf.is-open { background: #fff; border-color: var(--satm-border); color: var(--satm-accent); }
.satm-ds .satm-ds__hf.is-on { background: var(--satm-accent); border-color: var(--satm-accent); color: #fff; }
.satm-ds--menu .satm-ds__table thead th { padding-right: 38px; position: sticky; }
.satm-ds--menu .satm-ds__table thead th .satm-ds__hf { position: absolute; right: 4px; top: 4px; margin: 0; float: none; }
.satm-ds--menu .satm-ds__table thead th[data-k] { cursor: pointer; }

.satm-ds__chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.satm-ds__chips:empty { display: none; }
.satm-ds__chip { display: inline-flex; align-items: center; gap: 6px; background: #eef4f4; color: var(--satm-accent-deep); border-radius: 999px; padding: 3px 6px 3px 10px; font-size: 12px; font-weight: 600; }
.satm-ds__chip b { font-weight: 400; color: #3d434a; }
.satm-ds .satm-ds__chip button { border: none; background: none; color: var(--satm-accent); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; box-shadow: none; }
.satm-ds__chip--clear { background: #fff; border: 1px solid var(--satm-border); color: var(--satm-muted); }

.satm-ds__pop { position: fixed; z-index: 100000; width: 290px; background: #fff; border: 1px solid var(--satm-border); border-radius: 6px; box-shadow: 0 12px 32px rgba(16,24,40,.18); padding: 8px; font-size: 13px; display: none; text-transform: none; letter-spacing: 0; font-weight: 400; }
.satm-ds__pop.is-open { display: block; }
.satm-ds__pop .satm-ds__psort { display: flex; flex-direction: column; border-bottom: 1px solid var(--satm-border); padding-bottom: 6px; margin-bottom: 6px; }
.satm-ds .satm-ds__pop .satm-ds__psort button { text-align: left; background: none; border: none; padding: 6px 8px; font: inherit; font-size: 13px; color: #2c3338; cursor: pointer; border-radius: 4px; box-shadow: none; }
.satm-ds .satm-ds__pop .satm-ds__psort button:hover, .satm-ds .satm-ds__pop .satm-ds__psort button.is-on { background: #eef4f4; color: var(--satm-accent); }
.satm-ds__pop input[type=search] { width: 100%; height: 30px; border: 1px solid #cfd4db; border-radius: 4px; padding: 0 8px; font: inherit; font-size: 13px; margin-bottom: 6px; }
.satm-ds__plist { max-height: 220px; overflow: auto; border: 1px solid var(--satm-border); border-radius: 4px; padding: 4px; }
.satm-ds__plist label, .satm-ds__panel label { display: flex; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 3px; cursor: pointer; margin: 0; font-size: 13px; font-weight: 400; }
.satm-ds__plist label:hover { background: #f6f7f9; }
.satm-ds__plist label.satm-ds__pall { border-bottom: 1px solid var(--satm-border); margin-bottom: 3px; font-weight: 600; }
.satm-ds__pop select { width: 100%; height: 30px; margin-top: 6px; border: 1px solid #cfd4db; border-radius: 4px; font: inherit; font-size: 13px; background: #fff; }
.satm-ds__pfoot { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; }
.satm-ds .satm-ds__pfoot button { font: inherit; font-size: 12.5px; padding: 6px 12px; border-radius: 4px; cursor: pointer; border: 1px solid var(--satm-border); background: #fff; color: #2c3338; box-shadow: none; text-transform: none; letter-spacing: 0; }
.satm-ds .satm-ds__pfoot .satm-ds__pdone { background: var(--satm-accent); color: #fff; border-color: var(--satm-accent); font-weight: 600; }
.satm-ds__phint { font-size: 11.5px; color: var(--satm-muted); margin: 6px 2px 0; }

.satm-ds__drawer { position: fixed; inset: 0; z-index: 100001; display: none; }
.satm-ds__drawer.is-open { display: block; }
.satm-ds__scrim { position: absolute; inset: 0; background: rgba(10,14,20,.5); }
.satm-ds__panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(380px, 92vw); background: #fff; padding: 16px; overflow: auto; box-shadow: -8px 0 30px rgba(0,0,0,.25); font-size: 13px; }
.satm-ds__panel h3 { margin: 0 0 10px; font-size: 16px; text-transform: uppercase; }
.satm-ds__panel details { border: 1px solid var(--satm-border); border-radius: 4px; margin-bottom: 8px; }
.satm-ds__panel summary { padding: 8px 10px; font-weight: 600; cursor: pointer; font-size: 13px; }
.satm-ds__panel summary .satm-ds__pn { float: right; color: var(--satm-accent); }
.satm-ds__panel .satm-ds__plist { max-height: 200px; border: none; padding: 4px 8px 8px; }
.satm-ds__panel .satm-ds__pfoot { position: sticky; bottom: 0; background: #fff; padding-top: 10px; }
.satm-ds__panel .satm-ds__pfoot button { flex: 1; padding: 9px; }
.satm-ds__drawerbtn { display: none !important; }
@media (max-width: 900px) {
	.satm-ds--menu .satm-ds__hf { display: none; }
	.satm-ds--menu .satm-ds__drawerbtn { display: inline-block !important; }
}

/* ---------- Accessibility & polish (audit pass) ---------- */

/* Visible keyboard focus everywhere the theme might reset it. */
.satm-ds :focus-visible, .satm-dsp :focus-visible, .satm-lang-switch button:focus-visible {
	outline: 2px solid #146d71 !important; outline-offset: 2px !important; box-shadow: none !important;
}
.satm-ds .satm-ds__table thead th[tabindex]:focus-visible { outline-offset: -2px !important; }

/* Sticky first column gets a divider so it reads as fixed while scrolling sideways. */
.satm-ds__table td.satm-ds__tgl, .satm-ds__table th.satm-ds__tgl { box-shadow: 1px 0 0 var(--satm-border); }

/* Popover never taller than the viewport. */
.satm-ds__pop { max-height: calc(100vh - 24px); overflow: auto; }

/* Empty state when no row matches. */
.satm-ds__empty td { padding: 26px 16px !important; text-align: center; color: var(--satm-muted); font-size: 14px; background: #fff !important; }
.satm-ds__empty[hidden] { display: none; }
.satm-ds .satm-ds__empty button { font: inherit; font-size: 13px; font-weight: 600; color: var(--satm-accent); background: none; border: none; text-decoration: underline; cursor: pointer; padding: 0 4px; box-shadow: none; text-transform: none; letter-spacing: 0; }

@media print {
	.satm-ds__toolbar, .satm-lang-switch, .satm-ds__hf, .satm-ds__tgl, .satm-ds__pop, .satm-ds__drawer, .satm-dsp__actions { display: none !important; }
	.satm-ds__sheet { max-height: none; overflow: visible; border: none; box-shadow: none; }
}

/* Language tag on file buttons (content language of the file). */
.satm-ds__flang { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 3px; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; line-height: 1.5; background: rgba(255,255,255,.22); border: 1px solid currentColor; opacity: .95; }
.satm-ds__btn:not(.satm-ds__btn--primary) .satm-ds__flang { background: #eef4f4; }
.satm-ds__btn:not(.satm-ds__btn--primary):hover .satm-ds__flang,
.satm-ds__btn:not(.satm-ds__btn--primary):focus-visible .satm-ds__flang { background: rgba(255,255,255,.22); }

/* ---------- Inline summary (expanded row) ---------- */

.satm-ds__detail--inline .satm-lang { position: relative; }
.satm-ds__sumhead { margin: 0 190px 10px 0; }
.satm-ds__sumhead .satm-ds__h { margin: 0; }
/* Desktop: the page button sits top-right; it lives last in the markup so phones show it at the end. */
.satm-ds .satm-ds__open { position: absolute; top: 0; right: 0; font-size: 12.5px; padding: 6px 12px; }
.satm-ds__sumgrid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 14px 28px; align-items: start; }
.satm-ds__sumlabel { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--satm-muted); margin-bottom: 4px; }
.satm-ds__sumfiles .satm-ds__dl { margin: 0 0 10px !important; }
.satm-ds__excerpt { font-size: 13px; color: #3d434a; margin: 0 !important; }
.satm-ds__summeta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin: 0; font-size: 12.5px; }
.satm-ds__summeta div { border-bottom: 1px solid #e6e9ee; padding-bottom: 5px; }
.satm-ds__summeta dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--satm-muted); margin: 0; }
.satm-ds__summeta dd { margin: 1px 0 0; color: #2c3338; }
@media (max-width: 800px) {
	.satm-ds__sumgrid { grid-template-columns: 1fr; }
	.satm-ds__summeta { grid-template-columns: 1fr; }
}

/* Copy-citation button: solid deep teal (the theme's default button styling washed it out). */
.satm-dsp .satm-dsp__citeactions button.satm-ds__btn,
.satm-dsp .satm-dsp__citeactions button.satm-ds__btn:hover,
.satm-dsp .satm-dsp__citeactions button.satm-ds__btn:focus {
	background: var(--satm-accent-deep, #146d71) !important; border-color: var(--satm-accent-deep, #146d71) !important; color: #fff !important;
	text-transform: none; letter-spacing: 0; box-shadow: none;
}
.satm-dsp .satm-dsp__citeactions button.satm-ds__btn:hover { background: #0f5a5d !important; border-color: #0f5a5d !important; }

/* ---------- Responsive columns (the ▸ summary always shows every value) ---------- */

.satm-ds__name { min-width: 240px; }
.satm-ds__countries { white-space: nowrap; }
/* Single-line cells never spill into the next column: clip with an ellipsis (full text in the tooltip and the ▸ summary). */
.satm-ds__table td.satm-ds__nw, .satm-ds__table td.satm-ds__countries { overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.satm-ds__table td.satm-ds__dlcol { max-width: none; overflow: visible; }
.satm-ds .satm-ds__dlall { cursor: pointer; font-family: inherit; }
@media (max-width: 640px) {
	.satm-ds__table { min-width: 0; table-layout: auto; }
	.satm-ds__col--p1, .satm-ds__col--p2, .satm-ds__col--p3 { display: none; }
	.satm-ds__name { min-width: 0; }
	.satm-ds .satm-ds__table thead th { font-size: 10.5px; white-space: normal; }
}

/* ---------- Sticky columns + horizontal-scroll affordance ---------- */

/* Dataset name stays visible while scrolling sideways; Download stays at the right edge. */
.satm-ds__table td.satm-ds__name, .satm-ds__table th[data-k="title"] { position: sticky; left: 38px; z-index: 1; }
.satm-ds__table thead th[data-k="title"] { z-index: 3; }
/* Download scrolls with the other columns; only the Dataset name stays fixed. */
.satm-ds__sheet.is-x-scrolled .satm-ds__table td.satm-ds__name, .satm-ds__sheet.is-x-scrolled .satm-ds__table th[data-k="title"] { box-shadow: 8px 0 8px -6px rgba(16,24,40,.28); }
.satm-ds__scrollhint { margin: 6px 0 0; font-size: 12px; color: var(--satm-muted); }
.satm-ds__scrollhint[hidden] { display: none; }
.satm-ds__moren { display: inline-block; padding: 0 6px; border-radius: 9px; background: #eef4f4; color: var(--satm-accent-deep); font-size: 11px; font-weight: 700; white-space: nowrap; }
/* Column budget (desktop): fixed layout with explicit widths for the secondary
   columns; Dataset takes whatever is left. Below 1180px the layout goes back
   to automatic because columns start hiding. */
.satm-ds__table { table-layout: fixed; }
/* Widths = each header on ONE line in its longer language (Spanish), measured. */
.satm-ds__c-tgl { width: 38px; }
.satm-ds__c-disagg { width: 156px; }
.satm-ds__c-geo { width: 144px; }
.satm-ds__c-source { width: 108px; }
.satm-ds__c-years { width: 88px; }
.satm-ds__c-countries { width: 160px; }
.satm-ds__c-ttc { width: 134px; }
.satm-ds__c-dl { width: 124px; }
.satm-ds .satm-ds__table thead th { white-space: nowrap; }
/* Menu mode: sorting lives in the column menu, so the permanent ▲▼ goes; a single
   arrow appears only on the sorted column. (Row mode keeps the arrows.) */
.satm-ds--menu .satm-ds__arr { display: none; }
.satm-ds--menu .satm-ds__table thead th.is-sorted .satm-ds__arr { display: inline; opacity: 1; }
.satm-ds__table td.satm-ds__name { white-space: normal; }
/* Top scrollbar, synced with the sheet; shown only when there is horizontal overflow. */
.satm-ds__topscroll { overflow-x: auto; overflow-y: hidden; height: 14px; margin-bottom: 2px; }
.satm-ds__topscroll[hidden] { display: none; }
.satm-ds__topscroll > div { height: 1px; }
.satm-ds__table td.satm-ds__dlcol { white-space: nowrap; }

/* ---------- Phones: expanded summary flows as a block under the row ---------- */

@media (max-width: 640px) {
	.satm-ds__table tr.satm-ds__drow td { padding: 12px 12px 14px; }
	/* Compact summary: files first, then the excerpt, then label/value pairs side by side, page button last. */
	.satm-ds__sumhead { margin: 0 0 8px; }
	.satm-ds__sumhead .satm-ds__h { font-size: 15px; text-align: left; margin: 0; }
	.satm-ds .satm-ds__open { position: static; display: block; text-align: center; margin-top: 12px; padding: 9px 12px; }
	.satm-ds__detail--inline .satm-ds__sumgrid { display: block; }
	.satm-ds__detail--inline .satm-ds__summeta { display: block; margin-top: 10px; }
	.satm-ds__summeta div { display: grid; grid-template-columns: 44% 1fr; gap: 0 10px; align-items: baseline; padding: 6px 0; }
	.satm-ds__summeta dt { font-size: 10px; letter-spacing: .03em; }
	.satm-ds__summeta dd { margin: 0; font-size: 12.5px; }
	.satm-ds__sumlabel { display: none; }
	.satm-ds__excerpt { font-size: 12.5px; }
}

/* ---------- Dataset page on phones ---------- */

.satm-dsp__cl { display: none; }
@media (max-width: 640px) {
	.satm-dsp { font-size: 14.5px; }
	.satm-dsp__topline { align-items: flex-start; }
	.satm-dsp__actions .satm-ds__btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
	.satm-dsp__section h3 { font-size: 14px; }
	/* Distributions: each file becomes a card. */
	.satm-dsp .satm-dsp__files, .satm-dsp .satm-dsp__files tbody, .satm-dsp .satm-dsp__files tr { display: block; }
	.satm-dsp .satm-dsp__files thead { display: none; }
	.satm-dsp .satm-dsp__files tr { border: 1px solid var(--satm-border); border-radius: var(--satm-radius); padding: 10px 12px 12px; margin-bottom: 10px; background: #fff; }
	.satm-dsp .satm-dsp__files td { display: block; border: none; padding: 0; }
	.satm-dsp .satm-dsp__files td.satm-dsp__ftitle { font-weight: 600; color: var(--satm-dark); margin-bottom: 8px; }
	.satm-dsp .satm-dsp__files td.satm-dsp__fcell { display: inline-flex; align-items: center; gap: 5px; margin: 0 14px 6px 0; font-size: 12.5px; color: #3d434a; }
	.satm-dsp .satm-dsp__files td.satm-dsp__fcell .satm-dsp__cl { display: inline; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--satm-muted); }
	.satm-dsp .satm-dsp__files td.satm-dsp__faction { margin-top: 6px; white-space: normal; }
	.satm-dsp .satm-dsp__files td.satm-dsp__faction .satm-ds__btn { display: flex; justify-content: center; width: 100%; padding: 8px 12px; font-size: 13px; }
	/* Sidebar boxes and long values. */
	.satm-dsp__box { padding: 14px; }
	.satm-dsp__meta dt { padding-top: 6px; }
	.satm-dsp__id, .satm-dsp__citetext { word-break: break-word; overflow-wrap: anywhere; }
	.satm-dsp__citeactions .satm-ds__btn { flex: 1 1 auto; justify-content: center; }
	.satm-dsp__more li { font-size: 13.5px; }
}
