/*
 * Aurora Editorial for AllBlog.Ru
 * Server-rendered editorial layout with dark/light modes.
 */

:root {
    color-scheme: dark;
    --ae-bg: #09090d;
    --ae-bg-soft: #0f1016;
    --ae-surface: #14151c;
    --ae-surface-2: #1a1b24;
    --ae-surface-3: #22232e;
    --ae-text: #f3f1f8;
    --ae-text-soft: #c9c5d4;
    --ae-muted: #8f8a9c;
    --ae-line: rgba(255,255,255,.11);
    --ae-line-strong: rgba(255,255,255,.19);
    --ae-accent: #a78bfa;
    --ae-accent-2: #67e8f9;
    --ae-accent-3: #f0abfc;
    --ae-accent-soft: rgba(167,139,250,.13);
    --ae-glow: rgba(139,92,246,.24);
    --ae-success: #6ee7b7;
    --ae-danger: #fb7185;
    --ae-shadow: 0 28px 80px rgba(0,0,0,.38);
    --ae-shadow-soft: 0 14px 42px rgba(0,0,0,.22);
    --ae-radius-xl: 30px;
    --ae-radius-lg: 22px;
    --ae-radius-md: 16px;
    --ae-radius-sm: 11px;
    --ae-wrap: 1240px;
    --ae-header-h: 78px;

    /* Compatibility variables used by inherited AllBlog templates. */
    --background: var(--ae-bg);
    --text-color: var(--ae-text);
    --header-bg: rgba(9,9,13,.86);
    --header-text: var(--ae-text);
    --sidebar-bg: var(--ae-surface);
    --sidebar-text: var(--ae-text);
    --category-bg: transparent;
    --category-hover-bg: var(--ae-accent-soft);
    --category-active-bg: var(--ae-accent);
    --category-active-text: #100b1b;
    --category-border: var(--ae-accent);
    --category-active-border: var(--ae-accent);
    --post-bg: var(--ae-surface);
    --post-link: var(--ae-text);
    --post-link-hover: var(--ae-accent-2);
    --post-preview: var(--ae-text-soft);
    --post-meta: var(--ae-muted);
    --post-meta-color: var(--ae-muted);
    --post-meta-border: var(--ae-line);
    --post-content-color: var(--ae-text-soft);
    --post-content-link: var(--ae-accent-2);
    --post-content-link-hover: var(--ae-accent);
    --admin-comment-glow: var(--ae-glow);
    --back-link-color: var(--ae-text-soft);
    --back-link-bg: var(--ae-surface);
    --back-link-border: var(--ae-line);
    --back-link-hover-bg: var(--ae-accent-soft);
    --back-link-hover-border: var(--ae-accent);
    --back-link-shadow: var(--ae-glow);
    --article-bg: var(--ae-surface);
    --article-h1-color: var(--ae-text);
    --pre-bg: #0a0a0f;
    --pagination-bg: var(--ae-surface-2);
    --pagination-hover-bg: var(--ae-accent-soft);
    --pagination-active-bg: var(--ae-accent);
    --pagination-active-text: #100b1b;
    --pagination-text: var(--ae-text);
    --scroll-top-bg: var(--ae-accent);
    --scroll-top-hover-bg: var(--ae-accent-2);
    --scroll-top-color: #100b1b;
    --shadow: var(--ae-shadow-soft);
    --shadow-hover: var(--ae-shadow);
    --hamburger-stroke: var(--ae-text);
    --error-content-bg: var(--ae-surface);
    --error-code-color: var(--ae-accent);
    --error-code-shadow: var(--ae-glow);
    --error-h1-color: var(--ae-text);
    --error-p-color: var(--ae-muted);
    --error-shadow: var(--ae-shadow);

    /* Northline compatibility for inherited post/flow styles. */
    --nl-bg: var(--ae-bg);
    --nl-bg-soft: var(--ae-bg-soft);
    --nl-surface: var(--ae-surface);
    --nl-surface-2: var(--ae-surface-2);
    --nl-surface-3: var(--ae-surface-3);
    --nl-elevated: var(--ae-surface-2);
    --nl-text: var(--ae-text);
    --nl-muted: var(--ae-muted);
    --nl-soft: var(--ae-text-soft);
    --nl-border: var(--ae-line);
    --nl-border-strong: var(--ae-line-strong);
    --nl-accent: var(--ae-accent);
    --nl-accent-strong: var(--ae-accent-2);
    --nl-accent-soft: var(--ae-accent-soft);
    --nl-accent-glow: var(--ae-glow);
    --nl-danger: var(--ae-danger);
    --nl-success: var(--ae-success);
    --nl-warning: #fbbf24;
    --nl-shadow: var(--ae-shadow);
    --nl-shadow-soft: var(--ae-shadow-soft);
    --nl-radius-lg: var(--ae-radius-lg);
    --nl-radius-md: var(--ae-radius-md);
    --nl-radius-sm: var(--ae-radius-sm);
    --nl-header-h: var(--ae-header-h);
}

