/* home — glue + tabloid
 * Desktop: rail = шапка (высота меню), main + контент на всю ширину под ней (как xras.ru).
 * Mobile: shell как обычно.
 * Окружение главной: body.xras-theme-home + shell.css + этот файл.
 */

body.xras-theme-home {
    /* main.jpg — верх; index_2.jpg — низ (как prod main-page) */
    --home-bg-aspect: 0.458333;
    --home-bg-url: url('/img/backgrounds/main.jpg');
    --home-bg-bottom-url: url('/img/backgrounds/index_2.jpg');
    --home-desktop-ref-w: 1482px;
    --home-bg-w: 1482px;
    --home-bg-position-mobile: right top;
    --home-bg-position-desktop: right top;
    --home-text-dim: rgba(255, 255, 255, 0.62);
    --home-footer-bottom: 20px;
    --home-footer-h: 1.25rem;
    --home-tabloid-gap: 14px;
    --home-content-tail-h: 4rem;
    --home-content-tail: calc(var(--home-tabloid-gap) + var(--home-content-tail-h));
    --home-footer-slot: calc(var(--main-content-pad-bottom) - var(--home-footer-h) - var(--home-footer-bottom));
}

.xras-theme-home .xras-main__content {
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--home-footer-bottom);
}

.xras-theme-home .xras-main__inner {
    --bg-bleed-left: var(--page-pad-left);
    width: 100%;
    margin-right: 0;
}

/* shell ::before = 100vw — на главной overflow и обрезка mobile-bar */
.xras-theme-home .xras-main__inner::before {
    width: calc(100% + var(--bg-bleed-left));
}

/* Нижний фон — от левого края экрана до правого, как на prod */
.xras-theme-home .xras-main__inner::after {
    background-image: var(--home-bg-bottom-url);
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 100% auto;
    left: calc(-1 * var(--bg-bleed-left));
    width: 100vw;
}

.xras-theme-home .xras-home-bg {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    top: 0;
    left: calc(-1 * var(--bg-bleed-left));
    width: calc(100% + var(--bg-bleed-left));
    min-height: 100%;
    background: var(--home-bg-url) no-repeat left top;
}

