/* ==========================================================================
   ProjectDozG — shared stylesheet
   1. Tokens   2. Base   3. Space background   4. Layout   5. Header
   6. Buttons  7. Hero   8. Cards        9. Screenshots  10. Guide
   11. Wiki    12. Footer  13. Motion    14. Responsive  15. Changelog
   16. Tools wiki tables
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
    color-scheme: dark;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth:
        transform 0.4s var(--ease),
        background 0.4s var(--ease),
        border-color 0.4s var(--ease),
        box-shadow 0.4s var(--ease),
        color 0.4s var(--ease),
        opacity 0.4s var(--ease);

    --glass-blur: blur(18px) saturate(1.3);   /* frosted-glass strength: raise/lower the 18px */

    --bg-color: #08090d;
    --card-bg: rgba(21, 23, 30, 0.5);
    --card-hover-border: rgba(255, 65, 108, 0.3);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #ff416c;
    --accent-glow: rgba(255, 65, 108, 0.4);
    --accent-gradient: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: rgba(0, 0, 0, 0.4);
    --nav-bg: rgba(8, 9, 13, 0.75);
    --warning-bg: rgba(249, 115, 22, 0.06);
    --warning-border: rgba(249, 115, 22, 0.2);
    --step-num-bg: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
    color-scheme: light;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.55);
    --card-hover-border: rgba(225, 29, 72, 0.3);
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent: #e11d48;
    --accent-glow: rgba(225, 29, 72, 0.2);
    --accent-gradient: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-shadow: rgba(15, 23, 42, 0.05);
    --nav-bg: rgba(248, 250, 252, 0.75);
    --warning-bg: rgba(234, 88, 12, 0.05);
    --warning-border: rgba(234, 88, 12, 0.2);
    --step-num-bg: rgba(15, 23, 42, 0.05);
}

/* 2. Base ------------------------------------------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    overflow-x: hidden;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

button,
select {
    font: inherit;
    color: inherit;
}

img {
    max-width: 100%;
}

ol,
ul {
    list-style: none;
}

code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--glass-border);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.85em;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border: 2px solid var(--bg-color);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Keyboard users can jump straight past the sticky header. */
.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 1000;
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--accent-gradient);
    box-shadow: 0 8px 24px var(--accent-glow);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: top 0.2s var(--ease);
}

.skip-link:focus {
    top: 16px;
}

/* Anchor links land below the sticky header. */
section[id],
.wiki-panel {
    scroll-margin-top: 90px;
}

/* 3. Space background (stars + planets are drawn by space.js) -------------- */
.space {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 85% 8%, rgba(255, 65, 108, 0.16), transparent 70%),
        radial-gradient(ellipse 55% 55% at 8% 92%, rgba(79, 70, 229, 0.22), transparent 70%),
        radial-gradient(ellipse 40% 35% at 55% 55%, rgba(56, 189, 248, 0.05), transparent 70%),
        linear-gradient(180deg, #04050c 0%, #090c1f 100%);
}

[data-theme="light"] .space {
    background:
        radial-gradient(ellipse 60% 50% at 85% 8%, rgba(225, 29, 72, 0.1), transparent 70%),
        radial-gradient(ellipse 55% 55% at 8% 92%, rgba(79, 70, 229, 0.12), transparent 70%),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.space canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* 4. Layout ---------------------------------------------------------------- */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 24px;
}

main > section:first-child {
    padding-top: 80px;
}

.section-title {
    margin-bottom: 15px;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow:
        0 1px 3px var(--bg-color),
        0 0 18px var(--bg-color);
}

.section-desc {
    max-width: 700px;
    margin: 0 auto 60px;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    text-shadow:
        0 1px 3px var(--bg-color),
        0 0 18px var(--bg-color);
}

.sub-title {
    margin: 50px 0 24px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.section-desc + .sub-title {
    margin-top: 0;
}

.doc-container {
    max-width: 900px;
    margin: 0 auto;
}

/* 5. Header ---------------------------------------------------------------- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5%;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(26px) saturate(1.3);
    -webkit-backdrop-filter: blur(26px) saturate(1.3);
}

.header-end {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.logo-img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

nav a {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-smooth);
}

nav a:hover,
nav a.active {
    background: var(--glass-border);
    color: var(--text-main);
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    border: none;
    border-radius: 10px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    background: var(--glass-border);
    color: var(--text-main);
    transform: scale(1.05);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 6. Buttons --------------------------------------------------------------- */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-primary:hover {
    box-shadow: 0 12px 35px var(--accent-glow);
}

.btn-secondary {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--glass-border);
    border-color: var(--text-muted);
}

/* A button whose href is still empty (wiki.js marks it aria-disabled) */
.btn[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
}

.btn-primary[aria-disabled="true"] {
    background: var(--glass-border);
    box-shadow: none;
    color: var(--text-muted);
}

/* 7. Hero ------------------------------------------------------------------ */
.hero {
    position: relative;
    padding: 140px 20px 80px;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 25px;
    padding: 6px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    background: var(--glass-border);
    box-shadow: 0 4px 15px var(--glass-shadow);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    animation: fadeInDown 1s var(--ease);
}

