/* ==========================================================================
   Answerly — Main Stylesheet
   Vanilla CSS, custom properties, mobile-first with desktop breakpoints.
   Class prefix: at-  (the companion plugin's own markup uses "ate-", so the
   two never collide.) Custom properties use the --aty- prefix for the same
   reason — the plugin defines its own --at-* variables globally.
   ========================================================================== */

:root {
	/* Color */
	--aty-primary: #4f46e5;
	--aty-primary-hover: #4338ca;
	--aty-primary-subtle: rgba(79, 70, 229, .08);
	--aty-primary-ring: rgba(79, 70, 229, .16);
	--aty-accent: #0ea5e9;
	--aty-success: #059669;
	--aty-success-subtle: rgba(5, 150, 105, .1);
	--aty-warning: #d97706;
	--aty-warning-subtle: rgba(217, 119, 6, .1);
	--aty-danger: #dc2626;
	--aty-gold: #d4a72c;
	--aty-silver: #9aa2ad;
	--aty-bronze: #b3703b;

	--aty-bg: #f7f8fb;
	--aty-surface: #ffffff;
	--aty-surface-soft: #f1f4f9;
	--aty-border: #e6e9f0;
	--aty-border-strong: #d6dbe6;
	--aty-text: #0f172a;
	--aty-text-muted: #64748b;
	--aty-text-subtle: #94a3b8;

	/* Shape */
	--aty-radius-sm: 10px;
	--aty-radius-md: 14px;
	--aty-radius-lg: 20px;
	--aty-radius-full: 9999px;

	/* Elevation */
	--aty-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
	--aty-shadow-md: 0 10px 24px -10px rgba(15, 23, 42, .14);
	--aty-shadow-lg: 0 24px 48px -14px rgba(15, 23, 42, .2);

	/* Motion */
	--aty-transition: all .18s cubic-bezier(.4, 0, .2, 1);

	/* Type */
	--aty-font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	/* Layout */
	--aty-header-h: 68px;
	--aty-container-w: 1240px;
	--aty-content-w: 68%;
	--aty-sidebar-w: 30%;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--aty-font);
	color: var(--aty-text);
	background: var(--aty-bg);
	font-size: 15.5px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.01em; }
:focus-visible { outline: 2.5px solid var(--aty-primary); outline-offset: 2px; border-radius: 4px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.at-skip-link {
	position: absolute; top: -50px; left: 10px; z-index: 10000;
	background: var(--aty-primary); color: #fff; padding: 10px 16px;
	border-radius: var(--aty-radius-sm); transition: top .15s ease;
}
.at-skip-link:focus { top: 10px; }

.at-container { max-width: var(--aty-container-w); margin: 0 auto; padding: 0 20px; }

/*
 * Prevent mobile auto-zoom on focus.
 *
 * iOS Safari (and some Android browsers) zoom the whole page in when a
 * focused form field's computed font-size is under 16px. Rather than
 * disabling pinch-zoom in the viewport meta tag (which would hurt
 * accessibility for anyone who relies on zooming), every text field is
 * simply kept at 16px or larger. This is written broadly enough to also
 * cover the plugin's own answer-submission and withdrawal forms, not just
 * theme markup.
 */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
	font-size: 16px !important;
}

/* ==========================================================================
   Layout — 70/30 desktop, stacked tablet/mobile
   ========================================================================== */
.at-layout { display: block; padding-top: 28px; padding-bottom: 60px; }
.at-layout__content { min-width: 0; }

@media (min-width: 1024px) {
	.at-layout { display: grid; grid-template-columns: minmax(0, var(--aty-content-w)) minmax(0, var(--aty-sidebar-w)); gap: 32px; align-items: start; }
}

.at-layout--page { max-width: 820px; padding-top: 40px; padding-bottom: 60px; }
.at-layout--404 .at-404 { text-align: center; padding: 100px 20px; }
.at-layout--404 .at-404 h1 { font-size: 30px; margin-bottom: 12px; }
.at-layout--404 .at-404 p { color: var(--aty-text-muted); margin-bottom: 24px; }

/* ==========================================================================
   Buttons & badges
   ========================================================================== */
