/*
	Asura Scans — the whole front end.

	Madara's Bootstrap, slick, AOS, lightbox and 328KB stylesheet are dequeued in
	functions.php, so every rule below stands on its own. Font Awesome is the one
	outside dependency and it ships with Madara Core.
*/

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
	--as-bg: #0e0a17;
	--as-bg-soft: #141020;
	--as-panel: #1b1526;
	--as-raise: #241c33;
	--as-line: #2e2540;
	--as-line-soft: #241d34;

	--as-brand: #8b3ffb;
	--as-accent: #a855f7;
	--as-accent-hi: #c084fc;
	--as-amber: #f59e0b;
	--as-gold: #fbbf24;

	--as-text: #ece8f5;
	--as-text-dim: #c5bcd8;
	--as-muted: #9d92b5;

	--as-radius: 8px;
	--as-radius-lg: 14px;
	--as-gap: 16px;
	--as-container: 1320px;

	--as-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--as-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body.as {
	margin: 0;
	background: var(--as-bg);
	color: var(--as-text);
	font-family: var(--as-font);
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--as-text);
	text-decoration: none;
	transition: color .15s ease;
}

a:hover,
a:focus {
	color: var(--as-accent-hi);
}

h1, h2, h3, h4, h5 {
	margin: 0 0 .6em;
	line-height: 1.25;
	font-weight: 600;
	letter-spacing: -.01em;
}

p {
	margin: 0 0 1em;
}

ul, ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

button {
	font: inherit;
	cursor: pointer;
}

input,
select,
textarea {
	font: inherit;
	color: inherit;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

:focus-visible {
	outline: 2px solid var(--as-accent-hi);
	outline-offset: 2px;
}

.as-container {
	width: 100%;
	max-width: var(--as-container);
	margin: 0 auto;
	padding: 0 18px;
}

.as-page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.as-main {
	flex: 1 0 auto;
	padding-bottom: 48px;
}

/* --------------------------------------------------------------------------
   3. Header
   -------------------------------------------------------------------------- */

.as-header {
	background: var(--as-brand);
	position: sticky;
	top: 0;
	z-index: 60;
}

.as-header__inner {
	display: flex;
	align-items: center;
	gap: 26px;
	min-height: 62px;
}

.as-logo {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	flex: 0 0 auto;
}

.as-logo__mark {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	flex: 0 0 auto;
}

.as-logo__text {
	font-weight: 700;
	font-size: 19px;
	letter-spacing: -.02em;
	color: #fff;
	white-space: nowrap;
}

.as-nav {
	display: flex;
	align-items: center;
	gap: 4px;
}

.as-nav a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 500;
	color: rgba(255, 255, 255, .92);
}

.as-nav a:hover,
.as-nav .is-current > a,
.as-nav .current-menu-item > a {
	background: rgba(0, 0, 0, .22);
	color: #fff;
}

.as-header__tools {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.as-search {
	position: relative;
	width: 260px;
}

.as-search__field {
	width: 100%;
	height: 40px;
	padding: 0 66px 0 38px;
	background: rgba(10, 6, 20, .55);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 999px;
	color: #fff;
	font-size: 14px;
}

.as-search__field::placeholder {
	color: rgba(255, 255, 255, .6);
}

.as-search__field:focus {
	outline: none;
	border-color: rgba(255, 255, 255, .5);
	background: rgba(10, 6, 20, .8);
}

.as-search__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: rgba(255, 255, 255, .75);
	font-size: 13px;
	pointer-events: none;
}

.as-search__hint {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	padding: 2px 7px;
	font-size: 11px;
	font-weight: 500;
	color: rgba(255, 255, 255, .7);
	background: rgba(255, 255, 255, .12);
	border-radius: 5px;
	pointer-events: none;
}

.as-nav-toggle {
	display: none;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: rgba(10, 6, 20, .45);
	border: 1px solid rgba(255, 255, 255, .12);
	color: #fff;
}