.hero h1 {
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    background-image: linear-gradient(100deg, var(--accent) 0%, #ff4b2b 38%, #ff9a5a 55%, var(--accent) 100%);
    background-size: 220% 100%;
    animation: titleIn 1.5s var(--ease) 0.35s both, titleShine 7s ease-in-out 2s infinite alternate;
}

.hero p {
    max-width: 600px;
    margin: 0 auto 45px;
    color: var(--text-muted);
    font-size: 1.3rem;
    animation: fadeInUp 1s var(--ease) 0.8s both;
}

.hero .btn-group {
    animation: fadeInUp 1s var(--ease) 1s both;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 60px;
    margin-top: 80px;
    animation: fadeInUp 1s var(--ease) 1.2s both;
}

.stat-item {
    position: relative;
    text-align: center;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20%;
    right: -30px;
    width: 1px;
    height: 60%;
    background: var(--glass-border);
}

.stat-item h3 {
    margin-bottom: 2px;
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.stat-item p {
    margin: 0;
    max-width: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    animation: none;
}

/* Cycling "Welcome" line above the title (see home.js) */
.welcome {
    height: 2.4rem;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.welcome span {
    display: inline-block;
    animation: wordIn 0.9s var(--ease) 0.2s both;
}

.welcome span.out {
    animation: wordOut 0.45s ease-in both;
}

/* 8. Cards ----------------------------------------------------------------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 30px;
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card,
.device-card,
.info-card,
.timeline-step,
.wiki-card,
.spec {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
}

.feature-card,
.device-card,
.info-card,
.timeline-step,
.wiki-card,
.spec,
.bug-form,
.disclaimer-card,
.tab,
.btn-secondary,
footer {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.feature-card,
.device-card,
.info-card {
    box-shadow: 0 10px 30px var(--glass-shadow);
    transition: var(--transition-smooth);
}

/* Feature card */
.feature-card {
    position: relative;
    overflow: hidden;
    padding: 45px 35px;
    border-radius: 20px;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--card-hover-border);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 30px;
    border-radius: 14px;
    background: var(--glass-border);
    color: var(--accent);
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-wrapper {
    background: var(--accent);
    box-shadow: 0 8px 20px var(--accent-glow);
    color: #fff;
    transform: scale(1.05) rotate(5deg);
}

.feature-icon-wrapper svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.98rem;
}

/* Device card */
.device-card {
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
}

.device-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 15px 35px var(--accent-glow);
}

.device-card h3 {
    margin-bottom: 8px;
    font-size: 1.6rem;
    font-weight: 700;
}

.device-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.device-codename {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    background: var(--glass-border);
    color: var(--text-muted);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.85rem;
}

.badge-official {
    display: inline-block;
    margin-bottom: 14px;
    padding: 2px 10px;
    border: 1px solid var(--warning-border);
    border-radius: 100px;
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.build-label {
    display: block;
    margin: 10px 0 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-align: left;
    text-transform: uppercase;
}

/* Build picker rows (devices page) and build-page lists */
.build-list-label {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-align: left;
    text-transform: uppercase;
}

.build-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.build-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 15px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass-border);
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.build-row:hover {
    border-color: var(--card-hover-border);
    background: var(--card-bg);
    box-shadow: 0 8px 22px var(--glass-shadow);
    transform: translateX(4px);
}

.build-row-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.build-row-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.98rem;
    font-weight: 700;
}