.at-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 18px; font-size: 13.5px; font-weight: 600;
	border-radius: var(--aty-radius-sm); border: 1px solid transparent;
	transition: var(--aty-transition); white-space: nowrap;
}
.at-btn--primary { background: var(--aty-primary); color: #fff; box-shadow: var(--aty-shadow-sm); }
.at-btn--primary:hover { background: var(--aty-primary-hover); transform: translateY(-1px); box-shadow: var(--aty-shadow-md); }
.at-btn--ghost { background: transparent; color: var(--aty-text); border-color: transparent; }
.at-btn--ghost:hover { background: var(--aty-surface-soft); }
.at-btn--outline { background: transparent; color: var(--aty-primary); border-color: var(--aty-primary-subtle); }
.at-btn--outline:hover { background: var(--aty-primary-subtle); }

.at-badge {
	display: inline-flex; align-items: center; gap: 5px;
	font-size: 11.5px; font-weight: 700; padding: 4px 10px;
	border-radius: var(--aty-radius-full); line-height: 1.4;
	background: var(--aty-surface-soft); color: var(--aty-text-muted);
}
.at-badge--reward { background: var(--aty-warning-subtle); color: var(--aty-warning); }
.at-badge--trending { background: rgba(220, 38, 38, .08); color: #dc2626; }
.at-badge--category { background: var(--aty-primary-subtle); color: var(--aty-primary); }
.at-badge--category:hover { background: var(--aty-primary-ring); }
.at-badge--easy { background: var(--aty-success-subtle); color: var(--aty-success); }
.at-badge--medium { background: var(--aty-warning-subtle); color: var(--aty-warning); }
.at-badge--hard { background: rgba(220, 38, 38, .1); color: var(--aty-danger); }

/* ==========================================================================
   Header
   ========================================================================== */
.at-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255, 255, 255, .82);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--aty-border);
}
.at-header__inner {
	height: var(--aty-header-h);
	display: flex; align-items: center; gap: 18px;
}
.at-header__brand { display: flex; align-items: center; gap: 10px; }
.at-logo { display: flex; align-items: center; }
.at-logo__image { display: block; height: 36px; width: auto; }
.at-logo--footer .at-logo__image { height: 30px; }
.at-logo__text { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--aty-text); }
.at-logo--footer .at-logo__text, .at-logo--footer { font-size: 18px; font-weight: 800; }

/* WordPress's own Customizer-uploaded logo (Appearance > Site Identity)
   uses its own custom-logo-link / custom-logo classes — keep it the same
   height as the bundled fallback so switching between the two is seamless. */
.at-header__brand .custom-logo-link { display: flex; align-items: center; }
.at-header__brand .custom-logo { height: 36px; width: auto; }
.at-footer__top .custom-logo-link { display: flex; align-items: center; }
.at-footer__top .custom-logo { height: 30px; width: auto; }

.at-mobile-nav-toggle {
	display: flex; flex-direction: column; justify-content: center; gap: 4px;
	width: 34px; height: 34px; background: transparent; border: none; padding: 0;
}
.at-mobile-nav-toggle span { width: 100%; height: 2px; background: var(--aty-text); border-radius: 2px; }

.at-header__search { flex: 1; min-width: 0; max-width: 460px; position: relative; }
.at-search-form {
	display: flex; align-items: center; gap: 8px;
	background: var(--aty-surface-soft); border: 1.5px solid transparent;
	border-radius: var(--aty-radius-full); padding: 9px 16px;
	transition: var(--aty-transition);
}
.at-search-form:focus-within { border-color: var(--aty-primary); background: var(--aty-surface); box-shadow: 0 0 0 4px var(--aty-primary-ring); }
.at-search-form__input { border: none; background: transparent; outline: none; width: 100%; font-size: 16px; color: var(--aty-text); }
.at-search-suggestions {
	position: absolute; top: calc(100% + 8px); left: 0; right: 0;
	background: var(--aty-surface); border: 1px solid var(--aty-border);
	border-radius: var(--aty-radius-md); box-shadow: var(--aty-shadow-lg);
	overflow: hidden; z-index: 50;
}
.at-search-suggestions__item { display: block; padding: 11px 16px; border-bottom: 1px solid var(--aty-border); }
.at-search-suggestions__item:last-child { border-bottom: none; }
.at-search-suggestions__item:hover, .at-search-suggestions__item.is-active { background: var(--aty-surface-soft); }
.at-search-suggestions__title { font-size: 13.5px; font-weight: 600; display: block; }
.at-search-suggestions__title mark { background: var(--aty-primary-subtle); color: var(--aty-primary); border-radius: 3px; padding: 0 1px; }
.at-search-suggestions__meta { font-size: 11.5px; color: var(--aty-text-subtle); }
.at-search-suggestions__empty { padding: 16px; font-size: 13px; color: var(--aty-text-muted); text-align: center; }

