/* ==========================================================================
   Page family: custom pages, resources, news listing + article, 404.
   Builds on the tokens and primitives in main.css (.page-hero, .cta-band,
   .eyebrow, .chip, .btn, .markdown-body). Tokens only: no new hex values.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared editorial bits
   -------------------------------------------------------------------------- */

.news-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
    flex-shrink: 0;
}

/* Brand fallback for stories with no picture: navy, a teal glow and an
   orange glow (the signature rule's two ends), the faint street grid of the
   route-map motif, and the infinity mark. */
.news-fallback {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(70% 90% at 8% 100%, rgba(var(--teal-rgb), 0.62), transparent 70%),
        radial-gradient(60% 80% at 100% 0%, rgba(var(--accent-rgb), 0.5), transparent 70%),
        var(--navy);
    isolation: isolate;
}
.news-fallback::before {
    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: 44px 44px;
    -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000 30%, transparent 100%);
    mask-image: radial-gradient(80% 80% at 50% 50%, #000 30%, transparent 100%);
}
.news-fallback::after {
    content: '';
    position: absolute;
    left: -10%;
    right: -10%;
    top: 58%;
    height: 2px;
    z-index: -1;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35) 30%, rgba(255, 255, 255, 0.35) 70%, transparent);
    transform: rotate(-14deg);
}
.news-mark {
    font-family: var(--font-display);
    font-size: clamp(3.4rem, 2.4rem + 3vw, 5.2rem);
    font-weight: 500;
    line-height: 1;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 10px 40px rgba(var(--navy-deep-rgb), 0.5);
    transition: transform var(--t-med);
}
/* Vary the glows so a grid of picture-less stories doesn't repeat itself */
.news-card:nth-child(3n+2) .news-fallback {
    background:
        radial-gradient(70% 90% at 100% 100%, rgba(var(--accent-rgb), 0.52), transparent 70%),
        radial-gradient(70% 80% at 0% 0%, rgba(var(--teal-rgb), 0.6), transparent 70%),
        var(--navy);
}
.news-card:nth-child(3n+3) .news-fallback {
    background:
        radial-gradient(90% 70% at 50% 110%, rgba(var(--teal-rgb), 0.7), transparent 70%),
        radial-gradient(40% 50% at 85% 15%, rgba(var(--accent-rgb), 0.45), transparent 70%),
        var(--navy-deep);
}
.news-card:nth-child(3n+2) .news-fallback::after { transform: rotate(11deg); top: 44%; }
.news-card:nth-child(3n+3) .news-fallback::after { transform: rotate(-4deg); top: 66%; }

/* Empty states (resources + news) */
.res-empty,
.news-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(48px, 6vw, 72px) clamp(24px, 4vw, 48px);
    border-radius: var(--r-xl);
    background: var(--white);
    border: 1px dashed var(--line-strong);
    text-align: center;
}
.res-empty__icon,
.news-empty__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: var(--teal-tint);
    color: var(--teal);
}
.res-empty__title,
.news-empty__title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--ink-strong);
}
.res-empty__text,
.news-empty__text { max-width: 46ch; color: var(--muted); }
.res-empty .btn,
.news-empty .btn { margin-top: 14px; }

/* --------------------------------------------------------------------------
   Custom pages (page.html)
   -------------------------------------------------------------------------- */

.doc { padding: clamp(56px, 7vw, 104px) 0 0; background: var(--white); }
.doc__layout { max-width: 72ch; }
.doc__layout--toc {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 72ch) minmax(200px, 250px);
    justify-content: space-between;
    gap: clamp(48px, 7vw, 120px);
    align-items: start;
}

