/* DOMINATOR App */
:root {
	--brand: #262626;
	--brand-ink: #fff;
	--accent: #df7629;
	--accent-ink: #fff;
	--accent-on-light: #df7629;
	--accent-on-dark: #df7629;
	--bar-accent: var(--accent);
	--accent-text: var(--accent-on-light);
	--link: #1e73be;
	--bg: #f1f1f3;
	--surface: #fff;
	--surface2: #f6f6f8;
	--ink: #111114;
	--ink2: #6b6b73;
	--line: rgba(0, 0, 0, .08);
	--shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .05);
	--bar-h: 54px;
	--tabs-h: 58px;
	--safe-t: env(safe-area-inset-top, 0px);
	--safe-b: env(safe-area-inset-bottom, 0px);
	--fs: 17px;
	--maxw: 760px;
	color-scheme: light;
}
:root[data-textsize="1"] { --fs: 15px; }
:root[data-textsize="3"] { --fs: 19px; }
:root[data-textsize="4"] { --fs: 21.5px; }
:root[data-theme="dark"] {
	--accent-text: var(--accent-on-dark); --bg: #000; --surface: #161618; --surface2: #222225; --ink: #f2f2f4; --ink2: #9a9aa3;
	--line: rgba(255, 255, 255, .1); --shadow: none; --link: #6cb2ff; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--accent-text: var(--accent-on-dark); --bg: #000; --surface: #161618; --surface2: #222225; --ink: #f2f2f4; --ink2: #9a9aa3;
		--line: rgba(255, 255, 255, .1); --shadow: none; --link: #6cb2ff; color-scheme: dark;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
	padding-bottom: calc(var(--tabs-h) + var(--safe-b));
	overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

/* Icons */
.ic { display: inline-flex; width: 22px; height: 22px; flex: none; }
.ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.big { width: 44px; height: 44px; color: var(--accent-text); }

/* Top bar */
.bar {
	position: sticky; top: 0; z-index: 30;
	display: flex; align-items: center; gap: 4px;
	height: calc(var(--bar-h) + var(--safe-t)); padding: var(--safe-t) 6px 0 14px;
	background: var(--brand); color: var(--brand-ink);
}
.bar.has-back { padding-left: 2px; }
.bar .brand { display: flex; align-items: center; flex: 0 1 auto; min-width: 0; height: 100%; font-weight: 800; font-size: 19px; letter-spacing: -.01em; overflow: hidden; }
.bar .brand img { max-height: 36px; max-width: 100%; width: auto; height: auto; display: block; object-fit: contain; object-position: left center; }
.bar .brand img.tall { max-height: 44px; }
.bar .brand img.square { max-height: 46px; border-radius: 6px; }
.bar-title { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-actions { margin-left: auto; display: flex; align-items: center; }
.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; padding: 0;
}
.icon-btn:active { background: rgba(127, 127, 127, .2); }
.icon-btn.on .ic svg { fill: currentColor; }
.bar .icon-btn.on { color: var(--bar-accent); }
@media (hover: none) { .wide-only { display: none; } }

/* Search field in the bar */
.searchbar {
	flex: 1; display: flex; align-items: center; gap: 8px; height: 38px; margin-right: 8px; padding: 0 12px;
	border-radius: 10px; background: color-mix(in srgb, var(--brand-ink) 14%, transparent); color: var(--brand-ink);
}
.searchbar .ic { width: 18px; height: 18px; opacity: .8; }
.searchbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: inherit; }
.searchbar input::placeholder { color: inherit; opacity: .65; }
.searchbar input::-webkit-search-cancel-button { filter: invert(1); }
.light-bar .searchbar input::-webkit-search-cancel-button { filter: none; }

