/* ================================================================== */
/*  Guides & comparisons — hub (/en/guides/) and article pages         */
/*  Dark gradient header band (same palette as the site CTA banners),  */
/*  image cards, sticky TOC, reading progress, diagrams. Motion comes  */
/*  from js/article.js and is skipped under prefers-reduced-motion.    */
/* ================================================================== */

.art-page {
    background: var(--bg-soft);
    padding-bottom: 96px;          /* same as .about-page */
}

/* ---------- Header band ---------- */

.art-head {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.10), transparent 50%),
        radial-gradient(circle at 85% 90%, rgba(167, 243, 208, 0.12), transparent 55%),
        linear-gradient(135deg, var(--brand-fill) 0%, #0b1220 100%);
}
/* Same drifting line pattern as the CTA banners. */
.art-head::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("../../assets/images/graphics/cta-flow-bg.svg") center / cover no-repeat;
    opacity: 0.35;
    animation: cta-flow-drift 14s ease-in-out infinite alternate;
    -webkit-mask-image: linear-gradient(20deg, #000 0%, transparent 60%);
            mask-image: linear-gradient(20deg, #000 0%, transparent 60%);
}
/* Faint blueprint grid on the right. */
.art-head::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
            mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
}

.art-head__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 48px 24px 56px;
}
@media (min-width: 960px) {
    .art-head__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; padding: 72px 24px 80px; }
}
/* Article header shares the reading column's edges (TOC + text). */
.art-head:not(.art-head--hub) .art-head__inner { max-width: 1112px; }
.art-head__inner--hub { padding-bottom: 72px; }
@media (min-width: 960px) {
    .art-head__inner--hub { grid-template-columns: minmax(0, 760px); padding: 88px 24px 96px; }
}
.art-head__text > * { animation: art-rise 0.7s var(--ease-out) both; }
.art-head__text > :nth-child(2) { animation-delay: 60ms; }
.art-head__text > :nth-child(3) { animation-delay: 120ms; }
.art-head__text > :nth-child(4) { animation-delay: 180ms; }

.art-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    font-size: var(--fs-body-sm);
    color: var(--text-subtle-on-dark);
}
.art-crumbs a { color: var(--text-muted-on-dark); text-decoration: none; }
.art-crumbs a:hover { color: #fff; }

.art-head__eyebrow {
    margin: 0 0 14px;
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: var(--accent-amber);     /* same as .cm-hero__eyebrow / .sw-hero__eyebrow */
}
.art-head__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    font-size: var(--fs-body-sm);
    color: var(--text-muted-on-dark);
}
.art-head__title {
    margin: 0 0 18px;
    font-size: clamp(30px, 4.2vw, 48px);
    font-weight: var(--fw-semibold);
    line-height: 1.08;
    letter-spacing: var(--ls-display);
    text-wrap: balance;
    color: #fff;
}
.art-head__lead {
    margin: 0;
    max-width: 62ch;
    font-size: var(--fs-lead);
    line-height: var(--lh-loose);
    color: var(--text-muted-on-dark);
}
.art-head__byline {
    margin: 0;
    font-size: var(--fs-body-sm);
    color: var(--text-subtle-on-dark);
}
.art-head__byline a { color: inherit; text-decoration: none; }
.art-head__byline a:hover { text-decoration: underline; text-underline-offset: 3px; }