@media (min-width: 992px) {
    body.xras-theme-home {
        --home-rail-stack-h: 409px;
        --home-content-gap: 66px;
        --main-offset-top: calc(var(--home-rail-stack-h) + var(--home-content-gap) / 2);
    }

    body.xras-theme-home .xras-layout {
        display: grid;
        grid-template-columns: var(--rail-w) 1fr;
        align-items: start;
        width: 100%;
        max-width: var(--home-desktop-ref-w);
    }

    body.xras-theme-home .xras-rail {
        position: relative;
        z-index: 2;
        grid-column: 1;
        grid-row: 1;
        align-self: start;
        width: var(--rail-w);
        height: auto;
        bottom: auto;
        overflow: visible;
        background: none !important;
        background-color: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    body.xras-theme-home .xras-rail__inner {
        min-height: 0;
        height: auto;
        background: none !important;
        background-color: transparent !important;
    }

    body.xras-theme-home .xras-main {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        margin-left: 0;
        min-height: 100vh;
    }

    body.xras-theme-home .xras-main__content {
        box-sizing: border-box;
        padding-left: var(--shell-pad-x);
        padding-right: var(--shell-pad-x);
    }

    .xras-theme-home .xras-home-bg {
        background-size: min(var(--home-bg-w), 100%) auto;
        background-position: var(--home-bg-position-desktop);
    }
}

@media (max-width: 991.98px) {
    body.xras-theme-home {
        --main-offset-top: clamp(
            150px,
            calc(
                (100vw - var(--page-pad-left) - var(--page-pad-right))
                * var(--bg-top-scale-mobile)
                * var(--home-bg-aspect)
                * var(--bg-title-ratio)
            ),
            640px
        );
    }

    .xras-theme-home .xras-home-bg {
        background-size: 171% auto;
        background-position: var(--home-bg-position-mobile);
    }
}

/* ── Tabloid v1 ── */

.home-tabloid {
    --home-tile-bg: rgba(0, 0, 0, 0.52);
    --home-tile-border: rgba(255, 216, 0, 0.22);
    --home-tile-border-hover: rgba(255, 216, 0, 0.38);
    --home-tile-bg-hover: rgba(0, 0, 0, 0.62);
    --home-tile-radius: 6px;
    --home-yellow: #ffd800;
    --home-green: #00ff00;
    --home-orange: #ff8000;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: var(--home-tabloid-gap);
}

.home-tile {
    min-width: 0;
    border-radius: var(--home-tile-radius);
    background: var(--home-tile-bg);
    border: 1px solid var(--home-tile-border);
    overflow: hidden;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.home-hero-row {
    --home-hero-gap: 12px;
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--home-hero-gap);
    width: 100%;
}

.home-hero-row > .home-tile {
    flex: 1 1 0;
    min-width: 0;
}

@media (min-width: 992px) {
    .home-hero-row .home-tile__link--thumb,
    .home-hero-row .home-tile__link--hero {
        min-height: 0;
        height: 100%;
    }
}

.home-hero-row .home-tile--hero {
    width: auto;
    max-width: none;
    aspect-ratio: unset;
    height: auto;
    align-self: stretch;
}

/* hero-row: медиа фиксированной пропорции; подпись растёт вниз, не сжимает картинку */
.home-hero-row .home-tile__link--thumb,
.home-hero-row .home-tile__link--hero {
    justify-content: flex-start;
}

.home-hero-row .home-tile__thumb-media,
.home-hero-row .home-tile__thumb-media--aurora,
.home-hero-row .home-tile__media--hero {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.home-hero-row .home-tile__hero-cap {
    margin-top: 0;
}

.home-tile--hero {
    --home-hero-cap-extra: 2.75rem; /* ~½ высоты блока надписей */
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    aspect-ratio: unset;
    border-color: var(--home-tile-border);
    background: rgba(255, 255, 255, 0.045);
    overflow: hidden;
}

.home-tile:hover {
    border-color: var(--home-tile-border-hover);
}

.home-tile:not(.home-tile--flare):not(.home-tile--storms):hover {
    background: var(--home-tile-bg-hover);
}

.home-tile--flare,
.home-tile--storms {
    display: flex;
    flex-direction: column;
    background: transparent;
    overflow: hidden;
}

.home-tile--flare {
    container-type: inline-size;
}

.home-tile--flare:hover,
.home-tile--storms:hover {
    background: transparent;
}

.home-tile--wide {
    grid-column: 1 / -1;
}

.home-tile__link {
    display: block;
    padding: 16px 18px 18px;
    color: inherit;
    text-decoration: none;
}

.home-tile__link--hero {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: calc(var(--home-hero-panel-size, 420px) + var(--home-hero-cap-extra));
    padding: 0;
    background: transparent;
}

/* Legacy v0: template_home_tabloid.html */
.home-tile__link--row {
    padding: 14px 18px;
}

.home-tile__media--hero {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 1 / 1;
    line-height: 0;
    background: transparent;
    overflow: hidden;
}

.home-sun-hero {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-mask-image: radial-gradient(
        circle closest-side at 50% 50%,
        #000 0,
        #000 80.46875%,
        transparent 100%
    );
    mask-image: radial-gradient(
        circle closest-side at 50% 50%,
        #000 0,
        #000 80.46875%,
        transparent 100%
    );
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-mode: alpha;
    mask-mode: alpha;
}

/* HMI: полный квадрат кадра, без кольцевой маски */
.home-sun-hero--hmi {
    -webkit-mask-image: none;
    mask-image: none;
}

.home-sun-hero__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-tile__hero-media-link,
.home-tile__hero-cap-link {
    color: inherit;
    text-decoration: none;
}

.home-tile__hero-media-link {
    display: block;
    position: absolute;
    inset: 0;
}

.home-tile__hero-cap-link {
    display: block;
}

.home-sun-hero-stack {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.home-sun-hero-stack .home-sun-hero {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.home-sun-hero-stack .home-sun-hero.is-active {
    opacity: 1;
}

.home-sun-view-switch {
    display: none;
    position: absolute;
    z-index: 3;
    right: 8px;
    bottom: 8px;
    align-items: center;
    margin: 0;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(4px);
}

.home-sun-view-switch__btn {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}

.home-sun-view-switch__btn.is-active {
    color: var(--home-yellow);
}

.home-sun-view-switch__btn:hover {
    color: #fff;
}

.home-sun-view-switch__sep {
    margin: 0 5px;
    font-size: 11px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.34);
    user-select: none;
}

@media (min-width: 992px) {
    .home-tile--sun-dual .home-sun-hero--corona {
        display: none;
    }

    .home-tile--sun-dual .home-sun-hero--hmi {
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .home-tile--sun-dual .home-sun-view-switch {
        display: inline-flex;
    }
}

.home-tile__hero-cap {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    margin-top: auto;
    padding: 12px 16px 14px;
    background: none;
}

.home-tile__kicker {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--home-yellow);
}

.home-tile__title {
    display: block;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

.home-tile__hero-cap .home-tile__title,
.home-tile__thumb-cap .home-tile__title,
.home-tile--aurora .home-tile__title,
.home-tile--enlil .home-tile__title,
.home-tile--projects .home-tile__title,
.home-tile--diary .home-tile__title {
    font-size: 15px;
}

.home-tile__meta {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--home-text-dim);
}

.home-tile--flare .home-tile__meta {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
    align-self: stretch;
}

.home-tile--flare .home-tile__meta-line {
    flex: 0 0 auto;
    white-space: nowrap;
}

.home-tile__badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.35;
    color: #1a1a1a;
    background: var(--home-orange);
}

/* FI badge: спокойно / низкая → зелёный; умеренная → жёлтый; высокая → оранжевый;
   очень высокая → красный; экстремальная → фиолетовый */
.home-tile__badge--fi-calm,
.home-tile__badge--fi-low {
    color: #1a1a1a;
    background: var(--home-green);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.28);
}

.home-tile__badge--fi-moderate {
    color: #1a1a1a;
    background: var(--home-yellow);
    box-shadow: 0 0 10px rgba(255, 216, 0, 0.28);
}

.home-tile__badge--fi-high {
    color: #1a1a1a;
    background: var(--home-orange);
    box-shadow: 0 0 10px rgba(255, 128, 0, 0.28);
}

.home-tile__badge--fi-very-high {
    color: #fff;
    background: #ff3333;
    box-shadow: 0 0 10px rgba(255, 48, 48, 0.35);
}

.home-tile__badge--fi-extreme {
    color: #fff;
    background: rgb(156, 0, 156);
    box-shadow: 0 0 10px rgba(156, 0, 156, 0.4);
}

.home-tile__status {
    display: block;
    width: 100%;
    max-width: 4.5rem;
    height: 6px;
    margin-bottom: 12px;
    border-radius: 2px;
    background: var(--home-green);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.35);
}