/* Category chips */
.chips {
	position: sticky; top: calc(var(--bar-h) + var(--safe-t)); z-index: 25;
	display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	-webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
	scrollbar-width: none; border-bottom: 1px solid var(--line);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
	flex: none; padding: 7px 15px; border-radius: 999px; font-size: 14px; font-weight: 600; text-transform: capitalize;
	background: var(--surface); color: var(--ink); border: 1px solid var(--line); cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.views { max-width: var(--maxw); margin: 0 auto; }

/* Feed */
.list { display: flex; flex-direction: column; }
.card { display: block; position: relative; }
.card.hero {
	margin: 12px 12px 6px; border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow);
}
.card.hero .img { aspect-ratio: 16 / 9; background: var(--surface2); }
.card.hero .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.hero .txt { padding: 12px 16px 16px; }
.card.hero .t { margin: 6px 0 0; font-size: 22px; line-height: 1.22; font-weight: 750; letter-spacing: -.015em; }
.card.hero .ex { margin: 8px 0 0; color: var(--ink2); font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.row {
	display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; margin: 0 12px;
	border-bottom: 1px solid var(--line);
}
.card.row .txt { flex: 1; min-width: 0; }
.card.row .t { margin: 5px 0 0; font-size: 16.5px; line-height: 1.3; font-weight: 650; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.row .thumb { flex: none; width: 104px; height: 78px; border-radius: 12px; overflow: hidden; background: var(--surface2); }
.card.row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card:active { opacity: .7; }
.card.new { animation: dmx-new 1.6s ease-out; }
@keyframes dmx-new { from { background: color-mix(in srgb, var(--accent) 20%, transparent); } }
.meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); flex-wrap: wrap; }
.meta .cat { color: var(--accent-text); font-weight: 750; text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; }
.meta .cc { display: inline-flex; align-items: center; gap: 3px; }
.meta .cc .ic { width: 13px; height: 13px; }
.rating {
	display: inline-block; margin-right: 7px; padding: 1px 6px 1px; border-radius: 6px; vertical-align: .14em;
	background: var(--accent); color: var(--accent-ink); font-size: .62em; font-weight: 800; letter-spacing: .03em; line-height: 1.5;
}
.day { margin: 0; padding: 20px 28px 4px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); font-weight: 700; }
.status { padding: 22px 16px 30px; text-align: center; color: var(--ink2); }
.end { margin: 0; font-size: 14px; }
.spinner {
	width: 26px; height: 26px; margin: 0 auto; border-radius: 50%;
	border: 3px solid var(--line); border-top-color: var(--accent); animation: dmx-spin .8s linear infinite;
}
@keyframes dmx-spin { to { transform: rotate(360deg); } }
.error { padding: 18px; text-align: center; color: var(--ink2); }
.empty { padding: 70px 30px; text-align: center; color: var(--ink2); }

/* Promo / install */
.promo, .install, .card-box {
	margin: 12px; padding: 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow);
}
.promo { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }
.promo p { margin: 0; font-weight: 600; }
.promo .row-btns { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 6px; }
.install { display: flex; align-items: center; gap: 12px; margin-bottom: 0; }
.install img { border-radius: 10px; }
.install .grow { flex: 1; min-width: 0; font-size: 13px; color: var(--ink2); line-height: 1.3; }
.install strong { display: block; color: var(--ink); font-size: 15px; }
.install .icon-btn { width: 32px; height: 32px; }
body:not([data-view="feed"]) .install-slot { display: none; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 42px; padding: 9px 18px; border: 0; border-radius: 12px; cursor: pointer;
	background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 15px;
}
.btn .ic { width: 19px; height: 19px; }
.btn:disabled { opacity: .5; }
.btn.ghost { background: var(--surface2); color: var(--ink); }
.btn.block { display: flex; width: 100%; }
.link { border: 0; background: none; color: var(--link); padding: 0; cursor: pointer; font-weight: 600; }

