/* UT-News console — light frosted glass by default, dark at night (auto) or by choice. */
:root {
	--c-brand: #0F7B6C;
	--acc: var(--c-brand);
	--bg: #EEF2F3;
	--ink: #0B1215;
	--ink2: #33424A;
	--muted: #56646B;
	--faint: #6E7C82;
	--panel: rgb(255 255 255 / .66);
	--panel2: rgb(255 255 255 / .92);
	--line: rgb(255 255 255 / .9);
	--hair: rgb(11 18 21 / .08);
	--hair2: rgb(11 18 21 / .14);
	--field: rgb(255 255 255 / .85);
	--soft: color-mix(in srgb, var(--acc) 12%, transparent);
	--ok: #0B6E55; --warn: #A24F06; --bad: #B42318; --info: #1F5FB0;
	--aura1: color-mix(in srgb, var(--acc) 20%, transparent);
	--aura2: rgb(255 170 110 / .22);
	--aura3: rgb(110 160 255 / .18);
	--blur: 22px;
	--display: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	--ui: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	--r-panel: 22px;
	--r-ctl: 12px;
	--side: 264px;
	--edge: linear-gradient(90deg, #A8D4C9 0%, #3F8F81 18%, #D4ECE6 34%, #2C7A6B 52%, #9CCDC1 68%, #1F6F63 84%, #C6E4DC 100%);
	color-scheme: light;
}
:root[data-theme="dark"] {
	--bg: #0A1013;
	--ink: #F2F6F7;
	--ink2: #C6D0D4;
	--muted: #98A6AC;
	--faint: #7F8E94;
	--panel: rgb(26 34 39 / .66);
	--panel2: rgb(36 46 52 / .92);
	--line: rgb(255 255 255 / .10);
	--hair: rgb(255 255 255 / .09);
	--hair2: rgb(255 255 255 / .16);
	--field: rgb(8 14 18 / .55);
	--soft: color-mix(in srgb, var(--acc) 24%, transparent);
	--ok: #5FD3B5; --warn: #F2A54A; --bad: #FF8A7A; --info: #8CBBF2;
	--aura1: color-mix(in srgb, var(--acc) 18%, transparent);
	--aura2: rgb(255 170 110 / .10);
	--aura3: rgb(110 160 255 / .10);
	color-scheme: dark;
}
* { box-sizing: border-box; }
body.utn-c { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 15.5px/1.55 var(--ui); -webkit-font-smoothing: antialiased; transition: background-color .3s, color .3s; }
a { color: var(--acc); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

.glow { position: fixed; inset: 0; pointer-events: none; z-index: 0;
	background:
		radial-gradient(900px 600px at 0% 0%, var(--aura1), transparent 62%),
		radial-gradient(800px 600px at 100% 0%, var(--aura2), transparent 62%),
		radial-gradient(900px 700px at 60% 100%, var(--aura3), transparent 62%);
}
.edge { height: 5px; border-radius: 3px; background: var(--edge); }
.glass { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); backdrop-filter: blur(var(--blur)) saturate(170%); }

/* ---------- Boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; gap: 18px; text-align: center; color: var(--muted); }
.boot .edge { width: 220px; margin: auto; background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Layout ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; gap: 0; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 0 16px 16px; display: flex; flex-direction: column; }
.side__in { flex: 1; display: flex; flex-direction: column; padding: 14px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); backdrop-filter: blur(var(--blur)) saturate(170%); }
.side__brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 14px; text-decoration: none; color: var(--ink); }
.side__brand img { max-height: 34px; width: auto; }
.side__mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 800 15px var(--display); background: var(--acc); color: #fff; flex: none; }
.side__name { font: 700 16.5px/1.15 var(--display); letter-spacing: -0.02em; }
.side__sub { font-size: 12.5px; color: var(--muted); }
.side__group { margin-top: 10px; }
.side__label { font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 6px 12px; }
.side__link { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 12px; color: var(--ink2); text-decoration: none; font-weight: 500; font-size: 15px; border: 1px solid transparent; }
.side__link svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.side__link:hover { background: var(--hair); color: var(--ink); }
.side__link.is-on { background: var(--panel2); border-color: var(--line); color: var(--ink); font-weight: 600; }
.side__link.is-on svg { color: var(--acc); opacity: 1; }
.side__badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #C4610E; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.side__foot { margin-top: auto; padding: 14px 10px 2px; font-size: 12.5px; color: var(--faint); }

.main { min-width: 0; display: flex; flex-direction: column; padding: 16px 16px 0; }
.top { position: sticky; top: 16px; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); backdrop-filter: blur(var(--blur)) saturate(170%); }
.top__menu { display: none; width: 40px; height: 40px; border-radius: 999px; border: 0; background: none; color: var(--ink); cursor: pointer; place-items: center; }
.top__menu svg { width: 22px; height: 22px; }
.top__crumb { font-weight: 600; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__crumb strong { color: var(--ink); }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.tg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--hair); }
.tg button { width: 36px; height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.tg button svg { width: 17px; height: 17px; }
.tg button:hover { color: var(--ink); }
.tg button[aria-pressed="true"] { background: var(--panel2); color: var(--ink); }
.me { display: flex; align-items: center; gap: 10px; padding: 3px 12px 3px 3px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; position: relative; }
.me__av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--display); background: var(--acc); color: #fff; flex: none; }
.me__name { font-weight: 600; font-size: 13.5px; line-height: 1.15; }
.me__role { font-size: 12px; color: var(--acc); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px; display: none; z-index: 30; background: var(--panel2); }
.menu.is-open { display: block; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; font-weight: 600; font-size: 14px; }
.menu a:hover, .menu button:hover { background: var(--hair); }

.view { padding: 24px 4px 120px; max-width: 1440px; width: 100%; }
.view-in { animation: rise .35s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .view-in, .boot .edge { animation: none; } }

.tabbar { display: none; }
@media (max-width: 1000px) {
	.app { grid-template-columns: 1fr; }
	.side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-105%); transition: transform .25s; padding: 10px; }
	.side__in { background: var(--panel2); }
	.app.nav-open .side { transform: none; }
	.app.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 45; background: rgb(0 0 0 / .25); }
	.top__menu { display: grid; }
	.me__name, .me__role, .top .btn span { display: none; }
	.me { padding-right: 3px; }
	.main { padding: 10px 10px 0; }
	.top { top: 10px; }
	.view { padding: 18px 2px 120px; }
	.tabbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 40; padding: 6px 8px; border-radius: 999px; justify-content: space-around; align-items: center; background: var(--panel2); border: 1px solid var(--line); -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); backdrop-filter: blur(var(--blur)) saturate(170%); }
	.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 56px; padding: 5px 0; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer; }
	.tabbar svg { width: 22px; height: 22px; }
	.tabbar .is-on { color: var(--acc); }
	.tabbar .tabbar__write { width: 52px; height: 52px; min-width: 52px; border-radius: 50%; background: var(--acc); color: #fff; justify-content: center; padding: 0; }
}
@media (max-width: 420px) { .top__crumb { display: none; } .top .tg button { width: 32px; height: 32px; } }

/* ---------- Headings ---------- */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ph h1 { font: 750 clamp(28px, 3.4vw, 40px)/1.05 var(--display); letter-spacing: -0.035em; margin: 0; }
.ph p { margin: 6px 0 0; color: var(--muted); max-width: 70ch; font-size: 16px; }
.ph__actions { display: flex; gap: 10px; flex-wrap: wrap; }
h2.h { font: 700 19px var(--display); letter-spacing: -0.02em; margin: 0; }

/* ---------- Buttons & controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--hair2); background: var(--panel2); color: var(--ink); font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--acc); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--acc); border-color: transparent; color: #fff; }
.btn--primary:hover { filter: brightness(1.08); border-color: transparent; }
.btn--amber { background: #C4610E; border-color: transparent; color: #fff; }
.btn--danger { color: var(--bad); }
.btn--danger:hover { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--panel2)); }
.btn--ghost { background: none; border-color: transparent; }
.btn--ghost:hover { background: var(--hair); border-color: transparent; }
.btn--sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn--lg { height: 50px; padding: 0 22px; font-size: 16px; }
.btn--block { width: 100%; }
.icon-btn { width: 34px; padding: 0; }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 13.5px; color: var(--ink2); }
.field small { color: var(--muted); font-size: 12.5px; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]), .field select, .field textarea, .select {
	width: 100%; padding: 11px 14px; border-radius: var(--r-ctl); border: 1px solid var(--hair2); background: var(--field); color: var(--ink); font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .select:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 4px var(--soft); }
.field select, .select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2378868C' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field select option, .select option { background: var(--bg); color: var(--ink); }
.field input[type=range] { width: 100%; accent-color: var(--acc); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 14.5px; }
.check input { width: 18px; height: 18px; accent-color: var(--acc); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 14.5px; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 42px; height: 25px; border-radius: 999px; background: var(--hair2); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: var(--acc); }
.switch input:checked + i::after { transform: translateX(17px); }
.switch input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 2px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--hair); color: var(--ink2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--publish, .pill--running, .pill--ok, .pill--paid, .pill--replied { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.pill--pending, .pill--scheduled, .pill--invoiced, .pill--new { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.pill--future { color: var(--info); background: color-mix(in srgb, var(--info) 13%, transparent); }
.pill--paused, .pill--broken, .pill--missing, .pill--overdue, .pill--expired, .pill--trash { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--hair); color: var(--ink2); }
.tag--amber { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.tag--glass { background: var(--soft); color: var(--acc); }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 18px 20px 16px; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.kpi__label { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.kpi__value { font: 750 32px/1.1 var(--display); letter-spacing: -0.035em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi__foot { margin-top: 6px; font-size: 13px; color: var(--muted); position: relative; z-index: 1; }
.kpi__delta--up { color: var(--ok); font-weight: 600; }
.kpi__delta--down { color: var(--bad); font-weight: 600; }
.kpi__spark { position: absolute; right: 0; bottom: 0; width: 55%; height: 46px; opacity: .9; color: var(--acc); }
.kpi--link { text-decoration: none; color: inherit; transition: border-color .15s; }
.kpi--link:hover { border-color: var(--acc); }
.kpi--alert .kpi__value { color: var(--warn); }
@media (max-width: 640px) { .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 14px; } .kpi__value { font-size: 26px; } .kpi__spark { width: 70%; height: 34px; } }

.dash { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; }
.dash > * { min-width: 0; }
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } }
.panel { padding: 20px 22px; }
.panel + .panel { margin-top: 18px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

.hello { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.hello h1 { font: 750 clamp(30px, 4vw, 42px)/1.05 var(--display); letter-spacing: -0.04em; margin: 0; }
.hello p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.hello .ph__actions { margin-left: auto; }
@media (max-width: 640px) { .hello .ph__actions { margin-left: 0; width: 100%; } .hello .ph__actions .btn { flex: 1; } }

/* ---------- Charts ---------- */
.chart { width: 100%; height: 240px; display: block; color: var(--acc); }
.chart text { fill: var(--muted); font: 500 11.5px var(--ui); }
.chart .grid line { stroke: var(--hair); }
.chart .area { fill: url(#utnArea); }
.chart .line { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .line2 { fill: none; stroke: #D9771A; stroke-width: 1.8; stroke-dasharray: 4 4; opacity: .85; }
.chart .dot { fill: var(--bg); stroke: currentColor; stroke-width: 2.4; }
.chart .hair { stroke: var(--hair2); }
.chart-tip { position: fixed; pointer-events: none; z-index: 90; padding: 8px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--hair2); font-size: 13px; color: var(--ink); display: none; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.chart-tip b { font-family: var(--display); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--acc); }
.legend i.amber { background: #D9771A; }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 70px; gap: 12px; align-items: center; font-size: 14px; }
.bar__track { height: 10px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.bar__fill { height: 100%; border-radius: inherit; background: var(--acc); transform-origin: left; animation: grow .7s cubic-bezier(.2,.7,.2,1) both; }
@keyframes grow { from { transform: scaleX(0); } }
.bar b { text-align: right; font-variant-numeric: tabular-nums; }
.progress { height: 6px; border-radius: 999px; background: var(--hair); overflow: hidden; min-width: 110px; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--acc); }
.progress--soon i { background: var(--warn); }
.left { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.left--soon { color: var(--warn); font-weight: 600; }

/* ---------- Lists & tables ---------- */
.list { display: grid; grid-template-columns: minmax(0, 1fr); }
.list > * { min-width: 0; }
.li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--hair); }
.li:first-child { border-top: 0; padding-top: 0; }
.li__thumb { width: 56px; height: 42px; border-radius: 10px; object-fit: cover; flex: none; background: var(--hair); }
.li__main { min-width: 0; flex: 1; }
.li__title { font-weight: 600; color: var(--ink); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li__title:hover { color: var(--acc); }
.li__meta { font-size: 13px; color: var(--muted); }
.rank { font: 750 24px var(--display); width: 26px; color: var(--acc); flex: none; letter-spacing: -0.04em; }

.feed .li { align-items: flex-start; }
.feed__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); margin-top: 7px; flex: none; }
.feed__dot--amber { background: var(--warn); }
.feed__dot--red { background: var(--bad); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 180px; border-radius: 999px; background: var(--panel2); }
.toolbar .grow { flex: 1; min-width: 200px; }
.tabs { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 16px; -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
.tabs button { height: 36px; padding: 0 15px; border-radius: 999px; border: 0; background: none; color: var(--ink2); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.tabs button.is-on { background: var(--ink); color: var(--bg); }
.tabs button small { margin-left: 6px; opacity: .7; font-weight: 500; }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.t th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.t td { padding: 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--hair); }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.t .acts { text-align: right; white-space: nowrap; }
.t input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--acc); }
.art-cell { display: flex; gap: 12px; align-items: center; min-width: 260px; }
.art-cell img, .art-cell .ph-img { width: 64px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--hair); }
.art-cell a { font-weight: 600; color: var(--ink); text-decoration: none; }
.art-cell a:hover { color: var(--acc); }
.art-cell small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.bulkbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 16px; background: var(--soft); border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent); }
.pager { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 14px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }

.empty { text-align: center; padding: 52px 20px; color: var(--muted); }
.empty h3 { font: 700 20px var(--display); color: var(--ink); margin: 0 0 6px; }
.empty p { margin: 0 0 18px; }
.skel { height: 16px; border-radius: 6px; background: linear-gradient(90deg, var(--hair), var(--hair2), var(--hair)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

/* ---------- Editor ---------- */
.ed { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 1150px) { .ed { grid-template-columns: 1fr; } }
.ed__paper { padding: clamp(18px, 3vw, 40px); background: var(--panel2); }
.ed__title { width: 100%; border: 0; background: none; font: 750 clamp(28px, 3.6vw, 42px)/1.1 var(--display); letter-spacing: -0.035em; color: var(--ink); resize: none; overflow: hidden; padding: 0; }
.ed__title:focus, .ed__sub:focus { outline: none; }
.ed__title::placeholder, .ed__sub::placeholder { color: var(--faint); opacity: .7; }
.ed__sub { width: 100%; border: 0; background: none; font: 400 19px/1.45 var(--ui); color: var(--ink2); resize: none; padding: 0; margin-top: 12px; overflow: hidden; }
.ed__bar { position: sticky; top: 80px; z-index: 5; display: flex; gap: 2px; flex-wrap: wrap; padding: 6px; margin: 24px 0 0; border-radius: 16px; background: var(--panel2); border: 1px solid var(--hair2); }
.ed__bar button { min-width: 36px; height: 36px; padding: 0 9px; border-radius: 10px; border: 0; background: none; color: var(--ink2); cursor: pointer; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.ed__bar button:hover { background: var(--hair); color: var(--ink); }
.ed__bar button svg { width: 17px; height: 17px; }
.ed__bar .sep { width: 1px; background: var(--hair2); margin: 6px 4px; }
.ed__body { min-height: 420px; margin-top: 18px; font: 400 19px/1.75 "Newsreader", Georgia, "Times New Roman", serif; color: var(--ink); outline: none; }
.ed__body:empty::before { content: attr(data-ph); color: var(--faint); }
.ed__body p { margin: 0 0 1em; }
.ed__body h2 { font: 700 26px/1.2 var(--display); margin: 1.4em 0 .5em; }
.ed__body h3 { font: 700 21px/1.25 var(--display); margin: 1.3em 0 .4em; }
.ed__body blockquote { margin: 1.2em 0; padding-left: 20px; border-left: 3px solid var(--acc); font-style: italic; }
.ed__body img { border-radius: 14px; margin: 1em 0; }
.ed__body ul, .ed__body ol { padding-left: 1.3em; }
.ed__foot { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 13px; color: var(--muted); }
.ed__side { display: grid; gap: 16px; position: sticky; top: 84px; }
@media (max-width: 1150px) { .ed__side { position: static; } }
.box { padding: 18px; }
.box > h3 { font: 700 15.5px var(--display); margin: 0 0 12px; display: flex; justify-content: space-between; align-items: center; }
.cats { display: grid; gap: 8px; max-height: 220px; overflow-y: auto; padding-right: 4px; }
.drop { display: grid; place-items: center; text-align: center; gap: 6px; padding: 22px; border: 1.5px dashed var(--hair2); border-radius: 16px; cursor: pointer; color: var(--muted); font-size: 14px; transition: border-color .15s, background .15s; position: relative; overflow: hidden; }
.drop svg { width: 24px; height: 24px; }
.drop:hover, .drop.is-over { border-color: var(--acc); background: var(--soft); }
.drop img { width: 100%; border-radius: 12px; aspect-ratio: 16/10; object-fit: cover; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.serp { padding: 14px; border-radius: 14px; background: #fff; color: #202124; font-family: arial, sans-serif; border: 1px solid var(--hair); }
.serp__url { font-size: 12px; color: #4d5156; }
.serp__title { font-size: 18px; color: #1a0dab; line-height: 1.3; margin: 2px 0; }
.serp__desc { font-size: 13px; color: #4d5156; line-height: 1.45; }
.count { font-size: 12px; color: var(--muted); text-align: right; }
.count.is-over { color: var(--warn); }
.restore { padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--warn) 12%, var(--panel2)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }

/* ---------- Cards (ads, partners) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { padding: 10px; overflow: hidden; display: flex; flex-direction: column; }
.card__media { aspect-ratio: 16/7; display: grid; place-items: center; border-radius: 14px; background: var(--hair); padding: 12px; }
.card__media img { max-height: 100%; width: auto; border-radius: 8px; }
.card__media--logo { background: rgb(255 255 255 / .92); }
.card__body { padding: 14px 8px 8px; display: grid; gap: 8px; flex: 1; align-content: start; }
.card__title { font: 700 17px var(--display); margin: 0; letter-spacing: -0.01em; }
.card__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.card__stats div { padding: 8px 10px; border-radius: 12px; background: var(--hair); }
.card__stats b { display: block; font: 750 18px var(--display); font-variant-numeric: tabular-nums; }
.card__stats span { font-size: 12px; color: var(--muted); }
.card__foot { display: flex; gap: 8px; padding: 12px 8px 6px; border-top: 1px solid var(--hair); flex-wrap: wrap; margin-top: 6px; }

/* ---------- Drawer, modal, toast ---------- */
.scrim { position: fixed; inset: 0; background: rgb(3 8 11 / .35); z-index: 70; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(560px, calc(100% - 20px)); z-index: 71; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-panel); display: flex; flex-direction: column; overflow: hidden; animation: slide .28s cubic-bezier(.2,.7,.2,1) both; -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); backdrop-filter: blur(var(--blur)) saturate(170%); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer .edge { border-radius: 0; height: 4px; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--hair); }
.drawer__head h2 { font: 750 22px var(--display); margin: 0; letter-spacing: -0.02em; }
.drawer__body { padding: 22px; overflow-y: auto; flex: 1; }
.drawer__foot { padding: 14px 22px; border-top: 1px solid var(--hair); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal { position: fixed; z-index: 72; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px)); padding: 26px; background: var(--panel2); animation: pop .2s both; }
@keyframes pop { from { transform: translate(-50%, -46%); opacity: 0; } }
.modal h2 { font: 750 21px var(--display); margin: 0 0 8px; }
.modal p { color: var(--muted); margin: 0 0 20px; }
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 95; display: grid; gap: 10px; }
@media (max-width: 1000px) { .toasts { bottom: 96px; left: 16px; right: 16px; } }
.toast { padding: 13px 16px 13px 14px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--hair2); display: flex; gap: 10px; align-items: center; font-weight: 600; max-width: 440px; animation: rise .25s both; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.toast--err::before { background: var(--bad); }

/* ---------- Misc ---------- */
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; padding: 4px 8px; border-radius: 8px; background: var(--hair); color: var(--ink); }
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix th { white-space: normal; min-width: 92px; vertical-align: bottom; }
.checks { display: grid; gap: 8px; }
.chk { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--hair); }
.chk__i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 13px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.chk--bad .chk__i { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.chk small { display: block; color: var(--muted); }
.preview-mast { border-radius: 18px; overflow: hidden; border: 1px solid var(--hair); background: #E9EEF0; color: #0B1215; padding: 12px; display: grid; gap: 10px; }
.preview-mast__nav { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 999px; background: rgb(255 255 255 / .8); font-weight: 600; font-size: 13px; }
.preview-mast__nav strong { font: 800 18px var(--display); letter-spacing: -0.04em; margin-right: auto; }
.preview-mast__tick { padding: 8px 14px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 13px; width: fit-content; }
.preview-mast__card { padding: 10px; background: rgb(255 255 255 / .7); border: 1px solid #fff; display: grid; gap: 8px; }
.preview-mast__card i { display: block; height: 70px; background: linear-gradient(150deg, #FFB080, #7060A0); }
.preview-mast__card b { font-size: 14px; }
.colorrow { display: flex; gap: 10px; align-items: center; }
.colorrow input[type=color] { width: 44px; height: 42px; border: 1px solid var(--hair2); border-radius: 12px; background: none; padding: 3px; cursor: pointer; }
.msg { display: grid; grid-template-columns: 340px 1fr; min-height: 520px; overflow: hidden; }
.msg__list { border-right: 1px solid var(--hair); overflow-y: auto; max-height: 70vh; }
.msg__item { display: block; width: 100%; text-align: left; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--hair); background: none; cursor: pointer; color: var(--ink); }
.msg__item:hover, .msg__item.is-on { background: var(--hair); }
.msg__item b { display: block; }
.msg__item span { font-size: 13px; color: var(--muted); }
.msg__read { padding: 26px; }
.msg__body { white-space: pre-wrap; font-size: 16px; line-height: 1.65; padding: 18px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--hair); }
@media (max-width: 800px) { .msg { grid-template-columns: 1fr; } .msg__list { border-right: 0; max-height: 300px; } }
.ending { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--hair); }
.ending:first-child { border-top: 0; padding-top: 0; }

/* ---------- Login ---------- */
.lg { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; position: relative; z-index: 1; }
.lg__art { position: relative; overflow: hidden; margin: 16px; border-radius: 28px; background: linear-gradient(180deg, #FFB080 0%, #A060A0 50%, #1A2650 100%); }
.lg__panes { position: absolute; inset: -4%; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 1fr); gap: 10px; background: #0B1A20; padding: 10px; transform: perspective(1400px) rotateY(-16deg) rotateX(4deg) scale(1.12); transform-origin: left center; }
.lg__panes span { position: relative; overflow: hidden; background: linear-gradient(175deg, rgba(255,196,160,.95), rgba(160,96,150,.9) 45%, rgba(26,38,78,.95)); }
.lg__panes span:nth-child(3n) { background: linear-gradient(175deg, rgba(196,236,224,.95), rgba(46,138,120,.9) 50%, rgba(10,36,44,.95)); }
.lg__panes span:nth-child(5n+1) { filter: brightness(.85); }
.lg__panes span::after { content: ""; position: absolute; inset: -40% auto -40% -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); animation: pane 1.4s cubic-bezier(.5,0,.2,1) both; }
.lg__panes span:nth-child(6n+1)::after { animation-delay: .1s; } .lg__panes span:nth-child(6n+2)::after { animation-delay: .2s; } .lg__panes span:nth-child(6n+3)::after { animation-delay: .3s; } .lg__panes span:nth-child(6n+4)::after { animation-delay: .4s; } .lg__panes span:nth-child(6n+5)::after { animation-delay: .5s; } .lg__panes span:nth-child(6n)::after { animation-delay: .6s; }
@keyframes pane { from { left: -60%; } to { left: 160%; } }
@media (prefers-reduced-motion: reduce) { .lg__panes span::after { animation: none; display: none; } }
.lg__quote { position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 28px 30px; border-radius: 20px; background: rgb(255 255 255 / .7); border: 1px solid rgb(255 255 255 / .9); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); color: #0B1215; }
.lg__brand { font: 800 clamp(34px, 4.4vw, 56px)/0.95 var(--display); letter-spacing: -0.045em; margin: 0 0 10px; }
.lg__quote p:not(.lg__brand) { margin: 0; color: #33424A; font-size: 17px; max-width: 44ch; }
.lg__form { display: grid; place-content: center; padding: 32px 20px; gap: 18px; }
.lg__card { width: min(420px, 100%); padding: 34px; overflow: hidden; position: relative; background: var(--panel2); }
.lg__card > .edge { position: absolute; left: 0; right: 0; top: 0; border-radius: 0; }
.lg__card h1 { font: 750 30px var(--display); letter-spacing: -0.035em; margin: 8px 0 6px; }
.lg__card .muted { margin: 0 0 24px; }
.lg__logo { max-height: 44px; width: auto; margin-bottom: 8px; }
.lg__forgot { text-align: center; font-weight: 600; font-size: 14px; }
.lg__foot { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; width: min(420px, 100%); }
.lg__foot a { color: var(--muted); }
.lg__theme { position: absolute; top: 20px; right: 20px; z-index: 2; }
.alert { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 12%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad); font-weight: 600; margin-bottom: 18px; }
@media (max-width: 900px) { .lg { grid-template-columns: 1fr; } .lg__art { min-height: 240px; } .lg__quote { padding: 18px; } }

/* Branding: design style picker and colour sets */
.stylepick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .stylepick { grid-template-columns: 1fr; } }
.stylepick__opt { position: relative; display: grid; gap: 4px; padding: 10px; border-radius: 14px; border: 1.5px solid var(--hair); cursor: pointer; }
.stylepick__opt input { position: absolute; opacity: 0; }
.stylepick__opt:has(input:checked) { border-color: var(--acc); background: var(--soft); }
.stylepick__opt:has(input:focus-visible) { outline: 2px solid var(--acc); outline-offset: 2px; }
.stylepick__opt b { font-size: 14px; }
.stylepick__opt small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.stylepick__art { height: 74px; border-radius: 10px; display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 14px 1fr 1fr; gap: 5px; padding: 6px; margin-bottom: 4px; background: #EEF2F6; }
.stylepick__art i { border-radius: 4px; background: #fff; border: 1px solid #DCE3EA; }
.stylepick__art i:first-child { grid-column: 1 / -1; }
.stylepick__art i:nth-child(2) { grid-row: 2 / 4; }
.stylepick__art--minimal { background: #fff; }
.stylepick__art--minimal i { background: transparent; border: 0; border-top: 2px solid #13202A; border-radius: 0; }
.stylepick__art--minimal i:first-child { border-top: 0; border-bottom: 1px solid #13202A; }
.stylepick__art--glass { background: radial-gradient(circle at 10% 10%, #9fd6c8, transparent 60%), radial-gradient(circle at 90% 90%, #ffc39b, transparent 60%), #E6EDF2; }
.stylepick__art--glass i { background: rgb(255 255 255 / .55); border-color: rgb(255 255 255 / .9); border-radius: 8px; }
.stylepick__art--glass i:first-child { border-radius: 999px; }
.palettes { display: flex; flex-wrap: wrap; gap: 8px; }
.palette { display: inline-flex; align-items: center; gap: 3px; height: 34px; padding: 0 10px 0 6px; border-radius: 999px; border: 1px solid var(--hair); background: var(--panel); color: var(--ink); cursor: pointer; font: 500 13px var(--sans, inherit); }
.palette i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .08); }
.palette span { margin-left: 4px; }
.palette.is-on, .palette:hover { border-color: var(--acc); }
[hidden] { display: none !important; }
.hs__row { align-items: center; }
.hs__row.is-off .li__main { opacity: .5; }
.hs__num { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--hair); font-size: 12px; font-weight: 600; }
.hs__acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hs__acts .switch { margin: 0 4px; }
@media (max-width: 700px) { .hs__row { flex-wrap: wrap; } .hs__acts { width: 100%; justify-content: flex-start; padding-left: 38px; } }
.addsec { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--hair); background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; font: inherit; white-space: normal; }
.addsec:hover { border-color: var(--acc); }
.addsec svg { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.addsec b { font-size: 14px; }
.addsec small { display: block; margin-top: 2px; font-size: 12.5px; }