.home-tile__link--activity {
    position: relative;
    min-height: 9.5rem;
    padding: 0;
    overflow: hidden;
}

.home-tile--flare .home-tile__link--activity,
.home-tile--storms .home-tile__link--activity {
    flex: 1 1 auto;
    min-height: 100%;
}

/* ── Split panel: двухколоночная оболочка (плитки + ticker) ── */
.home-split {
    display: flex;
    align-items: stretch;
    width: 100%;
    --split-aside-pad-x: 12px;
    --split-aside-pad-y: 8px;
    --split-panel-max: 450px;
}

.home-split__main {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    align-self: stretch;
}

.home-split__aside {
    position: relative;
    z-index: 1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 0;
    padding: var(--split-aside-pad-y) var(--split-aside-pad-x);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    box-sizing: border-box;
}

.home-split--aside-50 .home-split__main {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.home-split--aside-50 .home-split__aside {
    flex: 0 1 50%;
    min-width: 10.5rem;
    padding: 8px 7px 8px 5px;
}

.home-split--aside-60 .home-split__main {
    flex: 1 1 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-split--aside-60 .home-split__aside {
    flex: 0 0 60%;
    padding: 8px 14px 2px 10px;
}

.home-split--aside-fixed {
    container-type: inline-size;
    --ticker-detail-pad-x: 12px;
    --ticker-detail-col: clamp(3.5rem, 22cqi, 5.5rem);
    --ticker-detail-gap: clamp(0.125rem, 3cqi, 0.65rem);
    --ticker-detail-inner: calc(2 * var(--ticker-detail-col) + var(--ticker-detail-gap));
    --ticker-detail-w: calc(var(--ticker-detail-inner) + 2 * var(--ticker-detail-pad-x));
}

.home-split--aside-fixed .home-split__main {
    flex: 1 1 auto;
    padding-right: 10px;
}

.home-split--aside-fixed .home-split__aside {
    flex: 0 0 var(--ticker-detail-w);
    width: var(--ticker-detail-w);
    min-width: var(--ticker-detail-w);
    max-width: var(--ticker-detail-w);
}

.home-panel__title {
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.03em;
    text-align: center;
    color: var(--home-text-dim);
}

.home-panel__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.home-tile__flare-top-head.home-panel__title {
    margin-bottom: 6px;
    line-height: 1.1;
}

.home-tile__storms-chart-head.home-panel__title {
    margin-bottom: 3px;
    line-height: 1.1;
}

.home-tile__activity-text {
    position: relative;
    z-index: 1;
    padding: 16px 18px 18px;
}

.home-tile__activity-vis {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* FI: <2.5 зелёный; [2.5,5) жёлтый; [5,7.5) оранжевый; ≥7.5 красный
   Ветер: <300 голубой; [300,500) зелёный; [500,600) жёлтый; [600,800) оранжевый; ≥800 красный */
.home-tile__activity-vis--cyan {
    background:
        radial-gradient(ellipse 80% 120% at 70% 100%, rgba(64, 196, 255, 0.34), transparent 55%),
        radial-gradient(ellipse 60% 90% at 20% 80%, rgba(80, 160, 255, 0.24), transparent 50%),
        linear-gradient(160deg, rgba(8, 28, 48, 0.92), rgba(0, 0, 0, 0.45));
}

.home-tile__activity-vis--calm {
    background:
        radial-gradient(ellipse 80% 120% at 70% 100%, rgba(0, 255, 120, 0.28), transparent 55%),
        radial-gradient(ellipse 60% 90% at 20% 80%, rgba(80, 200, 255, 0.22), transparent 50%),
        linear-gradient(160deg, rgba(10, 30, 50, 0.9), rgba(0, 0, 0, 0.4));
}

.home-tile__activity-vis--yellow {
    background:
        radial-gradient(ellipse 80% 120% at 70% 100%, rgba(255, 216, 0, 0.32), transparent 55%),
        radial-gradient(ellipse 60% 90% at 20% 80%, rgba(255, 200, 64, 0.22), transparent 50%),
        linear-gradient(160deg, rgba(36, 28, 8, 0.9), rgba(0, 0, 0, 0.4));
}

.home-tile__activity-vis--orange {
    background:
        radial-gradient(ellipse 80% 120% at 70% 100%, rgba(255, 128, 0, 0.34), transparent 55%),
        radial-gradient(ellipse 60% 90% at 20% 80%, rgba(255, 96, 32, 0.26), transparent 50%),
        linear-gradient(160deg, rgba(42, 18, 4, 0.92), rgba(0, 0, 0, 0.45));
}

.home-tile__activity-vis--flare {
    background:
        radial-gradient(ellipse 80% 120% at 70% 100%, rgba(255, 64, 48, 0.34), transparent 55%),
        radial-gradient(ellipse 60% 90% at 20% 80%, rgba(255, 128, 32, 0.26), transparent 50%),
        linear-gradient(160deg, rgba(48, 8, 8, 0.92), rgba(0, 0, 0, 0.45));
}

/* Вспышки: текст слева (50%) + топ-5 справа (50%) — пропорции через .home-split--aside-50 */

.home-tile__index-cap {
    position: relative;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 10px;
}

.home-tile__index-cap-label {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    margin-bottom: 2px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.03em;
    text-align: center;
    color: var(--home-text-dim);
    white-space: nowrap;
}

.home-tile__index-cap .home-tile__badge {
    margin-bottom: 0;
}

.home-tile__index-cap--aurora {
    position: absolute;
    top: 16px;
    left: 18px;
    z-index: 2;
    margin-bottom: 0;
    pointer-events: none;
}

.home-tile__flare-panel {
    padding: 0 2px;
}

.home-tile__flare-head,
.home-tile__flare-row {
    --flare-grid: minmax(1.75rem, 1fr) 0.85rem minmax(4.5rem, 2.2fr) 0.85rem minmax(1.75rem, 1fr);
    display: grid;
    grid-template-columns: var(--flare-grid);
    align-items: center;
    width: 100%;
    white-space: nowrap;
}

.home-tile__flare-head {
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--home-text-dim);
}

.home-tile__flare-h-class,
.home-tile__flare-h-area,
.home-tile__flare-h-time {
    text-align: center;
}

.home-tile__flare-row {
    font-size: 13px;
    line-height: 1.35;
}

.home-tile__flare-row + .home-tile__flare-row {
    margin-top: 3px;
}

.home-tile__flare-class {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.home-tile__flare-sep {
    color: rgba(255, 255, 255, 0.38);
    text-align: center;
    font-weight: 400;
}

.home-tile__flare-class--c {
    color: var(--home-yellow);
}

.home-tile__flare-class--m {
    color: var(--home-orange);
}

.home-tile__flare-time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 0 0.15rem;
}

.home-tile__flare-area {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

/* Магнитные бури: текст слева (~40%) + мини-график Kp справа (~60%) — .home-split--aside-60 */

.home-tile__kp-tag {
    white-space: nowrap;
}

.home-tile__link--storms .home-tile__title {
    white-space: normal;
}

.home-tile__link--storms .home-tile__status--kp {
    display: block;
    width: 100%;
    max-width: none;
    height: 6px;
    margin-bottom: 12px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
    overflow: hidden;
}

.home-tile__status--kp .home-tile__status-fill {
    display: block;
    height: 100%;
    min-width: 0;
    width: calc(var(--kp, 0) / 9 * 100%);
    border-radius: 2px;
    background: var(--home-green);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.28);
}

.home-tile__status--kp.home-tile__status--yellow .home-tile__status-fill {
    background: var(--home-yellow);
    box-shadow: 0 0 8px rgba(255, 216, 0, 0.32);
}

.home-tile__status--kp.home-tile__status--red .home-tile__status-fill {
    background: #ff3333;
    box-shadow: 0 0 8px rgba(255, 48, 48, 0.38);
}

.home-tile__storms-plot {
    display: grid;
    grid-template-columns: repeat(17, minmax(0, 1fr));
    grid-template-rows: auto auto;
    align-items: end;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.home-tile__storms-plot > :nth-child(1) { grid-column: 1; grid-row: 2; }
.home-tile__storms-plot > :nth-child(2) { grid-column: 2; grid-row: 1; }
.home-tile__storms-plot > :nth-child(3) { grid-column: 3; grid-row: 2; }
.home-tile__storms-plot > :nth-child(4) { grid-column: 4; grid-row: 1; }
.home-tile__storms-plot > :nth-child(5) { grid-column: 5; grid-row: 2; }
.home-tile__storms-plot > :nth-child(6) { grid-column: 6; grid-row: 1; }
.home-tile__storms-plot > :nth-child(7) { grid-column: 7; grid-row: 2; }
.home-tile__storms-plot > :nth-child(8) { grid-column: 8; grid-row: 1; }
.home-tile__storms-plot > :nth-child(9) { grid-column: 9; grid-row: 2; }
.home-tile__storms-plot > :nth-child(10) { grid-column: 10; grid-row: 1; }
.home-tile__storms-plot > :nth-child(11) { grid-column: 11; grid-row: 2; }
.home-tile__storms-plot > :nth-child(12) { grid-column: 12; grid-row: 1; }
.home-tile__storms-plot > :nth-child(13) { grid-column: 13; grid-row: 2; }
.home-tile__storms-plot > :nth-child(14) { grid-column: 14; grid-row: 1; }
.home-tile__storms-plot > :nth-child(15) { grid-column: 15; grid-row: 2; }
.home-tile__storms-plot > :nth-child(16) { grid-column: 16; grid-row: 1; }
.home-tile__storms-plot > :nth-child(17) { grid-column: 17; grid-row: 2; }

.home-tile__storms-tick {
    align-self: start;
    margin-top: 1px;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    text-align: center;
    color: var(--home-text-dim);
}

.home-tile__storms-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    height: 4.5rem;
    overflow: visible;
}

.home-tile__storms-bar-val {
    position: relative;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
}

.home-tile__storms-bar-track {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    width: 100%;
    min-height: 2.5rem;
    margin-top: 2px;
}

.home-tile__storms-bar-fill {
    width: 100%;
    max-width: 22px;
    margin: 0 auto;
    min-height: 3px;
    height: calc(var(--kp, 2) / 9 * 100%);
    border-radius: 2px 2px 0 0;
    background: var(--home-green);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.28);
}

.home-tile__storms-bar--yellow .home-tile__storms-bar-fill {
    background: var(--home-yellow);
    box-shadow: 0 0 8px rgba(255, 216, 0, 0.32);
}

.home-tile__storms-bar--red .home-tile__storms-bar-fill {
    background: #ff3333;
    box-shadow: 0 0 8px rgba(255, 48, 48, 0.38);
}

.home-tile__storms-bar--current .home-tile__storms-bar-val {
    color: #fff;
}

.home-tile__storms-now {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 22px;
    margin-bottom: 1px;
    pointer-events: none;
}

.home-tile__storms-now-label {
    font-size: 7px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

.home-tile__storms-now-line {
    display: block;
    width: 100%;
    height: 0;
    margin-top: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.45);
}

.home-tile__storms-chart-foot {
    width: 100%;
    max-width: 300px;
    margin-top: 2px;
    padding-top: 2px;
    padding-bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.03em;
    text-align: center;
    color: var(--home-text-dim);
}

.home-ticker {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--home-tabloid-gap);
}

