@import url("../footer.css?v=20260311");

@font-face {
    font-family: "Action Sans";
    src: url("../ActionSans-Bold.otf") format("opentype");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy: #03366d;
    --orange: #ff5918;
    --light-gray: #f2f2f2;
    --med-gray: #808080;
    --dark-gray: #222222;
    --teal: #008376;
    --accent: #2dd4bf;
    --page-bg: #1a1a1e;
    --surface: rgba(255, 255, 255, 0.035);
    --line: rgba(255, 255, 255, 0.08);
    --line-soft: rgba(255, 255, 255, 0.05);
    /* WCAG AA+ on #1a1a1e: body ~7:1, muted ~5.5:1, meta ~4.6:1 */
    --text-primary: #f0f0f4;
    --text-body: #d4d4dc;
    --text-secondary: #b8b8c6;
    --text-tertiary: #a0a2b0;
    --focus-ring: var(--accent);
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none;
}

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    background: var(--page-bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Skip link ── */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0.75rem;
    z-index: 10000;
    padding: 0.55rem 0.85rem;
    border-radius: 4px;
    background: var(--navy);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid var(--focus-ring);
    text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
    left: 0.75rem;
    outline: none;
}

/* ── Focus (keyboard) ── */

.updates-page a:focus {
    outline: none;
}

.updates-page a:focus-visible,
.updates-page button:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .updates-page *,
    .updates-page *::before,
    .updates-page *::after {
        animation: none;
        transition: none;
    }
}

/* ── Layout ── */

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

main.container {
    width: 100%;
    overflow-x: clip;
}

/* ── Nav ── */

.header {
    background: linear-gradient(180deg, var(--navy) 40%, var(--page-bg) 100%);
    padding: var(--spacing-md) 0;
}

.header .nav {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    font-size: 0.7rem;
    display: flex;
    gap: 1.5em;
}

.nav-links a {
    color: var(--text-body);
    opacity: 1;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--text-primary);
}

.logo img {
    height: 32px;
    width: auto;
}

/* ── Index page header ── */

.page-header {
    padding: 3.5rem 0 0;
    margin-bottom: 0;
}

.page-header h1 {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-header .lede {
    color: var(--text-body);
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 540px;
    margin: 0;
}

/* ── Noscript fallback list ── */

.noscript-updates-fallback {
    padding: 2rem 0;
    border-top: 1px solid var(--line-soft);
}

.noscript-updates-fallback > p {
    color: var(--text-body);
    font-size: 0.92rem;
    margin-bottom: 1.25rem;
}

.noscript-updates-fallback ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.noscript-updates-fallback li {
    border-top: 1px solid var(--line-soft);
    padding-top: 1.25rem;
}

.noscript-updates-fallback li:first-child {
    border-top: none;
    padding-top: 0;
}

.noscript-updates-fallback a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.noscript-updates-fallback a:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.noscript-updates-fallback .fallback-date {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
}

.noscript-updates-fallback .fallback-title {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.noscript-updates-fallback .fallback-summary {
    color: var(--text-body);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ── Timeline (index cards) ── */

.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 2.5rem 0 var(--spacing-lg);
}

.timeline-item {
    position: relative;
    display: block;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line-soft);
    transition: background-color 0.15s ease;
}

.timeline-date {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.timeline-item h2 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.timeline-body {
    color: var(--text-body);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.85rem;
}

.timeline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.timeline-details {
    margin-top: 0.75rem;
}

.timeline-detail-section {
    margin-bottom: 1rem;
}

.timeline-detail-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
}

.timeline-detail-section ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.timeline-detail-section li {
    color: var(--text-body);
    font-size: 0.88rem;
    line-height: 1.55;
    padding-left: 1rem;
    position: relative;
}

.timeline-detail-section li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

/* ── Copy button ── */

.timeline-copy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 1;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.timeline-copy-icon .timeline-copy-icon-glyph {
    font-size: 0.95rem;
    line-height: 1;
    pointer-events: none;
}

.timeline-copy-icon:hover,
.timeline-copy-icon:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
}

.timeline-copy-icon.is-copied {
    color: var(--accent);
    background: rgba(45, 212, 191, 0.08);
    border-color: rgba(45, 212, 191, 0.25);
}

.timeline-copy-icon.is-failed {
    color: var(--orange);
    border-color: rgba(255, 89, 24, 0.25);
}

/* ── Post pages ── */