.build-pill {
    display: inline-block;
    padding: 1px 8px;
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--accent);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.build-row-meta {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.build-row-arrow {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.build-row-arrow svg {
    width: 18px;
    height: 18px;
}

.build-row:hover .build-row-arrow {
    color: var(--accent);
    transform: translateX(2px);
}

.build-row.soon {
    opacity: 0.72;
}

.build-row.soon .build-pill {
    border-color: var(--warning-border);
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.build-list-empty {
    padding: 14px 16px;
    border: 1px dashed var(--glass-border);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.card-more {
    display: inline-block;
    margin-top: 16px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.card-more:hover {
    text-decoration: underline;
}

/* Info + maintainer cards */
.info-card {
    padding: 28px 24px;
    border-radius: 16px;
    text-align: center;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--card-hover-border);
}

.info-label {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.info-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.info-note {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.maintainer-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.maintainer-card .avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    box-shadow: 0 8px 20px var(--accent-glow);
}

.maintainer-card img.avatar {
    display: block;
    object-fit: cover;
    background: var(--glass-border);
}

.maintainer-card div.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
}

.maintainer-card .role {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.maintainer-card .about {
    flex: 1;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.maintainer-card .about p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.m-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 205px;
    max-width: 100%;
    margin-top: 18px;
    padding: 9px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass-border);
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.m-link:hover {
    border-color: rgba(34, 158, 217, 0.5);
    background: rgba(34, 158, 217, 0.1);
    box-shadow: 0 8px 24px rgba(34, 158, 217, 0.18);
    transform: translateY(-3px);
}

.tg-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: #229ed9;
}

.tg-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
    text-align: left;
}

.tg-label {
    font-size: 0.85rem;
    font-weight: 700;
}

.tg-handle {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.tg-arrow {
    width: 14px;
    height: 14px;
    margin-left: auto;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.m-link:hover .tg-arrow {
    color: #229ed9;
    transform: translate(1px, -1px);
}

/* Wiki link card */
.wiki-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 900px;
    margin: 50px auto 0;
    padding: 30px 35px;
    border-radius: 20px;
}

.wiki-card h3 {
    margin-bottom: 6px;
    font-size: 1.4rem;
}

.wiki-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.wiki-card .btn-group {
    justify-content: flex-start;
}

/* News feed */
.news-list {
    max-width: 900px;
    margin: 0 auto;
    padding: 8px 28px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: var(--card-bg);
    box-shadow: 0 10px 30px var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.news-item {
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 24px 4px;
    border-bottom: 1px solid var(--glass-border);
}

.news-item:last-child {
    border-bottom: 0;
}

.news-item-main {
    min-width: 0;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.news-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.news-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    line-height: 1.4;
}

.news-badge.is-release {
    border-color: #15803d;
    background: #15803d;
    color: #fff;
}

.news-badge.is-news {
    border-color: var(--text-main);
    background: var(--text-main);
    color: var(--bg-color);
}

.news-title {
    margin-bottom: 8px;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.news-summary {
    color: var(--text-muted);
    font-size: 0.94rem;
}

.news-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.news-thumb {
    flex: 0 0 200px;
    width: 200px;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    object-fit: cover;
}

/* Bug report form */
.bug-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 32px 35px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: var(--card-bg);
    box-shadow: 0 10px 30px var(--glass-shadow);
}

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 0 20px;
}

.field {
    margin-bottom: 18px;
}

.field .build-label {
    margin-top: 0;
}

.optional {
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.field-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--glass-border);
    color: var(--text-main);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s var(--ease);
}

.field-input:focus {
    border-color: var(--accent);
    outline: none;
}

.field-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

textarea.field-input {
    min-height: 130px;
    font-family: inherit;
    resize: vertical;
}

select.field-input {
    cursor: pointer;
}

select.field-input option {
    background: var(--bg-color);
    color: var(--text-main);
}

.field-input.invalid {
    border-color: #f97316;
}

.form-note {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.form-note a {
    color: var(--accent);
    font-weight: 600;
}

/* Build page — banner + download ------------------------------------------ */
.build-hero {
    max-width: 1200px;
    padding-bottom: 24px;
}

.build-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.build-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.build-breadcrumb a:hover {
    color: var(--accent);
}

.build-crumb-sep {
    opacity: 0.45;
}

.build-banner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
    align-items: center;
    gap: 30px;
    min-height: 480px;
    overflow: hidden;
    padding: 58px 56px;
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 65, 108, 0.24), transparent 40%),
        radial-gradient(circle at 92% 90%, rgba(79, 70, 229, 0.28), transparent 46%),
        linear-gradient(145deg, var(--card-bg), var(--bg-color));
    box-shadow: 0 30px 80px var(--glass-shadow);
    isolation: isolate;
}

.build-banner::before {
    content: '';
    position: absolute;
    inset: -15%;
    z-index: -2;
    background-image: var(--banner-image);
    background-position: center 18%;
    background-size: cover;
    filter: blur(34px) saturate(1.3);
    opacity: 0.22;
}

.build-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 54px 54px;
    -webkit-mask-image: radial-gradient(circle at 30% 40%, #000, transparent 75%);
    mask-image: radial-gradient(circle at 30% 40%, #000, transparent 75%);
    pointer-events: none;
}

[data-theme="light"] .build-banner::after {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
}

[data-theme="light"] .build-banner::before {
    opacity: 0.12;
}

.build-banner-copy {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.build-eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.build-status,
.build-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.build-status {
    border: 1px solid var(--warning-border);
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
}

.build-status.is-soon {
    border-color: var(--glass-border);
    background: var(--glass-border);
    color: var(--text-muted);
}

.build-tag {
    border: 1px solid var(--glass-border);
    background: var(--glass-border);
    color: var(--accent);
}

.build-device {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.build-banner h1 {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 18px;
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.build-version {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(3.8rem, 7vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

.build-wordmark {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}

.build-desc {
    max-width: 52ch;
    margin-bottom: 28px;
    color: var(--text-muted);
    font-size: 1rem;
}

.build-actions {
    justify-content: flex-start;
}

.build-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 36px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--glass-border);
}

.build-facts li {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.build-facts span {
    color: var(--text-muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.build-facts strong {
    font-size: 0.9rem;
}

.build-banner-visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.build-watermark {
    position: absolute;
    right: -3%;
    bottom: 0;
    z-index: 0;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.16);
    font-size: clamp(7rem, 15vw, 11rem);
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -0.08em;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

[data-theme="light"] .build-watermark {
    -webkit-text-stroke-color: rgba(15, 23, 42, 0.14);
}

.build-phone {
    --phone-top: 8px;
    position: relative;
    z-index: 1;
    width: min(235px, 78%);
    padding: var(--phone-top) 7px 16px;
    border: 1px solid #353943;
    border-radius: 32px;
    background: linear-gradient(160deg, #13151c 0%, #050609 8%, #000 45%, #07080c 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 0 0 3px #000,
        0 30px 60px rgba(0, 0, 0, 0.55);
    transform: rotate(4deg) translateY(4px);
    transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.build-banner:hover .build-phone {
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 0 0 3px #000,
        0 36px 70px rgba(0, 0, 0, 0.6);
    transform: rotate(1deg) translateY(-6px);
}

.build-phone img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 20;
    border-radius: 24px 24px 20px 20px;
    background: #000;
    object-fit: cover;
    object-position: top center;
}

.build-detail {
    max-width: 1200px;
    padding-top: 36px;
    padding-bottom: 100px;
}

.build-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.85fr);
    gap: 24px;
    align-items: start;
    margin: 0 auto;
}

.build-panel {
    padding: 32px;
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    background: var(--card-bg);
    box-shadow: 0 10px 30px var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.build-panel h2 {
    margin-bottom: 8px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.build-panel > p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.build-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.build-meta div {
    padding: 12px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass-border);
}

.build-meta dt {
    color: var(--text-muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.build-meta dd {
    margin-top: 3px;
    overflow-wrap: anywhere;
    font-size: 0.88rem;
    font-weight: 600;
}

.build-highlights {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
}

.build-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.build-highlights li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 800;
    line-height: 1.4;
}

.build-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    background: var(--accent-gradient);
    box-shadow: 0 10px 30px var(--accent-glow);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.build-download:hover {
    box-shadow: 0 14px 36px var(--accent-glow);
    transform: translateY(-2px);
}

.build-download[aria-disabled="true"] {
    background: var(--glass-border);
    box-shadow: none;
    color: var(--text-muted);
    opacity: 0.75;
    pointer-events: none;
}

.build-note {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.build-note a {
    color: var(--accent);
    font-weight: 600;
}

.build-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.build-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-top: 14px;
}

.build-links .card-more {
    margin-top: 8px;
}

.build-missing {
    max-width: 640px;
    padding-top: 140px;
    padding-bottom: 140px;
    text-align: center;
}

.build-missing .badge {
    animation: none;
}

.build-missing h1 {
    margin-bottom: 14px;
    font-size: 2.4rem;
    letter-spacing: -1px;
}

.build-missing p {
    margin: 0 auto 30px;
    color: var(--text-muted);
}

/* 9. Screenshots ----------------------------------------------------------- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.tab {
    padding: 10px 22px;
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tab:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
}

.tab.active {
    border-color: transparent;
    background: var(--accent-gradient);
    box-shadow: 0 6px 20px var(--accent-glow);
    color: #fff;
}

.tab-note {
    margin: -20px 0 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    text-shadow:
        0 1px 3px var(--bg-color),
        0 0 18px var(--bg-color);
}

/* Galaxy A22 hardware chips above the gallery */
.a22-specs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: -28px auto 38px;
}

.a22-spec {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.a22-spec svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.8;
}

.a22-spec-brand {
    border-color: rgba(255, 65, 108, 0.3);
    background: rgba(255, 65, 108, 0.08);
    color: var(--text-main);
}

[data-theme="light"] .a22-spec-brand {
    background: rgba(225, 29, 72, 0.06);
}

.shots-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
}

.shot-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
}

/* Galaxy A22: flat 6.4" Infinity-U screen with thin black bezels, a slightly
   deeper chin, and the small teardrop camera cutout of the press renders. */
.shot-slot {
    --phone-top: 8px;
    position: relative;
    width: 100%;
    padding: var(--phone-top) 6px 16px;
    border: 1px solid #353943;
    border-radius: 32px;
    background: linear-gradient(160deg, #13151c 0%, #050609 8%, #000 45%, #07080c 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 0 0 3px #000,
        0 18px 40px rgba(0, 0, 0, 0.45);
    color: #94a3b8;
    cursor: default;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.shot-screen {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 9 / 20;
    overflow: hidden;
    border-radius: 24px 24px 20px 20px;
    background: #000;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Galaxy A22 press render: a shallow U-shaped cutout with sloped sides,
   flush with the black top bezel. */
.shot-notch {
    position: absolute;
    top: var(--phone-top);
    left: 50%;
    z-index: 3;
    width: 9%;
    min-width: 17px;
    max-width: 24px;
    aspect-ratio: 1 / 0.72;
    /* Inline SVG keeps the exact A22 cutout shape and renders black on every
       mobile browser (clip-path was losing its fill on Chrome for Android). */
    background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2072'%20preserveAspectRatio='none'%3E%3Cpath%20fill='%23000'%20d='M0%200H100L97%208.6%2094%2018%2092%2028.8%2090%2039.6%2088%2049%2084%2057.6%2076%2064.8%2064%2069.8%2054%2072H46L36%2069.8%2024%2064.8%2016%2057.6%2012%2049%2010%2039.6%208%2028.8%206%2018%203%208.6Z'/%3E%3C/svg%3E") center top / 100% 100% no-repeat;
    transform: translateX(-50%);
    pointer-events: none;
}

/* 13 MP selfie lens with its silver ring and small glints */
.shot-notch::after {
    content: '';
    position: absolute;
    top: 38%;
    left: 50%;
    width: 26%;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 36% 34%,
            rgba(120, 190, 230, 0.9) 0 3%, transparent 4%),
        radial-gradient(circle at 66% 62%,
            rgba(222, 138, 186, 0.75) 0 3%, transparent 4%),
        radial-gradient(circle at 42% 38%, #38404f 0%, #0c1018 46%, #05070b 78%);
    box-shadow:
        0 0 0 1px rgba(145, 156, 175, 0.3),
        inset 0 0 1px #000;
    transform: translate(-50%, -50%);
}

/* The A22 front render has no visible earpiece slit above the screen. */
.shot-earpiece {
    display: none;
}

/* Volume rocker + side fingerprint/power key */
.shot-key {
    position: absolute;
    right: -3px;
    z-index: 2;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #454b5b, #1a1d25);
    box-shadow: 1px 0 2px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.shot-key-volume {
    top: 21%;
    height: 13%;
}

.shot-key-power {
    top: 37%;
    height: 9%;
}

/* SIM tray on the left edge */
.shot-sim {
    position: absolute;
    top: 17%;
    left: -3px;
    z-index: 2;
    width: 3px;
    height: 8%;
    border-radius: 3px 0 0 3px;
    background: linear-gradient(180deg, #3a3f4c 0 45%, #15171d 45% 55%, #3a3f4c 55% 100%);
    pointer-events: none;
}

.shot-screen img {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.shot-slot:not(:disabled) {
    cursor: zoom-in;
}

.shot-slot:not(:disabled):hover {
    transform: translateY(-8px);
    border-color: var(--card-hover-border);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 0 0 3px #090a0f,
        0 24px 50px var(--accent-glow);
}

.shot-slot:not(:disabled):hover .shot-screen img {
    transform: scale(1.03);
}

.shot-slot.missing {
    border-color: rgba(148, 163, 184, 0.18);
}

.shot-slot.missing .shot-screen {
    background:
        radial-gradient(circle at 50% 42%, rgba(148, 163, 184, 0.1), transparent 60%),
        #07080c;
}

.shot-slot.missing .shot-placeholder {
    color: #64748b;
}

.shot-caption {
    align-self: center;
    padding: 4px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--bg-color);
    box-shadow: 0 4px 14px var(--glass-shadow);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: center;
}

.shot-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.shot-placeholder svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.7;
}

.screenshots-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: 64px;
    padding: 30px 36px;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(255, 65, 108, 0.1), transparent 55%),
        var(--card-bg);
    box-shadow: 0 20px 50px var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

[data-theme="light"] .screenshots-cta {
    background:
        radial-gradient(ellipse at 100% 0%, rgba(225, 29, 72, 0.06), transparent 55%),
        var(--card-bg);
}

.screenshots-cta h3 {
    margin-bottom: 6px;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.screenshots-cta p {
    max-width: 560px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.screenshots-cta .btn-group {
    flex-shrink: 0;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 84px 96px;
    background: rgba(3, 4, 8, 0.86);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-height: 100%;
    margin: 0;
}

.lightbox img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(72vw, 430px);
    max-height: calc(100vh - 180px);
    border-radius: 20px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lightbox figcaption {
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: center;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lightbox-close {
    top: 22px;
    right: 22px;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }

.lightbox-close:hover,
.lightbox-nav:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.16);
}

.lightbox-nav:hover {
    transform: translateY(-50%) scale(1.06);
}

.lightbox-close svg,
.lightbox-nav svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lightbox-nav[hidden] {
    display: none;
}

/* 10. Install guide -------------------------------------------------------- */
.disclaimer-card {
    margin-bottom: 50px;
    padding: 30px;
    border: 1px solid var(--warning-border);
    border-radius: 20px;
    background: var(--warning-bg);
}

.disclaimer-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.disclaimer-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.disclaimer-item strong {
    color: var(--text-main);
}

.disclaimer-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: 2px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    font-size: 0.75rem;
    font-weight: bold;
}

.timeline {
    position: relative;
    margin-bottom: 50px;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 33px;
    z-index: 1;
    width: 2px;
    background: var(--glass-border);
}

.timeline-step {
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
    padding: 20px 20px 20px 60px;
    border-radius: 16px;
    transition: var(--transition-smooth);
}

.timeline-step:hover {
    transform: translateX(8px);
    border-color: var(--card-hover-border);
    background: var(--glass-border);
}

.step-number {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--step-num-bg);
    font-size: 0.9rem;
    font-weight: 700;
    transform: translateY(-50%);
    transition: var(--transition-smooth);
}

.timeline-step:hover .step-number {
    border-color: transparent;
    background: var(--accent-gradient);
    box-shadow: 0 4px 15px var(--accent-glow);
    color: #fff;
}

.timeline-step a {
    border-bottom: 1px dashed var(--accent);
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.timeline-step a:hover {
    border-bottom-color: var(--text-main);
    color: var(--text-main);
}

/* 11. Wiki ----------------------------------------------------------------- */
.wiki-panel[hidden] {
    display: none;
}

.wiki-panel .doc-container {
    padding: 36px 32px;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    background: var(--card-bg);
    box-shadow: 0 20px 60px var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.wiki-panel:not([hidden]) > .doc-container {
    animation: fadeInUp 0.7s var(--ease) both;   /* replays each time a tab is opened */
}

.tutorial-img {
    display: block;
    width: 100%;
    max-width: 520px;
    margin-top: 14px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.chip-figure {
    margin: -24px 0 40px;
    text-align: center;
}

.chip-figure img {
    display: block;
    width: 160px;
    height: 160px;
    margin: 0 auto 10px;
    border-radius: 20px;
    object-fit: cover;
}

.chip-figure figcaption {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.spec {
    padding: 16px 20px;
    border-radius: 14px;
}

.spec dt {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.spec dd {
    margin-top: 4px;
    font-weight: 600;
}

/* 12. Footer --------------------------------------------------------------- */
footer {
    padding: 50px 20px;
    border-top: 1px solid var(--glass-border);
    background: var(--nav-bg);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* 13. Motion --------------------------------------------------------------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes titleIn {
    from { opacity: 0; filter: blur(18px); transform: translateY(24px) scale(0.92); }
    to   { opacity: 1; filter: blur(0);    transform: none; }
}

@keyframes titleShine {
    from { background-position: 0% 50%; }
    to   { background-position: 100% 50%; }
}

@keyframes wordIn {
    from { opacity: 0; filter: blur(12px); transform: translateY(12px) scale(0.96); }
    to   { opacity: 1; filter: blur(0);    transform: none; }
}

@keyframes wordOut {
    from { opacity: 1; filter: blur(0);    transform: none; }
    to   { opacity: 0; filter: blur(12px); transform: translateY(-12px) scale(1.04); }
}

/* Scroll reveal. script.js adds .active when the element enters the viewport.
   Uses an animation (not a transition) so --delay never slows down hover effects. */
.reveal {
    opacity: 0;
}

.reveal.active {
    opacity: 1;
    animation: fadeInUp 0.8s var(--ease) var(--delay, 0s) backwards;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; }
    .reveal.active,
    .badge,
    .hero h1,
    .hero p,
    .hero .btn-group,
    .stats,
    .welcome span,
    .wiki-panel:not([hidden]) > .doc-container { animation: none; }
}

/* 14. Responsive ----------------------------------------------------------- */
@media (max-width: 1100px) {
    header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-end {
        justify-content: space-between;
        width: 100%;
    }

    nav {
        flex: 1;
        gap: 2px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
        mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    nav a {
        padding: 8px 10px;
        white-space: nowrap;
    }
}

@media (max-width: 992px) {
    .hero h1 { font-size: 3.5rem; }
    .stats { gap: 30px; }
    .stat-item::after { display: none; }
    .shots-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

    .build-banner {
        grid-template-columns: minmax(0, 1fr) minmax(210px, 0.65fr);
        min-height: 420px;
        padding: 44px 36px;
    }

    .build-banner-visual { min-height: 340px; }
    .build-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    section { padding: 70px 20px; }
    .section-title { font-size: 2rem; }
    .hero { padding-top: 100px; }
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1.1rem; }

    .stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .timeline::before { left: 23px; }
    .timeline-step { padding: 15px 15px 15px 50px; }
    .step-number { left: 5px; width: 30px; height: 30px; font-size: 0.8rem; }
    .wiki-panel .doc-container { padding: 24px 18px; border-radius: 20px; }
    .wiki-card { padding: 24px; }
    .news-list { padding: 8px 18px; }
    .news-item { flex-direction: column; }
    .news-thumb { flex: none; width: 100%; max-width: 280px; }
    .bug-form { padding: 24px 20px; }

    .a22-specs { margin: -20px auto 30px; }
    .a22-spec { padding: 6px 12px; font-size: 0.76rem; }
    .shots-grid { gap: 18px 14px; }
    .shot-slot { --phone-top: 7px; padding: var(--phone-top) 5px 14px; border-radius: 24px; }
    .shot-screen { border-radius: 19px 19px 15px 15px; }
    .shot-notch { min-width: 14px; }
    .shot-earpiece { top: 3px; height: 2px; }
    .shot-key, .shot-sim { width: 2px; }
    .shot-key { right: -2px; }
    .shot-sim { left: -2px; }
    .shot-caption { font-size: 0.78rem; }
    .screenshots-cta {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
        margin-top: 46px;
        padding: 24px;
    }
    .screenshots-cta .btn-group { width: 100%; }
    .screenshots-cta .btn { flex: 1 1 auto; justify-content: center; }
    .lightbox { padding: 74px 14px 110px; }
    .lightbox img { max-width: min(84vw, 380px); max-height: calc(100vh - 200px); }
    .lightbox-nav { top: auto; bottom: 26px; width: 44px; height: 44px; transform: none; }
    .lightbox-nav:hover { transform: scale(1.06); }
    .lightbox-nav.prev { left: calc(50% - 58px); }
    .lightbox-nav.next { right: calc(50% - 58px); }
    .lightbox-close { top: 14px; right: 14px; }

    .build-hero { padding-top: 50px; }
    .build-banner {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 34px 24px;
        border-radius: 22px;
    }
    .build-banner-visual {
        min-height: 330px;
        margin-top: 8px;
    }
    .build-phone {
        width: min(200px, 62%);
        transform: none;
    }
    .build-banner:hover .build-phone { transform: translateY(-4px); }
    .build-actions .btn { flex: 1 1 180px; justify-content: center; }
    .build-facts { gap: 14px 24px; }
    .build-detail { padding-top: 20px; padding-bottom: 70px; }
    .build-panel { padding: 24px 20px; }
    .build-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .build-missing { padding-top: 100px; padding-bottom: 100px; }
    .build-missing h1 { font-size: 2rem; }
}

/* 15. Changelog ------------------------------------------------------------ */
.changelog-hero {
    max-width: 1200px;
    padding-top: 110px;
    padding-bottom: 30px;
}

/* Custom banner. Swap the backdrop by changing --changelog-banner below
   (any image path works) or override it on .changelog-banner in the page. */
.changelog-banner {
    --changelog-banner: url("screenshots/v4.1/1.jpg");
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: center;
    gap: 30px;
    min-height: 580px;
    overflow: hidden;
    padding: 64px 60px;
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    background:
        radial-gradient(circle at 10% 0%, rgba(255, 65, 108, 0.26), transparent 42%),
        radial-gradient(circle at 100% 100%, rgba(79, 70, 229, 0.3), transparent 48%),
        linear-gradient(145deg, #12141c 0%, #08090d 100%);
    box-shadow: 0 34px 90px var(--glass-shadow);
    isolation: isolate;
}

.changelog-banner::before {
    content: '';
    position: absolute;
    inset: -12%;
    z-index: -2;
    background-image: var(--changelog-banner);
    background-position: center 20%;
    background-size: cover;
    filter: blur(38px) saturate(1.25);
    opacity: 0.18;
}

.changelog-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 52px 52px;
    -webkit-mask-image: radial-gradient(circle at 28% 36%, #000, transparent 74%);
    mask-image: radial-gradient(circle at 28% 36%, #000, transparent 74%);
    pointer-events: none;
}

[data-theme="light"] .changelog-banner {
    background:
        radial-gradient(circle at 10% 0%, rgba(225, 29, 72, 0.12), transparent 42%),
        radial-gradient(circle at 100% 100%, rgba(79, 70, 229, 0.12), transparent 48%),
        linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

[data-theme="light"] .changelog-banner::before { opacity: 0.1; }

[data-theme="light"] .changelog-banner::after {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

.changelog-banner-copy {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.changelog-banner h1 {
    margin: 18px 0 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(3.6rem, 7vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.05em;
    padding-bottom: 0.08em;   /* room for descenders with background-clip:text */
}

.changelog-lead {
    max-width: 54ch;
    color: var(--text-muted);
    font-size: 1.08rem;
}

.changelog-actions {
    justify-content: flex-start;
    margin-top: 28px;
}

.changelog-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid var(--glass-border);
}

.changelog-stats li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.changelog-stats strong {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.changelog-stats span {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.changelog-banner-visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 460px;
}

.release-stack {
    position: relative;
    width: min(340px, 100%);
    height: 460px;
}

.release-stack::before {
    content: '';
    position: absolute;
    inset: 12% 8%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow), transparent 68%);
    filter: blur(28px);
    opacity: 0.8;
}

.release-preview {
    position: absolute;
    right: 0;
    left: 0;
    padding: 22px 24px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(30, 33, 44, 0.92), rgba(12, 14, 22, 0.94));
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

[data-theme="light"] .release-preview {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.94));
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

.release-preview.is-latest {
    top: 0;
    z-index: 3;
    border-color: rgba(255, 65, 108, 0.35);
    transform: rotate(3deg);
}

.release-preview.is-stable {
    top: 150px;
    z-index: 2;
    transform: rotate(-2.5deg) translateX(-14px);
}

.release-preview.is-old {
    top: 300px;
    z-index: 1;
    opacity: 0.86;
    transform: rotate(2deg) translateX(10px);
}

.release-stack:hover .release-preview.is-latest {
    box-shadow: 0 30px 60px var(--accent-glow);
    transform: rotate(1deg) translateY(-8px);
}

.release-stack:hover .release-preview.is-stable {
    transform: rotate(-1deg) translateX(-14px) translateY(-4px);
}

.release-stack:hover .release-preview.is-old {
    transform: rotate(1deg) translateX(10px) translateY(4px);
}

.release-preview-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.release-preview-version {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.release-preview-tag {
    padding: 3px 9px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    color: var(--accent);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.release-preview-name {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.release-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.release-preview-bar {
    height: 5px;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--glass-border);
}

.release-preview-bar span {
    display: block;
    width: var(--progress, 100%);
    height: 100%;
    border-radius: inherit;
    background: var(--accent-gradient);
}

/* Release timeline */
.changelog-section {
    max-width: 1050px;
    padding-top: 50px;
}

.changelog-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 44px;
    padding-left: 34px;   /* lines up with the timeline cards below */
}

.changelog-section-head .section-title {
    margin-bottom: 8px;
    text-align: left;
}

.changelog-section-head .section-desc {
    margin: 0;
    text-align: left;
}

.changelog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.changelog-filter {
    padding: 8px 18px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.changelog-filter:hover {
    color: var(--text-main);
}

.changelog-filter.is-active {
    background: var(--accent-gradient);
    box-shadow: 0 6px 18px var(--accent-glow);
    color: #fff;
}

.changelog-list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 940px;
    margin: 0 auto;
    padding-left: 34px;
}

.changelog-list::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 11px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-glow), var(--glass-border) 40%, transparent);
}

.release-entry {
    position: relative;
}

.release-entry::before {
    content: '';
    position: absolute;
    top: 34px;
    left: -30px;
    width: 12px;
    height: 12px;
    border: 3px solid var(--bg-color);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.release-entry[data-status="stable"]::before {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.release-entry[data-status="archived"]::before {
    background: var(--text-muted);
    box-shadow: 0 0 0 4px var(--glass-border);
}

.release-entry[hidden] {
    display: none;
}

.release-card {
    padding: 32px 34px;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    background: var(--card-bg);
    box-shadow: 0 10px 30px var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: var(--transition-smooth);
}

.release-card:hover {
    border-color: var(--card-hover-border);
    box-shadow: 0 18px 45px var(--glass-shadow);
    transform: translateX(5px);
}

.release-entry.is-latest .release-card {
    border-color: rgba(255, 65, 108, 0.3);
}

.release-entry.is-highlighted .release-card {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 20px 55px var(--glass-shadow);
}

.release-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.release-eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

.release-version {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.release-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.release-badge.is-beta {
    border-color: var(--warning-border);
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.release-badge.is-stable {
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.release-badge.is-latest {
    border-color: rgba(255, 65, 108, 0.3);
    background: rgba(255, 65, 108, 0.1);
    color: var(--accent);
}

.release-badge.is-archived {
    color: var(--text-muted);
}

.release-date {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.release-card h3 {
    margin-bottom: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.release-summary {
    max-width: 72ch;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.release-changes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 8px 24px;
    margin-bottom: 22px;
}

.release-changes li {
    position: relative;
    padding-left: 22px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.release-changes li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 800;
    line-height: 1.5;
}

.release-devices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.device-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-border);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.device-chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.device-chip.is-ready {
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.08);
    color: #22c55e;
}

.device-chip.is-soon {
    border-color: var(--warning-border);
    background: rgba(249, 115, 22, 0.08);
    color: #f97316;
}

.device-chip.is-archived {
    color: var(--text-muted);
}

a.device-chip:hover {
    border-color: currentColor;
    transform: translateY(-2px);
}

.release-link {
    flex-shrink: 0;
}

.changelog-cta {
    max-width: 940px;
    margin: 56px auto 0;
}

/* Solid fallback for browsers without backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    header,
    footer,
    .feature-card,
    .device-card,
    .info-card,
    .timeline-step,
    .wiki-card,
    .spec,
    .bug-form,
    .disclaimer-card,
    .tab,
    .btn-secondary,
    .build-panel,
    .changelog-filters,
    .release-card {
        background-color: var(--bg-color);
    }

    .release-preview {
        background: var(--bg-color);
    }
}

@media (max-width: 992px) {
    .changelog-banner {
        grid-template-columns: 1fr;
        padding: 48px 40px;
    }

    .changelog-banner-visual {
        min-height: 460px;
        margin-top: 10px;
    }

    .release-stack {
        width: min(360px, 100%);
        height: 460px;
    }

    .release-preview.is-stable { top: 150px; }
    .release-preview.is-old { top: 300px; }
}

@media (max-width: 768px) {
    .changelog-hero {
        padding-top: 80px;
        padding-bottom: 10px;
    }

    .changelog-banner {
        padding: 36px 24px;
        border-radius: 24px;
    }

    .changelog-banner h1 {
        font-size: clamp(3rem, 14vw, 4.2rem);
    }

    .changelog-lead {
        font-size: 0.98rem;
    }

    .changelog-stats {
        gap: 22px;
    }

    .changelog-banner-visual {
        min-height: 300px;
    }

    .release-stack {
        height: 300px;
    }

    .release-preview {
        padding: 18px 20px;
    }

    /* Keep the mobile banner compact: the timeline below still lists every release. */
    .release-preview.is-old {
        display: none;
    }

    .release-preview.is-stable { top: 145px; }

    .changelog-section {
        padding-top: 30px;
    }

    .changelog-section-head {
        align-items: flex-start;
        flex-direction: column;
        padding-left: 24px;
    }

    .changelog-filters {
        width: 100%;
        justify-content: center;
    }

    .changelog-filter {
        flex: 1 1 auto;
    }

    .changelog-list {
        padding-left: 24px;
    }

    .changelog-list::before {
        left: 7px;
    }

    .release-entry::before {
        top: 28px;
        left: -23px;
        width: 10px;
        height: 10px;
    }

    .release-card {
        padding: 24px 20px;
    }

    .release-card:hover {
        transform: none;
    }

    .release-head {
        flex-direction: column;
    }

    .release-link {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .release-preview,
    .release-card,
    .changelog-filter {
        transition: none;
    }

    .release-stack:hover .release-preview.is-latest { transform: rotate(3deg); }
    .release-stack:hover .release-preview.is-stable { transform: rotate(-2.5deg) translateX(-14px); }
    .release-stack:hover .release-preview.is-old { transform: rotate(2deg) translateX(10px); }
}

/* Keep the skip-link target focusable without drawing a box around the page */
main:focus {
    outline: none;
}

/* The author display:flex must not defeat the hidden attribute */
.changelog-filters[hidden] {
    display: none;
}

/* 16. Tools wiki tables ---------------------------------------------------- */
.tools-table-wrap {
    max-width: 900px;
    margin: 0 auto 24px;
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    scrollbar-width: thin;
}

.tools-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.tools-table-credits {
    min-width: 720px;
}

.tools-table th,
.tools-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    text-align: left;
    vertical-align: top;
}

.tools-table th {
    background: var(--glass-border);
    color: var(--text-main);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.tools-table td {
    color: var(--text-muted);
    line-height: 1.5;
}

.tools-table td:first-child {
    color: var(--text-main);
    font-weight: 600;
}

.tools-table tbody tr:last-child td {
    border-bottom: 0;
}

.tools-table code {
    white-space: nowrap;
}

.tools-table a {
    border-bottom: 1px dashed var(--accent);
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.tools-table a:hover {
    border-bottom-color: var(--text-main);
    color: var(--text-main);
}

.tools-credit-index {
    color: var(--accent) !important;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.tools-note {
    margin: -8px 0 32px;
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
}

@media (max-width: 768px) {
    .tools-table th,
    .tools-table td {
        padding: 10px 12px;
    }

    .tools-note {
        font-size: 0.82rem;
    }
}