.home-ticker__cell {
    position: relative;
    display: grid;
    align-items: stretch;
    min-height: 4.5rem;
    padding: 0;
    border-radius: 4px;
    border: 1px solid var(--home-tile-border);
    background: transparent;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.18s ease;
}

.home-ticker__cell-vis {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-ticker__cell-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
    padding: 15px 14px 17px;
}

.home-ticker__cell:hover {
    border-color: var(--home-tile-border-hover);
}

.home-ticker__cell.home-split {
    display: flex;
}

.home-ticker__label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--home-text-dim);
}

.home-ticker__value {
    display: block;
    margin-top: 5px;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.home-ticker__value small {
    font-size: 17px;
    font-weight: 600;
    color: var(--home-text-dim);
}

.home-ticker__meta {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--home-text-dim);
}

/* Kp на прогнозе: как столбики бурь — <4 зелёный; [4,5) жёлтый; ≥5 красный */
.home-ticker__kp--green {
    color: var(--home-green);
}

.home-ticker__kp--yellow {
    color: var(--home-yellow);
}

.home-ticker__kp--red {
    color: #ff3333;
}

/* Ticker: ветер + пятна + прогноз — пропорции через .home-split--aside-fixed */

.home-ticker__wind-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: baseline;
    column-gap: var(--ticker-detail-gap);
    width: 100%;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.3;
}