[data-theme="light"] {
    color-scheme: light;
    --ae-bg: #f5f4f8;
    --ae-bg-soft: #eceaf1;
    --ae-surface: #ffffff;
    --ae-surface-2: #f8f7fb;
    --ae-surface-3: #efedf4;
    --ae-text: #17151d;
    --ae-text-soft: #4f4a58;
    --ae-muted: #77717f;
    --ae-line: rgba(35,29,45,.12);
    --ae-line-strong: rgba(35,29,45,.20);
    --ae-accent: #7257d9;
    --ae-accent-2: #087c8c;
    --ae-accent-3: #a13bb3;
    --ae-accent-soft: rgba(114,87,217,.10);
    --ae-glow: rgba(114,87,217,.16);
    --ae-success: #13795b;
    --ae-danger: #c83e59;
    --ae-shadow: 0 28px 70px rgba(44,37,58,.14);
    --ae-shadow-soft: 0 12px 34px rgba(44,37,58,.08);

    --background: var(--ae-bg);
    --category-active-text: #ffffff;
    --pagination-active-text: #ffffff;
    --scroll-top-color: #ffffff;
    --pre-bg: #eeecf3;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 86% -5%, rgba(167,139,250,.14), transparent 30rem),
        radial-gradient(circle at -10% 38%, rgba(103,232,249,.07), transparent 28rem),
        var(--ae-bg);
    color: var(--ae-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    transition: background-color .25s ease, color .25s ease;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .32;
    background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
[data-theme="light"] body::before { opacity: .35; background-image: linear-gradient(rgba(25,20,34,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(25,20,34,.025) 1px, transparent 1px); }
a { color: inherit; }
a, button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
img, video { max-width: 100%; height: auto; }
::selection { background: var(--ae-accent); color: #fff; }
:focus-visible { outline: 3px solid rgba(103,232,249,.58); outline-offset: 3px; }

.ae-wrap { width: min(var(--ae-wrap), calc(100% - 40px)); margin-inline: auto; }
.ae-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ae-section-kicker { display: flex; align-items: center; gap: 10px; color: var(--ae-muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.ae-section-kicker > span { width: 24px; height: 2px; background: linear-gradient(90deg, var(--ae-accent), var(--ae-accent-2)); }

/* Header */
.ae-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--ae-header-h);
    border-bottom: 1px solid var(--ae-line);
    background: color-mix(in srgb, var(--ae-bg) 82%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
}
.ae-header__inner { width: min(var(--ae-wrap), calc(100% - 40px)); height: 100%; margin-inline: auto; display: flex; align-items: center; gap: 36px; }
.ae-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: 0 0 auto; }
.ae-brand__mark { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--ae-line-strong); border-radius: 14px; background: linear-gradient(145deg, var(--ae-surface-2), var(--ae-surface)); box-shadow: inset 0 1px rgba(255,255,255,.08), 0 10px 30px rgba(0,0,0,.14); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; font-weight: 900; }
.ae-brand__mark span:first-child { color: var(--ae-accent); }
.ae-brand__mark span:last-child { color: var(--ae-accent-2); }
.ae-brand__mark i { color: var(--ae-muted); font-style: normal; }
.ae-brand__text { display: grid; line-height: 1; gap: 5px; }
.ae-brand__text strong { font-size: 20px; letter-spacing: -.04em; }
.ae-brand__text small { color: var(--ae-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 9px; letter-spacing: .08em; }
.ae-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ae-nav a { position: relative; padding: 10px 13px; border-radius: 10px; color: var(--ae-muted); font-size: 14px; font-weight: 700; text-decoration: none; transition: color .18s ease, background .18s ease; }
.ae-nav a:hover { color: var(--ae-text); background: var(--ae-surface-2); }
.ae-nav a[aria-current="page"] { color: var(--ae-text); }
.ae-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--ae-accent), var(--ae-accent-2)); }
.ae-nav .ae-nav__admin { color: var(--ae-accent-2); }
.ae-header__actions { display: flex; align-items: center; gap: 8px; }
.ae-icon-button, .ae-menu-button { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ae-line); border-radius: 12px; background: var(--ae-surface); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.ae-icon-button:hover, .ae-menu-button:hover { transform: translateY(-1px); border-color: var(--ae-line-strong); background: var(--ae-surface-2); }
.ae-icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
#moon-icon { display: none; }
.ae-menu-button { display: none; flex-direction: column; gap: 4px; }
.ae-menu-button span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.ae-menu-open .ae-menu-button span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.ae-menu-open .ae-menu-button span:nth-child(2) { opacity: 0; }
.ae-menu-open .ae-menu-button span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Promo spotlight */
.ae-promo {
    position: relative;
    z-index: 35;
    padding: 10px 0 12px;
    border-bottom: 1px solid var(--ae-line);
    background:
        linear-gradient(90deg, rgba(103,232,249,.025), rgba(167,139,250,.045) 58%, transparent),
        color-mix(in srgb, var(--ae-bg-soft) 72%, transparent);
    transition: opacity .18s ease, transform .18s ease, padding .18s ease;
}
.ae-promo.is-closing { opacity: 0; transform: translateY(-8px); }
.ae-promo__inner {
    position: relative;
    isolation: isolate;
    width: min(var(--ae-wrap), calc(100% - 40px));
    min-height: 64px;
    margin-inline: auto;
    padding: 9px 10px 9px 12px;
    display: flex;
    align-items: center;
    gap: 13px;
    overflow: hidden;
    border: 1px solid var(--ae-line);
    border-radius: 18px;
    background:
        linear-gradient(100deg, color-mix(in srgb, var(--ae-surface) 96%, transparent), color-mix(in srgb, var(--ae-surface-2) 90%, transparent));
    box-shadow: 0 12px 34px rgba(0,0,0,.14), inset 0 1px rgba(255,255,255,.025);
}
.ae-promo__inner::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 250px;
    height: 160px;
    left: -80px;
    top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(103,232,249,.14), transparent 68%);
    pointer-events: none;
}
.ae-promo__inner::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 230px;
    height: 150px;
    right: 120px;
    bottom: -110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167,139,250,.14), transparent 68%);
    pointer-events: none;
}
.ae-promo__visual {
    width: 44px;
    height: 44px;
    padding: 11px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--ae-accent-2) 32%, var(--ae-line));
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(103,232,249,.13), rgba(167,139,250,.12));
    box-shadow: inset 0 1px rgba(255,255,255,.055), 0 8px 22px rgba(0,0,0,.14);
}
.ae-promo__visual i {
    width: 3px;
    min-height: 7px;
    border-radius: 8px;
    background: linear-gradient(to top, var(--ae-accent), var(--ae-accent-2));
    box-shadow: 0 0 9px rgba(103,232,249,.22);
    animation: ae-promo-wave 1.15s ease-in-out infinite alternate;
}
.ae-promo__visual i:nth-child(1) { height: 9px; animation-delay: -.55s; }
.ae-promo__visual i:nth-child(2) { height: 18px; animation-delay: -.25s; }
.ae-promo__visual i:nth-child(3) { height: 13px; animation-delay: -.8s; }
.ae-promo__visual i:nth-child(4) { height: 21px; animation-delay: -.4s; }
.ae-promo__visual i:nth-child(5) { height: 11px; animation-delay: -.68s; }
@keyframes ae-promo-wave { to { transform: scaleY(.48); opacity: .72; } }
.ae-promo__content { min-width: 0; flex: 1; display: grid; gap: 1px; }
.ae-promo__eyebrow {
    color: var(--ae-accent-2);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 8px;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: .17em;
    text-transform: uppercase;
}
.ae-promo__copy { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.ae-promo__copy strong { flex: 0 0 auto; color: var(--ae-text); font-size: 13px; line-height: 1.35; font-weight: 850; }
.ae-promo__copy strong::after { content: "/"; margin-left: 10px; color: var(--ae-line-strong); font-weight: 500; }
.ae-promo__copy span { min-width: 0; overflow: hidden; color: var(--ae-muted); font-size: 12.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.ae-promo__cta {
    min-height: 42px;
    padding: 0 14px 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--ae-accent-2) 28%, var(--ae-line));
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(103,232,249,.13), rgba(167,139,250,.14));
    color: var(--ae-text);
    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: inset 0 1px rgba(255,255,255,.045);
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.ae-promo__cta svg { width: 15px; height: 15px; fill: none; stroke: var(--ae-accent-2); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ae-promo__cta:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--ae-accent-2) 58%, var(--ae-line)); background: linear-gradient(135deg, rgba(103,232,249,.19), rgba(167,139,250,.19)); box-shadow: 0 10px 25px rgba(0,0,0,.16), 0 0 28px rgba(103,232,249,.07); }
.ae-promo__close {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--ae-muted);
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.ae-promo__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ae-promo__close:hover { color: var(--ae-text); border-color: var(--ae-line); background: var(--ae-surface-3); transform: rotate(4deg); }
[data-theme="light"] .ae-promo__inner { box-shadow: 0 10px 30px rgba(44,37,58,.08), inset 0 1px rgba(255,255,255,.85); }
@media (prefers-reduced-motion: reduce) { .ae-promo__visual i { animation: none; } }

