/* Zembra Status — design tokens, then layout, then components. */

:root {
	--font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

	--bg: #f5f7fb;
	--surface: #ffffff;
	--surface-2: #f0f3f8;
	--border: #e2e7ef;
	--border-strong: #cfd6e2;
	--text: #172033;
	--text-2: #4a5568;
	--text-3: #6b7588;

	--brand: #1e4f91;
	--brand-hover: #173f75;
	--brand-soft: #e7eef9;
	--focus: #4d8ef0;

	--ok: #1f8f55;
	--ok-soft: #e4f5ec;
	--minor: #c27c0e;
	--minor-soft: #fdf3e1;
	--major: #c9302c;
	--major-soft: #fbe9e8;
	--maintenance: #2f6fd6;
	--maintenance-soft: #e6effc;
	--neutral-soft: #eef1f5;

	--radius: 12px;
	--radius-small: 8px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
	--shadow-raised: 0 8px 24px rgba(16, 24, 40, .08);
	color-scheme: light;
}

/* Dark theme: the visitor's choice (data-theme) wins over the system setting. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0e131c;
		--surface: #161d29;
		--surface-2: #1c2433;
		--border: #263042;
		--border-strong: #344055;
		--text: #e8edf5;
		--text-2: #b4bfd0;
		--text-3: #8a96aa;

		--brand: #5b93e6;
		--brand-hover: #79a8ee;
		--brand-soft: #1b2a44;

		--ok: #3cc480;
		--ok-soft: #12301f;
		--minor: #f0a63a;
		--minor-soft: #352812;
		--major: #f2645d;
		--major-soft: #3a1918;
		--maintenance: #6a9ff0;
		--maintenance-soft: #172844;
		--neutral-soft: #222b3a;

		--shadow: 0 1px 2px rgba(0, 0, 0, .3);
		--shadow-raised: 0 8px 24px rgba(0, 0, 0, .35);
		color-scheme: dark;
	}
}

:root[data-theme="dark"] {
	--bg: #0e131c;
	--surface: #161d29;
	--surface-2: #1c2433;
	--border: #263042;
	--border-strong: #344055;
	--text: #e8edf5;
	--text-2: #b4bfd0;
	--text-3: #8a96aa;

	--brand: #5b93e6;
	--brand-hover: #79a8ee;
	--brand-soft: #1b2a44;

	--ok: #3cc480;
	--ok-soft: #12301f;
	--minor: #f0a63a;
	--minor-soft: #352812;
	--major: #f2645d;
	--major-soft: #3a1918;
	--maintenance: #6a9ff0;
	--maintenance-soft: #172844;
	--neutral-soft: #222b3a;

	--shadow: 0 1px 2px rgba(0, 0, 0, .3);
	--shadow-raised: 0 8px 24px rgba(0, 0, 0, .35);
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 15px/1.55 var(--font);
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 700; }
p { margin: 0 0 12px; }
hr.divider { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.muted { color: var(--text-3); }
.text-danger { color: var(--major); }
.lead { color: var(--text-2); font-size: 16px; margin-top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-small); z-index: 10; }
.skip-link:focus { left: 8px; }

/* Layout */

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 32px; padding-bottom: 56px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand img { border-radius: 8px; }
.brand__product { color: var(--text-3); font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; padding: 8px 0; }
.site-nav > a:not(.button) { color: var(--text-2); font-weight: 500; font-size: 14px; }
.site-nav > a[aria-current="page"] { color: var(--brand); }
.site-header--admin { background: var(--surface); }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--text-3); }
.site-footer__inner { display: flex; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 20px; flex-wrap: wrap; }
.site-footer__links { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--text-3); }