.home-ticker__wind-row + .home-ticker__wind-row {
    margin-top: 1px;
}

.home-ticker__wind-label {
    font-weight: 400;
    color: var(--home-text-dim);
    text-align: left;
}

.home-ticker__wind-value {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #fff;
    text-align: right;
}

.home-ticker__wind-value small {
    font-size: 0.92em;
    font-weight: 600;
    color: var(--home-text-dim);
}

.home-ticker__wind-value--bz-neg {
    color: #6ea8ff;
}

.home-ticker__spots-head,
.home-ticker__spots-row {
    --spots-pad: 0.55em;
    --spots-sep-col: 1.25rem;
    --spots-grid: minmax(0, 1fr) var(--spots-sep-col) minmax(0, 1.15fr) var(--spots-sep-col) minmax(0, 1fr);
    display: grid;
    grid-template-columns: var(--spots-grid);
    align-items: center;
    width: 100%;
    white-space: nowrap;
}

.home-ticker__spots-head {
    margin-bottom: 2px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--home-text-dim);
}

.home-ticker__spots-h-ar,
.home-ticker__spots-h-area {
    text-align: center;
}

.home-ticker__spots-h-mt {
    text-align: left;
    padding-left: var(--spots-pad);
}

.home-ticker__spots-row {
    font-size: 13px;
    line-height: 1.25;
}