/* --------------------------------------------------------------------------
   4. Hero
   -------------------------------------------------------------------------- */

.as-hero {
	position: relative;
	padding: 26px 0 34px;
	overflow: hidden;
	background: var(--as-bg-soft);
	border-bottom: 1px solid var(--as-line-soft);
}

/* The featured cover, blown up and blurred, is the only light in the room. */
.as-hero__glow {
	position: absolute;
	inset: -20% -10% auto -10%;
	height: 150%;
	background-size: cover;
	background-position: center 20%;
	filter: blur(60px) saturate(150%);
	opacity: .32;
	transform: scale(1.1);
	transition: background-image .4s ease;
	pointer-events: none;
}

.as-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(14, 10, 23, .45) 0%, rgba(14, 10, 23, .1) 40%, var(--as-bg-soft) 100%);
	pointer-events: none;
}

.as-hero__track {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding: 14px 0 10px;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.as-hero__track::-webkit-scrollbar {
	display: none;
}

.as-hero__item {
	position: relative;
	flex: 0 0 auto;
	width: 158px;
	scroll-snap-align: center;
	border-radius: var(--as-radius);
	overflow: hidden;
	opacity: .55;
	transform: scale(.93);
	transition: opacity .35s ease, transform .35s ease, box-shadow .35s ease;
}

.as-hero__item img {
	width: 100%;
	aspect-ratio: 5 / 7;
	object-fit: cover;
}

.as-hero__item.is-active {
	opacity: 1;
	transform: scale(1.14);
	z-index: 3;
	box-shadow: var(--as-shadow), 0 0 0 2px rgba(168, 85, 247, .55);
}

.as-hero__item:hover {
	opacity: .95;
}

.as-hero__score {
	position: absolute;
	top: 7px;
	left: 7px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background: rgba(10, 6, 20, .82);
	border-radius: 999px;
	opacity: 0;
	transition: opacity .3s ease;
}

.as-hero__score i {
	color: var(--as-gold);
	font-size: 11px;
}

.as-hero__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 26px 10px 10px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
	background: linear-gradient(180deg, transparent, rgba(8, 5, 14, .92));
	opacity: 0;
	transition: opacity .3s ease;
}

.as-hero__item.is-active .as-hero__score,
.as-hero__item.is-active .as-hero__caption {
	opacity: 1;
}

/* --------------------------------------------------------------------------
   5. Layout
   -------------------------------------------------------------------------- */

.as-home {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 22px;
	align-items: start;
	padding-top: 26px;
}

.as-home__wide {
	grid-column: 1 / -1;
}

.as-stack {
	display: flex;
	flex-direction: column;
	gap: 22px;
	min-width: 0;
}

/* --------------------------------------------------------------------------
   6. Panels
   -------------------------------------------------------------------------- */

.as-panel {
	background: var(--as-panel);
	border: 1px solid var(--as-line-soft);
	border-radius: var(--as-radius-lg);
	overflow: hidden;
}

.as-panel__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px 12px;
}

.as-panel__title {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 19px;
	font-weight: 600;
	color: #fff;
}

.as-panel__icon {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: rgba(168, 85, 247, .16);
	color: var(--as-accent-hi);
	font-size: 14px;
}

.as-tag {
	padding: 2px 8px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #1a1200;
	background: var(--as-amber);
	border-radius: 5px;
}

.as-panel__action {
	margin-left: auto;
}

.as-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 16px;
	font-size: 13.5px;
	font-weight: 600;
	color: #fff;
	background: var(--as-accent);
	border: 0;
	border-radius: 8px;
}

.as-pill:hover {
	background: var(--as-accent-hi);
	color: #fff;
}

.as-pill--amber {
	background: var(--as-amber);
	color: #1a1200;
}

.as-pill--amber:hover {
	background: var(--as-gold);
	color: #1a1200;
}

.as-panel__body {
	padding: 4px 18px 18px;
}