.at-header__nav { display: none; }
.at-primary-menu { display: flex; gap: 4px; }
.at-primary-menu li a { display: block; padding: 8px 12px; border-radius: var(--aty-radius-sm); font-size: 14px; font-weight: 600; color: var(--aty-text-muted); }
.at-primary-menu li a:hover { background: var(--aty-surface-soft); color: var(--aty-text); }

.at-header__actions { display: flex; align-items: center; gap: 10px; }
.at-btn--ask span { display: none; }
.at-header-wallet {
	display: flex; align-items: center; gap: 6px;
	background: var(--aty-warning-subtle); color: var(--aty-warning);
	padding: 8px 12px; border-radius: var(--aty-radius-full); font-size: 13px; font-weight: 700;
}
.at-avatar-img { border-radius: 50%; display: block; }
.at-auth-links { display: flex; gap: 8px; }

.at-mobile-ask-fab {
	position: fixed; bottom: 22px; right: 18px; z-index: 90;
	width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: var(--aty-primary); color: #fff; box-shadow: var(--aty-shadow-lg);
}

.at-sidebar-toggle {
	display: none; align-items: center; justify-content: center;
	width: 36px; height: 36px; border-radius: var(--aty-radius-full);
	background: var(--aty-surface-soft); border: none; color: var(--aty-text-muted);
}
.at-sidebar-toggle:hover { color: var(--aty-primary); background: var(--aty-primary-subtle); }

.at-drawer-backdrop {
	position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 94;
}
body.at-drawer-open { overflow: hidden; }

@media (min-width: 860px) {
	.at-header__nav { display: block; }
	.at-mobile-nav-toggle { display: none; }
	.at-btn--ask span { display: inline; }
	.at-mobile-ask-fab { display: none; }
}
@media (max-width: 859px) {
	.at-header__search { order: 3; flex-basis: 100%; max-width: none; margin-top: 8px; }
	.at-header__inner { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; }
	.at-btn--ask { display: none; }
}

/*
 * Mobile nav — progressive enhancement.
 *
 * Without JavaScript the nav stays in normal document flow (still fully
 * navigable, just visually simple). Only once assets/js/main.js has run
 * and tagged <html class="at-js"> do we convert it into a slide-in
 * off-canvas drawer driven by the hamburger button.
 */
@media (max-width: 859px) {
	.at-header__nav { display: block; padding: 6px 0 2px; }
	.at-primary-menu { flex-direction: column; }

	html.at-js .at-header__nav {
		position: fixed; inset: 0 22% 0 0; top: var(--aty-header-h);
		background: var(--aty-surface); transform: translateX(-100%);
		transition: transform .22s ease; z-index: 95; padding: 20px;
		box-shadow: var(--aty-shadow-lg); overflow-y: auto;
	}
	html.at-js .at-header__nav.is-open { transform: translateX(0); }
}

/*
 * Mobile sidebar — same progressive-enhancement approach: in normal flow
 * below the content by default (works with JS off), becomes a slide-in
 * drawer — reachable via the header toggle button instead of scrolling
 * past an endless infinite-scroll feed — once JS is active.
 */
.at-sidebar-close { display: none; }

@media (max-width: 1023px) {
	.at-sidebar-toggle { display: flex; }
	html.at-js .at-sidebar-close {
		display: flex; align-items: center; justify-content: center;
		width: 32px; height: 32px; border-radius: 50%; background: var(--aty-surface-soft);
		border: none; color: var(--aty-text-muted); margin-bottom: 12px;
	}

	html.at-js .at-sidebar {
		position: fixed; inset: 0 0 0 14%; top: var(--aty-header-h);
		z-index: 95; transform: translateX(100%); transition: transform .24s ease;
		background: var(--aty-surface); box-shadow: var(--aty-shadow-lg);
		padding: 20px; overflow-y: auto;
	}
	html.at-js .at-sidebar.is-open { transform: translateX(0); }
	html.at-js .at-sidebar .at-sidebar__sticky { position: static; }
}
@media (min-width: 1024px) {
	.at-sidebar-toggle { display: none !important; }
}

/* ==========================================================================
   Feed / cards
   ========================================================================== */