/* Article */
.post { background: var(--surface); min-height: 100vh; padding-bottom: 20px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 18px; }
.head { padding-top: 20px; }
.post .title { margin: 10px 0 8px; font-size: calc(var(--fs) * 1.55); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.byline { color: var(--ink2); font-size: 14px; margin-bottom: 4px; }
.byline .cc { display: inline-flex; align-items: center; gap: 3px; color: inherit; text-decoration: none; }
.byline .cc .ic { width: 14px; height: 14px; margin-left: 4px; }
.content { font-size: var(--fs); line-height: 1.65; overflow-wrap: break-word; padding-top: 6px; }
.content p { margin: 0 0 1.05em; }
.content h2, .content h3, .content h4 { line-height: 1.25; margin: 1.5em 0 .5em; letter-spacing: -.01em; }
.content h2 { font-size: 1.3em; }
.content h3 { font-size: 1.15em; }
.content a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.content img { border-radius: 10px; display: block; margin: 1em auto; }
.content a img { display: block; }
.content figure { margin: 1.2em 0; max-width: 100%; }
.content figcaption, .content .wp-caption-text { font-size: .8em; color: var(--ink2); text-align: center; margin-top: -.4em; }
.content .wp-caption { max-width: 100% !important; width: auto !important; }
.content ul, .content ol { padding-left: 1.3em; margin: 0 0 1.05em; }
.content li { margin: .25em 0; }
.content blockquote {
	margin: 1.2em 0; padding: .6em 1em; border-left: 4px solid var(--accent); background: var(--surface2); border-radius: 0 10px 10px 0; font-style: italic;
}
.content blockquote p:last-child { margin-bottom: 0; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.content pre { overflow-x: auto; background: var(--surface2); padding: 12px; border-radius: 10px; font-size: .85em; }
.content .embed { margin: 1.2em 0; }
.content .embed iframe, .content iframe { display: block; width: 100%; height: auto; border: 0; border-radius: 10px; background: #000; }
.content .table-wrap { overflow-x: auto; margin: 1.2em 0; }
.content table { border-collapse: collapse; font-size: .85em; min-width: 100%; }
.content td, .content th { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.content .alignleft, .content .alignright { float: none; margin: 1em auto; }
.content .twitter-tweet, .content .instagram-media { margin: 1em auto !important; }
.skeleton { padding: 20px 0; }
.skeleton i { display: block; height: 14px; margin: 0 0 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface2) 25%, var(--line) 50%, var(--surface2) 75%); background-size: 200% 100%; animation: dmx-sk 1.2s infinite; }
.skeleton i.short { width: 60%; }
@keyframes dmx-sk { to { background-position: -200% 0; } }
.post-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 10px 0 6px; border-top: 1px solid var(--line); margin-top: 18px; }
.post-actions .btn { flex: 1; }
.comments { padding-top: 12px; }
.comments .btn.block { margin: 6px 0; }
.disqus { min-height: 120px; }
.more { padding-top: 18px; }
.more > h3 { margin: 6px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); }
.more .card.row { margin: 0; padding-left: 0; padding-right: 0; }

/* Native comments */
.clist { padding: 8px 0; }
.comment { padding: 12px 0 2px; border-top: 1px solid var(--line); }
.comment .replies { margin-left: 18px; }
.comment .replies .comment { border-top: 0; border-left: 2px solid var(--line); padding-left: 12px; }
.chead { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.chead time { color: var(--ink2); font-size: 12.5px; }
.avatar { border-radius: 50%; }
.cbody { font-size: calc(var(--fs) * .92); line-height: 1.55; }
.cbody p { margin: .4em 0; }
.comment .link { font-size: 13px; margin-bottom: 6px; }
.cform { display: grid; gap: 10px; padding: 12px 0; }
.cform h4 { margin: 4px 0 0; }
.cform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cform input, .cform textarea, .settings select {
	width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); font-size: 16px;
}
.reply-note { font-size: 14px; color: var(--ink2); }
.muted { color: var(--ink2); }
.small { font-size: 12.5px; }

/* Saved / search */
.saved .card.row { padding-right: 46px; }
.saved .remove { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; color: var(--ink2); }
.recent { padding: 4px 0 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 16px; }