.art-head__media {
    margin: 0;
    animation: art-rise 0.9s 0.15s var(--ease-out) both;
}
.art-head__pic,
.art-head__pic img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-lg);
}
.art-head__pic {
    box-shadow: 0 34px 70px -18px rgba(0, 0, 0, 0.7), 0 14px 28px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.14);
    background: #f4f6f9;
}
/* Product shots on white: contain, on a light plate. */
.art-head__pic img[src*="/products/"],
.art-head__pic img[src*="/heroes/"] { object-fit: contain; padding: 24px; background: #f4f6f9; }

/* ---------- Chips ---------- */

.art-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.02em;
    background: var(--brand-50);
    color: var(--brand-600);
}
.art-chip--compare { background: #fdf3e6; color: #b45309; }
.art-chip--on-dark { background: rgba(255, 255, 255, 0.14); color: #fff; }
.art-chip--on-dark.art-chip--compare { background: rgba(253, 186, 116, 0.22); color: #fed7aa; }

/* ---------- Hub: filter + card grid ---------- */

.art-hub {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 56px 24px 0;
}
/* Type filter — underline tabs on a divider line (docs/blog-hub pattern).
   The label is for screen readers only. */
.art-filter {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    margin: 0 0 36px;
    padding-top: 28px;
    border-bottom: 1px solid var(--border-strong);
    overflow-x: auto;
    scrollbar-width: none;
}
.art-filter::-webkit-scrollbar { display: none; }
.art-filter[hidden] { display: none; }
.art-filter__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.art-filter__chip {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    margin: 0;
    padding: 10px 0 14px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 15px;
    font-weight: var(--fw-medium);
    color: var(--text-muted);
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out);
}
.art-filter__chip::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand-fill-500);
    transform: scaleX(0);
    transition: transform var(--dur-med) var(--ease-out);
}
.art-filter__chip:hover { color: var(--text); }
.art-filter__chip:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 4px; border-radius: 4px; }
.art-filter__chip[aria-pressed="true"] { color: var(--text); font-weight: var(--fw-semibold); }
.art-filter__chip[aria-pressed="true"]::after { transform: scaleX(1); }
.art-filter__n {
    font-size: 13px;
    font-weight: var(--fw-regular);
    color: var(--text-subtle);
}

.art-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}
@media (min-width: 640px) { .art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .art-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.art-grid > li { min-width: 0; }
.art-grid > li[hidden] { display: none; }

/* Card */
.art-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 0 0 1px var(--border);
    text-decoration: none;
    color: inherit;
    transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.art-card__link:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 3px; }
.art-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f4f6f9;
}
.art-card__pic,
.art-card__pic img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}
.art-card__pic img[src*="/products/"],
.art-card__pic img[src*="/heroes/"] { object-fit: contain; padding: 18px; }
.art-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    padding: 20px 22px 22px;
}
.art-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: var(--fs-caption);
    color: var(--text-subtle);
}
.art-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: var(--fw-semibold);
    line-height: 1.3;
    letter-spacing: var(--ls-tight);
    color: var(--text);
    transition: color var(--dur-fast) var(--ease-out);
}
.art-card__desc {
    margin: 0;
    font-size: var(--fs-body-sm);
    line-height: var(--lh-body);
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.art-card__more {
    margin-top: auto;
    padding-top: 6px;
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    color: var(--brand-500);
}
.art-card__more span { display: inline-block; transition: transform var(--dur-med) var(--ease-out); }

/* Featured / lead card: full width, image beside text. The server marks the
   first card featured; the filter script moves .is-lead to the first
   visible card. */
@media (min-width: 900px) {
    .art-grid--hub > .art-card--featured,
    .art-grid--hub > .is-lead { grid-column: 1 / -1; }
    .art-grid--hub > .art-card--featured .art-card__link,
    .art-grid--hub > .is-lead .art-card__link { flex-direction: row; }
    .art-grid--hub > .art-card--featured .art-card__media,
    .art-grid--hub > .is-lead .art-card__media { flex: 0 0 52%; aspect-ratio: 4 / 3; align-self: center; }
    .art-grid--hub > .art-card--featured .art-card__body,
    .art-grid--hub > .is-lead .art-card__body { justify-content: center; padding: 36px 40px; gap: 14px; }
    .art-grid--hub > .art-card--featured .art-card__title,
    .art-grid--hub > .is-lead .art-card__title { font-size: 26px; line-height: 1.2; }
    /* Once the filter has run, only the lead card is wide. */
    .art-grid--hub.is-filtered > .art-card--featured:not(.is-lead) { grid-column: auto; }
    .art-grid--hub.is-filtered > .art-card--featured:not(.is-lead) .art-card__link { flex-direction: column; }
    .art-grid--hub.is-filtered > .art-card--featured:not(.is-lead) .art-card__media { flex: none; aspect-ratio: 4 / 3; align-self: auto; }
    .art-grid--hub.is-filtered > .art-card--featured:not(.is-lead) .art-card__body { padding: 20px 22px 22px; gap: 10px; justify-content: flex-start; }
    .art-grid--hub.is-filtered > .art-card--featured:not(.is-lead) .art-card__title { font-size: 18px; }
}

/* Filter change: cards pop back in. */
.art-grid > li.is-pop { animation: art-pop 0.45s var(--ease-out) both; }

/* ---------- Photo placeholder (branded artwork) ---------- */

.art-ph {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
    background:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 24px 24px,
        radial-gradient(circle at 30% 20%, rgba(90, 127, 209, 0.55), transparent 60%),
        linear-gradient(135deg, var(--brand-fill-600), #0b1220);
}
.art-ph__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.04);
}
.art-ph__label {
    font-size: 11px;
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

/* ---------- Article: layout ---------- */

.art-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    max-width: 1112px;             /* TOC 240 + gap 64 + text 760 + gutters; header matches */
    margin: 0 auto;
    padding: 48px 24px 0;
}
@media (min-width: 1080px) {
    .art-shell { grid-template-columns: 240px minmax(0, 760px); justify-content: center; gap: 64px; padding-top: 64px; }
}
.art-main { min-width: 0; }