.as-panel__body--flush {
	padding: 0 18px 8px;
}

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */

.as-row {
	position: relative;
}

.as-row__track {
	display: flex;
	gap: var(--as-gap);
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.as-row__track::-webkit-scrollbar {
	display: none;
}

.as-row__track > * {
	flex: 0 0 168px;
	scroll-snap-align: start;
}

.as-row__nav {
	position: absolute;
	top: 32%;
	right: -8px;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(27, 21, 38, .95);
	border: 1px solid var(--as-line);
	color: #fff;
	box-shadow: var(--as-shadow);
	z-index: 4;
}

.as-row__nav--prev {
	left: -8px;
	right: auto;
}

.as-row__nav:hover {
	background: var(--as-accent);
	border-color: var(--as-accent);
}

.as-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: var(--as-gap);
}

.as-card {
	min-width: 0;
}

.as-card__cover {
	position: relative;
	display: block;
	aspect-ratio: 5 / 7;
	border-radius: var(--as-radius);
	overflow: hidden;
	background: #100c1b;
}

.as-card__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.as-card:hover .as-card__cover img {
	transform: scale(1.06);
}

.as-card__type {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 3px 8px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(139, 63, 251, .92);
	border-radius: 5px;
}

.as-card__title {
	display: block;
	margin: 10px 0 3px;
	font-size: 14px;
	font-weight: 600;
	color: var(--as-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.as-card__chapter {
	display: block;
	font-size: 13px;
	color: var(--as-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.as-card__chapter:hover {
	color: var(--as-accent-hi);
}

/* Rating readout: gold stars, numeric score alongside. */
.as-stars {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-top: 5px;
	color: var(--as-gold);
	font-size: 11px;
}

.as-stars__value {
	margin-left: 5px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--as-text-dim);
}

/* --------------------------------------------------------------------------
   8. Popular sidebar
   -------------------------------------------------------------------------- */

.as-tabs {
	display: inline-flex;
	gap: 4px;
	margin-left: auto;
	padding: 4px;
	background: var(--as-raise);
	border-radius: 999px;
}

.as-tabs button {
	padding: 5px 13px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--as-muted);
	background: transparent;
	border: 0;
	border-radius: 999px;
}

.as-tabs button:hover {
	color: #fff;
}

.as-tabs button.is-active {
	color: #fff;
	background: var(--as-accent);
}

.as-rank {
	display: none;
	flex-direction: column;
}

.as-rank.is-active {
	display: flex;
}

.as-rank__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--as-line-soft);
}

.as-rank__item:last-child {
	border-bottom: 0;
}

.as-rank__num {
	flex: 0 0 26px;
	height: 26px;
	display: grid;
	place-items: center;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: var(--as-raise);
	border-radius: 50%;
}

.as-rank__item:nth-child(1) .as-rank__num {
	background: var(--as-accent);
}

.as-rank__item:nth-child(2) .as-rank__num,
.as-rank__item:nth-child(3) .as-rank__num {
	background: rgba(168, 85, 247, .55);
}

.as-rank__cover {
	flex: 0 0 48px;
	width: 48px;
	aspect-ratio: 5 / 7;
	border-radius: 6px;
	overflow: hidden;
	background: #100c1b;
}

.as-rank__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.as-rank__body {
	min-width: 0;
	flex: 1;
}