.doc__body { font-size: 1.125rem; line-height: 1.78; }
.doc__body > * + * { margin-top: 1.15em; }
.doc__body h2 {
    font-size: clamp(1.55rem, 1.25rem + 1vw, 2.1rem);
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-top: 2.1em;
    padding-top: 1.1em;
    border-top: 1px solid var(--line);
    scroll-margin-top: calc(var(--nav-h) + 24px);
}
.doc__body > h2:first-child { padding-top: 0; border-top: 0; }
.doc__body h3 { font-size: 1.3rem; margin-top: 1.9em; scroll-margin-top: calc(var(--nav-h) + 24px); }
.doc__body h2 + *, .doc__body h3 + * { margin-top: 0.7em; }
.doc__body li { padding-left: 0.25em; }
.doc__body ol li::marker { color: var(--teal); font-family: var(--font-display); font-weight: 600; }
.doc__body blockquote {
    padding: 24px 28px;
    border-left: 0;
    border-radius: var(--r-lg);
    background: var(--teal-tint);
    font-size: 1.15rem;
    line-height: 1.55;
    font-weight: 500;
    color: var(--ink-strong);
}
.doc__body blockquote p + p { margin-top: 0.6em; }
.doc__body table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    font-size: 0.975rem;
}
.doc__body th { background: var(--surface); font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.04em; }
.doc__body th, .doc__body td { padding: 14px 18px; }
.doc__body tr:last-child td { border-bottom: 0; }

.doc__toc {
    position: sticky;
    top: calc(var(--nav-h) + 40px);
    padding-top: 6px;
}
.doc__toc[hidden] { display: none; }
.doc__toc-title {
    margin-bottom: 14px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--teal);
}
.doc__toc-list { border-left: 1px solid var(--line); }
.doc__toc-list a {
    display: block;
    margin-left: -1px;
    padding: 7px 0 7px 18px;
    border-left: 2px solid transparent;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--muted);
    transition: color var(--t-fast), border-color var(--t-fast);
}
.doc__toc-list a:hover { color: var(--ink-strong); }
.doc__toc-list a.is-active { color: var(--ink-strong); font-weight: 600; border-left-color: var(--accent); }

/* --------------------------------------------------------------------------
   Resources library
   -------------------------------------------------------------------------- */

.res-search {
    position: relative;
    max-width: 640px;
    margin-top: 40px;
}
.res-search__icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}
.res-search__input {
    width: 100%;
    height: 64px;
    padding: 0 76px 0 60px;
    border: 0;
    border-radius: var(--r-pill);
    background: var(--white);
    color: var(--ink-strong);
    font-size: 1.0625rem;
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: box-shadow var(--t-fast);
    -webkit-appearance: none;
    appearance: none;
}
.res-search__input::placeholder { color: var(--subtle); }
.res-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.res-search__input:focus { outline: none; box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(var(--teal-rgb), 0.55); }
.res-search__count {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: var(--r-pill);
    background: var(--surface);
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink-strong);
    pointer-events: none;
}

.res-page { padding: clamp(56px, 7vw, 104px) 0 var(--section-pad); background: var(--surface); }
.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.res-card { height: 100%; }
.res-card__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: clamp(24px, 2.4vw, 32px);
    border-radius: var(--r-lg);
    background: var(--white);
    border: 1px solid var(--line);
    transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.res-card__inner:hover { transform: translateY(-5px); box-shadow: var(--shadow-3); border-color: transparent; }
.res-card__inner:focus-within { box-shadow: 0 0 0 3px rgba(var(--teal-rgb), 0.35); }
.res-card__top { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.res-badge {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 16px;
    background: var(--surface);
    color: var(--ink);
    transition: transform var(--t-med);
}
.res-card__inner:hover .res-badge { transform: rotate(-6deg) scale(1.04); }
.res-badge--pdf, .res-badge--slides { background: var(--coral-tint); color: var(--accent-hover); }
.res-badge--doc, .res-badge--sheet { background: var(--teal-tint); color: var(--teal); }
.res-badge--image { background: var(--navy); color: var(--teal-bright); }
.res-card__type { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.res-card__kind { font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; color: var(--ink-strong); }
.res-card__size { font-size: 0.8125rem; color: var(--muted); }
.res-card__title {
    font-size: clamp(1.2rem, 1.1rem + 0.35vw, 1.4rem);
    letter-spacing: -0.02em;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.res-card__link { color: inherit; }
.res-card__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.res-card__link:focus-visible { outline: none; }
.res-card__desc { margin-top: 12px; font-size: var(--fs-small); line-height: 1.6; color: var(--muted); }
.res-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.res-card__tag { font-size: 0.75rem; padding: 5px 11px; }
.res-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 26px;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--navy);
    transition: color var(--t-fast);
}
.res-card__cta svg { transition: transform var(--t-fast); }
.res-card__inner:hover .res-card__cta { color: var(--accent); }
.res-card__inner:hover .res-card__cta svg { transform: translate(2px, -2px); }
#noResults { margin-top: 8px; }

/* --------------------------------------------------------------------------
   News listing
   -------------------------------------------------------------------------- */

.news-list { padding: clamp(40px, 5vw, 72px) 0 0; background: var(--white); }
.news-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: clamp(32px, 4vw, 48px);
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}
.news-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.news-filters::-webkit-scrollbar { display: none; }
.news-filter {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    height: 42px;
    padding: 0 18px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line-strong);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.news-filter:hover { border-color: var(--navy); color: var(--navy); }