.art-side { display: none; }
@media (min-width: 1080px) {
    .art-side {
        display: block;
        position: sticky;
        top: 96px;
        align-self: start;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}

/* Sticky TOC with an indicator line on the active item. */
.art-toc__title,
.art-toc-m summary {
    margin: 0 0 12px;
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: var(--text-subtle);
}
.art-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 2px solid var(--deploy-guide);
}
.art-toc li { margin: 0; }
.art-toc a {
    display: block;
    margin-left: -2px;
    padding: 7px 0 7px 14px;
    border-left: 2px solid transparent;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.art-toc a:hover { color: var(--text); }
.art-toc a.is-active { color: var(--brand-500); border-left-color: var(--brand-500); font-weight: var(--fw-medium); }
.art-side__back {
    display: inline-block;
    margin-top: 24px;
    font-size: var(--fs-body-sm);
    color: var(--brand-500);
    text-decoration: none;
}
.art-side__back:hover { text-decoration: underline; }

/* Mobile contents */
.art-toc-m {
    margin: 0 0 36px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 1px var(--border);
}
.art-toc-m summary { margin: 0; cursor: pointer; }
.art-toc-m ol { margin: 12px 0 0; padding-left: 20px; list-style: decimal; }
.art-toc-m li { margin: 0 0 8px; font-size: var(--fs-body-sm); }
.art-toc-m a { color: var(--brand-500); text-decoration: none; }
@media (min-width: 1080px) { .art-toc-m { display: none; } }

/* "In short" summary */
.art-summary {
    position: relative;
    margin: 0 0 32px;
    padding: 22px 24px 22px 26px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 1px var(--border);
    overflow: hidden;
}
.art-summary::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--brand-fill), var(--brand-fill-500));
}
.art-summary__label {
    margin: 0 0 6px;
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: var(--brand-500);
}
.art-summary p:last-child {
    margin: 0;
    font-size: var(--fs-lead);
    line-height: var(--lh-loose);
    color: var(--text);
}

/* ---------- Article: body copy ---------- */