.as-rank__title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--as-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.as-rank__genres {
	display: block;
	font-size: 12px;
	color: var(--as-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.as-rank__genres b {
	font-weight: 500;
	color: var(--as-accent-hi);
}

/* --------------------------------------------------------------------------
   9. Update list
   -------------------------------------------------------------------------- */

.as-updates__item {
	display: flex;
	gap: 13px;
	padding: 13px 0;
	border-bottom: 1px solid var(--as-line-soft);
}

.as-updates__item:last-child {
	border-bottom: 0;
}

.as-updates__cover {
	flex: 0 0 58px;
	width: 58px;
	aspect-ratio: 5 / 7;
	border-radius: 6px;
	overflow: hidden;
	background: #100c1b;
}

.as-updates__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.as-updates__body {
	min-width: 0;
	flex: 1;
}

.as-updates__title {
	display: block;
	margin-bottom: 6px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.as-updates__chapters {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.as-updates__chapter {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 13px;
}

.as-updates__chapter a {
	color: var(--as-text-dim);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.as-updates__chapter a:hover {
	color: var(--as-accent-hi);
}

.as-updates__time {
	flex: 0 0 auto;
	font-size: 11.5px;
	color: var(--as-muted);
}

/* --------------------------------------------------------------------------
   10. Series page
   -------------------------------------------------------------------------- */

.as-series {
	position: relative;
	border-radius: var(--as-radius-lg);
	overflow: hidden;
	background: var(--as-panel);
	border: 1px solid var(--as-line-soft);
	margin-bottom: 22px;
}

.as-series__backdrop {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center 25%;
	filter: blur(40px) saturate(140%);
	opacity: .22;
}

.as-series__inner {
	position: relative;
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 24px;
	padding: 24px;
	background: linear-gradient(180deg, rgba(27, 21, 38, .72), var(--as-panel));
}

.as-series__cover {
	border-radius: var(--as-radius);
	overflow: hidden;
	aspect-ratio: 5 / 7;
	background: #100c1b;
	box-shadow: var(--as-shadow);
}

.as-series__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.as-series__title {
	margin: 0 0 6px;
	font-size: 30px;
	font-weight: 700;
	color: #fff;
}

.as-series__alt {
	margin: 0 0 14px;
	font-size: 14px;
	color: var(--as-muted);
}

.as-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 10px 20px;
	margin: 0 0 16px;
	font-size: 14px;
}

.as-fact {
	display: flex;
	gap: 8px;
}

.as-fact__label {
	color: var(--as-muted);
	flex: 0 0 auto;
}

.as-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0 0 18px;
}

.as-chip {
	display: inline-block;
	padding: 4px 12px;
	font-size: 12.5px;
	color: var(--as-text-dim);
	background: var(--as-raise);
	border: 1px solid var(--as-line);
	border-radius: 999px;
}

.as-chip:hover {
	color: #fff;
	border-color: var(--as-accent);
}

.as-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.as-summary {
	color: var(--as-text-dim);
	font-size: 14.5px;
}

.as-chapters {
	max-height: 640px;
	overflow-y: auto;
}

.as-chapters__item {
	border-bottom: 1px solid var(--as-line-soft);
}

.as-chapters__item:last-child {
	border-bottom: 0;
}

.as-chapters__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 18px;
	font-size: 14.5px;
	color: var(--as-text-dim);
}

.as-chapters__link:hover {
	background: var(--as-raise);
	color: #fff;
}

.as-chapters__date {
	flex: 0 0 auto;
	font-size: 12.5px;
	color: var(--as-muted);
}

/* --------------------------------------------------------------------------
   11. Reader
   -------------------------------------------------------------------------- */

.as-reader__bar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 13px 16px;
	background: var(--as-panel);
	border: 1px solid var(--as-line-soft);
	border-radius: var(--as-radius-lg);
	margin: 18px 0;
}

.as-reader__title {
	margin: 0;
	font-size: 17px;
	color: #fff;
	flex: 1 1 auto;
	min-width: 0;
}

.as-reader__title small {
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: var(--as-muted);
}

.as-reader__select {
	height: 38px;
	max-width: 280px;
	padding: 0 12px;
	background: var(--as-raise);
	border: 1px solid var(--as-line);
	border-radius: 8px;
	color: var(--as-text);
}

.as-reader__pages {
	background: #08060e;
	border-radius: var(--as-radius-lg);
	overflow: hidden;
}

.as-reader__pages img {
	width: 100%;
	max-width: 920px;
	margin: 0 auto;
	display: block;
}

.as-reader__empty {
	padding: 44px 16px;
	text-align: center;
	color: var(--as-muted);
}

/* --------------------------------------------------------------------------
   12. Filters, pagination, buttons
   -------------------------------------------------------------------------- */

.as-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 0 18px 14px;
}