.at-feed__header { margin-bottom: 18px; }
.at-feed__heading { font-size: 22px; }
.at-feed__grid { display: flex; flex-direction: column; gap: 16px; }
.at-feed__end { text-align: center; color: var(--aty-text-subtle); font-size: 13px; padding: 24px 0; }
.at-feed__empty { text-align: center; padding: 60px 20px; color: var(--aty-text-muted); }
.at-feed__empty .at-icon { margin-bottom: 10px; opacity: .5; }
.at-feed__empty p { margin-bottom: 16px; }
.at-feed__skeletons { display: none; flex-direction: column; gap: 16px; margin-top: 16px; }
.at-feed__skeletons.is-visible { display: flex; }

.at-card {
	background: var(--aty-surface); border: 1px solid var(--aty-border);
	border-radius: var(--aty-radius-lg); overflow: hidden;
	box-shadow: var(--aty-shadow-sm); transition: var(--aty-transition);
	opacity: 0; animation: at-fade-in .4s ease forwards;
}
.at-card:hover { transform: translateY(-3px); box-shadow: var(--aty-shadow-md); border-color: var(--aty-border-strong); }
@keyframes at-fade-in { to { opacity: 1; } }
.at-card__thumb { display: block; aspect-ratio: 16/9; overflow: hidden; }
.at-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.at-card:hover .at-card__thumb img { transform: scale(1.04); }
.at-card__body { padding: 20px 22px 18px; }
.at-card__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.at-card__title { font-size: 18px; margin-bottom: 8px; }
.at-card__title a:hover { color: var(--aty-primary); }
.at-card__excerpt { color: var(--aty-text-muted); font-size: 14px; margin: 0 0 12px; }
.at-card__tags { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.at-tag { font-size: 12px; color: var(--aty-accent); font-weight: 600; }
.at-card__footer {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--aty-border);
}
.at-card__author { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--aty-text-muted); }
.at-card__author strong, .at-card__author span:first-child { font-weight: 600; }
.at-card__author-link { display: flex; align-items: center; gap: 8px; color: inherit; }
.at-card__author-link:hover span { color: var(--aty-primary); }
.at-dot { opacity: .5; }
.at-card__stats { display: flex; align-items: center; gap: 14px; }
.at-card__stat { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--aty-text-subtle); }
.at-bookmark-btn {
	display: flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; border-radius: var(--aty-radius-full);
	background: var(--aty-surface-soft); border: none; color: var(--aty-text-subtle);
	transition: var(--aty-transition);
}
.at-bookmark-btn:hover { color: var(--aty-primary); background: var(--aty-primary-subtle); }
.at-bookmark-btn.is-active { color: var(--aty-warning); background: var(--aty-warning-subtle); }
.at-bookmark-btn--lg { width: 40px; height: 40px; }

@media (min-width: 700px) {
	.at-feed__grid { display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
	.at-layout__content .at-feed__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Skeleton loaders
   ========================================================================== */
.at-skeleton {
	position: relative; overflow: hidden; background: var(--aty-surface-soft);
	border-radius: var(--aty-radius-sm);
}
.at-skeleton::after {
	content: ""; position: absolute; inset: 0; transform: translateX(-100%);
	background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
	animation: at-shimmer 1.3s infinite;
}
@keyframes at-shimmer { to { transform: translateX(100%); } }
.at-card--skeleton .at-skeleton--thumb { aspect-ratio: 16/9; border-radius: 0; }
.at-card--skeleton .at-skeleton--badge { width: 90px; height: 20px; margin-bottom: 12px; border-radius: var(--aty-radius-full); }
.at-card--skeleton .at-skeleton--title { width: 70%; height: 22px; margin-bottom: 12px; }
.at-card--skeleton .at-skeleton--line { width: 100%; height: 13px; margin-bottom: 8px; }
.at-card--skeleton .at-skeleton--line.short { width: 45%; }
.at-card--skeleton .at-skeleton--footer { width: 100%; height: 30px; margin-top: 14px; }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.at-sidebar__sticky { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1024px) {
	.at-sidebar__sticky { position: sticky; top: calc(var(--aty-header-h) + 20px); }
}
.at-widget {
	background: var(--aty-surface); border: 1px solid var(--aty-border);
	border-radius: var(--aty-radius-lg); padding: 20px 22px; box-shadow: var(--aty-shadow-sm);
}
.at-widget__title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; margin-bottom: 14px; }
.at-widget__title .at-icon { color: var(--aty-primary); }
.at-widget__empty { font-size: 13px; color: var(--aty-text-subtle); margin: 0; }

.at-mini-list__item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--aty-border); }
.at-mini-list__item:last-child { border-bottom: none; }
.at-mini-list__rank { font-size: 12px; font-weight: 700; color: var(--aty-text-subtle); width: 16px; }
.at-mini-list__title { flex: 1; font-size: 13.5px; font-weight: 600; }
.at-mini-list__title:hover { color: var(--aty-primary); }
.at-mini-list__meta { font-size: 11.5px; color: var(--aty-text-subtle); white-space: nowrap; }