.home-ticker__spots-row + .home-ticker__spots-row {
    margin-top: 1px;
}

.home-ticker__spots-ar {
    font-weight: 700;
    color: #fff;
    text-align: right;
    font-variant-numeric: tabular-nums;
    padding-right: var(--spots-pad);
}

.home-ticker__spots-sep {
    color: rgba(255, 255, 255, 0.38);
    text-align: center;
    font-weight: 400;
}

.home-ticker__spots-area {
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    color: var(--home-text-dim);
    text-align: center;
}

.home-ticker__spots-mt {
    font-weight: 700;
    text-align: left;
    padding-left: var(--spots-pad);
}

.home-ticker__spots-mt.mt-alpha {
    color: var(--home-green);
}

.home-ticker__spots-mt.mt-beta {
    color: #ffff66;
}

.home-ticker__spots-mt.mt-other {
    color: #ffa500;
}

.home-ticker__spots-mt.mt-red {
    color: #ff4444;
}

/* Прогноз бурь: вероятности — 2 дня × 3 столбика */

.home-ticker__forecast-days {
    display: flex;
    align-items: flex-end;
    gap: clamp(0.35rem, 3.5cqi, 0.85rem);
    width: 100%;
}

.home-ticker__forecast-day {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.home-ticker__forecast-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    height: 3.25rem;
}

.home-ticker__forecast-bar {
    flex: 1 1 0;
    min-width: 0;
    max-width: 1.375rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.home-ticker__forecast-bar-val {
    flex: 0 0 auto;
    font-size: 8px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
}

.home-ticker__forecast-bar-track {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    width: 100%;
    min-height: 1.35rem;
    margin-top: 2px;
}

.home-ticker__forecast-bar-fill {
    width: 100%;
    max-width: 18px;
    margin: 0 auto;
    min-height: 3px;
    height: max(3px, calc(var(--prob, 0) * 1%));
    border-radius: 2px 2px 0 0;
    background: var(--home-green);
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.24);
}

.home-ticker__forecast-bar--disturb .home-ticker__forecast-bar-fill {
    background: var(--home-yellow);
    box-shadow: 0 0 6px rgba(255, 216, 0, 0.28);
}

.home-ticker__forecast-bar--storm .home-ticker__forecast-bar-fill {
    background: #ff3333;
    box-shadow: 0 0 6px rgba(255, 48, 48, 0.32);
}

.home-ticker__forecast-day-line {
    display: block;
    width: 100%;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.home-ticker__forecast-day-label {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--home-text-dim);
}

.home-tri-row {
    --home-tri-gap: 12px;
    --home-tri-min-h: 19rem;
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--home-tri-gap);
    width: 100%;
}

.home-tri-row > .home-tile {
    flex: 1 1 0;
    min-width: 0;
}

.home-tile__link--thumb {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: var(--home-tri-min-h);
    padding: 0;
    overflow: hidden;
}

.home-tile__thumb-media {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    background: #000;
    overflow: hidden;
}

.home-tile__thumb-media img,
.home-tile__thumb-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.home-tile__thumb-media--aurora .home-tile__aurora-map img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: center;
}

.home-tile__thumb-video {
    pointer-events: none;
}