/* Hero */
.ae-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--ae-line); }
.ae-hero::after { content: ""; position: absolute; width: 640px; height: 640px; right: -300px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(167,139,250,.16), transparent 66%); pointer-events: none; }
.ae-hero__grid { min-height: 590px; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(390px,.75fr); align-items: center; gap: 80px; padding-block: 80px 72px; }
.ae-hero__copy h1 { max-width: 820px; margin: 20px 0 22px; font-size: clamp(48px, 6.3vw, 86px); line-height: .98; letter-spacing: -.065em; font-weight: 850; }
.ae-hero__copy h1 em { color: transparent; font-style: normal; -webkit-text-stroke: 1px var(--ae-text-soft); text-stroke: 1px var(--ae-text-soft); }
.ae-hero__copy > p { max-width: 720px; margin: 0; color: var(--ae-text-soft); font-size: clamp(17px, 2vw, 21px); line-height: 1.65; }
.ae-search { width: min(680px,100%); min-height: 60px; margin-top: 36px; padding: 7px 7px 7px 18px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--ae-line-strong); border-radius: 18px; background: color-mix(in srgb, var(--ae-surface) 86%, transparent); box-shadow: var(--ae-shadow-soft); }
.ae-search svg { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: var(--ae-muted); stroke-width: 1.8; stroke-linecap: round; }
.ae-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ae-text); font-size: 15px; }
.ae-search input::placeholder { color: var(--ae-muted); }
.ae-search button { min-width: 98px; height: 46px; border: 0; border-radius: 13px; background: linear-gradient(135deg, var(--ae-accent), #8b5cf6); color: #fff; font-size: 13px; font-weight: 850; cursor: pointer; box-shadow: 0 10px 24px var(--ae-glow); transition: transform .18s ease, filter .18s ease; }
.ae-search button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.ae-hero__stats { display: flex; align-items: stretch; gap: 0; margin-top: 40px; }
.ae-hero__stats div { min-width: 116px; padding: 0 26px; border-left: 1px solid var(--ae-line); }
.ae-hero__stats div:first-child { padding-left: 0; border-left: 0; }
.ae-hero__stats strong { display: block; color: var(--ae-text); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 22px; }
.ae-hero__stats span { color: var(--ae-muted); font-size: 12px; }
.ae-hero__visual { position: relative; min-height: 390px; display: grid; place-items: center; }
.ae-orbit { position: absolute; border: 1px solid var(--ae-line); border-radius: 50%; }
.ae-orbit--one { width: 390px; height: 390px; animation: ae-spin 28s linear infinite; }
.ae-orbit--one::before, .ae-orbit--two::before { content: ""; position: absolute; width: 10px; height: 10px; top: 12%; left: 12%; border-radius: 50%; background: var(--ae-accent-2); box-shadow: 0 0 24px var(--ae-accent-2); }
.ae-orbit--two { width: 280px; height: 280px; border-style: dashed; transform: rotate(35deg); animation: ae-spin-reverse 22s linear infinite; }
.ae-orbit--two::before { top: auto; left: auto; right: 7%; bottom: 18%; background: var(--ae-accent); box-shadow: 0 0 24px var(--ae-accent); }
@keyframes ae-spin { to { transform: rotate(360deg); } }
@keyframes ae-spin-reverse { from { transform: rotate(35deg); } to { transform: rotate(-325deg); } }
.ae-terminal-card { position: relative; z-index: 2; width: min(410px,90%); overflow: hidden; border: 1px solid var(--ae-line-strong); border-radius: 22px; background: rgba(13,13,19,.88); box-shadow: 0 36px 100px rgba(0,0,0,.46), 0 0 80px var(--ae-glow); transform: rotate(-2deg); backdrop-filter: blur(16px); }
[data-theme="light"] .ae-terminal-card { background: rgba(28,24,37,.94); }
.ae-terminal-card__bar { height: 43px; padding-inline: 15px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid rgba(255,255,255,.09); color: #8f8a9c; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 10px; }
.ae-terminal-card__bar i { width: 8px; height: 8px; border-radius: 50%; background: #fb7185; }
.ae-terminal-card__bar i:nth-child(2) { background: #fbbf24; }
.ae-terminal-card__bar i:nth-child(3) { background: #6ee7b7; }
.ae-terminal-card__bar span { margin-left: auto; }
.ae-terminal-card pre { margin: 0; padding: 34px; color: #d8d4e0; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 14px; line-height: 1.9; white-space: pre-wrap; }
.ae-terminal-card code b { color: #67e8f9; }
.ae-terminal-card code span { color: #a9a4b4; }
.ae-terminal-card code strong { color: #a78bfa; }

/* Search heading */
.ae-search-result-head { padding: 50px 0 10px; }
.ae-search-result-head .ae-wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.ae-search-result-head h1 { margin: 8px 0 2px; font-size: clamp(34px,5vw,58px); letter-spacing: -.045em; }
.ae-search-result-head p { margin: 0; color: var(--ae-muted); }
.ae-search-result-head a { padding: 10px 14px; border: 1px solid var(--ae-line); border-radius: 11px; color: var(--ae-muted); font-size: 13px; text-decoration: none; }

/* Sections and feature */
.ae-featured-section { padding: 78px 0 42px; }
.ae-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.ae-section-heading h2 { margin: 7px 0 0; font-size: clamp(28px,4vw,42px); line-height: 1; letter-spacing: -.045em; }
.ae-section-heading > span { color: var(--ae-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 11px; }
.ae-section-heading--line { padding-bottom: 18px; border-bottom: 1px solid var(--ae-line); }
.ae-featured-card { min-height: 470px; display: grid; grid-template-columns: minmax(0,1.08fr) minmax(360px,.92fr); overflow: hidden; border: 1px solid var(--ae-line); border-radius: var(--ae-radius-xl); background: var(--ae-surface); box-shadow: var(--ae-shadow-soft); }
.ae-featured-card__media { position: relative; min-height: 470px; overflow: hidden; background: linear-gradient(135deg, #18131f, #0e1620); }
.ae-featured-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 56%, rgba(0,0,0,.42)); pointer-events: none; }
.ae-featured-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.ae-featured-card:hover .ae-featured-card__media img { transform: scale(1.035); }
.ae-featured-card__media.is-placeholder { display: grid; place-items: center; background: radial-gradient(circle at 25% 20%, rgba(167,139,250,.24), transparent 34%), radial-gradient(circle at 78% 75%, rgba(103,232,249,.16), transparent 30%), #101017; }
.ae-code-watermark { color: rgba(255,255,255,.88); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: clamp(50px,7vw,92px); font-weight: 900; line-height: .78; letter-spacing: -.09em; }
.ae-featured-card__index { position: absolute; z-index: 2; left: 24px; bottom: 19px; color: rgba(255,255,255,.72); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; font-style: normal; letter-spacing: .12em; }
.ae-featured-card__body { padding: clamp(34px,5vw,66px); display: flex; flex-direction: column; justify-content: center; }
.ae-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--ae-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 10px; letter-spacing: .045em; text-transform: uppercase; }
.ae-meta-line a { color: var(--ae-accent-2); text-decoration: none; }
.ae-meta-line a::after { content: "·"; margin-left: 10px; color: var(--ae-muted); }
.ae-featured-card__body h2 { margin: 18px 0 20px; font-size: clamp(32px,4.4vw,54px); line-height: 1.04; letter-spacing: -.052em; }
.ae-featured-card__body h2 a { text-decoration: none; }
.ae-featured-card__body > p { margin: 0; color: var(--ae-text-soft); font-size: 16px; line-height: 1.72; }
.ae-featured-card__footer { margin-top: 34px; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--ae-line); }
.ae-featured-card__footer > div { display: flex; flex-wrap: wrap; gap: 14px; color: var(--ae-muted); font-size: 11px; }
.ae-featured-card__footer > a { display: inline-flex; align-items: center; gap: 8px; color: var(--ae-text); font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.ae-featured-card__footer > a i { color: var(--ae-accent-2); font-style: normal; }

/* Feed */
.ae-feed-section { padding: 52px 0 100px; }
.ae-feed-section--category { padding-top: 70px; }
.ae-content-layout { display: grid; grid-template-columns: minmax(0,1fr) 315px; align-items: start; gap: 58px; }
.ae-feed { min-width: 0; }
.ae-article-list { border-top: 1px solid var(--ae-line); }
.ae-article-row { display: grid; grid-template-columns: 205px minmax(0,1fr); gap: 28px; padding: 30px 0; border-bottom: 1px solid var(--ae-line); }
.ae-article-row__media { position: relative; height: 150px; overflow: hidden; border-radius: 17px; background: var(--ae-surface-2); text-decoration: none; }
.ae-article-row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.ae-article-row:hover .ae-article-row__media img { transform: scale(1.045); }
.ae-article-row__media.is-placeholder { display: grid; place-items: center; border: 1px solid var(--ae-line); background: radial-gradient(circle at 20% 20%, var(--ae-accent-soft), transparent 50%), var(--ae-surface); }
.ae-article-row__media.is-placeholder span { color: var(--ae-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 25px; font-weight: 900; }
.ae-article-row__body { min-width: 0; }
.ae-article-row__body h2 { margin: 10px 0 10px; font-size: clamp(22px,2.7vw,30px); line-height: 1.15; letter-spacing: -.035em; }
.ae-article-row__body h2 a { text-decoration: none; background-image: linear-gradient(var(--ae-accent), var(--ae-accent)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px; transition: background-size .28s ease; }
.ae-article-row:hover h2 a { background-size: 100% 1px; }
.ae-article-row__body > p { max-width: 760px; margin: 0; color: var(--ae-text-soft); font-size: 14px; line-height: 1.68; }
.ae-article-row__footer { margin-top: 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px; color: var(--ae-muted); font-size: 10px; }
.ae-article-row__footer > a { margin-left: auto; display: inline-flex; gap: 8px; color: var(--ae-text); font-size: 12px; font-weight: 800; text-decoration: none; }
.ae-article-row__footer > a i { color: var(--ae-accent-2); font-style: normal; transition: transform .18s ease; }
.ae-article-row__footer > a:hover i { transform: translateX(3px); }

/* Rail */
.ae-rail { position: sticky; top: calc(var(--ae-header-h) + 24px); display: grid; gap: 18px; }
.ae-rail-card { overflow: hidden; border: 1px solid var(--ae-line); border-radius: var(--ae-radius-lg); background: color-mix(in srgb, var(--ae-surface) 88%, transparent); box-shadow: var(--ae-shadow-soft); }
.ae-rail-card__head { min-height: 54px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--ae-line); }
.ae-rail-card__head > span { font-size: 12px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.ae-rail-card__head small, .ae-rail-card__head a { color: var(--ae-muted); font-size: 10px; text-decoration: none; }
.ae-category-list { padding: 9px; display: grid; gap: 2px; }
.ae-category-list a { padding: 10px 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 10px; color: var(--ae-text-soft); font-size: 12px; text-decoration: none; transition: background .18s ease, color .18s ease; }
.ae-category-list a:hover { background: var(--ae-surface-2); color: var(--ae-text); }
.ae-category-list a.is-active { background: var(--ae-accent-soft); color: var(--ae-text); }
.ae-category-list a.is-active span::before { content: ""; width: 5px; height: 5px; margin-right: 8px; display: inline-block; border-radius: 50%; background: var(--ae-accent); box-shadow: 0 0 12px var(--ae-accent); vertical-align: 1px; }
.ae-category-list b { min-width: 28px; height: 23px; padding: 0 7px; display: inline-grid; place-items: center; border: 1px solid var(--ae-line); border-radius: 8px; color: var(--ae-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 9px; font-weight: 600; }
.ae-flow-mini-list { padding: 4px 16px 10px; }
.ae-flow-mini-list a { padding: 14px 0; display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 11px; border-bottom: 1px solid var(--ae-line); text-decoration: none; }
.ae-flow-mini-list a:last-child { border-bottom: 0; }
.ae-flow-mini-list time { color: var(--ae-accent-2); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 9px; text-transform: uppercase; }
.ae-flow-mini-list strong { color: var(--ae-text-soft); font-size: 11px; line-height: 1.45; transition: color .18s ease; }
.ae-flow-mini-list a:hover strong { color: var(--ae-text); }
.ae-tool-links { padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ae-tool-links a { min-height: 72px; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid transparent; border-radius: 12px; background: var(--ae-surface-2); text-decoration: none; transition: border-color .18s ease, transform .18s ease; }
.ae-tool-links a:hover { transform: translateY(-2px); border-color: var(--ae-line-strong); }
.ae-tool-links i { color: var(--ae-accent); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; font-style: normal; font-weight: 800; }
.ae-tool-links span { color: var(--ae-text-soft); font-size: 9px; line-height: 1.25; }

/* Pagination and empty */
.ae-pagination { margin-top: 32px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ae-pagination a, .ae-pagination span { text-decoration: none; }
.ae-pagination__edge { min-width: 90px; color: var(--ae-text-soft); font-size: 12px; font-weight: 750; }
.ae-pagination__edge:last-child { text-align: right; }
.ae-pagination__edge.is-disabled { opacity: .3; }
.ae-pagination__pages { display: flex; align-items: center; justify-content: center; gap: 6px; }
.ae-pagination__pages a, .ae-pagination__pages > span:not(.ae-pagination__dots) { width: 35px; height: 35px; display: inline-grid; place-items: center; border: 1px solid var(--ae-line); border-radius: 10px; color: var(--ae-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 10px; }
.ae-pagination__pages a:hover { color: var(--ae-text); border-color: var(--ae-line-strong); background: var(--ae-surface); }
.ae-pagination__pages .is-current { border-color: transparent; background: var(--ae-accent); color: #fff; box-shadow: 0 8px 20px var(--ae-glow); }
.ae-pagination__dots { color: var(--ae-muted); }
.ae-empty-state { padding: 72px 32px; display: grid; justify-items: center; text-align: center; border: 1px dashed var(--ae-line-strong); border-radius: var(--ae-radius-lg); background: var(--ae-surface); }
.ae-empty-state > span { color: var(--ae-accent-2); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; }
.ae-empty-state h2 { margin: 14px 0 8px; font-size: 28px; }
.ae-empty-state p { margin: 0; color: var(--ae-muted); }
.ae-empty-state a { margin-top: 22px; padding: 11px 16px; border: 1px solid var(--ae-line-strong); border-radius: 11px; text-decoration: none; font-size: 12px; font-weight: 800; }

/* Category hero */
.ae-category-hero { padding: 70px 0 60px; border-bottom: 1px solid var(--ae-line); background: linear-gradient(135deg, rgba(167,139,250,.08), transparent 55%); }
.ae-breadcrumbs { margin-bottom: 48px; display: flex; align-items: center; gap: 10px; color: var(--ae-muted); font-size: 11px; }
.ae-breadcrumbs a { text-decoration: none; }
.ae-category-hero__grid { display: grid; grid-template-columns: minmax(0,1fr) 250px; align-items: end; gap: 50px; }
.ae-category-hero h1 { margin: 16px 0 20px; font-size: clamp(52px,8vw,98px); line-height: .92; letter-spacing: -.07em; }
.ae-category-hero__grid p { max-width: 760px; margin: 0; color: var(--ae-text-soft); font-size: 17px; line-height: 1.7; }
.ae-category-hero__count { padding-left: 30px; display: flex; align-items: center; gap: 18px; border-left: 1px solid var(--ae-line-strong); }
.ae-category-hero__count strong { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 52px; line-height: 1; }
.ae-category-hero__count span { color: var(--ae-muted); font-size: 11px; line-height: 1.5; text-transform: uppercase; letter-spacing: .08em; }
.ae-search--compact { max-width: 620px; min-height: 54px; margin-top: 44px; }
.ae-search--compact button { height: 40px; }

/* Links and footer */
.ae-links-cloud { padding: 72px 0; border-top: 1px solid var(--ae-line); background: var(--ae-bg-soft); }
.ae-links-cloud__head { margin: 9px 0 22px; display: flex; align-items: baseline; justify-content: space-between; }
.ae-links-cloud__head h2 { margin: 0; font-size: clamp(28px,4vw,42px); letter-spacing: -.045em; }
.ae-links-cloud__head span { color: var(--ae-muted); font-size: 11px; }
.ae-links-cloud__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.ae-links-cloud__grid a { min-height: 68px; padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid var(--ae-line); border-radius: 14px; background: var(--ae-surface); text-decoration: none; font-size: 12px; font-weight: 750; }
.ae-links-cloud__grid a:hover { border-color: var(--ae-line-strong); }
.ae-links-cloud__grid i { color: var(--ae-accent-2); font-style: normal; }
.ae-footer { padding: 62px 0 42px; border-top: 1px solid var(--ae-line); background: #07070a; color: #f4f1f8; }
[data-theme="light"] .ae-footer { background: #16131b; }
.ae-footer__grid { display: grid; grid-template-columns: 1fr auto auto; align-items: start; gap: 70px; }
.ae-footer__brand { font-size: 27px; font-weight: 900; letter-spacing: -.05em; text-decoration: none; }
.ae-footer__brand span { color: #a78bfa; }
.ae-footer p { max-width: 430px; margin: 14px 0 0; color: #9892a4; font-size: 12px; line-height: 1.65; }
.ae-footer nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.ae-footer nav a { color: #c7c1ce; font-size: 11px; text-decoration: none; }
.ae-footer nav a:hover { color: #fff; }
.ae-footer__meta { display: grid; gap: 8px; color: #716b78; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 9px; text-align: right; }
.ae-scroll-top { position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--ae-line-strong); border-radius: 13px; background: var(--ae-surface); color: var(--ae-text); box-shadow: var(--ae-shadow-soft); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: .2s ease; }
.ae-scroll-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* Compatibility for inherited templates */
.container { width: min(1180px, calc(100% - 40px)); margin: 38px auto 80px; display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 32px; align-items: start; }
.container > main { min-width: 0; }
.sidebar { position: sticky; top: calc(var(--ae-header-h) + 20px); padding: 16px; border: 1px solid var(--ae-line); border-radius: var(--ae-radius-lg); background: var(--ae-surface); box-shadow: var(--ae-shadow-soft); }
.sidebar h2 { margin: 8px 8px 12px; display: flex; align-items: center; gap: 8px; color: var(--ae-muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.sidebar .category, .sidebar .admin-login-btn { margin: 3px 0; padding: 10px 11px; display: flex; align-items: center; gap: 9px; border-radius: 10px; color: var(--ae-text-soft); font-size: 12px; text-decoration: none; }
.sidebar .category:hover, .sidebar .admin-login-btn:hover { background: var(--ae-surface-2); color: var(--ae-text); }
.sidebar .category.active { background: var(--ae-accent-soft); color: var(--ae-text); }
#search-form { margin-bottom: 18px; display: flex; gap: 6px; }
#search-form input { min-width: 0; flex: 1; padding: 10px 11px; border: 1px solid var(--ae-line); border-radius: 10px; background: var(--ae-bg-soft); color: var(--ae-text); outline: 0; }
#search-form button { width: 42px; border: 0; border-radius: 10px; background: var(--ae-accent); color: #fff; cursor: pointer; }
.post, .category-description, .profile-section, .error-content { margin-bottom: 20px; padding: 26px; border: 1px solid var(--ae-line); border-radius: var(--ae-radius-lg); background: var(--ae-surface); box-shadow: var(--ae-shadow-soft); }
.post-title { color: var(--ae-text); font-size: 27px; font-weight: 850; line-height: 1.15; letter-spacing: -.035em; text-decoration: none; }
.post-preview { color: var(--ae-text-soft); }
.post-meta { color: var(--ae-muted); font-size: 11px; }
.post-image { width: 100%; margin: 18px 0; border-radius: 16px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 28px; }
.pagination a, .pagination span { min-width: 38px; height: 38px; padding: 0 10px; display: inline-grid; place-items: center; border: 1px solid var(--ae-line); border-radius: 10px; background: var(--ae-surface); color: var(--ae-text-soft); text-decoration: none; }
.pagination .active, .pagination a.active { background: var(--ae-accent); color: #fff; }
.back-link { display: inline-flex; margin-bottom: 20px; padding: 10px 14px; border: 1px solid var(--ae-line); border-radius: 11px; background: var(--ae-surface); color: var(--ae-text-soft); text-decoration: none; }
.logo { color: inherit; text-decoration: none; }
.footer { display: none; }
.theme-toggle, .hamburger, .flow-button { font: inherit; }

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

/* Responsive */
@media (max-width: 1080px) {
    .ae-hero__grid { grid-template-columns: 1fr 360px; gap: 40px; }
    .ae-content-layout { grid-template-columns: minmax(0,1fr) 285px; gap: 34px; }
    .ae-featured-card { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .ae-menu-button { display: inline-flex; }
    .ae-nav { position: fixed; top: calc(var(--ae-header-h) + 10px); left: 20px; right: 20px; padding: 10px; display: grid; gap: 2px; border: 1px solid var(--ae-line-strong); border-radius: 18px; background: var(--ae-surface); box-shadow: var(--ae-shadow); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: .2s ease; }
    .ae-menu-open .ae-nav { opacity: 1; visibility: visible; transform: none; }
    .ae-nav a { padding: 13px 14px; }
    .ae-nav a[aria-current="page"]::after { display: none; }
    .ae-header__actions { margin-left: auto; }
    .ae-hero__grid { min-height: auto; grid-template-columns: 1fr; padding-block: 70px; }
    .ae-hero__visual { display: none; }
    .ae-hero__copy h1 { max-width: 760px; }
    .ae-featured-card { grid-template-columns: 1fr; }
    .ae-featured-card__media { min-height: 390px; }
    .ae-content-layout { grid-template-columns: 1fr; }
    .ae-rail { position: static; grid-template-columns: 1fr 1fr; }
    .ae-rail-card--categories { grid-column: 1 / -1; }
    .ae-category-list { grid-template-columns: 1fr 1fr; }
    .ae-footer__grid { grid-template-columns: 1fr 1fr; }
    .ae-footer__meta { grid-column: 1 / -1; text-align: left; }
    .container { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}

@media (max-width: 680px) {
    .ae-wrap, .ae-header__inner, .ae-promo__inner { width: min(100% - 28px, var(--ae-wrap)); }
    .ae-brand__text small { display: none; }
    .ae-brand__text strong { font-size: 18px; }
    .ae-brand__mark { width: 42px; height: 42px; }
    .ae-promo { padding-block: 8px 9px; }
    .ae-promo__inner { min-height: 58px; gap: 9px; padding: 7px 8px 7px 9px; border-radius: 16px; }
    .ae-promo__visual { width: 40px; height: 40px; padding: 10px 9px; border-radius: 12px; }
    .ae-promo__eyebrow { display: none; }
    .ae-promo__copy { display: block; }
    .ae-promo__copy strong { display: block; overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
    .ae-promo__copy strong::after, .ae-promo__copy span { display: none; }
    .ae-promo__cta { min-height: 40px; padding-inline: 12px; }
    .ae-promo__cta span { display: none; }
    .ae-promo__close { width: 34px; height: 34px; }
    .ae-hero__grid { padding-block: 54px 48px; }
    .ae-hero__copy h1 { margin-top: 16px; font-size: clamp(44px,14vw,64px); }
    .ae-hero__copy > p { font-size: 16px; }
    .ae-search { min-height: 54px; margin-top: 28px; padding-left: 14px; }
    .ae-search button { min-width: 78px; height: 40px; }
    .ae-hero__stats { justify-content: space-between; }
    .ae-hero__stats div { min-width: 0; padding: 0 14px; }
    .ae-hero__stats strong { font-size: 18px; }
    .ae-featured-section { padding-top: 52px; }
    .ae-section-heading { align-items: start; }
    .ae-featured-card__media { min-height: 260px; }
    .ae-featured-card__body { padding: 28px 23px; }
    .ae-featured-card__body h2 { font-size: 34px; }
    .ae-featured-card__footer { align-items: flex-start; flex-direction: column; }
    .ae-feed-section { padding-top: 36px; }
    .ae-article-row { grid-template-columns: 1fr; gap: 16px; }
    .ae-article-row__media { height: 220px; }
    .ae-article-row__footer > a { width: 100%; margin-left: 0; }
    .ae-rail { grid-template-columns: 1fr; }
    .ae-rail-card--categories { grid-column: auto; }
    .ae-category-list { grid-template-columns: 1fr; }
    .ae-pagination { align-items: stretch; flex-wrap: wrap; }
    .ae-pagination__pages { order: -1; width: 100%; }
    .ae-category-hero { padding-top: 45px; }
    .ae-breadcrumbs { margin-bottom: 32px; }
    .ae-category-hero__grid { grid-template-columns: 1fr; gap: 30px; }
    .ae-category-hero h1 { font-size: clamp(52px,17vw,76px); }
    .ae-category-hero__count { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--ae-line); }
    .ae-links-cloud__grid { grid-template-columns: 1fr; }
    .ae-footer__grid { grid-template-columns: 1fr; gap: 34px; }
    .ae-footer__meta { grid-column: auto; }
    .ae-footer nav { max-width: 360px; }
    .container { width: min(100% - 28px, 1180px); margin-top: 22px; }
}

/* =========================================================
   Aurora Editorial 1.3 — compact home feature, Flow, Gallery
   ========================================================= */
:root { --ae-accent-contrast: #160f22; }
[data-theme="light"] { --ae-accent-contrast: #ffffff; }

/* Compact featured article on the home page */
.ae-featured-section { padding: 56px 0 30px; }
.ae-featured-card {
    height: clamp(360px, 32vw, 420px);
    min-height: 0;
    grid-template-columns: minmax(0, 1.04fr) minmax(380px, .96fr);
}
.ae-featured-card__media { min-height: 0; height: 100%; }
.ae-featured-card__body {
    min-height: 0;
    overflow: hidden;
    padding: clamp(28px, 3.7vw, 46px);
}
.ae-featured-card__body h2 {
    margin: 14px 0 16px;
    font-size: clamp(30px, 3.35vw, 38px);
    line-height: 1.03;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}
.ae-featured-card__body > p {
    font-size: 14px;
    line-height: 1.62;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
.ae-featured-card__footer { margin-top: 23px; padding-top: 17px; }
.ae-featured-card__footer > div { gap: 11px; font-size: 10px; }

/* Guaranteed contrast for every pagination implementation */
.ae-pagination__pages .is-current,
.ae-compact-pagination .is-current,
.pagination .active,
.pagination a.active {
    color: var(--ae-accent-contrast) !important;
    font-weight: 900 !important;
    text-shadow: none !important;
}

/* Shared internal-page helpers */
.ae-inline-back {
    width: fit-content;
    margin-bottom: 28px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ae-text-soft);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: color .18s ease, transform .18s ease;
}
.ae-inline-back:hover { color: var(--ae-accent-2); transform: translateX(-3px); }

/* Flow index */
.ae-flow-hero,
.ae-gallery-hero {
    padding: 62px 0 42px;
    border-bottom: 1px solid var(--ae-line);
    background:
        radial-gradient(circle at 80% 20%, rgba(167,139,250,.13), transparent 27rem),
        linear-gradient(180deg, rgba(255,255,255,.015), transparent);
}
.ae-flow-hero__grid,
.ae-gallery-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 70px;
}
.ae-flow-hero h1,
.ae-gallery-hero h1 {
    margin: 14px 0 17px;
    font-size: clamp(58px, 8vw, 104px);
    line-height: .88;
    letter-spacing: -.075em;
}
.ae-flow-hero p,
.ae-gallery-hero p {
    max-width: 700px;
    margin: 0;
    color: var(--ae-text-soft);
    font-size: 16px;
    line-height: 1.72;
}
.ae-flow-hero__stats,
.ae-gallery-hero__stats {
    padding: 19px;
    display: grid;
    grid-template-columns: repeat(3, minmax(105px, 1fr));
    gap: 1px;
    border: 1px solid var(--ae-line);
    border-radius: var(--ae-radius-lg);
    background: var(--ae-surface);
    box-shadow: var(--ae-shadow-soft);
}
.ae-gallery-hero__stats { grid-template-columns: repeat(2, minmax(125px, 1fr)); }
.ae-flow-hero__stats div,
.ae-gallery-hero__stats div {
    min-width: 0;
    padding: 8px 18px;
    display: grid;
    gap: 4px;
    border-left: 1px solid var(--ae-line);
}
.ae-flow-hero__stats div:first-child,
.ae-gallery-hero__stats div:first-child { border-left: 0; }
.ae-flow-hero__stats strong,
.ae-gallery-hero__stats strong {
    font-size: 25px;
    line-height: 1;
    letter-spacing: -.04em;
}
.ae-flow-hero__stats span,
.ae-gallery-hero__stats span {
    color: var(--ae-muted);
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ae-flow-stream { padding: 54px 0 96px; }
.ae-flow-list { margin-top: 8px; }
.ae-flow-entry {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 25px;
    padding: 28px 0;
    border-bottom: 1px solid var(--ae-line);
}
.ae-flow-entry__date {
    position: relative;
    padding-top: 7px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--ae-muted);
}
.ae-flow-entry__date::after {
    content: "";
    position: absolute;
    top: 15px;
    right: -13px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ae-accent-2);
    box-shadow: 0 0 17px rgba(103,232,249,.55);
}
.ae-flow-entry__date strong {
    color: var(--ae-text);
    font-size: 30px;
    line-height: 1;
    letter-spacing: -.05em;
}
.ae-flow-entry__date span {
    margin-top: 3px;
    font-size: 10px;
    text-transform: lowercase;
}
.ae-flow-entry__date time {
    margin-top: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 9px;
}
.ae-flow-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(260px, .86fr) minmax(0, 1.14fr);
    overflow: hidden;
    border: 1px solid var(--ae-line);
    border-radius: var(--ae-radius-lg);
    background: var(--ae-surface);
    box-shadow: var(--ae-shadow-soft);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.ae-flow-entry:hover .ae-flow-card {
    transform: translateY(-3px);
    border-color: var(--ae-line-strong);
    box-shadow: var(--ae-shadow);
}
.ae-flow-entry--text .ae-flow-card { grid-template-columns: 1fr; }
.ae-flow-card__media {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    background: var(--ae-surface-2);
    text-decoration: none;
}
.ae-flow-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.66));
}
.ae-flow-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s ease;
}
.ae-flow-entry:hover .ae-flow-card__media img { transform: scale(1.035); }
.ae-flow-card__media > span {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
    bottom: 16px;
    display: flex;
    justify-content: space-between;
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.ae-flow-card__media i { color: var(--ae-accent-2); font-style: normal; }
.ae-flow-card__body {
    min-width: 0;
    padding: clamp(25px, 3.3vw, 39px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.ae-flow-card__body .ae-meta-line > span:first-child {
    color: var(--ae-accent-2);
}
.ae-flow-card__body .ae-meta-line > span:first-child::after {
    content: "·";
    margin-left: 10px;
    color: var(--ae-muted);
}
.ae-flow-card__body h2 {
    margin: 13px 0 13px;
    font-size: clamp(25px, 3.2vw, 38px);
    line-height: 1.08;
    letter-spacing: -.045em;
}
.ae-flow-card__body h2 a { text-decoration: none; }
.ae-flow-card__body > p {
    margin: 0;
    color: var(--ae-text-soft);
    font-size: 14px;
    line-height: 1.68;
}
.ae-flow-card__footer {
    margin-top: 24px;
    padding-top: 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--ae-line);
}
.ae-flow-card__footer > div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--ae-muted);
    font-size: 10px;
}
.ae-flow-card__footer > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ae-text);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}
.ae-flow-card__footer i { color: var(--ae-accent-2); font-style: normal; }

/* Gallery index */
.ae-gallery-section { padding: 54px 0 100px; }
.ae-gallery-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 42px;
}
.ae-gallery-main { min-width: 0; }
.ae-gallery-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 215px;
    gap: 12px;
}
.ae-gallery-tile {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--ae-line);
    border-radius: 17px;
    background: var(--ae-surface-2);
    box-shadow: var(--ae-shadow-soft);
}
.ae-gallery-tile--wide { grid-column: span 2; }
.ae-gallery-tile > a {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    text-decoration: none;
}
.ae-gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s cubic-bezier(.2,.7,.2,1), filter .3s ease;
}
.ae-gallery-tile:hover img { transform: scale(1.045); filter: saturate(1.08); }
.ae-gallery-tile__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.79));
    opacity: .78;
    transition: opacity .2s ease;
}
.ae-gallery-tile:hover .ae-gallery-tile__shade { opacity: .96; }
.ae-gallery-tile__copy {
    position: absolute;
    z-index: 2;
    left: 16px;
    right: 44px;
    bottom: 14px;
    display: grid;
    gap: 3px;
    color: #fff;
}
.ae-gallery-tile__copy strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ae-gallery-tile__copy small {
    overflow: hidden;
    color: rgba(255,255,255,.65);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ae-gallery-tile > a > i {
    position: absolute;
    z-index: 2;
    right: 15px;
    bottom: 15px;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    color: var(--ae-accent-2);
    background: rgba(0,0,0,.28);
    font-size: 10px;
    font-style: normal;
    backdrop-filter: blur(8px);
}
.ae-gallery-comments {
    position: sticky;
    top: calc(var(--ae-header-h) + 24px);
    overflow: hidden;
    border: 1px solid var(--ae-line);
    border-radius: var(--ae-radius-lg);
    background: var(--ae-surface);
    box-shadow: var(--ae-shadow-soft);
}
.ae-gallery-comments__head {
    padding: 21px 21px 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--ae-line);
}
.ae-gallery-comments__head h2 {
    margin: 7px 0 0;
    font-size: 21px;
    letter-spacing: -.035em;
}
.ae-gallery-comments__head > span {
    min-width: 31px;
    height: 27px;
    padding: 0 8px;
    display: grid;
    place-items: center;
    border: 1px solid var(--ae-line);
    border-radius: 9px;
    color: var(--ae-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 9px;
}
.ae-gallery-comment-list { padding: 8px; }
.ae-gallery-comment {
    padding: 15px 13px;
    border-bottom: 1px solid var(--ae-line);
}
.ae-gallery-comment:last-child { border-bottom: 0; }
.ae-gallery-comment header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.ae-gallery-comment header strong { font-size: 12px; }
.ae-gallery-comment time {
    color: var(--ae-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 8px;
    white-space: nowrap;
}
.ae-gallery-comment > p {
    margin: 9px 0 12px;
    color: var(--ae-text-soft);
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.ae-gallery-comment > a {
    position: relative;
    padding: 10px 31px 10px 11px;
    display: grid;
    gap: 2px;
    border: 1px solid var(--ae-line);
    border-radius: 11px;
    background: var(--ae-surface-2);
    text-decoration: none;
}
.ae-gallery-comment > a span {
    color: var(--ae-accent-2);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.ae-gallery-comment > a strong {
    overflow: hidden;
    color: var(--ae-text-soft);
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ae-gallery-comment > a i {
    position: absolute;
    top: 50%;
    right: 11px;
    color: var(--ae-accent);
    font-style: normal;
    transform: translateY(-50%);
}
.ae-gallery-comments__empty { padding: 30px 21px; color: var(--ae-muted); font-size: 12px; }
.ae-compact-pagination {
    margin-top: 23px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ae-compact-pagination--comments {
    margin: 0;
    padding: 14px;
    border-top: 1px solid var(--ae-line);
}
.ae-compact-pagination a,
.ae-compact-pagination > span:not(.ae-pagination__dots) {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--ae-line);
    border-radius: 10px;
    color: var(--ae-muted);
    background: var(--ae-surface);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 9px;
    text-decoration: none;
}
.ae-compact-pagination a:hover { color: var(--ae-text); border-color: var(--ae-line-strong); }
.ae-compact-pagination .is-current {
    border-color: transparent !important;
    background: var(--ae-accent) !important;
    box-shadow: 0 8px 20px var(--ae-glow);
}

@media (max-width: 1080px) {
    .ae-featured-card { height: 390px; grid-template-columns: 1fr 1fr; }
    .ae-gallery-layout { grid-template-columns: minmax(0, 1fr) 305px; gap: 28px; }
    .ae-gallery-grid { grid-auto-rows: 190px; }
    .ae-flow-card { grid-template-columns: minmax(230px, .78fr) minmax(0, 1.22fr); }
}

@media (max-width: 900px) {
    .ae-featured-card { height: auto; }
    .ae-featured-card__media { min-height: 330px; height: auto; }
    .ae-flow-hero__grid,
    .ae-gallery-hero__grid { grid-template-columns: 1fr; gap: 32px; }
    .ae-flow-hero__stats,
    .ae-gallery-hero__stats { width: min(100%, 520px); }
    .ae-gallery-layout { grid-template-columns: 1fr; }
    .ae-gallery-comments { position: static; }
}

@media (max-width: 720px) {
    .ae-flow-hero,
    .ae-gallery-hero { padding: 42px 0 34px; }
    .ae-flow-hero h1,
    .ae-gallery-hero h1 { font-size: clamp(56px, 20vw, 82px); }
    .ae-flow-hero__stats,
    .ae-gallery-hero__stats { padding: 12px; }
    .ae-flow-hero__stats div,
    .ae-gallery-hero__stats div { padding: 8px 10px; }
    .ae-flow-entry { grid-template-columns: 1fr; gap: 12px; padding: 22px 0; }
    .ae-flow-entry__date {
        padding: 0;
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
    }
    .ae-flow-entry__date::after { display: none; }
    .ae-flow-entry__date strong { font-size: 20px; }
    .ae-flow-entry__date time { margin: 0 0 0 auto; }
    .ae-flow-card { grid-template-columns: 1fr; }
    .ae-flow-card__media { min-height: 235px; }
    .ae-flow-card__footer { align-items: flex-start; flex-direction: column; }
    .ae-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 190px; }
    .ae-gallery-tile--wide { grid-column: span 2; }
}

@media (max-width: 520px) {
    .ae-featured-card__media { min-height: 230px; }
    .ae-featured-card__body h2 { font-size: 31px; }
    .ae-flow-hero__stats { grid-template-columns: 1fr 1fr; }
    .ae-flow-hero__stats div:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--ae-line); padding-top: 13px; }
    .ae-gallery-hero__stats { grid-template-columns: 1fr 1fr; }
    .ae-gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 230px; }
    .ae-gallery-tile--wide { grid-column: auto; }
    .ae-gallery-tile__copy strong { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
}