.news-filter--active,
.news-filter--active:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.news-toolbar__count { flex-shrink: 0; font-size: var(--fs-small); color: var(--muted); }

/* Page-1 billboard */
.news-featured-wrap { margin-bottom: clamp(28px, 3vw, 40px); }
.news-featured {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    min-height: clamp(420px, 38vw, 540px);
    border-radius: var(--r-xl);
    background: var(--navy);
    color: rgba(255, 255, 255, 0.76);
    overflow: hidden;
    isolation: isolate;
    transition: transform var(--t-med), box-shadow var(--t-med);
}
.news-featured:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); }
.news-featured::after {
    content: '';
    position: absolute;
    right: -160px;
    bottom: -200px;
    z-index: -1;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--teal-rgb), 0.35), transparent 70%);
    pointer-events: none;
}
.news-featured__media { position: relative; overflow: hidden; min-height: 280px; }
.news-featured__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease-out);
}
.news-featured:hover .news-featured__media img { transform: scale(1.04); }
.news-featured:hover .news-mark { transform: scale(1.06); }
.news-featured .news-mark { font-size: clamp(5rem, 3rem + 6vw, 9rem); }
.news-featured__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: clamp(32px, 4.4vw, 64px);
}
.news-featured__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.news-featured__latest {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--white);
}
.news-featured__cat {
    padding: 5px 12px;
    border-radius: var(--r-pill);
    background: rgba(var(--teal-rgb), 0.3);
    color: var(--teal-bright);
    font-size: 0.8125rem;
    font-weight: 500;
}
.news-featured__title {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 1.2rem + 2vw, 3rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: var(--tracking-display);
    color: var(--white);
    text-wrap: balance;
}
.news-featured__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.74);
}
.news-featured__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    margin-top: 8px;
    padding-top: 22px;
    border-top: 1px solid var(--navy-line);
}
.news-featured__meta { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.6); }
.news-featured__more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--white); transition: color var(--t-fast); }
.news-featured__more .news-arrow { transition: transform var(--t-fast); }
.news-featured:hover .news-featured__more { color: var(--accent-bright); }
.news-featured:hover .news-featured__more .news-arrow { transform: translateX(4px); }

/* Card grid (also used by "More news" on article pages) */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; }
.news-card { height: 100%; }
.news-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--r-lg);
    background: var(--surface);
    overflow: hidden;
    transition: transform var(--t-med), box-shadow var(--t-med), background var(--t-med);
}
.news-card__link:hover { transform: translateY(-6px); background: var(--white); box-shadow: var(--shadow-3); }
.news-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.news-card__link:hover .news-card__media img { transform: scale(1.05); }
.news-card__link:hover .news-mark { transform: scale(1.08); }
.news-card .news-cat,
.news-card__media .news-cat {
    position: absolute;
    left: 14px;
    top: 14px;
    padding: 6px 12px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.news-card__body { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 24px 26px 28px; }
.news-card__meta { display: flex; align-items: center; gap: 9px; font-size: 0.8125rem; color: var(--muted); }
.news-card__title {
    font-size: clamp(1.2rem, 1.1rem + 0.35vw, 1.4rem);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.02em;
    transition: color var(--t-fast);
}
.news-card__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: var(--fs-small);
    line-height: 1.6;
    color: var(--muted);
}
.news-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--navy);
    transition: color var(--t-fast);
}
.news-card__more .news-arrow { transition: transform var(--t-fast); }
.news-card__link:hover .news-card__more { color: var(--accent); }
.news-card__link:hover .news-card__more .news-arrow { transform: translateX(4px); }

/* Pagination */
.news-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: clamp(48px, 6vw, 72px);
}
.news-pagination__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line-strong);
    font-weight: 600;
    color: var(--navy);
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
a.news-pagination__btn:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.news-pagination__btn[aria-disabled="true"] { opacity: 0.38; }
.news-pagination__status { font-size: var(--fs-small); color: var(--muted); }
.news-pagination__status strong { color: var(--ink-strong); }