/* Settings */
.settings { padding-bottom: 20px; }
.card-box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 17px; }
.card-box h3 .ic { color: var(--accent-text); }
.card-box h4 { margin: 16px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink2); }
.card-box p { margin: 6px 0; }
.card-box .btn { margin-top: 8px; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { position: relative; flex: none; width: 52px; height: 32px; border-radius: 99px; border: 0; background: var(--line); cursor: pointer; padding: 0; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch.on { background: #34c759; }
.switch.on i { transform: translateX(20px); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--surface2); text-transform: capitalize; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.seg { display: flex; padding: 3px; border-radius: 11px; background: var(--surface2); }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.ts1 { font-size: 13px; } .ts2 { font-size: 16px; } .ts3 { font-size: 19px; } .ts4 { font-size: 23px; }

/* Bottom tabs */
.tabs {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
	display: flex; height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
	background: color-mix(in srgb, var(--surface) 90%, transparent);
	-webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
	border-top: 1px solid var(--line);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--ink2); }
.tab .ic { width: 24px; height: 24px; }
.tab.on { color: var(--accent-text); }
.tab.on .ic svg { fill: currentColor; fill-opacity: .14; }

/* Toast, pill, pull to refresh */
.toast {
	position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 14px); z-index: 60;
	display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 14px;
	background: rgba(28, 28, 30, .94); color: #fff; font-size: 14.5px; box-shadow: 0 6px 24px rgba(0,0,0,.25);
	transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast button { border: 0; background: none; color: var(--accent-on-dark); font-weight: 700; cursor: pointer; padding: 0; }
.pill {
	position: fixed; left: 50%; top: calc(var(--bar-h) + var(--safe-t) + 62px); z-index: 26;
	display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border: 0; border-radius: 99px;
	background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.2);
	transform: translate(-50%, -20px); opacity: 0; pointer-events: none; transition: .25s; cursor: pointer;
}
.pill .ic { width: 16px; height: 16px; }
.pill.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.ptr {
	position: fixed; left: 50%; top: calc(var(--bar-h) + var(--safe-t)); z-index: 24;
	display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-top: -40px; border-radius: 50%;
	background: var(--surface); color: var(--ink2); box-shadow: 0 2px 10px rgba(0,0,0,.2); transform: translate(-50%, 0); opacity: 0;
}
.ptr.show { opacity: 1; }
.ptr.ready { color: var(--accent-text); }
.ptr.spin { transform: translate(-50%, 70px) !important; color: var(--accent-text); }
.ptr.spin .ic { animation: dmx-spin .8s linear infinite; }

/* Sheets and lightbox */
.sheet-back { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; animation: dmx-fade .2s; }
.sheet { width: 100%; max-width: 520px; padding: 22px 20px calc(20px + var(--safe-b)); border-radius: 22px 22px 0 0; background: var(--surface); animation: dmx-up .25s; }
.sheet h3 { margin: 0 0 6px; }
.steps { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.steps .ic { width: 34px; height: 34px; padding: 6px; border-radius: 9px; background: var(--surface2); color: var(--link); justify-content: center; align-items: center; font-size: 18px; }
@keyframes dmx-fade { from { opacity: 0; } }
@keyframes dmx-up { from { transform: translateY(40px); opacity: .5; } }
.lightbox { position: fixed; inset: 0; z-index: 80; background: #000; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .close { position: absolute; top: calc(var(--safe-t) + 8px); right: 8px; color: #fff; background: rgba(255,255,255,.12); }

/* Ads */
/* Full width everywhere (also in the flex list): an ad unit needs the width to choose a size. */
.ad { display: block; align-self: stretch; max-width: 100%; margin: 0; text-align: center; overflow: hidden; }
.ad:has(iframe, ins[data-ad-status="filled"]) { margin: 18px 0; padding-top: 4px; }
.ad::before { content: "Advertisements"; display: none; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink2); margin-bottom: 4px; }
.ad:has(iframe, ins[data-ad-status="filled"])::before { display: block; }
.ad ins[data-ad-status="unfilled"] { display: none !important; }
.feed .ad-list:has(iframe) { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin: 0 12px; }
.content .ad { clear: both; }

/* Wider screens */
@media (min-width: 760px) {
	.card.hero { margin: 16px 0 8px; }
	.card.row { margin: 0; }
	.chips { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