.as-filters__label {
	font-size: 13px;
	color: var(--as-muted);
	margin-right: 4px;
}

.as-filters__link {
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	color: var(--as-text-dim);
	background: var(--as-raise);
	border: 1px solid var(--as-line);
	border-radius: 999px;
}

.as-filters__link.is-active,
.as-filters__link:hover {
	color: #fff;
	background: var(--as-accent);
	border-color: var(--as-accent);
}

.as-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	padding: 6px 0 20px;
}

.as-pagination .page-numbers {
	min-width: 38px;
	height: 38px;
	display: inline-grid;
	place-items: center;
	padding: 0 12px;
	font-size: 14px;
	color: var(--as-text-dim);
	background: var(--as-panel);
	border: 1px solid var(--as-line-soft);
	border-radius: 8px;
}

.as-pagination .page-numbers:hover,
.as-pagination .page-numbers.current {
	color: #fff;
	background: var(--as-accent);
	border-color: var(--as-accent);
}

.as-empty {
	padding: 40px 16px;
	text-align: center;
	color: var(--as-muted);
}

.as-prose {
	padding: 24px;
}

.as-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: var(--as-accent);
	border: 1px solid transparent;
	border-radius: 8px;
}

.as-btn:hover {
	background: var(--as-accent-hi);
	color: #fff;
}

.as-btn--ghost {
	background: transparent;
	border-color: var(--as-line);
	color: var(--as-text-dim);
}

.as-btn--ghost:hover {
	background: var(--as-raise);
	color: #fff;
}

/* --------------------------------------------------------------------------
   13. Homepage introduction
   -------------------------------------------------------------------------- */

.as-intro {
	padding: 24px 26px 28px;
	max-width: 940px;
	color: var(--as-text-dim);
	font-size: 15px;
	line-height: 1.75;
}

.as-intro h1 {
	margin: 0 0 14px;
	font-size: 27px;
	font-weight: 700;
	color: #fff;
}

.as-intro h2 {
	margin: 26px 0 8px;
	font-size: 18px;
	color: #fff;
}

.as-intro p {
	margin: 0 0 12px;
}

.as-intro a {
	color: var(--as-accent-hi);
}

.as-intro a:hover {
	text-decoration: underline;
}

.as-intro__links {
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px solid var(--as-line-soft);
	font-size: 14px;
}

.as-intro__links strong {
	color: var(--as-text);
	margin-right: 4px;
}

/* --------------------------------------------------------------------------
   13a. Advertising

   Every slot reserves its height before the iframe arrives, so an ad dropping
   in never shoves the page — the thing readers hate most about ad-funded
   sites, and what Core Web Vitals measures as layout shift.
   -------------------------------------------------------------------------- */

.as-ad {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 18px auto;
	overflow: hidden;
}

.as-ad iframe {
	display: block;
	border: 0;
}

.as-ad--leaderboard {
	min-height: 90px;
}

.as-ad--box {
	min-height: 250px;
}

.as-ad--native {
	display: block;
	margin: 22px auto;
	min-height: 120px;
}

/* Between the pages of a chapter: sits on the reader's own black, with enough
   air either side that it reads as a break rather than a mis-scanned page. */
.as-ad--inline {
	margin: 0;
	padding: 26px 16px;
	background: #08060e;
}

/* Side rails. The reader column is capped at 920px, so on a wide screen this
   space is dead anyway. Below 1500px they are hidden rather than squeezed —
   an ad lying over the page is worse than no ad. */
.as-rail {
	display: none;
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 30;
}

.as-rail .as-ad {
	margin: 0;
}