.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-header .lead { margin-bottom: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back-link { display: inline-block; font-size: 14px; color: var(--text-3); margin-bottom: 8px; }

.section { margin-top: 40px; }
.section__header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section__header .section__title { margin-bottom: 0; }
.section__title { font-size: 17px; font-weight: 650; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.stack { display: grid; gap: 12px; }

.columns { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.columns__main, .columns__side { display: grid; gap: 20px; min-width: 0; }
@media (max-width: 860px) { .columns { grid-template-columns: minmax(0, 1fr); } }

/* Surfaces */

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 20px; }
.columns .panel + .panel { margin-top: 0; }
.panel--narrow { max-width: 520px; margin: 24px auto 0; }
.panel--sticky { position: sticky; top: 88px; }
.panel--danger { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-color: color-mix(in srgb, var(--major) 30%, var(--border)); flex-wrap: wrap; }
.panel--danger p { margin: 0; }
.panel--danger-soft { background: transparent; box-shadow: none; border-style: dashed; padding: 16px 24px; }
.panel__title { font-size: 16px; font-weight: 650; margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }
.panel__subtitle { font-size: 14px; font-weight: 650; margin: 16px 0 8px; color: var(--text-2); }
.panel h1 { font-size: 24px; margin-bottom: 8px; }
.empty { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 20px; color: var(--text-3); text-align: center; margin: 0; }

.alert { border-radius: var(--radius-small); padding: 12px 16px; margin-bottom: 20px; border: 1px solid transparent; font-weight: 500; }
.alert--success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert--error { background: var(--major-soft); color: var(--major); border-color: color-mix(in srgb, var(--major) 25%, transparent); }
.alert--info { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }

/* Status primitives */

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: var(--text-3); }
.dot--ok { background: var(--ok); }
.dot--minor { background: var(--minor); }
.dot--major { background: var(--major); box-shadow: 0 0 0 3px color-mix(in srgb, var(--major) 20%, transparent); }
.dot--maintenance { background: var(--maintenance); }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--neutral-soft); color: var(--text-2); }
.badge .dot { width: 8px; height: 8px; box-shadow: none; }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--minor { background: var(--minor-soft); color: var(--minor); }
.badge--major { background: var(--major-soft); color: var(--major); }
.badge--maintenance { background: var(--maintenance-soft); color: var(--maintenance); }
.badge--resolved { background: var(--ok-soft); color: var(--ok); }

.count { display: inline-flex; min-width: 24px; justify-content: center; font-size: 12px; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--neutral-soft); color: var(--text-2); }
.count--ok { background: var(--ok-soft); color: var(--ok); }
.count--warn { background: var(--minor-soft); color: var(--minor); }

.chip { display: inline-flex; align-items: center; font-size: 12.5px; padding: 2px 9px; border-radius: 6px; background: var(--neutral-soft); color: var(--text-2); white-space: nowrap; }
a.chip:hover { text-decoration: none; background: var(--brand-soft); color: var(--brand); }
.chip--more { background: transparent; border: 1px dashed var(--border-strong); }

.state { font-size: 13px; font-weight: 600; }
.state--open, .state--failed { color: var(--major); }
.state--scheduled, .state--pending { color: var(--maintenance); }
.state--resolved, .state--sent { color: var(--ok); }
.state--excluded { color: var(--text-3); }