/* --------------------------------------------------------------------------
   News article
   -------------------------------------------------------------------------- */

.news-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    width: 0;
    height: 3px;
    background: var(--gradient-signature);
    background-size: 100vw 100%;
    pointer-events: none;
}

.news-preview-ribbon {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100% - 24px);
    padding: 8px 8px 8px 18px;
    border-radius: var(--r-pill);
    background: var(--navy-deep);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-3);
    color: var(--white);
    font-size: var(--fs-small);
    font-weight: 500;
    transform: translateX(-50%);
}
.news-preview-ribbon svg { flex-shrink: 0; color: var(--accent-bright); }
.news-preview-ribbon a {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: var(--r-pill);
    background: var(--accent);
    font-weight: 600;
    transition: background var(--t-fast);
}
.news-preview-ribbon a:hover { background: var(--accent-hover); }

/* Hero */
.news-article-hero .page-hero__inner { max-width: 1000px; }
.news-article-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 26px;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.72);
}
.news-article-hero__cat { transition: background var(--t-fast); }
.on-dark .news-article-hero__cat:hover { background: rgba(var(--teal-rgb), 0.45); }
.news-article-hero__title {
    max-width: 21ch;
    font-size: clamp(2.2rem, 1.3rem + 3.1vw, 4.1rem);
    line-height: 1.03;
}
.news-article-hero__standfirst { max-width: 60ch; }

.news-byline { margin-top: 38px; display: flex; }
.news-byline__person {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 7px 22px 7px 7px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--navy-line);
    color: var(--white);
    transition: background var(--t-fast), border-color var(--t-fast);
}
.news-byline__person--link:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.22); }
.news-byline__avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--teal), var(--accent));
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--white);
}
.news-byline__avatar img { width: 100%; height: 100%; object-fit: cover; }
.news-byline__avatar--brand { background: var(--white); }
.news-byline__avatar--brand img { width: 26px; height: 26px; object-fit: contain; }
.news-byline__text { display: flex; flex-direction: column; line-height: 1.3; }
.news-byline__name { font-weight: 600; font-size: 0.975rem; }
.news-byline__role { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.6); }
.news-byline__arrow { margin-left: 4px; opacity: 0.6; transition: transform var(--t-fast), opacity var(--t-fast); }
.news-byline__person--link:hover .news-byline__arrow { transform: translateX(3px); opacity: 1; }

/* Picture header: the image sits below the text, overlapping the hero */
.news-article-hero--image { --figure-lift: clamp(110px, 15vw, 230px); padding-bottom: calc(clamp(64px, 8vw, 112px) + var(--figure-lift)); }
.news-article-figure {
    position: relative;
    z-index: 2;
    margin-top: calc(clamp(110px, 15vw, 230px) * -1);
}
.news-article-figure__frame {
    aspect-ratio: 2 / 1;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--navy);
    box-shadow: var(--shadow-3);
}
.news-article-figure__frame img { width: 100%; height: 100%; object-fit: cover; }
.news-article-figure__caption {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: var(--fs-small);
    color: var(--muted);
}
.news-article-figure__caption svg { flex-shrink: 0; color: var(--teal); }

/* Story layout */
.news-article-section { padding: clamp(56px, 7vw, 96px) 0 clamp(72px, 9vw, 128px); background: var(--white); }
.news-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(40px, 6vw, 104px);
    align-items: start;
}
.news-article-main { min-width: 0; max-width: 70ch; }

.news-article__body { font-size: 1.15rem; line-height: 1.78; color: var(--ink); }
.news-article__body > * + * { margin-top: 1.2em; }
.news-article__body > p:first-child { font-size: 1.28rem; line-height: 1.62; color: var(--ink-strong); }
.news-article__body h2 {
    margin-top: 2.1em;
    font-size: clamp(1.55rem, 1.2rem + 1.1vw, 2.15rem);
    letter-spacing: -0.025em;
    line-height: 1.15;
}
.news-article__body h3 { margin-top: 1.8em; font-size: 1.35rem; }
.news-article__body h2 + *, .news-article__body h3 + * { margin-top: 0.7em; }
/* The global `ul { list-style: none }` reset applies here too: restore markers */
.news-article__body ul { list-style: disc; padding-left: 1.3em; }
.news-article__body ol { list-style: decimal; padding-left: 1.4em; }
.news-article__body ul ul { list-style: circle; }
.news-article__body li { padding-left: 0.3em; }
.news-article__body li + li { margin-top: 0.5em; }
.news-article__body ul li::marker { color: var(--accent); }
.news-article__body ol li::marker { color: var(--teal); font-family: var(--font-display); font-weight: 600; }
.news-article__body blockquote {
    position: relative;
    margin: 1.8em 0;
    padding: 4px 0 4px 1.1em;
    border-left: 0;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.95rem);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--ink-strong);
}
.news-article__body blockquote::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--teal), var(--accent));
}
.news-article__body img { border-radius: var(--r-lg); }