@media (min-width: 1500px) {
	.as-rail {
		display: block;
	}

	.as-rail--left {
		left: 24px;
	}

	.as-rail--right {
		right: 24px;
	}

	/*
		The rails are fixed at the middle of the screen, so anything as wide as
		the container slides underneath them as the reader scrolls — including
		the Prev/Next bar, which would leave the Next button unclickable behind
		an advert. Narrow the reading column instead of moving the rails: the
		pages themselves are capped at 920px, so the reader loses nothing.
	*/
	body.as-reading-page .as-container {
		max-width: min(980px, calc(100vw - 700px));
	}
}

@media (max-width: 799px) {
	.as-ad--leaderboard {
		min-height: 60px;
	}
}

/* Phones get their own 320x50 unit, so nothing needs scaling down here. */
@media (max-width: 519px) {
	.as-ad--leaderboard {
		min-height: 50px;
	}

	.as-ad--inline {
		padding: 18px 8px;
	}
}

/* --------------------------------------------------------------------------
   13b. WhatsApp channel

   Kept in WhatsApp's own green rather than the site accent: the point of the
   button is to be recognised at a glance as "that app I already have open".
   -------------------------------------------------------------------------- */

.as-wa-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 16px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: #25d366;
	border-radius: 999px;
	white-space: nowrap;
	transition: background .15s ease, transform .15s ease;
}

.as-wa-btn i {
	font-size: 18px;
}

.as-wa-btn:hover {
	background: #1ebe5b;
	color: #fff;
	transform: translateY(-1px);
}

.as-wa-cta {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 22px 0;
	padding: 18px 20px;
	background: linear-gradient(135deg, rgba(37, 211, 102, .15), rgba(37, 211, 102, .04));
	border: 1px solid rgba(37, 211, 102, .38);
	border-radius: var(--as-radius-lg);
}

.as-wa-cta__mark {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 50px;
	height: 50px;
	font-size: 27px;
	color: #fff;
	background: #25d366;
	border-radius: 50%;
}

.as-wa-cta__text {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 14px;
	color: var(--as-text-dim);
	line-height: 1.55;
}

.as-wa-cta__text strong {
	display: block;
	margin-bottom: 3px;
	font-size: 16.5px;
	font-weight: 600;
	color: #fff;
}

.as-wa-cta__go {
	flex: 0 0 auto;
	padding: 12px 24px;
	font-size: 14.5px;
	font-weight: 700;
	color: #fff;
	background: #25d366;
	border-radius: 8px;
	white-space: nowrap;
	transition: background .15s ease;
}

.as-wa-cta__go:hover {
	background: #1ebe5b;
	color: #fff;
}

@media (max-width: 900px) {
	.as-wa-btn span {
		display: none;
	}

	.as-wa-btn {
		padding: 0 13px;
	}
}