.art-body > h2,
.art-faq > h2 {
    margin: 48px 0 14px;
    font-size: clamp(21px, 2vw, 25px);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-heading);
    color: var(--text);
    scroll-margin-top: 96px;
}
.art-body > h2:first-child { margin-top: 0; }
.art-body h3 {
    margin: 28px 0 10px;
    font-size: 18px;
    font-weight: var(--fw-semibold);
    line-height: var(--lh-heading);
    color: var(--text);
}
.art-body p,
.art-body li {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-body);
}
.art-body p { margin: 0 0 16px; }
.art-body strong { color: var(--text); font-weight: var(--fw-semibold); }
.art-body a {
    color: var(--brand-500);
    text-decoration: underline;
    text-decoration-color: rgba(26, 75, 181, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--dur-fast);
}
.art-body a:hover { text-decoration-color: currentColor; }
.art-body ul,
.art-body ol { margin: 0 0 18px; padding-left: 24px; }
.art-body ul { list-style: disc; }
.art-body ol { list-style: decimal; }
.art-body li { margin: 0 0 8px; }
.art-body li::marker { color: var(--brand-300); }
.art-body code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 1px 5px;
    border-radius: var(--radius-xs);
    background: var(--surface);
}

/* Callout */
.art-note {
    position: relative;
    margin: 24px 0;
    padding: 18px 20px 18px 56px;
    border-radius: var(--radius-md);
    background: var(--brand-50);
}
.art-note::before {
    content: "i";
    position: absolute;
    left: 18px;
    top: 18px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand-fill-500);
    color: #fff;
    font: 700 13px/1 Georgia, serif;
}
.art-note p { margin: 0; color: var(--text); }

/* Tables: card, zebra rows, sideways scroll on phones. */
.art-table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 12px 0 28px;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 1px var(--border);
    font-size: var(--fs-body-sm);
    line-height: var(--lh-snug);
}
.art-table th,
.art-table td {
    padding: 12px 14px;
    text-align: start;
    vertical-align: top;
    color: var(--text-muted);
    min-width: 130px;
    border-bottom: 1px solid var(--deploy-guide);
}
.art-table tbody tr:nth-child(even) td,
.art-table tbody tr:nth-child(even) th { background: var(--bg-soft); }
.art-table tbody tr:last-child td,
.art-table tbody tr:last-child th { border-bottom: 0; }
.art-table thead th {
    color: var(--text);
    font-weight: var(--fw-semibold);
    background: var(--bg-soft);
    white-space: nowrap;
}

/* Product / app shot in "How SHM360 helps" */
.art-shot { margin: 24px 0 28px; }
.art-shot__pic,
.art-shot__pic img {
    display: block;
    width: 100%;
    border-radius: var(--radius-md);
}
.art-shot__pic {
    overflow: hidden;
    background: #f4f6f9;
    box-shadow: 0 20px 40px -24px rgba(4, 44, 113, 0.4), 0 0 0 1px var(--border);
}
/* Screenshots show whole, never cropped (owner). Product shots sit on a padded 16:9 plate. */
.art-shot__pic img { height: auto; }
.art-shot__pic img[src*="/products/"] { aspect-ratio: 16 / 9; object-fit: contain; padding: 24px; }
/* App screenshots already framed in a device: whole image, no plate behind it. */
.art-shot__pic img[src*="-device_"] { aspect-ratio: auto; object-fit: initial; border-radius: 0; }
/* Full app screenshots: whole image, on the usual plate. */
.art-shot__pic img[src*="-full_"] { aspect-ratio: auto; object-fit: initial; }
.art-shot__pic:has(img[src*="-device_"]) { background: none; box-shadow: none; border-radius: 0; }
.art-shot figcaption,
.art-fig figcaption {
    margin-top: 10px;
    font-size: var(--fs-caption);
    line-height: var(--lh-body);
    color: var(--text-subtle);
}