/* Gallery */
.news-gallery { margin-top: clamp(56px, 7vw, 80px); padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--line); }
.news-gallery__title { margin: 16px 0 28px; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); letter-spacing: -0.03em; }
.news-gallery__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.news-gallery__grid--single { grid-template-columns: minmax(0, 1fr); }
.news-gallery__item { cursor: zoom-in; border-radius: var(--r-lg); }
.news-gallery__item:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.news-gallery__frame {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--surface);
}
.news-gallery__grid--single .news-gallery__frame { aspect-ratio: 16 / 9; }
.news-gallery__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.news-gallery__zoom {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity var(--t-fast), transform var(--t-fast);
}
.news-gallery__item:hover .news-gallery__frame img { transform: scale(1.04); }
.news-gallery__item:hover .news-gallery__zoom,
.news-gallery__item:focus-visible .news-gallery__zoom { opacity: 1; transform: none; }
.news-gallery__caption { margin-top: 10px; font-size: var(--fs-small); color: var(--muted); }

/* Aside */
.news-article-aside {
    position: sticky;
    top: calc(var(--nav-h) + 28px);
    display: grid;
    gap: 14px;
}
.news-aside-card { padding: 24px; border-radius: var(--r-lg); background: var(--surface); }
.news-aside-card__title {
    display: block;
    margin-bottom: 16px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--teal);
}
.news-share__buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.news-share__btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--line);
    color: var(--navy);
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.news-share__btn[hidden] { display: none; }
.news-share__btn:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.news-share__btn:active { transform: scale(0.94); }
.news-share__icon-done { display: none; }
.news-share__btn.is-copied { background: var(--teal); border-color: var(--teal); color: var(--white); }
.news-share__btn.is-copied .news-share__icon-link { display: none; }
.news-share__btn.is-copied .news-share__icon-done { display: block; }
.news-share__tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--navy);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition: opacity var(--t-fast), transform var(--t-fast);
    pointer-events: none;
}
.news-share__tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: var(--navy);
}
.news-share__btn.is-copied .news-share__tip { opacity: 1; transform: translate(-50%, 0); }

.news-links__list { display: grid; gap: 2px; }
.news-link {
    display: flex;
    gap: 12px;
    margin: 0 -10px;
    padding: 10px;
    border-radius: var(--r-md);
    transition: background var(--t-fast);
}
.news-link:hover { background: var(--white); }
.news-link__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--white);
    color: var(--teal);
    transition: background var(--t-fast), color var(--t-fast);
}
.news-link--resource .news-link__icon { color: var(--accent); }
.news-link:hover .news-link__icon { background: var(--navy); color: var(--white); }
.news-link__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 1px; }
.news-link__label { font-size: 0.9375rem; font-weight: 600; line-height: 1.35; color: var(--ink-strong); overflow-wrap: anywhere; }
.news-link__desc { font-size: 0.8125rem; line-height: 1.45; color: var(--muted); }

.news-dates dl { display: grid; }
.news-dates dl > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}
.news-dates dl > div:first-child { padding-top: 0; }
.news-dates dl > div:last-child { padding-bottom: 0; border-bottom: 0; }
.news-dates dt { font-size: 0.8125rem; color: var(--muted); }
.news-dates dd { font-size: 0.875rem; font-weight: 600; color: var(--ink-strong); text-align: right; }
.news-dates dd a { color: var(--teal); transition: color var(--t-fast); }
.news-dates dd a:hover { color: var(--accent); }

