/* Shared styles for the "X vs Y" comparison pages in /compare/. Same tokens as the home, about
   and privacy pages. Each page links this file; there is no build step. */
:root {
    --accent: #FF4FC1;
    --accent-subtle: rgba(255, 79, 193, 0.15);
    --bg-dark: #0A0A0C;
    --bg-card: rgba(18, 18, 22, 0.9);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --yes: #4ADE80;
    --no: #F87171;
    --partial: #FBBF24;
}

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

.bg-gradient {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-subtle), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 0% 80%, var(--accent-subtle), transparent);
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 48px 24px;
    line-height: 1.6;
}

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

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    opacity: 0.8;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.back-link:hover {
    color: var(--accent);
    opacity: 1;
}

.back-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.title {
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 48px 0 16px;
}

/* App cards */
.apps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.app-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 22%;
    flex: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.app-card .app-icon {
    width: 112px;
    height: 112px;
}

.app-head {
    gap: 18px;
}

.app-head h2 {
    margin: 0;
    font-size: 26px;
}

.app-dev {
    color: var(--text-muted);
    font-size: 14px;
}

.app-summary {
    color: var(--text-secondary);
    font-size: 15px;
}

.app-facts {
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.app-facts div {
    display: flex;
    gap: 10px;
}

.app-facts dt {
    color: var(--text-muted);
    min-width: 64px;
}

.store-link {
    font-size: 14px;
    font-weight: 600;
    margin-top: auto;
}

/* Feature table */
.table-wrap {
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: var(--bg-card);
    overflow: hidden;
}

.cmp {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.cmp th,
.cmp td {
    text-align: left;
    vertical-align: top;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.cmp thead th {
    background: rgba(255, 255, 255, 0.03);
}

.cmp thead img {
    width: 36px;
    height: 36px;
    border-radius: 22%;
    vertical-align: middle;
    margin-right: 8px;
}

.cmp tbody th[scope="row"] {
    color: var(--text-secondary);
    font-weight: 500;
    width: 26%;
}

.cmp td {
    width: 37%;
}

.cmp tr.group th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    padding-top: 18px;
    background: rgba(255, 255, 255, 0.02);
}

.cmp tbody:last-child tr:last-child th,
.cmp tbody:last-child tr:last-child td {
    border-bottom: none;
}

.mark {
    display: inline-block;
    width: 1.3em;
    font-weight: 700;
}

.yes .mark { color: var(--yes); }
.no .mark { color: var(--no); }
.partial .mark { color: var(--partial); }
.yes .mark::before { content: "✓"; }
.no .mark::before { content: "✕"; }
.partial .mark::before { content: "~"; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Prose */
.prose p,
.faq p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 14px;
    max-width: 72ch;
}

.faq h3 {
    font-size: 17px;
    margin: 22px 0 6px;
}

/* Which to choose */
.verdict-text {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.75;
    max-width: 72ch;
    margin-bottom: 18px;
}

.choose {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.choose-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 18px 20px;
}

.choose-card h3 {
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.choose-card h3 img {
    width: 36px;
    height: 36px;
    border-radius: 22%;
}

.choose-card ul {
    padding-left: 20px;
    color: var(--text-secondary);
}

.choose-card li {
    margin-bottom: 6px;
}

/* Paintrix card */
.paintrix {
    margin: 48px 0 8px;
    padding: 22px;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 79, 193, 0.3);
}

.paintrix-head {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.paintrix h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.paintrix p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Screenshot carousel: native horizontal scroll with snap points. Items are sized so 2.5 show on
   desktop and 1.5 on phones, which hints that there is more to swipe. compare.js wires the arrows. */
.carousel {
    --gap: 12px;
    --visible: 2.5;
    position: relative;
    margin-top: 22px;
}

.carousel-track {
    display: flex;
    gap: var(--gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    border-radius: 10px;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

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

.carousel-track img {
    flex: 0 0 calc((100% - (var(--visible) - 0.5) * var(--gap)) / var(--visible));
    width: 0;
    height: auto;
    aspect-ratio: 4 / 3;
    scroll-snap-align: start;
    border-radius: 10px;
    background: #000;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(10, 10, 12, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.carousel-btn:hover {
    background: var(--accent);
}

.carousel-btn:disabled {
    opacity: 0;
    pointer-events: none;
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 8px 28px rgba(255, 79, 193, 0.35);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

/* Internal links: "More comparisons" on each page and the lists on the hub */
.related h3 {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 20px 0 10px;
}

.link-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.link-list a {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
}

.link-list a:hover {
    color: var(--text-primary);
    border-color: rgba(255, 79, 193, 0.5);
    opacity: 1;
}

.all-link {
    margin-top: 18px;
    font-weight: 600;
}

/* Hub page */
.hub-lede {
    color: var(--text-secondary);
    font-size: 17px;
    max-width: 72ch;
    margin: 0 auto;
    text-align: center;
}

.pair-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.pair-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-weight: 600;
}

.pair-card:hover {
    border-color: rgba(255, 79, 193, 0.5);
    opacity: 1;
}

.pair-icons {
    display: flex;
    flex: none;
}

.pair-icons img {
    width: 44px;
    height: 44px;
    border-radius: 22%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.pair-icons img + img {
    margin-left: -12px;
}

.hub-app {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.hub-app-head {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.hub-app-head img {
    width: 56px;
    height: 56px;
    border-radius: 22%;
    flex: none;
}

.hub-app-head h3 {
    font-size: 19px;
}

.hub-app-head p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Sources + footer */
.sources {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 13px;
}

.sources h2 {
    font-size: 15px;
    margin: 0 0 10px;
    color: var(--text-secondary);
}

.sources ul {
    padding-left: 18px;
    margin-bottom: 12px;
}

.sources a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent);
    opacity: 1;
}

@media (min-width: 760px) {
    .apps,
    .choose {
        grid-template-columns: 1fr 1fr;
    }
}

/* Phones: each feature label becomes a full-width line with the two apps side by side under it,
   so both columns stay visible without horizontal scrolling. */
@media (max-width: 600px) {
    body {
        padding: 32px 16px;
    }

    h2 {
        font-size: 21px;
        margin-top: 40px;
    }

    .cmp {
        font-size: 14px;
    }

    .cmp tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        border-bottom: 1px solid var(--border-subtle);
    }

    .cmp th,
    .cmp td {
        border-bottom: none;
        padding: 8px 12px;
        width: auto;
    }

    .cmp tbody th[scope="row"] {
        grid-column: 1 / -1;
        width: auto;
        padding-bottom: 0;
        font-size: 13px;
        color: var(--text-muted);
    }

    .cmp thead th:first-child {
        display: none;
    }

    .cmp tr.group,
    .cmp tr.group th {
        display: block;
    }

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

    .carousel {
        --visible: 1.5;
    }

    .carousel-btn {
        width: 38px;
        height: 38px;
    }

    .app-card .app-icon {
        width: 88px;
        height: 88px;
    }
}

.prose strong {
    color: var(--text-primary);
    font-weight: 600;
}