/* FAQ accordion with animated chevron */
.art-faq { margin-top: 48px; }
.art-faq__item {
    margin: 0 0 10px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 1px var(--border);
    transition: box-shadow var(--dur-fast) var(--ease-out);
}
.art-faq__item[open] { box-shadow: 0 0 0 1px var(--brand-300); }
.art-faq__item summary {
    position: relative;
    list-style: none;
    padding: 16px 48px 16px 18px;
    cursor: pointer;
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    color: var(--text);
}
.art-faq__item summary::-webkit-details-marker { display: none; }
.art-faq__item summary::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--brand-500);
    border-bottom: 2px solid var(--brand-500);
    transform: translateY(-70%) rotate(45deg);
    transition: transform var(--dur-med) var(--ease-out);
}
.art-faq__item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.art-faq__item p {
    margin: 0;
    padding: 0 18px 18px;
    line-height: var(--lh-loose);
    color: var(--text-muted);
}

.art-disclaimer {
    margin: 32px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--deploy-guide);
    font-size: var(--fs-caption);
    color: var(--text-subtle);
}

/* Related reading */
.art-related {
    max-width: var(--container-max);
    margin: 96px auto 0;
    padding: 0 24px;
}
.art-related__title {
    margin: 0 0 24px;
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-heading);
    color: var(--text);
}
.art-related .art-card__title { font-size: 17px; }

/* Closing CTA: identical banner to the rest of the site (.ab-cta + the shared
   rules in base.css); only the gap above it is set here, matching the 96px
   that .ab-pillars leaves on the other pages. */
.art-cta { margin-top: 96px; }

/* "Related guides" band on product pages */
.art-related__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 32px;
    margin: 0 0 32px;
}
.art-related__eyebrow {
    margin: 0 0 10px;
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: var(--accent-amber);
}
.art-related--product .art-related__title { margin-bottom: 10px; font-size: var(--fs-h1); }
.art-related__lead {
    margin: 0;
    max-width: 60ch;
    font-size: var(--fs-lead);
    line-height: var(--lh-loose);
    color: var(--text-muted);
}
/* RU/KK lead is longer than EN/AR — drop the measure so it stays on one line on desktop. */
:lang(ru) .art-related__lead,
:lang(kk) .art-related__lead { max-width: none; }
.art-related__all {
    flex: none;
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    color: var(--brand-500);
    text-decoration: none;
    white-space: nowrap;
}
.art-related__all span { display: inline-block; transition: transform var(--dur-med) var(--ease-out); }
.art-related__all:hover span { transform: translateX(4px); }

/* ---------- Diagrams (inline SVG) ---------- */