/* More news */
.news-more { padding: var(--section-pad) 0; background: var(--surface); }
.news-more__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(32px, 4vw, 48px);
}
.news-more .news-card__link { background: var(--white); }
.news-more + .news-cta { background: var(--surface); padding-top: 0; }

/* Lightbox */
.news-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 96px;
    background: rgba(var(--navy-deep-rgb), 0.94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-med), visibility var(--t-med);
}
.news-lightbox.is-open { opacity: 1; visibility: visible; }
.news-lightbox__figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: min(1240px, 100%);
    max-height: 100%;
    transform: scale(0.97);
    transition: transform var(--t-med);
}
.news-lightbox.is-open .news-lightbox__figure { transform: none; }
.news-lightbox__img {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    max-height: calc(100svh - 200px);
    border-radius: var(--r-md);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
}
.news-lightbox__caption { max-width: 70ch; font-size: var(--fs-small); text-align: center; color: rgba(255, 255, 255, 0.8); }
.news-lightbox__close,
.news-lightbox__nav {
    position: absolute;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--white);
    transition: background var(--t-fast), border-color var(--t-fast);
}
.news-lightbox__close:hover,
.news-lightbox__nav:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.4); }
.news-lightbox__close { top: 20px; right: 20px; width: 48px; height: 48px; }
.news-lightbox__nav { top: 50%; margin-top: -26px; }
.news-lightbox__nav--prev { left: 24px; }
.news-lightbox__nav--next { right: 24px; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.error-hero { display: flex; align-items: center; min-height: clamp(600px, 86vh, 860px); min-height: clamp(600px, 86svh, 860px); }
.error-hero > .container { width: 100%; }
.error-hero__network { inset: 0 0 0 20%; opacity: 0.7; }
.error-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
}
.error-hero__content { min-width: 0; }
.error-hero__title { max-width: 16ch; }
.error-hero__code {
    display: flex;
    justify-content: flex-end;
    font-family: var(--font-display);
    font-size: clamp(7rem, 3rem + 13vw, 17rem);
    font-weight: 700;
    line-height: 0.82;
    letter-spacing: -0.07em;
    color: var(--white);
    user-select: none;
    position: relative;
    isolation: isolate;
    text-shadow: 0 30px 80px rgba(var(--navy-deep-rgb), 0.6);
}
.error-hero__code::before {
    content: '';
    position: absolute;
    inset: -30% -20%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(var(--navy-deep-rgb), 0.92), rgba(var(--navy-deep-rgb), 0.6) 55%, transparent);
    pointer-events: none;
}
.error-hero__zero {
    position: relative;
    color: transparent;
    -webkit-text-stroke: 0.035em var(--white);
    text-shadow: none;
}
.error-hero__zero::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.13em;
    height: 0.13em;
    margin: -0.065em 0 0 -0.065em;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0.05em rgba(var(--accent-rgb), 0.25), 0 0 40px rgba(var(--accent-rgb), 0.6);
    animation: chipPulse 2.4s var(--ease-in-out) infinite;
}
.error-hero__path {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    margin-top: 28px;
    padding: 6px 6px 6px 16px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--navy-line);
}
.error-hero__path-label {
    flex-shrink: 0;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--teal-bright);
}
.error-hero__path code {
    min-width: 0;
    padding: 5px 14px;
    border-radius: var(--r-pill);
    background: rgba(var(--navy-deep-rgb), 0.8);
    font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
    font-size: 0.875rem;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.error-body { padding: clamp(64px, 8vw, 112px) 0 var(--section-pad); background: var(--white); }
.error-body__text {
    max-width: 62ch;
    margin-bottom: clamp(56px, 7vw, 96px);
    font-size: clamp(1.15rem, 1rem + 0.45vw, 1.35rem);
    line-height: 1.6;
    color: var(--ink);
}
.error-suggestions { display: grid; gap: clamp(56px, 7vw, 88px); }
.error-suggestions__head { margin-bottom: 28px; }
.error-suggestions__head .eyebrow + .error-suggestions__title { margin-top: 16px; }
.error-suggestions__title { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.5rem); letter-spacing: var(--tracking-display); }
.error-suggestions__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.error-suggestions__grid--products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.error-card-wrap { height: 100%; }
.error-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    padding: 30px 30px 88px;
    border-radius: var(--r-lg);
    background: var(--surface);
    color: var(--muted);
    overflow: hidden;
    transition: transform var(--t-med), background var(--t-med), box-shadow var(--t-med);
}
.error-card:hover { transform: translateY(-5px); background: var(--white); box-shadow: var(--shadow-3); }
.error-card__num { font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.18em; color: var(--teal); margin-bottom: 6px; }
.error-card__title { font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.55rem); font-weight: 600; line-height: 1.18; letter-spacing: -0.02em; color: var(--ink-strong); }
.error-card__text { font-size: var(--fs-small); line-height: 1.55; }
.error-card__arrow {
    position: absolute;
    left: 30px;
    bottom: 28px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--white);
    color: var(--navy);
    box-shadow: var(--shadow-1);
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.error-card:hover .error-card__arrow { background: var(--accent); color: var(--white); transform: translateX(4px); }
.error-card--navy { background: var(--navy); color: rgba(255, 255, 255, 0.68); }
.error-card--navy::after {
    content: '';
    position: absolute;
    right: -120px;
    top: -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--teal-rgb), 0.35), transparent 70%);
    pointer-events: none;
}
.error-card--navy:hover { background: var(--navy-raised); }
.error-card--navy .error-card__num { color: var(--teal-bright); }
.error-card--navy .error-card__title { color: var(--white); }
.error-card--navy .error-card__arrow { background: rgba(255, 255, 255, 0.1); color: var(--white); box-shadow: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .news-article-layout { grid-template-columns: minmax(0, 1fr) 270px; }
}