/* ENLIL 860×690 → видимая зона 860×530 (срез 160 px сверху), без растяжения */
.home-tile__thumb-media--enlil {
    --enlil-src-w: 860;
    --enlil-src-h: 690;
    --enlil-crop-top: 160;
    --enlil-view-h: 530;
    container-type: size;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.home-tile__thumb-media--enlil img {
    display: block;
    aspect-ratio: 860 / 530;
    width: min(100cqw, calc(100cqh * 860 / 530));
    height: auto;
    max-height: 100cqh;
    object-fit: cover;
    /* нижний край кадра = нижний край исходника → сверху скрыты 160 px */
    object-position: 50% 100%;
}

.home-tile__thumb-cap {
    flex: 0 0 auto;
    padding: 12px 16px 14px;
}

/* tri-row: медиа фиксированной пропорции; длинная подпись у одной плитки
   увеличивает высоту всего ряда, не отнимая место у картинок соседей */
.home-tri-row .home-tile__link--thumb {
    justify-content: flex-start;
}

.home-tri-row .home-tile__thumb-media {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 860 / 530;
}

.home-tile--aurora .home-tile__thumb-media--aurora {
    container-type: size;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* hero-row: перебивает flex: 1 1 0 у сияний (правило выше по специфичности/порядку) */
.home-hero-row .home-tile--aurora .home-tile__thumb-media--aurora {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.home-tile__aurora-map {
    --aurora-map-w: 1500;
    --aurora-map-h: 1500;
    --aurora-map-scale: 0.9;
    position: relative;
    flex: 0 0 auto;
    width: min(calc(100cqw * var(--aurora-map-scale)), calc(100cqh * var(--aurora-map-scale)));
    height: min(calc(100cqw * var(--aurora-map-scale)), calc(100cqh * var(--aurora-map-scale)));
    max-width: 90%;
    max-height: 90%;
    aspect-ratio: 1 / 1;
    line-height: 0;
}

.home-tile__aurora-map img {
    display: block;
}

/* Маски легенды: координаты от нижнего левого угла кадра 1500×1500 */
.home-tile__aurora-mask {
    position: absolute;
    left: 0;
    background: #000;
    pointer-events: none;
}

.home-tile__aurora-mask--legend {
    bottom: calc(0 / var(--aurora-map-h) * 100%);
    width: calc(460 / var(--aurora-map-w) * 100%);
    height: calc(70 / var(--aurora-map-h) * 100%);
}

.home-tile__aurora-mask--time {
    bottom: calc(90 / var(--aurora-map-h) * 100%);
    width: calc(340 / var(--aurora-map-w) * 100%);
    height: calc((130 - 90) / var(--aurora-map-h) * 100%);
}

/* Бейдж AI: <3 зелёный; [3,6) жёлтый; [6,8) оранжевый; [8,10) красный; ≥10 фиолетовый */
.home-tile__aurora-badge.home-tile__badge {
    min-width: 3.6rem;
    box-sizing: border-box;
    text-align: center;
}

.home-tile__badge--ai-green {
    color: #1a1a1a;
    background: var(--home-green);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.28);
}

.home-tile__badge--ai-yellow {
    color: #1a1a1a;
    background: var(--home-yellow);
    box-shadow: 0 0 10px rgba(255, 216, 0, 0.28);
}

.home-tile__badge--ai-orange {
    color: #1a1a1a;
    background: var(--home-orange);
    box-shadow: 0 0 10px rgba(255, 128, 0, 0.28);
}

.home-tile__badge--ai-red {
    color: #fff;
    background: #ff3333;
    box-shadow: 0 0 10px rgba(255, 48, 48, 0.35);
}

.home-tile__badge--ai-purple {
    color: #fff;
    background: rgb(156, 0, 156);
    box-shadow: 0 0 10px rgba(156, 0, 156, 0.4);
}

.home-tile--aurora,
.home-tile--enlil,
.home-tile--projects {
    border-color: var(--home-tile-border);
    background: rgba(255, 255, 255, 0.045);
}

/* Резерв высоты бывшей нижней полосы таблоида — граница контента не поднимается */
.home-content-tail {
    flex-shrink: 0;
    height: var(--home-content-tail);
    min-height: var(--home-content-tail);
}

/* Подвал окружения главной — часть страницы, в нижней зоне shell-pad */
.xras-home-footer {
    position: relative;
    flex-shrink: 0;
    margin: var(--home-footer-slot) 0 0;
    padding: 0;
    border: none;
    background: none;
}

.xras-home-footer__inner {
    box-sizing: border-box;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.xras-home-footer__legend {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: var(--home-footer-h);
    letter-spacing: normal;
    text-transform: none;
    color: rgba(255, 255, 255, 0.36);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 2.5em;
}

.xras-home-footer__strong {
    font-weight: 600;
    color: inherit;
}

.xras-home-footer__legend a.xras-home-footer__strong {
    text-decoration: none;
}

.xras-home-footer__legend a.xras-home-footer__strong:hover {
    color: rgba(255, 255, 255, 0.58);
}

@media (max-width: 991.98px) {
    .home-tile--storms {
        container-type: inline-size;
    }

    /* Узкая плитка: левая часть сверху, правая снизу */
    @container (max-width: 620px) {
        .home-split--stack {
            flex-direction: column;
        }

        .home-split--stack .home-split__main {
            flex: 0 0 auto;
            width: 100%;
            min-width: 0;
            padding-bottom: 12px;
        }

        .home-split--stack .home-split__aside {
            flex: 0 0 auto;
            width: 100%;
            min-width: 0;
            align-self: auto;
            border-left: none;
            border-top: 1px solid rgba(255, 255, 255, 0.12);
            padding: 10px 14px 12px;
        }

        .home-split--stack .home-split__aside--panel-narrow {
            max-width: var(--split-panel-max);
            align-self: flex-start;
            align-items: stretch;
            padding: 10px 14px 12px 16px;
            box-sizing: border-box;
        }

        .home-tile__flare-top .home-tile__flare-panel {
            width: 100%;
            max-width: 100%;
        }

        .home-split--stack .home-panel__title {
            text-align: left;
        }

        .home-tile__storms-plot,
        .home-tile__storms-chart-foot {
            width: 100%;
            max-width: 100%;
        }

        .home-tile__storms-chart-foot {
            text-align: left;
        }

        @container (max-width: 450px) {
            .home-split--stack .home-split__aside--panel-narrow {
                max-width: none;
                width: 100%;
            }
        }

        /* Вспышки: индекс слева, kicker + title справа в одном блоке */
        .home-tile__link--flare .home-split__main {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            column-gap: 12px;
            align-items: start;
        }

        .home-tile__link--flare .home-tile__index-cap {
            grid-column: 1;
            grid-row: 1 / 3;
            align-self: center;
            margin-bottom: 0;
        }

        .home-tile__link--flare .home-tile__kicker {
            grid-column: 2;
            grid-row: 1;
            margin-bottom: 4px;
        }

        .home-tile__link--flare .home-tile__title {
            grid-column: 2;
            grid-row: 2;
        }

        .home-tile__link--flare .home-tile__meta {
            grid-column: 1 / -1;
            grid-row: 3;
            margin-top: 8px;
        }

        .home-tile__flare-panel .home-tile__flare-row:nth-child(n + 5) {
            display: none;
        }
    }

    .home-tabloid {
        grid-template-columns: 1fr;
    }

    .home-hero-row > .home-tile--sun-corona {
        display: none;
    }

    /* 661–991: hero/tri-row tiles — width auto в одной строке */
    .home-hero-row > .home-tile,
    .home-tri-row > .home-tile {
        width: auto;
    }

    @media (max-width: 660px) {
        .home-hero-row {
            flex-direction: column;
        }

        .home-hero-row > .home-tile {
            flex: 0 0 auto;
            width: 100%;
        }

        .home-tri-row {
            flex-direction: column;
        }

        .home-tri-row > .home-tile {
            flex: 0 0 auto;
            width: 100%;
        }
    }

    .home-hero-row .home-tile__link--thumb,
    .home-hero-row .home-tile__link--hero,
    .home-tri-row .home-tile__link--thumb {
        height: auto;
        min-height: 0;
    }

    .home-tri-row .home-tile__thumb-media--enlil {
        flex: 0 0 auto;
        aspect-ratio: 860 / 530;
    }

    .home-tri-row .home-tile__thumb-media--enlil img {
        width: 100%;
        height: 100%;
        max-height: none;
        aspect-ratio: unset;
        object-fit: cover;
        object-position: 50% 100%;
    }

    .xras-home-footer__inner {
        padding-right: 0;
    }

    .xras-home-footer__legend {
        gap: 0.1em 1.5em;
        line-height: 1.15;
    }

    .home-ticker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .home-ticker__cell--forecast {
        grid-column: 1 / -1;
    }

    @media (max-width: 660px) {
        .home-ticker {
            grid-template-columns: 1fr;
        }

        .home-ticker__cell--forecast {
            grid-column: auto;
        }
    }

    .home-ticker__cell,
    .home-ticker__cell-text {
        min-height: 4rem;
    }

    .home-ticker__label {
        font-size: 14px;
    }

    .home-ticker__value {
        font-size: 24px;
    }

    .home-ticker__value small {
        font-size: 15px;
    }

    /* Ветер / пятна: узкий viewport — левая сводка на шаг мельче */
    @media (max-width: 349.98px) {
        .home-ticker__cell--wind .home-ticker__cell-text .home-ticker__label,
        .home-ticker__cell--spots .home-ticker__cell-text .home-ticker__label {
            font-size: 13px;
        }

        .home-ticker__cell--wind .home-ticker__cell-text .home-ticker__value,
        .home-ticker__cell--spots .home-ticker__cell-text .home-ticker__value {
            font-size: 22px;
        }

        .home-ticker__cell--wind .home-ticker__cell-text .home-ticker__value small,
        .home-ticker__cell--spots .home-ticker__cell-text .home-ticker__value small {
            font-size: 14px;
        }
    }

    /* Ветер: ещё шаг мельче на самых узких экранах */
    @media (max-width: 334.98px) {
        .home-ticker__cell--wind .home-ticker__cell-text .home-ticker__label {
            font-size: 12px;
        }

        .home-ticker__cell--wind .home-ticker__cell-text .home-ticker__value {
            font-size: 20px;
        }

        .home-ticker__cell--wind .home-ticker__cell-text .home-ticker__value small {
            font-size: 13px;
        }
    }
}