.post-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    margin: 2rem 0 0;
    transition: color 0.15s ease;
}

.post-back-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.post-back-link:hover,
.post-back-link:focus-visible {
    color: var(--text-primary);
}

.update-post {
    padding-bottom: var(--spacing-xl);
}

.update-post-header {
    padding: 2rem 0 0;
    margin-bottom: 0;
}

.update-post-kicker {
    display: inline-block;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.update-post-header h1 {
    font-size: clamp(1.6rem, 4.5vw, 2.15rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
}

.update-post-summary {
    color: var(--text-body);
    font-size: 1rem;
    line-height: 1.65;
}

.update-post-content {
    max-width: 100%;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--line-soft);
}

.update-post-content p {
    color: var(--text-body);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.update-post-content a:not(.btn) {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(45, 212, 191, 0.55);
    text-underline-offset: 0.18em;
    transition:
        color 0.15s ease,
        text-decoration-color 0.15s ease;
}

.update-post-content a:not(.btn):hover,
.update-post-content a:not(.btn):focus-visible {
    color: var(--text-primary);
    text-decoration-color: var(--accent);
}

.update-post-content h2 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    margin: 2.25rem 0 0.65rem;
}

.update-post-content h2:first-child {
    margin-top: 0;
}

.update-post-content ul {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding-left: 0;
    padding-inline-start: 1.5rem;
    margin: 0 0 1.35rem;
    list-style: none;
}

.update-post-content li {
    position: relative;
    color: var(--text-body);
    font-size: 0.92rem;
    line-height: 1.65;
    padding-left: 0;
    padding-inline-start: 1.25rem;
}

.update-post-content li::before {
    content: "";
    position: absolute;
    top: 0.62em;
    left: 0.2rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.update-post-content code {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.07);
    border-radius: 3px;
    padding: 0.1em 0.3em;
    font-size: 0.88em;
}

.update-post-note {
    border-left: 2px solid var(--accent);
    padding: 0.75rem 1rem;
    margin: 1.25rem 0;
    background: rgba(45, 212, 191, 0.04);
    border-radius: 0 5px 5px 0;
}

.update-post-note p:last-child {
    margin-bottom: 0;
}

.update-post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line-soft);
}

.update-post-cta {
    margin-top: 2.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(45, 212, 191, 0.16);
    border-radius: 10px;
    background:
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.09), transparent 42%),
        var(--surface);
}

.update-post-cta h2 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    margin: 0 0 0.45rem;
}

.update-post-cta p {
    color: var(--text-body);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.update-post-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

/* ── Media ── */

.media-block {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.3);
    margin: 1.5rem 0 1.75rem;
}

.media-block img,
.media-block video {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
    object-fit: contain;
}

.media-block-embed {
    aspect-ratio: 16 / 9;
}

.media-block-embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.timeline-item img {
    max-width: 100%;
    height: auto;
}

.media-caption {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem 0.6rem;
}

.video-transcript-link {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* ── Buttons (scoped: wins over any stray global .btn from injected assets) ── */

.updates-page a.btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    line-height: 1.05;
    padding: 0.28rem 0.65rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.625rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition:
        background-color 0.12s ease,
        border-color 0.12s ease,
        color 0.12s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.updates-page a.btn-primary {
    background: var(--orange);
    color: #ffffff;
}

.updates-page a.btn-primary:hover {
    background: #e04d0a;
}

.updates-page a.btn-primary:focus-visible {
    outline-color: #ffffff;
}

.updates-page a.btn-ghost {
    background: transparent;
    color: var(--text-body);
    border-color: var(--line);
}

.updates-page a.btn-ghost:hover,
.updates-page a.btn-ghost:focus-visible {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
}

/* ── Misc ── */

.timeline-error {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text-body);
    font-size: 0.92rem;
}

.blog-cta {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2rem 1.75rem;
    margin: 2rem auto var(--spacing-lg);
}

.blog-cta h2 {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.blog-cta p {
    color: var(--text-body);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* ── Mobile ── */

@media (max-width: 640px) {
    .container,
    .header .nav {
        padding-left: 1.15rem;
        padding-right: 1.15rem;
    }

    .page-header {
        padding: 2.5rem 0 0;
    }

    .update-post-header {
        padding: 1.5rem 0 0;
    }

    .blog-cta {
        padding: 1.5rem 1.15rem;
    }

    .nav-links {
        gap: 0.75em;
    }
}