.art-fig {
    margin: 24px 0 32px;
    padding: 20px 20px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 1px var(--border);
}
.fg { display: block; width: 100%; height: auto; font-family: var(--font-sans); }
.fg-t { font-size: 14px; fill: var(--text); }
.fg-small { font-size: 12.5px; }
.fg-strong { font-weight: 600; }
.fg-muted { fill: var(--text-subtle); }
.fg-brand { fill: var(--brand-500); }
.fg-alt { fill: var(--accent-amber); }
.fg-accent { fill: #b91c1c; }
.fg-axis { stroke: var(--text-subtle); stroke-width: 1.5; }
.fg-guide { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 4; }
.fg-limit { stroke: #b91c1c; stroke-width: 1.5; stroke-dasharray: 7 5; }
.fg-line { fill: none; stroke: var(--brand-500); stroke-width: 3; stroke-linecap: round; }
.fg-line2 { fill: none; stroke: var(--accent-amber); stroke-width: 3; stroke-linecap: round; }
.fg-fill { fill: var(--brand-50); }
.fg-dot { fill: var(--brand-500); }
.fg-dot--brand { fill: var(--brand-500); }
.fg-dot--alt { fill: var(--accent-amber); }
.fg-dot--muted { fill: var(--text-subtle); }
.fg-dim { stroke: var(--text); stroke-width: 1.2; }
.fg-arrow { stroke: var(--text-subtle); stroke-width: 1.5; }
.fg-ahead { fill: var(--text-subtle); }
.fg-box { fill: var(--brand-50); stroke: var(--brand-300); stroke-width: 1.2; }
.fg-box--alt { fill: #fdf3e6; stroke: var(--accent-amber-soft); }
.fg-window { fill: var(--brand-50); }
.fg-ground { fill: #e7e2d8; }
.fg-concrete { fill: #d9dde3; stroke: #b7bec8; stroke-width: 1; }
.fg-new { fill: #eceff3; stroke: #b7bec8; stroke-width: 1; stroke-dasharray: 5 4; }
.fg-bar { stroke: var(--brand-600); stroke-width: 5; stroke-linecap: round; }
.fg-bar--old { stroke: #7a8496; }

/* Draw-in: js/article.js sets the curve dash values; the rest fades in. */
.fg-anim .fg-fill,
.fg-anim circle,
.fg-anim .fg-box,
.fg-anim .fg-arrow,
.fg-anim .fg-bar,
.fg-anim .fg-dim,
.fg-anim text {
    opacity: 0;
    transition: opacity 0.6s var(--ease-out);
}
.fg-anim.is-drawn .fg-fill { opacity: 1; transition-delay: 0.6s; }
.fg-anim.is-drawn text { opacity: 1; transition-delay: 0.3s; }
.fg-anim.is-drawn .fg-box,
.fg-anim.is-drawn .fg-arrow,
.fg-anim.is-drawn .fg-bar,
.fg-anim.is-drawn .fg-dim { opacity: 1; }
.fg-anim.is-drawn circle { opacity: 1; transition-delay: 0.9s; }

/* ---------- Scroll reveal (only once js/article.js has run) ---------- */

html.art-anim .art-body > h2,
html.art-anim .art-fig,
html.art-anim .art-shot,
html.art-anim .art-table,
html.art-anim .art-note,
html.art-anim .art-faq,
html.art-anim .art-grid > li,
html.art-anim .art-summary {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
html.art-anim .is-in {
    opacity: 1 !important;
    transform: none !important;
}

@keyframes art-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
@keyframes art-pop {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}
@keyframes cta-flow-drift {
    from { transform: translateX(-3%) scale(1); }
    to   { transform: translateX(3%) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    .art-head::before,
    .art-head__text > *,
    .art-head__media,
    .art-grid > li.is-pop { animation: none; }
    .art-card__link,
    .art-card__pic img { transition: none; }
}

/* ---------- Phones ---------- */

@media (max-width: 600px) {
    .art-head__inner { padding: 32px 16px 40px; gap: 24px; }
    .art-hub, .art-related, .art-shell { padding-left: 16px; padding-right: 16px; }
    .art-shell { padding-top: 32px; }
    .art-body p, .art-body li { font-size: 16px; }
    /* Diagrams keep readable text: they scroll sideways inside their card. */
    .art-fig { overflow-x: auto; padding: 14px 14px 10px; }
    .fg { min-width: 540px; }
}

/* Product pages: the band is followed directly by the closing banner. */
.art-related--product { margin-bottom: 96px; }

/* Image figures (photos, recorded charts) — same card as the SVG diagrams. */
.art-fig--img img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}
/* Wide charts: keep axis labels readable on phones — scroll inside the card. */
@media (max-width: 600px) {
    .art-fig--wide { overflow-x: auto; }
    .art-fig--wide img { min-width: 640px; }
}

/* ---------- Image zoom (lightbox, js/article.js) ---------- */
.art-zoomable { cursor: zoom-in; }
.art-zoomable:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 3px; }
/* Magnifier hint in the corner of zoomable figures */
.art-zoom-host { position: relative; }
.art-zoom-host::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(11, 18, 32, 0.55) url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22white%22 stroke-width=%222%22 stroke-linecap=%22round%22%3E%3Ccircle cx=%2211%22 cy=%2211%22 r=%226%22/%3E%3Cpath d=%22M20 20l-4.5-4.5M11 8.5v5M8.5 11h5%22/%3E%3C/svg%3E") center / 18px no-repeat;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity var(--dur-fast) var(--ease-out);
}
.art-zoom-host:hover::after { opacity: 1; }
[dir="rtl"] .art-zoom-host::after { right: auto; left: 12px; }

html.art-zoom-lock,
html.art-zoom-lock body { overflow: hidden; }

.art-zoom {
    touch-action: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: rgba(8, 13, 24, 0.94);
    opacity: 0;
    transition: opacity 0.18s var(--ease-out);
}
.art-zoom[hidden] { display: none; }
.art-zoom.is-open { opacity: 1; }
.art-zoom__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
}
.art-zoom__close:hover { background: rgba(255, 255, 255, 0.26); }
.art-zoom__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
[dir="rtl"] .art-zoom__close { right: auto; left: 12px; }

/* Fit mode: image contained in the screen. Actual-size mode: natural size,
   pan by scrolling / dragging the stage. */
.art-zoom__stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 64px 16px 12px;
    overflow: hidden;
    touch-action: none;             /* gestures zoom the image, never the page */
}
.art-zoom__img,
.art-zoom__svg {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 6px;
    background: #fff;
    cursor: zoom-in;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.art-zoom__svg { width: min(1200px, 100%); padding: 16px; }
.art-zoom__img,
.art-zoom__svg { transform-origin: 0 0; will-change: transform; user-select: none; -webkit-user-drag: none; }
.art-zoom.is-zoomed .art-zoom__img,
.art-zoom.is-zoomed .art-zoom__svg { cursor: grab; }
.art-zoom.is-zoomed .art-zoom__img:active,
.art-zoom.is-zoomed .art-zoom__svg:active { cursor: grabbing; }
.art-zoom__caption {
    margin: 0 auto;
    max-width: 900px;
    padding: 10px 20px 20px;
    font-size: var(--fs-body-sm);
    line-height: var(--lh-body);
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
}
.art-zoom__caption[hidden] { display: none; }
.art-zoom__caption strong { color: #fff; }
@media (prefers-reduced-motion: reduce) { .art-zoom { transition: none; } }

/* ---------- Site checklist card (numbered steps with check badges) ---------- */
.art-checklist {
    margin: 8px 0 28px;
    padding: 8px 24px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 1px var(--border);
}
.art-checklist h3 {
    margin: 22px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--deploy-guide);
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: var(--brand-500);
}
.art-body .art-checklist > ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: chk;
}
.art-body .art-checklist > ol > li {
    position: relative;
    counter-increment: chk;
    padding-left: 40px;
    margin: 0 0 12px;
}
.art-body .art-checklist > ol > li::before {
    content: counter(chk);
    position: absolute;
    left: 0;
    top: 1px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-600);
    font-size: 13px;
    font-weight: var(--fw-semibold);
}
.art-body .art-checklist > ol > li > ul { margin: 6px 0 6px; }
[dir="rtl"] .art-body .art-checklist > ol > li { padding-left: 0; padding-right: 40px; }
[dir="rtl"] .art-body .art-checklist > ol > li::before { left: auto; right: 0; }
@media (max-width: 600px) { .art-checklist { padding: 4px 16px 14px; } }

/* Card hover lift only on devices that really hover: on touch screens a tap
   would otherwise leave the card stuck in its hover state. */
@media (hover: hover) and (pointer: fine) {
    .art-card__link:hover {
        transform: translateY(-4px);
        box-shadow: 0 22px 40px -18px rgba(4, 44, 113, 0.35), 0 0 0 1px var(--brand-300);
    }
    .art-card__link:hover .art-card__pic img,
    .art-card__link:hover .art-card__pic.art-ph { transform: scale(1.05); }
    .art-card__link:hover .art-card__title { color: var(--brand-500); }
    .art-card__link:hover .art-card__more span { transform: translateX(4px); }
}