@media (max-width: 640px) {
	.as-wa-cta {
		flex-wrap: wrap;
		gap: 12px;
		padding: 16px;
	}

	.as-wa-cta__go {
		width: 100%;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.as-wa-btn:hover {
		transform: none;
	}
}

/* --------------------------------------------------------------------------
   14. Comments
   -------------------------------------------------------------------------- */

.as-comments {
	padding: 4px 0;
}

.as-comments__list .children {
	margin-left: 22px;
	border-left: 1px solid var(--as-line-soft);
	padding-left: 14px;
}

.as-comments .comment-body {
	padding: 12px 0;
	border-bottom: 1px solid var(--as-line-soft);
	font-size: 14.5px;
	color: var(--as-text-dim);
}

.as-comments .comment-author img {
	display: inline-block;
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: middle;
}

.as-comments .comment-author .fn {
	color: #fff;
	font-style: normal;
	font-weight: 600;
}

.as-comments .comment-metadata,
.as-comments .comment-metadata a {
	font-size: 12.5px;
	color: var(--as-muted);
}

.as-comments .comment-reply-link {
	font-size: 13px;
	color: var(--as-accent-hi);
}

.as-comments .comment-reply-title {
	font-size: 16px;
	color: #fff;
	margin: 18px 0 10px;
}

.as-comments input[type="text"],
.as-comments input[type="email"],
.as-comments input[type="url"],
.as-comments textarea {
	width: 100%;
	max-width: 520px;
	padding: 10px 12px;
	margin-bottom: 10px;
	background: var(--as-raise);
	border: 1px solid var(--as-line);
	border-radius: 8px;
	color: var(--as-text);
}

.as-comments textarea {
	max-width: 100%;
	min-height: 110px;
}

.as-comments .submit {
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: var(--as-accent);
	border: 0;
	border-radius: 8px;
}

.as-comments .submit:hover {
	background: var(--as-accent-hi);
}

/* --------------------------------------------------------------------------
   15. Widgets and footer
   -------------------------------------------------------------------------- */

.as-sidebar {
	display: flex;
	flex-direction: column;
	gap: 22px;
	min-width: 0;
}

.as-widget {
	background: var(--as-panel);
	border: 1px solid var(--as-line-soft);
	border-radius: var(--as-radius-lg);
	padding: 16px 18px;
}

.as-widget__title {
	margin: 0 0 12px;
	font-size: 16px;
	color: #fff;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--as-line-soft);
}

.as-widget li + li {
	margin-top: 8px;
}

.as-footer {
	background: var(--as-bg-soft);
	border-top: 1px solid var(--as-line-soft);
	margin-top: auto;
}

.as-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	justify-content: space-between;
	padding-top: 28px;
	padding-bottom: 28px;
}

.as-footer__brand {
	max-width: 470px;
}

.as-footer__note {
	margin: 10px 0 0;
	font-size: 13.5px;
	color: var(--as-muted);
}

.as-footer__menu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	font-size: 14px;
}

.as-footer__bar {
	background: #0a0713;
	padding: 13px 0;
	font-size: 13px;
	color: var(--as-muted);
}

.as-to-top {
	position: fixed;
	right: 18px;
	bottom: 18px;
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	color: #fff;
	background: var(--as-accent);
	border: 0;
	border-radius: 50%;
	box-shadow: var(--as-shadow);
	opacity: 0;
	visibility: hidden;
	transition: opacity .18s ease, visibility .18s ease;
	z-index: 40;
}

.as-to-top.is-visible {
	opacity: 1;
	visibility: visible;
}

/* --------------------------------------------------------------------------
   16. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
	.as-home {
		grid-template-columns: minmax(0, 1fr);
	}

	.as-search {
		width: 200px;
	}
}

@media (max-width: 900px) {
	.as-header__inner {
		flex-wrap: wrap;
		gap: 12px;
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.as-nav {
		order: 4;
		width: 100%;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
		padding-bottom: 6px;
	}

	.as-header.is-open .as-nav {
		display: flex;
	}

	.as-nav-toggle {
		display: grid;
		place-items: center;
	}

	.as-header__tools {
		gap: 8px;
	}

	.as-search {
		width: 100%;
		order: 5;
	}

	.as-series__inner {
		grid-template-columns: 150px minmax(0, 1fr);
		gap: 18px;
		padding: 18px;
	}

	.as-series__title {
		font-size: 22px;
	}
}

@media (max-width: 640px) {
	.as-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 11px;
	}

	.as-row__track > * {
		flex-basis: 132px;
	}

	.as-hero__item {
		width: 118px;
	}

	.as-panel__title {
		font-size: 17px;
	}

	.as-intro {
		padding: 18px 16px 22px;
	}

	.as-intro h1 {
		font-size: 21px;
	}
}

@media (max-width: 420px) {
	.as-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.as-series__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.as-series__cover {
		max-width: 180px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.as-hero__item,
	.as-card__cover img,
	.as-to-top,
	.as-row__track,
	.as-hero__track {
		transition: none;
		scroll-behavior: auto;
	}
}