.at-earners-list__item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--aty-border); }
.at-earners-list__item:last-child { border-bottom: none; }
.at-rank-badge {
	width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-size: 10.5px; font-weight: 800; background: var(--aty-surface-soft); color: var(--aty-text-subtle);
}
.at-rank-badge--gold { background: rgba(212, 167, 44, .15); color: var(--aty-gold); }
.at-rank-badge--silver { background: rgba(154, 162, 173, .18); color: var(--aty-silver); }
.at-rank-badge--bronze { background: rgba(179, 112, 59, .15); color: var(--aty-bronze); }
.at-rank-badge--pill { width: auto; height: auto; padding: 4px 10px; border-radius: var(--aty-radius-full); font-size: 12.5px; }
.at-earners-list__profile {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: inherit;
}
.at-earners-list__profile:hover .at-earners-list__name { color: var(--aty-primary); }
.at-earners-list__name { flex: 1; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-earners-list__amount { font-size: 12px; font-weight: 700; color: var(--aty-success); white-space: nowrap; }

.at-activity-list__item { padding: 8px 0; border-bottom: 1px solid var(--aty-border); font-size: 13px; }
.at-activity-list__item:last-child { border-bottom: none; }
.at-activity-list__item a:hover { color: var(--aty-primary); }
.at-activity-list__time { display: block; font-size: 11px; color: var(--aty-text-subtle); margin-top: 2px; }

.at-topics-list__item, .at-topics-list li { margin-bottom: 4px; }
.at-topics-list a { display: flex; justify-content: space-between; padding: 8px 4px; font-size: 13.5px; font-weight: 600; border-radius: var(--aty-radius-sm); }
.at-topics-list a:hover { background: var(--aty-surface-soft); color: var(--aty-primary); }
.at-topics-list__count { color: var(--aty-text-subtle); font-weight: 500; }

.at-earnings-facts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.at-earnings-facts li { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding-bottom: 8px; border-bottom: 1px dashed var(--aty-border); }
.at-earnings-facts li:last-child { border-bottom: none; padding-bottom: 0; }
.at-earnings-facts span { color: var(--aty-text-muted); }
.at-earnings-facts strong { color: var(--aty-text); }
.at-earnings-status { font-size: 12.5px; font-weight: 600; padding: 10px 12px; border-radius: var(--aty-radius-sm); background: var(--aty-surface-soft); }
.at-earnings-status--approved { background: var(--aty-success-subtle); color: var(--aty-success); }
.at-earnings-status--rejected { background: rgba(220,38,38,.08); color: var(--aty-danger); }
.at-earnings-status--pending { background: var(--aty-warning-subtle); color: var(--aty-warning); }

/* ==========================================================================
   Author profile
   ========================================================================== */
.at-profile { background: var(--aty-surface); border: 1px solid var(--aty-border); border-radius: var(--aty-radius-lg); padding: 28px 26px; box-shadow: var(--aty-shadow-sm); margin-bottom: 20px; }
.at-profile__identity { display: flex; gap: 16px; margin-bottom: 20px; }
.at-profile__avatar { flex-shrink: 0; }
.at-profile__name { font-size: clamp(20px, 3vw, 26px); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.at-profile__meta { font-size: 12.5px; color: var(--aty-text-muted); margin: 4px 0 0; }
.at-profile__bio { font-size: 14px; color: var(--aty-text-muted); margin: 10px 0 0; line-height: 1.6; }
.at-profile__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding-top: 20px; border-top: 1px solid var(--aty-border); }
.at-profile__stats li { background: var(--aty-surface-soft); border-radius: var(--aty-radius-md); padding: 14px 16px; }
.at-profile__stat-value { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.at-profile__stat-label { display: block; font-size: 11.5px; color: var(--aty-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; margin-top: 2px; }

@media (min-width: 640px) {
	.at-profile__stats { grid-template-columns: repeat(4, 1fr); }
}
.at-layout--author .at-feed + .at-feed { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--aty-border); }

/* ==========================================================================
   Single question
   ========================================================================== */
.at-hero { background: var(--aty-surface); border: 1px solid var(--aty-border); border-radius: var(--aty-radius-lg); padding: 28px 26px; box-shadow: var(--aty-shadow-sm); margin-bottom: 20px; }
.at-hero__badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.at-hero__title { font-size: clamp(22px, 3.4vw, 32px); margin-bottom: 18px; }
.at-hero__meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--aty-border); margin-bottom: 16px; }
.at-hero__author { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.at-hero__author div { display: flex; flex-direction: column; }
.at-hero__author time { color: var(--aty-text-muted); font-size: 12px; }
.at-hero__author-name { color: inherit; }
.at-hero__author-name:hover { color: var(--aty-primary); }
.at-hero__meta-end { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.at-hero__stats { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--aty-text-muted); }
/* "Answered by Booromi Team" — compact mockup pill (green, small on all screens) */
.at-answered-by {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .01em;
	color: #059669;
	background: rgba(5, 150, 105, .1);
	border: 1px solid rgba(5, 150, 105, .18);
	border-radius: 9999px;
	padding: 4px 9px 4px 7px;
	white-space: nowrap;
	max-width: 100%;
}
.at-answered-by__icon {
	flex-shrink: 0;
	width: 11px;
	height: 11px;
	color: #059669;
}
@media (max-width: 640px) {
	.at-answered-by {
		font-size: 10.5px;
		padding: 3px 8px 3px 6px;
		gap: 3px;
	}
	.at-answered-by__icon {
		width: 10px;
		height: 10px;
	}
	.at-hero__meta-end {
		gap: 8px;
	}
}
.at-hero__actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.at-share { display: flex; align-items: center; gap: 8px; }
.at-share__label { font-size: 12.5px; color: var(--aty-text-muted); margin-right: 4px; }
.at-share__btn {
	width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
	border-radius: 50%; background: var(--aty-surface-soft); font-size: 12px; font-weight: 700;
}
.at-share__btn:hover { background: var(--aty-primary-subtle); color: var(--aty-primary); }

.at-question__thumb { border-radius: var(--aty-radius-lg); overflow: hidden; margin-bottom: 20px; }
.at-question__content { background: var(--aty-surface); border: 1px solid var(--aty-border); border-radius: var(--aty-radius-lg); padding: 26px; box-shadow: var(--aty-shadow-sm); font-size: 16px; line-height: 1.75; }
.at-question__content p { margin: 0 0 1.1em; }
.at-question__content img { border-radius: var(--aty-radius-md); }
.at-question__content h2, .at-question__content h3 { margin: 1.4em 0 .6em; }

/* Booromi's Answer — editorial wrapper around existing post content (mockup-aligned) */
.at-booromi-answer {
	background: var(--aty-surface);
	border: 1px solid var(--aty-border);
	border-radius: var(--aty-radius-md);
	padding: 22px 24px;
	margin-bottom: 20px;
	box-shadow: var(--aty-shadow-sm);
}
.at-booromi-answer__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px 16px;
	flex-wrap: wrap;
	margin: 0 0 18px;
	padding: 0 0 14px;
	border-bottom: 1px solid var(--aty-border);
}
.at-booromi-answer__heading {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
}
.at-booromi-answer__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border-radius: 50%;
	background: var(--aty-success);
	color: #fff;
	flex-shrink: 0;
}
.at-booromi-answer__heading-text {
	min-width: 0;
}
.at-booromi-answer__title {
	margin: 0 0 3px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--aty-text);
	letter-spacing: -.01em;
}
.at-booromi-answer__subtitle {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.45;
	font-weight: 500;
	color: var(--aty-success);
}
.at-booromi-answer__updated {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	margin-left: auto;
	font-size: 11px;
	line-height: 1.25;
	font-weight: 500;
	color: var(--aty-text-muted);
	background: var(--aty-surface-soft);
	border: 1px solid var(--aty-border);
	border-radius: 9999px;
	padding: 4px 9px;
	white-space: nowrap;
	max-width: 100%;
}
@media (max-width: 640px) {
	.at-booromi-answer {
		padding: 16px 14px;
	}
	.at-booromi-answer__header {
		gap: 8px 10px;
		margin-bottom: 14px;
		padding-bottom: 12px;
	}
	.at-booromi-answer__title {
		font-size: 14.5px;
	}
	.at-booromi-answer__subtitle {
		font-size: 11.5px;
	}
	.at-booromi-answer__updated {
		font-size: 10.5px;
		padding: 3px 8px;
		/* Keep on its own row when the header wraps on small screens */
		margin-left: 32px; /* align under title text (badge width + gap) */
	}
	.at-booromi-answer__badge {
		width: 20px;
		height: 20px;
	}
	.at-booromi-answer__badge .at-icon {
		width: 11px;
		height: 11px;
	}
}
/* Body: keep typography from .at-question__content, drop the nested card chrome */
.at-booromi-answer .at-question__content {
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
}
/* Article formatting inside the answer (global ul resets list-style) */
.at-booromi-answer__body ul {
	list-style: disc;
	margin: 0 0 1.1em;
	padding-left: 1.35em;
}
.at-booromi-answer__body ol {
	list-style: decimal;
	margin: 0 0 1.1em;
	padding-left: 1.35em;
}
.at-booromi-answer__body li {
	margin: 0 0 .35em;
}
.at-booromi-answer__body table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.25em;
	font-size: 14.5px;
	border: 1px solid var(--aty-border);
	border-radius: var(--aty-radius-sm);
	overflow: hidden;
}
.at-booromi-answer__body th,
.at-booromi-answer__body td {
	padding: 10px 12px;
	border: 1px solid var(--aty-border);
	text-align: left;
	vertical-align: top;
}
.at-booromi-answer__body th {
	background: var(--aty-surface-soft);
	font-weight: 600;
	color: var(--aty-text);
}
.at-booromi-answer__body blockquote {
	margin: 0 0 1.1em;
	padding: 10px 14px;
	border-left: 3px solid var(--aty-primary);
	background: var(--aty-surface-soft);
	color: var(--aty-text-muted);
	border-radius: 0 var(--aty-radius-sm) var(--aty-radius-sm) 0;
}
.at-booromi-answer__body a {
	color: var(--aty-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.at-booromi-answer__body a:hover {
	color: var(--aty-primary-hover);
}


.at-related-questions { margin-top: 32px; }
.at-related-questions__title { font-size: 19px; margin-bottom: 16px; }
.at-related-questions__grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .at-related-questions__grid { grid-template-columns: repeat(3, 1fr); } }

.at-prev-next { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.at-prev-next__link { flex: 1; min-width: 220px; background: var(--aty-surface); border: 1px solid var(--aty-border); border-radius: var(--aty-radius-md); padding: 14px 18px; transition: var(--aty-transition); }
.at-prev-next__link:hover { border-color: var(--aty-primary); box-shadow: var(--aty-shadow-sm); }
.at-prev-next__link--next { text-align: right; }
.at-prev-next__label { display: block; font-size: 11.5px; color: var(--aty-text-subtle); margin-bottom: 4px; font-weight: 700; text-transform: uppercase; }
.at-prev-next__title { display: block; font-size: 14px; font-weight: 600; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.at-breadcrumbs { margin-bottom: 16px; font-size: 12.5px; }
.at-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.at-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--aty-text-subtle); }
.at-breadcrumbs a { color: var(--aty-text-muted); }
.at-breadcrumbs a:hover { color: var(--aty-primary); }
.at-breadcrumbs [aria-current] { color: var(--aty-text); font-weight: 600; }

/* ==========================================================================
   Footer
   ========================================================================== */
.at-footer { border-top: 1px solid var(--aty-border); background: var(--aty-surface); margin-top: 40px; padding: 40px 0 24px; }
.at-footer__top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--aty-border); margin-bottom: 20px; }
.at-footer-menu { display: flex; gap: 20px; flex-wrap: wrap; }
.at-footer-menu a { font-size: 13.5px; color: var(--aty-text-muted); font-weight: 600; }
.at-footer-menu a:hover { color: var(--aty-primary); }
.at-footer-legal { margin-bottom: 20px; }
.at-footer-legal ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.at-footer-legal a { font-size: 12.5px; color: var(--aty-text-subtle); font-weight: 600; }
.at-footer-legal a:hover { color: var(--aty-primary); }
.at-footer__bottom { text-align: center; }
.at-footer__copy { font-size: 12.5px; color: var(--aty-text-subtle); margin: 0; }

