/* ========================================
   UPDATES / PATCH NOTES PAGE
   ======================================== */

/* ── Color tokens ── */
:root {
    --up-new:      #DEF247;
    --up-improved: #3b82f6;
    --up-fixed:    #f97316;
    --up-major:    #a855f7;
}

/* ── Hero ── */
.up-hero {
    background: var(--gray-900);
    position: relative;
    overflow: hidden;
    padding: calc(var(--nav-height) + 60px) 0 80px;
}

.up-hero-bg-num {
    position: absolute;
    font-family: var(--font-title);
    font-size: clamp(180px, 28vw, 400px);
    font-weight: 900;
    letter-spacing: -0.08em;
    color: rgba(255,255,255,0.025);
    right: -0.05em;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.up-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 10% 50%, rgba(222, 242, 71,0.05) 0%, transparent 60%);
}

.up-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 64px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.up-hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--up-new);
    margin-bottom: 16px;
}

.up-dot-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--up-new);
    box-shadow: 0 0 0 0 rgba(222, 242, 71,0.4);
    animation: livePulse 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(222, 242, 71,0.5); }
    50%       { box-shadow: 0 0 0 8px rgba(222, 242, 71,0); }
}

.up-hero-version {
    font-family: var(--font-title);
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--white);
    line-height: 1;
    margin-bottom: 12px;
}

.up-hero-date {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
    margin-bottom: 20px;
}

.up-hero-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 500px;
}

.up-hero-counts {
    display: flex;
    gap: 12px;
}

.up-hero-count {
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 80px;
}

.up-hero-count span {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.up-hero-count small {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.7;
}

.up-new     { background: rgba(222, 242, 71,0.1);    color: var(--up-new); }
.up-improved{ background: rgba(59,130,246,0.1);   color: var(--up-improved); }
.up-fixed   { background: rgba(249,115,22,0.1);   color: var(--up-fixed); }

/* Hero highlights panel */
.up-hero-highlights {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.up-highlights-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.25);
    margin-bottom: 4px;
}

.up-highlight-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background 0.2s, border-color 0.2s;
}

.up-highlight-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.12);
}

.up-highlight-card strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--white);
}

.up-highlight-card p {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.5;
    margin: 0;
}

/* Tags */
.up-tag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
}

.up-tag-new      { background: rgba(222, 242, 71,0.15);  color: var(--up-new); }
.up-tag-fix      { background: rgba(249,115,22,0.15); color: var(--up-fixed); }
.up-tag-improved { background: rgba(59,130,246,0.15); color: var(--up-improved); }

/* Lime tags on light backgrounds need a dark accessible color */
.up-patch-tag.up-tag-new,
.up-change-badge.up-tag-new { color: #5a7000; background: rgba(222, 242, 71,0.2); }

/* ── Body Layout ── */
.up-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    gap: 48px;
    align-items: start;
    padding-top: 56px;
    padding-bottom: 80px;
}

/* ── Sidebar ── */
.up-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 20px);
}

.up-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.up-version-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.up-vlink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--gray-500);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.18s;
    position: relative;
}

.up-vlink:hover { background: var(--gray-100); color: var(--gray-900); }

.up-vlink.active {
    background: var(--gray-900);
    color: var(--white);
}

.up-vlink-num { flex: 1; font-family: var(--font-title); font-weight: 700; }

.up-vlink-date {
    font-size: 0.72rem;
    color: inherit;
    opacity: 0.5;
}

.up-vlink.active .up-vlink-date { opacity: 0.45; }

.up-vlink-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.up-dot-new      { background: #7a9400; }
.up-dot-improved { background: var(--up-improved); }
.up-dot-fix      { background: var(--up-fixed); }
.up-dot-major    { background: var(--up-major); }

.up-vlink-separator {
    padding: 10px 12px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-300);
    border-top: 1px solid var(--gray-100);
    margin-top: 6px;
}

.up-vlink-major .up-vlink-num { color: var(--up-major); }
.up-vlink-major.active .up-vlink-num { color: white; }

/* ── Main content ── */
.up-main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Patch Article ── */
.up-patch {
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 56px;
    margin-bottom: 56px;
}

.up-patch:last-child { border-bottom: none; padding-bottom: 80px; margin-bottom: 0; }

.up-patch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.up-patch-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.up-patch-version {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--gray-900);
    line-height: 1;
}

.up-patch-tag {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 6px;
}

.up-patch-date {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-500);
}

/* ── Sections ── */
.up-section {
    margin-bottom: 28px;
}

.up-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    width: fit-content;
}