.logo { position: relative; width: 28px; height: 28px; flex: none; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.logo img { width: 20px; height: 20px; object-fit: contain; }
.logo--fallback::after { content: attr(data-initial); font-size: 13px; font-weight: 700; color: var(--text-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo { background: #f2f4f8; border-color: transparent; } :root:not([data-theme="light"]) .logo--fallback { background: var(--surface-2); } }
:root[data-theme="dark"] .logo { background: #f2f4f8; border-color: transparent; }
:root[data-theme="dark"] .logo--fallback { background: var(--surface-2); }

/* Hero */

.hero { display: flex; align-items: center; gap: 20px; padding: 28px; border-radius: 16px; color: #fff; box-shadow: var(--shadow-raised); flex-wrap: wrap; }
.hero--ok { background: linear-gradient(135deg, #1f8f55, #23a565); }
.hero--minor { background: linear-gradient(135deg, #b86f05, #d58e1d); }
.hero--major { background: linear-gradient(135deg, #b42722, #d6413a); }
.hero--maintenance { background: linear-gradient(135deg, #2560bf, #3d7fe0); }
.hero__icon { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; flex: none; }
.hero__body { flex: 1; min-width: 220px; }
.hero__title { font-size: 24px; font-weight: 700; color: #fff; }
.hero__meta { margin: 4px 0 0; opacity: .9; font-size: 14px; }

/* Platforms */

.filter { position: relative; margin-top: 40px; }
.filter__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.filter input { width: 100%; padding: 12px 14px 12px 42px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; box-shadow: var(--shadow); }
.filter__empty { margin-top: 16px; }

.affected-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.platform-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--text-3); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.platform-card--major { border-left-color: var(--major); }
.platform-card--minor { border-left-color: var(--minor); }
.platform-card--maintenance { border-left-color: var(--maintenance); }
.platform-card__header { display: flex; align-items: center; gap: 12px; }
.platform-card__name { flex: 1; min-width: 0; }
.platform-card__name h3 { font-size: 16px; font-weight: 650; }
.platform-card__name .muted { font-size: 13px; white-space: nowrap; }

.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.service-list__item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.service-list__name { flex: 1; color: var(--text-2); }
a.service-list__name { color: var(--text-2); }
.service-list__state { font-weight: 600; font-size: 13px; }
.service-list__state--ok { color: var(--ok); }
.service-list__state--minor, .service-list__state--minor a { color: var(--minor); }
.service-list__state--major, .service-list__state--major a { color: var(--major); }
.service-list__state--maintenance, .service-list__state--maintenance a { color: var(--maintenance); }

.uptime__bars { display: flex; gap: 2px; height: 28px; }
.uptime__bar { flex: 1; border-radius: 2px; background: var(--ok); opacity: .85; }
.uptime__bar:hover { opacity: 1; }
.uptime__bar--minor { background: var(--minor); }
.uptime__bar--major { background: var(--major); }
.uptime__bar--maintenance { background: var(--maintenance); }
.uptime__legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-top: 6px; }
.uptime__value { color: var(--text-2); font-weight: 600; }

.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.platform-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.platform-tile { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-small); padding: 9px 12px; min-width: 0; }
.platform-tile__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 14px; }
.platform-tile__uptime { font-size: 12px; color: var(--ok); font-weight: 600; font-variant-numeric: tabular-nums; }
.platform-tile .logo { width: 24px; height: 24px; }
.platform-tile .logo img { width: 16px; height: 16px; }
.collapsible-toggle { margin-top: 12px; }
[data-collapsed-item] { display: none !important; }

/* Incidents */

.incident { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); position: relative; }
.incident::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--text-3); }
.incident--major::before { background: var(--major); }
.incident--minor::before { background: var(--minor); }
.incident--maintenance::before { background: var(--maintenance); }
.incident--resolved::before { background: var(--ok); }
.incident__header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.incident__title { font-size: 16px; font-weight: 650; }
.incident__title a { color: var(--text); }
.incident__text { color: var(--text-2); margin: 8px 0 0; }
.incident__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; margin-top: 12px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.incident__platforms { display: flex; gap: 6px; flex-wrap: wrap; }

.incident-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.incident-detail__header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.incident-detail .section__title { margin-top: 28px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 20px 0 0; }
.facts div { background: var(--surface-2); border-radius: var(--radius-small); padding: 10px 14px; }
.facts dt { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 500; }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.timeline__item { position: relative; padding: 0 0 20px 22px; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.timeline__item::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline__label { font-weight: 650; }
.timeline__body p { margin-bottom: 4px; }
.timeline__body time { font-size: 13px; }
@media (max-width: 560px) { .timeline__item { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

.affected-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.affected-grid li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-small); font-size: 14px; }

.cta { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; border-radius: var(--radius); background: var(--brand-soft); flex-wrap: wrap; }
.cta p { margin: 0; }

.pager { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.toggle-link { font-size: 14px; }

/* Forms */

.form h2.form__step { font-size: 17px; margin: 28px 0 16px; display: flex; align-items: center; gap: 10px; }
.form h2.form__step:first-of-type { margin-top: 0; }
.form__step span { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.form__actions { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.fine-print { font-size: 13px; margin: 16px 0 0; }
.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.hint { font-size: 13px; color: var(--text-3); margin: 6px 0 0; }
.input { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-small); padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.input--small { padding: 7px 10px; font-size: 14px; }
.input--code { font: 600 26px/1 var(--mono); letter-spacing: 10px; text-align: center; max-width: 260px; }
textarea.input { resize: vertical; min-height: 90px; }
.inline-form { display: inline; margin: 0; }
.inline-form p { margin: 0; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px/1 var(--font); padding: 11px 18px; border-radius: var(--radius-small); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.button:hover { text-decoration: none; }
.button--primary { background: var(--brand); color: #fff; }
.button--primary:hover { background: var(--brand-hover); color: #fff; }
.button--secondary { background: var(--brand-soft); color: var(--brand); }
.button--secondary:hover { background: color-mix(in srgb, var(--brand) 18%, var(--surface)); color: var(--brand); }
.button--ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.button--ghost:hover { background: var(--surface-2); color: var(--text); }
.button--light { background: #fff; color: #172033; }
.button--light:hover { background: rgba(255, 255, 255, .9); color: #172033; }
.button--danger { background: var(--major); color: #fff; }
.button--danger:hover { background: color-mix(in srgb, var(--major) 85%, #000); color: #fff; }
.button--success { background: var(--ok); color: #fff; }
.button--success:hover { background: color-mix(in srgb, var(--ok) 85%, #000); color: #fff; }
.button--small { padding: 8px 12px; font-size: 13px; }
.button--block { width: 100%; }
.button[disabled] { opacity: .55; cursor: not-allowed; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; font-weight: 500; }
.link-button:hover { text-decoration: underline; }
.link-button--danger { color: var(--major); }

.tabs { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-2); border-radius: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs__tab { border: 0; background: transparent; color: var(--text-2); font: 600 14px var(--font); padding: 8px 14px; border-radius: 7px; cursor: pointer; }
.tabs__tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.segmented { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 10px; flex-wrap: wrap; }
.segmented label, .segmented a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 7px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--text-2); }
.segmented label:has(input:checked), .segmented a[aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segmented a:hover { text-decoration: none; }
.segmented input { accent-color: var(--brand); margin: 0; }

.picker { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.picker__legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.picker__choices { margin-top: 12px; }
.picker__choices--inline { display: flex; gap: 8px; flex-wrap: wrap; }
.picker__toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.picker__toolbar .input { max-width: 260px; }
.picker__count { font-size: 13px; margin-right: auto; }
.picker__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 320px; overflow: auto; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface-2); }
.picker__option { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; background: var(--surface); border: 1px solid transparent; min-width: 0; }
.picker__option span:not(.logo):not(.dot) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker__option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.picker__option input, .check-pill input { accent-color: var(--brand); margin: 0; }
.picker__option .logo { width: 22px; height: 22px; }
.picker__option .logo img { width: 15px; height: 15px; }
.check-pill { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; font-size: 14px; }
.check-pill:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

.impact-options, .audience-options { display: grid; gap: 8px; }
.impact-options { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.impact-option, .audience-option { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-small); cursor: pointer; font-weight: 500; }
.impact-option input, .audience-option input { accent-color: var(--brand); margin: 0; }
.impact-option:has(input:checked), .audience-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.audience-option__label { flex: 1; }

/* Back-office */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; color: var(--text); }
.stat--link:hover { text-decoration: none; border-color: var(--brand); color: var(--text); }
.stat__value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat__label { font-size: 13px; color: var(--text-3); }
.stat--ok .stat__value { color: var(--ok); }
.stat--minor .stat__value { color: var(--minor); }
.stat--major .stat__value { color: var(--major); }
.stat--maintenance .stat__value { color: var(--maintenance); }

.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
form.toolbar { justify-content: flex-start; }
form.toolbar .input { max-width: 360px; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td .chip { margin: 2px 4px 2px 0; }
.table__actions { text-align: right; white-space: nowrap; }
.cell-with-logo { display: flex; align-items: center; gap: 10px; }

.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.plain-list--scroll { max-height: 320px; overflow: auto; gap: 6px; word-break: break-all; }
.broadcast-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.broadcast-list li { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.broadcast-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.broadcast-list .chip { margin-right: 6px; }

.adjust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.adjust .panel__subtitle { margin-top: 0; }
.adjust__search { display: flex; gap: 8px; }
.search-results { list-style: none; margin: 6px 0 0; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface); box-shadow: var(--shadow-raised); max-height: 220px; overflow: auto; }
.search-results button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; font: inherit; color: var(--text); cursor: pointer; word-break: break-all; }
.search-results button:hover, .search-results button:focus { background: var(--brand-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips .chip button { background: none; border: 0; margin-left: 6px; cursor: pointer; color: var(--text-3); font-size: 14px; line-height: 1; padding: 0; }
.chip--all { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.error-page { text-align: center; }
.error-page__code { font: 700 48px/1 var(--font); color: var(--text-3); margin-bottom: 12px; }
.error-page .button { margin-top: 12px; }

@media (max-width: 560px) {
	h1 { font-size: 24px; }
	.main { padding-top: 20px; }
	.panel, .incident-detail { padding: 18px; }
	.hero { padding: 20px; }
	.hero__title { font-size: 20px; }
	.hero__action { width: 100%; }
	.site-nav { gap: 4px 14px; }
}

@media print {
	.site-header, .site-footer, .filter, .hero__action, .cta { display: none; }
	body { background: #fff; }
}

/* Platform and service pages */

.entity-header { display: flex; align-items: center; gap: 18px; margin: 4px 0 8px; flex-wrap: wrap; }
.entity-header__logo .logo { width: 64px; height: 64px; border-radius: 16px; }
.entity-header__logo .logo img { width: 42px; height: 42px; }
.entity-header__logo .logo--fallback::after { font-size: 26px; }
.entity-header__icon { width: 64px; height: 64px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: var(--neutral-soft); color: var(--text-2); }
.entity-header__icon--ok { background: var(--ok-soft); color: var(--ok); }
.entity-header__icon--minor { background: var(--minor-soft); color: var(--minor); }
.entity-header__icon--major { background: var(--major-soft); color: var(--major); }
.entity-header__icon--maintenance { background: var(--maintenance-soft); color: var(--maintenance); }
.entity-header__body { flex: 1; min-width: 240px; }
.entity-header__meta { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin: 8px 0 0; font-size: 14px; }
.follow { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.follow__state { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.follow__manage { font-size: 13px; }

.row-list { display: grid; gap: 12px; }
.row-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.row-card__main { display: flex; align-items: center; gap: 14px; }
.row-card__main > div:not(.row-card__state) { flex: 1; min-width: 0; }
.row-card h3 { font-size: 16px; font-weight: 650; }
.row-card h3 a { color: var(--text); }
.row-card p { margin: 2px 0 0; font-size: 13.5px; }
.row-card__state a:hover { text-decoration: none; }

.service-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.service-card { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: var(--text); transition: border-color .15s, transform .15s; }
.service-card:hover { text-decoration: none; color: var(--text); border-color: var(--brand); transform: translateY(-1px); }
.service-card__name { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.service-card__state { font-size: 13px; color: var(--text-3); }
.service-card--major .service-card__state { color: var(--major); }
.service-card--minor .service-card__state { color: var(--minor); }
.service-card--maintenance .service-card__state { color: var(--maintenance); }

.platform-grid > li { min-width: 0; }
a.platform-tile { color: var(--text); transition: border-color .15s; }
a.platform-tile:hover { text-decoration: none; border-color: var(--brand); color: var(--text); }
.platform-card__name h3 a { color: var(--text); }
a.service-list__name:hover { color: var(--brand); }
.dot--soon { background: transparent; border: 2px dashed var(--text-3); }
.service-card--soon .service-card__state { color: var(--text-3); font-style: italic; }

/* Theme switch */

.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-small); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.theme-toggle:hover { color: var(--text); background: var(--surface-2); }
.theme-toggle__sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle__sun { display: block; } :root:not([data-theme="light"]) .theme-toggle__moon { display: none; } }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }

/* Account */

.account-menu { position: relative; }
.account-menu__button { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 10px 4px 4px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text); background: var(--surface); }
.account-menu__button::-webkit-details-marker { display: none; }
.account-menu__label { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu__panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-raised); padding: 8px; display: grid; gap: 2px; z-index: 10; }
.account-menu__panel a, .account-menu__panel .link-button { display: block; text-align: left; width: 100%; padding: 8px 10px; border-radius: 6px; color: var(--text); font-size: 14px; font-weight: 500; }
.account-menu__panel a:hover, .account-menu__panel .link-button:hover { background: var(--surface-2); text-decoration: none; }
.account-menu__panel form { margin: 0; }
.account-menu__email { font-size: 12.5px; padding: 6px 10px; margin: 0; border-bottom: 1px solid var(--border); margin-bottom: 4px; word-break: break-all; }
.identity { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface-2); }
.identity p { margin: 0; font-size: 13px; }
.identity__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.identity__avatar--small { width: 28px; height: 28px; font-size: 13px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.choice { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.choice .field { width: 100%; margin-top: 8px; }
.choice__title { font-size: 15px; font-weight: 650; }
.chip--monitoring { background: var(--maintenance-soft); color: var(--maintenance); font-size: 11.5px; font-weight: 600; margin-left: 8px; vertical-align: 2px; }