/* ==========================================================================
   Back to top
   ========================================================================== */
.at-back-to-top {
	position: fixed; bottom: 22px; left: 18px; z-index: 90;
	width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--aty-border);
	background: var(--aty-surface); box-shadow: var(--aty-shadow-md);
	display: flex; align-items: center; justify-content: center;
	opacity: 0; transform: translateY(10px); transition: var(--aty-transition);
	pointer-events: none;
}
.at-back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ==========================================================================
   Pagination fallback (noscript)
   ========================================================================== */
.at-pagination-fallback { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.at-pagination-fallback .page-numbers { padding: 8px 14px; border-radius: var(--aty-radius-sm); background: var(--aty-surface); border: 1px solid var(--aty-border); font-size: 13px; }
.at-pagination-fallback .page-numbers.current { background: var(--aty-primary); color: #fff; border-color: var(--aty-primary); }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Ad slots (Phase 1)
   ========================================================================== */
.at-ad {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	text-align: center;
	line-height: 0;
}

.at-ad ins,
.at-ad iframe {
	max-width: 100% !important;
}

/* Sidebar sticky ad — sits at the top of the sticky column */
.at-ad--sidebar {
	background: var(--aty-surface);
	border: 1px solid var(--aty-border);
	border-radius: var(--aty-radius-md);
	padding: 12px;
	box-shadow: var(--aty-shadow-sm);
	margin-bottom: 4px; /* gap is already on the sticky flex parent */
}

/* After-content ad on single questions */
.at-ad--after-content {
	margin: 28px 0 8px;
	padding: 16px 0;
	border-top: 1px solid var(--aty-border);
	border-bottom: 1px solid var(--aty-border);
}

/* Hide empty containers if something goes wrong */
.at-ad:empty {
	display: none;
}

/* In-feed native-style ad (Phase 2) */
.at-ad--infeed {
	background: var(--aty-surface);
	border: 1px solid var(--aty-border);
	border-radius: var(--aty-radius-lg);
	box-shadow: var(--aty-shadow-sm);
	padding: 14px 16px 16px;
	overflow: hidden;
}

.at-ad--infeed .at-ad__label {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--aty-text-subtle);
	margin-bottom: 10px;
	line-height: 1;
}

.at-ad--infeed .at-ad__inner {
	line-height: 0;
	min-height: 50px;
}

.at-ad--infeed ins,
.at-ad--infeed iframe {
	max-width: 100% !important;
}

/* Header leaderboard (Phase 3) — desktop only */
.at-ad--header {
	display: none;
	background: var(--aty-surface);
	border-bottom: 1px solid var(--aty-border);
	padding: 12px 0;
	text-align: center;
}

@media (min-width: 992px) {
	.at-ad--header {
		display: block;
	}
}

.at-ad--header .at-container {
	display: flex;
	justify-content: center;
	align-items: center;
}

/* Footer ad (Phase 3) */
.at-ad--footer {
	margin: 8px 0 24px;
	padding: 16px 0;
	text-align: center;
	border-top: 1px solid var(--aty-border);
}


/* ==========================================================================
   Helpful votes — sits just above Community Answers
   ========================================================================== */
.at-helpful {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 12px;
	margin: 22px 0 8px;
	padding: 12px 14px;
	background: var(--aty-surface-soft);
	border: 1px solid var(--aty-border);
	border-radius: var(--aty-radius-md);
}
.at-helpful__label {
	font-size: 13px;
	font-weight: 500;
	color: var(--aty-text-muted);
}
.at-helpful__actions {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}
.at-helpful__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--aty-text-muted);
	background: var(--aty-surface);
	border: 1px solid var(--aty-border);
	border-radius: var(--aty-radius-full);
	padding: 6px 12px;
	cursor: pointer;
	transition: var(--aty-transition);
	box-shadow: var(--aty-shadow-sm);
}
.at-helpful__btn:hover:not(:disabled) {
	border-color: var(--aty-border-strong);
	color: var(--aty-text);
}
.at-helpful__btn:disabled {
	cursor: wait;
	opacity: .7;
}
.at-helpful__btn--up.is-active {
	color: #059669;
	background: rgba(5, 150, 105, .1);
	border-color: rgba(5, 150, 105, .28);
}
.at-helpful__btn--down.is-active {
	color: #dc2626;
	background: rgba(220, 38, 38, .08);
	border-color: rgba(220, 38, 38, .22);
}
.at-helpful__count {
	font-variant-numeric: tabular-nums;
	min-width: 1ch;
}
.at-helpful__msg {
	font-size: 12px;
	color: var(--aty-text-muted);
	width: 100%;
}
.at-helpful__msg.is-error { color: var(--aty-danger); }
.at-helpful__msg.is-ok { color: var(--aty-success); }
@media (max-width: 640px) {
	.at-helpful {
		gap: 8px;
		margin: 16px 0 6px;
		padding: 10px 12px;
	}
	.at-helpful__label { font-size: 12px; width: 100%; }
	.at-helpful__actions { margin-left: 0; }
	.at-helpful__btn {
		font-size: 12px;
		padding: 5px 10px;
	}
}