.up-sh-new      { background: rgba(222, 242, 71,0.1);  color: #6a8500; }
.up-sh-improved { background: rgba(59,130,246,0.08); color: #1d4ed8; }
.up-sh-fixed    { background: rgba(249,115,22,0.08); color: #c2410c; }

/* ── Change Items ── */
.up-changes {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.up-change {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.up-change:hover { border-color: rgba(0,0,0,0.06); background: var(--gray-100); }

.up-change-new      { border-left: 3px solid rgba(222, 242, 71,0.6); }
.up-change-improved { border-left: 3px solid rgba(59,130,246,0.5); }

.up-change-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    flex-shrink: 0;
}

.up-change-new .up-change-icon { background: rgba(222, 242, 71,0.12); color: #5a7000; }

.up-change-body {
    flex: 1;
}

.up-change-body strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 5px;
}

.up-change-body strong em {
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--up-improved);
    background: rgba(59,130,246,0.08);
    padding: 1px 7px;
    border-radius: 100px;
    margin-left: 6px;
    vertical-align: middle;
}

.up-change-body p {
    font-size: 0.83rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin: 0 0 7px;
}

.up-change-cat {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gray-300);
}

.up-change-badge {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

.up-badge-new      { background: rgba(222, 242, 71,0.12); color: #5a7000; }
.up-badge-improved { background: rgba(59,130,246,0.1); color: #1d4ed8; font-size: 1rem; padding: 2px 8px; }

/* Fix list */
.up-fix-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.up-fix-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    color: var(--gray-700);
    line-height: 1.5;
    transition: background 0.15s;
}

.up-fix-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--up-fixed);
    flex-shrink: 0;
    margin-top: 6px;
}

.up-fix-list li:hover { background: var(--gray-100); }

.up-fix-list li strong { color: var(--gray-900); }

/* ── Major Patch ── */
.up-major-banner {
    position: relative;
    border-radius: 20px;
    background: linear-gradient(135deg, #1C1C1C 0%, #16213e 60%, #0f3460 100%);
    overflow: hidden;
    padding: 32px 36px;
    margin-bottom: 32px;
}

.up-major-banner.up-patch:last-child { padding-bottom: 32px; }

/* Text overrides for dark banner background */
.up-major-banner .up-patch-version h2,
.up-major-banner .up-patch-tag { color: rgba(255,255,255,0.95); }

.up-major-banner .up-patch-date { color: rgba(255,255,255,0.45); }

.up-major-banner .up-section-title { color: rgba(255,255,255,0.5); }

.up-major-banner .up-change {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}
.up-major-banner .up-change:hover { background: rgba(255,255,255,0.09); }

.up-major-banner .up-change strong,
.up-major-banner .up-change-body strong { color: rgba(255,255,255,0.9); }
.up-major-banner .up-change p,
.up-major-banner .up-change-body p { color: rgba(255,255,255,0.5); }

.up-major-banner .up-change-badge.up-tag-new {
    color: #c8e000;
    background: rgba(222,242,71,0.15);
}

.up-major-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168,85,247,0.2) 0%, transparent 65%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.up-major-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--up-major);
    margin-bottom: 12px;
}

.up-major-title {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--white);
    line-height: 1;
    margin-bottom: 14px;
}

.up-major-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.65;
    max-width: 520px;
    margin-bottom: 16px;
}

/* Launch version */
.up-launch-banner {
    background: linear-gradient(135deg, #1C1C1C 0%, #0f1a0f 60%, #0a200a 100%);
}

.up-launch-glow {
    background: radial-gradient(circle, rgba(222, 242, 71,0.15) 0%, transparent 65%);
}

.up-launch-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.up-launch-feat {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(222, 242, 71,0.06);
    border: 1px solid rgba(222, 242, 71,0.15);
    color: rgba(255,255,255,0.7);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
}

.up-launch-feat svg { color: var(--up-new); }

/* ── Responsive ── */
@media (max-width: 1000px) {
    .up-body {
        grid-template-columns: 1fr;
        padding: 32px 24px 64px;
    }

    .up-sidebar {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .up-sidebar-title { display: none; }

    .up-version-list {
        flex-direction: row;
        gap: 4px;
    }

    .up-vlink {
        white-space: nowrap;
        padding: 7px 12px;
    }

    .up-vlink-date { display: none; }
    .up-vlink-separator { display: none; }
    .up-vlink-dot { display: none; }

    .up-hero-inner {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 0 24px;
    }

    .up-hero-bg-num { font-size: 40vw; }
}

@media (max-width: 600px) {
    .up-hero-counts { gap: 8px; }
    .up-hero-count { min-width: 64px; padding: 12px; }
    .up-hero-count span { font-size: 1.4rem; }

    .up-patch-version { font-size: 1.6rem; }
    .up-major-title { font-size: 2.2rem; }
    .up-major-banner { padding: 32px 24px; }

    .up-launch-features { gap: 8px; }
    .up-launch-feat { font-size: 0.78rem; padding: 8px 12px; }
}

/* ── App Store sidebar card ── */
.up-sidebar-appstore {
    margin-top: 28px;
    padding: 20px;
    background: #f5f5f0;
    border-radius: 14px;
}

.up-appstore-rating {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.up-appstore-stars {
    font-size: 16px;
    color: #f59e0b;
    letter-spacing: 1px;
}

.up-star-half {
    opacity: 0.4;
}

.up-appstore-score {
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-900);
}

.up-sidebar-appstore p {
    font-size: 11px;
    color: #aaa;
    margin: 0 0 14px;
}

.up-appstore-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-900);
    background: #fff;
    border: 1.5px solid rgba(0,0,0,0.1);
    padding: 9px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.up-appstore-btn:hover {
    background: var(--lime);
    border-color: var(--lime);
}

/* ── Footer logo fix ── */
.footer-logo-wrap { display: inline-block; margin-bottom: 16px; }
.footer-logo-wrap .footer-logo,
.footer-logo { height: 32px !important; width: auto !important; display: block; filter: invert(1); }