@media (max-width: 1024px) {
    .doc__layout--toc { grid-template-columns: minmax(0, 1fr); }
    .doc__toc { display: none; }
    .res-grid, .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-featured { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .news-featured__media { aspect-ratio: 16 / 9; min-height: 0; }
    .news-article-layout { grid-template-columns: minmax(0, 1fr); }
    .news-article-main { max-width: 72ch; }
    .news-article-aside {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        align-items: start;
        padding-top: clamp(40px, 5vw, 56px);
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 900px) {
    .error-hero { min-height: 0; }
    .error-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .error-hero__code { order: -1; justify-content: flex-start; font-size: clamp(6rem, 2rem + 18vw, 10rem); }
    .error-hero__network { inset: 0; }
    .error-suggestions__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .news-toolbar { flex-direction: column; align-items: stretch; gap: 14px; }
    .news-filters { margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
    .news-more__head { flex-direction: column; align-items: flex-start; }
    .news-article-figure__frame { aspect-ratio: 16 / 10; border-radius: var(--r-lg); }
    .news-lightbox { padding: 64px 16px 104px; }
    .news-lightbox__nav { top: auto; bottom: 28px; margin-top: 0; }
    .news-lightbox__nav--prev { left: calc(50% - 64px); }
    .news-lightbox__nav--next { right: calc(50% - 64px); }
    .news-lightbox__img { max-height: calc(100vh - 220px); max-height: calc(100svh - 220px); }
}

@media (max-width: 560px) {
    .res-grid, .news-grid { grid-template-columns: minmax(0, 1fr); }
    .res-search { margin-top: 32px; }
    .res-search__input { height: 58px; padding: 0 64px 0 52px; font-size: 1rem; }
    .res-search__icon { left: 20px; }
    .res-search__count { min-width: 40px; height: 40px; right: 9px; }
    .news-featured__body { gap: 16px; }
    .news-featured__foot { flex-direction: column; align-items: flex-start; }
    .news-card__body { padding: 22px 22px 24px; }
    .news-pagination { gap: 10px; }
    .news-pagination__btn { padding: 0 16px; }
    .news-gallery__grid { grid-template-columns: minmax(0, 1fr); }
    .news-byline__person { padding-right: 18px; }
    .news-article__body { font-size: 1.0625rem; }
    .news-article__body > p:first-child { font-size: 1.17rem; }
    .doc__body { font-size: 1.0625rem; }
    .doc__body table { display: block; overflow-x: auto; }
    .news-preview-ribbon { left: 12px; right: 12px; bottom: 12px; transform: none; justify-content: space-between; }
    .news-preview-ribbon span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .error-suggestions__grid, .error-suggestions__grid--products { grid-template-columns: minmax(0, 1fr); }
    .error-card { padding: 26px 24px 82px; }
    .error-card__arrow { left: 24px; bottom: 24px; }
    .error-hero__path { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .error-hero__zero::after { animation: none; }
}
