/* ==========================================================================
   Diwa Games — diwagames.online
   Design system v2: DESIGN.md — "Paper & Sindoor" (light editorial arcade)
   ========================================================================== */

:root {
    --paper: #FAF5EB;
    --white: #FFFFFF;
    --sand: #E8DFCE;
    --ink: #23272F;
    --ink-soft: #3A404B;
    --note: #68707D;
    --sindoor: #C92D3B;
    --sindoor-deep: #A81F2D;
    --sindoor-tint: #F9E9E4;
    --sindoor-bright: #EF6B74; /* brand red tuned for ink/dark backgrounds */
    --peacock: #0E7C74;
    --peacock-tint: #E2F1EE;
    --saffron: #DE8F2E;
    --saffron-deep: #7A4A0E;
    --saffron-tint: #FAEFDC;
    --shadow: 0 10px 30px rgba(74, 55, 27, 0.10);
    --shadow-deep: 0 18px 44px rgba(74, 55, 27, 0.16);
    --hard-shadow: 4px 4px 0 rgba(35, 39, 47, 0.14);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --font-display: 'Bricolage Grotesque', 'Instrument Sans', sans-serif;
    --font-body: 'Instrument Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --radius: 0.9rem;
    --radius-sm: 0.65rem;
    --bar-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--sindoor); text-decoration: none; }
ul, ol { padding-left: 1.25rem; }
button { font: inherit; }
h1, h2, h3, .display { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }

a, button, [role="button"] { cursor: pointer; }
a:focus-visible, button:focus-visible {
    outline: 2.5px solid var(--sindoor);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 300;
    background: var(--ink); color: var(--paper);
    padding: 0.6rem 1rem; border-radius: 0 0 0.5rem 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

.container { max-width: 1200px; margin-inline: auto; padding-inline: 1.25rem; }
/* Header (top strip + nav bar) is never width-capped — it spans the full viewport */
.topline .container,
.site-header .container { max-width: none; }

/* ---------- Header: notice strip + sticky bar ---------- */
.topline {
    background: var(--ink); color: #C9CDD6;
    font-size: 0.78rem;
}
.topline-inner {
    display: flex; justify-content: space-between; gap: 1rem;
    padding-block: 0.45rem;
}
.topline .mono { font-size: 0.74rem; font-weight: 500; color: #9BA3B0; letter-spacing: 0.08em; text-transform: uppercase; }
.topline-flag { display: inline-flex; align-items: center; gap: 0.45rem; }
.topline-flag svg { color: var(--sindoor-bright); }

.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1.5px solid var(--sand);
}
.header-inner {
    min-height: var(--bar-h);
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.9rem; }
.brand img {
    width: 56px; height: 56px; border-radius: 14px;
    border: 1.5px solid var(--sand);
}
.brand-text { display: grid; line-height: 1.15; }
.brand-name {
    font-family: var(--font-display);
    font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink);
}
.brand-accent { color: var(--sindoor); }
.brand-tag { font-size: 0.72rem; color: var(--note); letter-spacing: 0.06em; text-transform: uppercase; }

.nav-list { display: flex; align-items: center; gap: 0.2rem; list-style: none; padding: 0; }
.nav-link {
    display: block; padding: 0.5rem 0.8rem;
    color: var(--ink-soft); font-weight: 500; font-size: 0.96rem;
    border-radius: 999px;
    transition: color 180ms var(--ease), background-color 180ms var(--ease);
}
.nav-link:hover { color: var(--ink); background: var(--paper); }
.nav-link.is-active { color: var(--sindoor); background: var(--sindoor-tint); font-weight: 600; }
.nav-sep { width: 1.5px; height: 22px; background: var(--sand); margin-inline: 0.6rem; }
.nav-cta {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    background: var(--sindoor); color: #fff;
    font-weight: 700; font-size: 0.95rem; border-radius: 999px;
    box-shadow: var(--hard-shadow);
    transition: background-color 180ms var(--ease), transform 150ms var(--ease), box-shadow 150ms var(--ease);
}
.nav-cta:hover { background: var(--sindoor-deep); transform: translateY(-1px); }
.nav-cta:active { transform: translate(2px, 2px); box-shadow: none; }

.nav-toggle {
    display: none;
    background: var(--white); color: var(--ink);
    border: 1.5px solid var(--ink);
    width: 46px; height: 46px; border-radius: 12px;
    align-items: center; justify-content: center;
    box-shadow: var(--hard-shadow);
}
.nav-toggle:active { transform: translate(2px, 2px); box-shadow: none; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 700; font-size: 1rem; line-height: 1.2;
    border: 1.5px solid transparent;
    transition: background-color 180ms var(--ease), border-color 180ms var(--ease),
                color 180ms var(--ease), transform 150ms var(--ease), box-shadow 150ms var(--ease);
}
.btn-primary { background: var(--sindoor); color: #fff; box-shadow: var(--hard-shadow); }
.btn-primary:hover { background: var(--sindoor-deep); transform: translateY(-1px); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: none; }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-lg { padding: 0.95rem 1.9rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Section heads ---------- */
.section { padding-top: clamp(3.5rem, 8vw, 6rem); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.section-head-copy { min-width: 0; }
.kicker {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--sindoor);
    margin-bottom: 0.7rem;
}
.kicker::before { content: ""; width: 26px; height: 2.5px; background: var(--sindoor); border-radius: 2px; }
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800; letter-spacing: -0.02em; line-height: 1.08;
}
.section-sub { color: var(--note); margin-top: 0.5rem; }
.section-link {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--ink); font-weight: 600; font-size: 0.95rem;
    border-bottom: 2px solid var(--sindoor);
    padding-bottom: 2px;
    transition: color 180ms var(--ease);
}
.section-link:hover { color: var(--sindoor); }

/* ---------- Hero (homepage) — Workers AI pattern background ---------- */
.hero {
    position: relative;
    background-image: url('/assets/images/ai/hero-pattern.webp');
    background-size: cover;
    background-position: center right;
    border-bottom: 1.5px solid var(--sand);
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(96deg,
        var(--paper) 0%, var(--paper) 38%,
        rgba(250, 245, 235, 0.94) 52%,
        rgba(250, 245, 235, 0.55) 74%,
        rgba(250, 245, 235, 0.30) 100%);
}
.hero-inner {
    position: relative;
    padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero-flag {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--white); border: 1.5px solid var(--ink);
    border-radius: 999px; padding: 0.4rem 0.95rem;
    font-size: 0.82rem; font-weight: 600; color: var(--ink);
    box-shadow: var(--hard-shadow);
    margin-bottom: 1.4rem;
}
.hero-flag svg { color: var(--peacock); }
.hero-title {
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    font-weight: 800; letter-spacing: -0.025em; line-height: 1.04;
}
.hero-title .accent-text { color: var(--sindoor); }
.hero-sub { color: var(--ink-soft); margin-top: 1.2rem; font-size: 1.08rem; }
.hero-stats {
    display: inline-flex; gap: 0;
    background: var(--white); border: 1.5px solid var(--sand); border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 1.8rem;
    overflow: hidden;
}
.hero-stat { padding: 0.85rem 1.5rem; border-left: 1.5px solid var(--sand); }
.hero-stat:first-child { border-left: 0; }
.hero-stat-num { display: block; font-size: 1.35rem; color: var(--sindoor); }
.hero-stat-label { font-size: 0.8rem; color: var(--note); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }

/* ---------- Trust band ---------- */
.trust-band { border-bottom: 1.5px solid var(--sand); background: var(--white); }
.trust-inner {
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding-block: 1.35rem; gap: 1.25rem;
}
.trust-item { display: flex; gap: 0.8rem; align-items: center; }
.trust-item > svg { color: var(--sindoor); flex-shrink: 0; }
.trust-item div { display: grid; line-height: 1.35; }
.trust-item strong { font-size: 0.95rem; color: var(--ink); }
.trust-item span { font-size: 0.82rem; color: var(--note); }
.trust-item span .mono { color: var(--sindoor); font-size: 0.8rem; }

/* ---------- Newest: horizontal snap strip ---------- */
.strip-wrap { position: relative; }
.strip {
    display: grid; grid-auto-flow: column;
    grid-auto-columns: 236px;
    gap: 1.1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.25rem 0.25rem 1.1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--sand) transparent;
}
.strip::-webkit-scrollbar { height: 8px; }
.strip::-webkit-scrollbar-thumb { background: var(--sand); border-radius: 4px; }
.strip-card {
    scroll-snap-align: start;
    display: flex; flex-direction: column;
    background: var(--white);
    border: 1.5px solid var(--sand);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.strip-card:hover { transform: translateY(-4px); border-color: var(--sindoor); box-shadow: var(--shadow-deep); }
.strip-card-media { padding: 0.8rem 0.8rem 0; }
.strip-card-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
.strip-card-body { padding: 0.85rem 1rem 1rem; display: grid; gap: 0.45rem; }
.strip-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.strip-card-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.strip-card-meta { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--note); }
.strip-card-meta .mono { font-size: 0.8rem; color: var(--ink-soft); }
.strip-card-meta .rating { color: var(--saffron-deep); }
.strip-card-cta {
    margin-top: 0.3rem;
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--sindoor); font-weight: 700; font-size: 0.88rem;
}

/* ---------- Hot: ranked leaderboard ---------- */
.rank-board {
    display: grid; grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
    background: var(--white);
    border: 1.5px solid var(--sand);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.6rem 1.6rem;
}
.rank-row {
    display: grid;
    grid-template-columns: auto 60px minmax(0, 1fr) auto auto;
    align-items: center; gap: 1rem;
    padding-block: 0.95rem;
    border-top: 1.5px solid var(--sand);
    transition: background-color 180ms var(--ease);
    border-radius: 6px;
}
.rank-board a.rank-row:hover { background: var(--paper); }
.rank-row:nth-child(1), .rank-row:nth-child(2):is(.rank-head + .rank-row) { border-top: 0; }
.rank-row.no-top { border-top: 0; }
.rank-num {
    font-family: var(--font-mono); font-weight: 600;
    font-size: 1.5rem; color: var(--sindoor);
    min-width: 2ch; text-align: center;
}
.rank-row img { width: 60px; height: 60px; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--sand); }
.rank-info { display: grid; line-height: 1.4; min-width: 0; }
.rank-name {
    font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink);
    display: flex; align-items: center; gap: 0.5rem;
    white-space: nowrap; overflow: hidden;
}
.rank-meta { font-size: 0.82rem; color: var(--note); display: flex; gap: 0.9rem; }
.rank-meta .mono { font-size: 0.8rem; color: var(--ink-soft); }
.rank-bonus {
    font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem;
    color: var(--sindoor); background: var(--sindoor-tint);
    padding: 0.3rem 0.65rem; border-radius: 999px;
    white-space: nowrap;
}
.rank-go {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--ink); color: var(--ink);
    transition: background-color 180ms var(--ease), color 180ms var(--ease);
}
.rank-row:hover .rank-go { background: var(--ink); color: var(--paper); }

/* ---------- All games: dense grid ---------- */
.apk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.apk-card {
    display: flex; flex-direction: column;
    background: var(--white);
    border: 1.5px solid var(--sand);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.apk-card:hover { transform: translateY(-4px); border-color: var(--sindoor); box-shadow: var(--shadow-deep); }
.apk-card-media { display: block; padding: 0.65rem 0.65rem 0; }
.apk-card-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
.apk-card-body { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.75rem 0.85rem 0.85rem; flex: 1; }
.apk-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.apk-card-name { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 0.98rem; }
.apk-card-stats { display: flex; gap: 0.8rem; font-size: 0.8rem; color: var(--note); }
.apk-card-stat { display: inline-flex; align-items: center; gap: 0.3rem; }
.apk-card-stat .mono { font-size: 0.78rem; color: var(--ink-soft); }
.apk-card-rating { color: var(--saffron-deep); }
.apk-card-rating svg { color: var(--saffron); }
.apk-card-cta {
    margin-top: auto;
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 0.55rem;
    border-top: 1.5px dashed var(--sand);
    color: var(--sindoor); font-weight: 700; font-size: 0.86rem;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center;
    position: static; /* never absolute */
    font-size: 0.66rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    padding: 0.22rem 0.55rem; border-radius: 999px;
    flex-shrink: 0;
}
.badge-new { color: var(--peacock); background: var(--peacock-tint); }
.badge-hot { color: var(--saffron-deep); background: var(--saffron-tint); }
.badge-version {
    color: var(--note); background: var(--paper); border: 1px solid var(--sand);
    font-family: var(--font-mono); text-transform: none; letter-spacing: 0; font-size: 0.76rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
    list-style: none; padding: 0;
    font-size: 0.85rem; color: var(--note);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 0.35rem; }
.breadcrumb li + li::before { content: "→"; color: var(--sand); }
.breadcrumb a { color: var(--note); transition: color 180ms var(--ease); }
.breadcrumb a:hover { color: var(--sindoor); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- APK detail: blurred-logo hero + ticket ---------- */
.apk-hero {
    position: relative; overflow: hidden;
    border-bottom: 1.5px solid var(--sand);
}
.apk-hero-bg {
    position: absolute; inset: -70px;
    background-size: cover;              /* per spec */
    background-position: center center;  /* per spec */
    filter: blur(42px) saturate(1.25);
    opacity: 0.65;
}
.apk-hero::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(250,245,235,0.75), rgba(250,245,235,0.35) 55%, var(--paper));
}
.apk-hero-inner { position: relative; z-index: 1; padding: 1.4rem 0 9rem; }

.ticket-wrap { position: relative; z-index: 2; margin-top: -6rem; }
.ticket {
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 1.1rem;
    box-shadow: 6px 6px 0 rgba(35, 39, 47, 0.16);
    overflow: hidden;
}
.ticket-main {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.6rem; align-items: center;
    padding: 1.6rem 1.8rem;
}
.ticket-logo {
    width: 108px; height: 108px; object-fit: cover;
    border-radius: 1rem; border: 1.5px solid var(--sand);
}
.ticket-id { min-width: 0; }
.ticket-badges { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.5rem; }
.ticket-title {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 800; letter-spacing: -0.02em; line-height: 1.05;
}
.ticket-note { color: var(--note); font-size: 0.9rem; margin-top: 0.45rem; }
.ticket-note .mono { font-size: 0.85rem; color: var(--ink-soft); }
.ticket-action { display: grid; gap: 0.5rem; justify-items: center; }
.ticket-action .btn { white-space: nowrap; }
.ticket-free { font-size: 0.8rem; color: var(--note); }
.ticket-specs {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border-top: 2px dashed var(--sand);
    background: var(--paper);
}
.spec {
    display: grid; gap: 0.15rem; justify-items: center; text-align: center;
    padding: 0.95rem 0.75rem;
    border-left: 1.5px solid var(--sand);
}
.spec:first-child { border-left: 0; }
.spec-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--note); }
.spec-value { font-family: var(--font-mono); font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.spec-value.accent { color: var(--sindoor); }
.spec .stars { margin-top: 0.1rem; }

/* ---------- Detail info panels ---------- */
.info-duo {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
    margin-top: clamp(2rem, 5vw, 3rem);
}
.panel {
    background: var(--white);
    border: 1.5px solid var(--sand);
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow);
}
.panel-title {
    display: flex; align-items: center; gap: 0.55rem;
    font-family: var(--font-display); font-size: 1.1rem; font-weight: 800;
    margin-bottom: 0.8rem;
}
.panel-title svg { color: var(--sindoor); }
.side-list { display: grid; }
.side-row {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding-block: 0.6rem;
    border-top: 1.5px solid var(--paper);
}
.side-row dt { color: var(--note); font-size: 0.92rem; }
.side-row dd { color: var(--ink); font-weight: 600; font-size: 0.94rem; text-align: right; }
.side-row dd.mono { font-size: 0.88rem; }
.side-row dd.accent { color: var(--sindoor); }
.stars { display: inline-flex; gap: 2px; color: var(--saffron); }

/* ---------- Article (detail + static) ---------- */
.article-wrap { margin-top: clamp(2.5rem, 6vw, 4rem); }
.article-col { width: 100%; }
.article-title {
    font-size: clamp(1.5rem, 3.5vw, 2.1rem);
    font-weight: 800; letter-spacing: -0.02em; line-height: 1.2;
    padding-bottom: 1.2rem; margin-bottom: 1.8rem;
    border-bottom: 1.5px solid var(--sand);
}
.article-body { counter-reset: h2c; }
.article-body h2 {
    counter-increment: h2c;
    display: flex; align-items: baseline; gap: 0.7rem;
    font-size: clamp(1.3rem, 3vw, 1.55rem);
    font-weight: 800; letter-spacing: -0.015em;
    margin: 2.4rem 0 0.85rem;
}
.article-body h2::before {
    content: counter(h2c, decimal-leading-zero);
    font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600;
    color: var(--sindoor);
    border: 1.5px solid var(--sindoor);
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    flex-shrink: 0; transform: translateY(-3px);
}
.article-body h3 { font-size: 1.15rem; font-weight: 700; margin: 1.7rem 0 0.6rem; }
.article-body h4 { font-size: 1.02rem; font-weight: 700; margin: 1.4rem 0 0.5rem; }
.article-body p { color: var(--ink-soft); margin-bottom: 1rem; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body ul { color: var(--ink-soft); margin: 0.6rem 0 1.2rem; display: grid; gap: 0.5rem; }
.article-body li::marker { color: var(--sindoor); }

/* ---------- FAQ accordion ---------- */
.faq-accordion { display: grid; gap: 0.7rem; margin: 1rem 0 1.4rem; }
.faq-item {
    background: var(--white);
    border: 1.5px solid var(--sand);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.faq-item[open] { border-color: var(--sindoor); box-shadow: var(--shadow); }
.faq-q {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.95rem 1.2rem;
    font-family: var(--font-display);
    font-weight: 700; font-size: 1.02rem; color: var(--ink);
    cursor: pointer;
    list-style: none;
    transition: color 180ms var(--ease), background-color 180ms var(--ease);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::marker { content: ""; }
.faq-q:hover { color: var(--sindoor); background: var(--paper); }
.faq-item[open] .faq-q { color: var(--sindoor); border-bottom: 1.5px dashed var(--sand); }
.faq-chev { flex-shrink: 0; color: var(--sindoor); transition: transform 220ms var(--ease); }
.faq-item[open] .faq-chev { transform: rotate(45deg); }
.faq-a { padding: 0.9rem 1.2rem 1rem; }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- Content tables ---------- */
.table-scroll { overflow-x: auto; margin: 1.2rem 0 1.6rem; border: 1.5px solid var(--sand); border-radius: var(--radius-sm); background: var(--white); }
.content-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.95rem; }
.content-table th {
    background: var(--ink); color: var(--paper);
    text-align: left; font-weight: 600;
    padding: 0.75rem 1rem; white-space: nowrap;
}
.content-table td {
    color: var(--ink-soft);
    padding: 0.7rem 1rem;
    border-bottom: 1.5px solid var(--paper);
    font-family: var(--font-mono); font-size: 0.87rem;
}
.content-table td:first-child { font-family: var(--font-body); font-size: 0.95rem; color: var(--ink); font-weight: 500; }
.content-table tbody tr:last-child td { border-bottom: 0; }
.content-table tbody tr:hover td { background: var(--paper); }

/* ---------- Homepage magazine article ---------- */
.mag { border-top: 1.5px solid var(--sand); margin-top: clamp(3.5rem, 8vw, 6rem); }
.mag-head { padding-top: clamp(3rem, 7vw, 5rem); }
.mag-title {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 800; letter-spacing: -0.02em; line-height: 1.1;
    margin-bottom: 1.2rem;
}
.mag-intro p { color: var(--ink-soft); margin-bottom: 1rem; }
.mag-intro strong, .mag-zig strong, .mag-cardgrid strong { color: var(--ink); }

.mag-zig {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(1.8rem, 5vw, 4rem);
    align-items: center;
    margin-top: clamp(2.5rem, 6vw, 4rem);
}
.mag-zig.flip .mag-zig-media { order: -1; }
.mag-zig-media img {
    width: 100%; border-radius: var(--radius);
    border: 1.5px solid var(--sand);
    box-shadow: var(--shadow);
    background: var(--white);
}
.mag-zig-copy h2 {
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    font-weight: 800; letter-spacing: -0.015em; line-height: 1.15;
    margin-bottom: 0.8rem;
}
.mag-zig-copy h3 { font-size: 1.1rem; font-weight: 700; margin: 1.2rem 0 0.4rem; }
.mag-zig-copy p { color: var(--ink-soft); margin-bottom: 0.8rem; }
.mag-zig-copy ul { color: var(--ink-soft); display: grid; gap: 0.45rem; margin-top: 0.5rem; }
.mag-zig-copy li::marker { color: var(--sindoor); }

.mag-band {
    margin-top: clamp(2.5rem, 6vw, 4rem);
    background: var(--white);
    border: 1.5px solid var(--sand);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(1.5rem, 4vw, 2.5rem);
}
.mag-band h2 {
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    font-weight: 800; margin-bottom: 0.8rem;
}
.mag-band p { color: var(--ink-soft); margin-bottom: 0.9rem; }
.mag-band .table-scroll { margin-bottom: 0.4rem; }

.mag-cardgrid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: clamp(2.5rem, 6vw, 4rem);
}
.mag-cell {
    background: var(--white);
    border: 1.5px solid var(--sand);
    border-radius: var(--radius);
    padding: 1.5rem 1.6rem;
}
.mag-cell h2 {
    font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em;
    padding-bottom: 0.7rem; margin-bottom: 0.9rem;
    border-bottom: 2px solid var(--sindoor-tint);
}
.mag-cell h3 { font-size: 1.02rem; font-weight: 700; margin: 1.1rem 0 0.35rem; }
.mag-cell p { color: var(--ink-soft); font-size: 0.96rem; margin-bottom: 0.7rem; }
.mag-cell ul { color: var(--ink-soft); font-size: 0.96rem; display: grid; gap: 0.4rem; }
.mag-cell li::marker { color: var(--sindoor); }
/* An odd last card spans the full row instead of leaving a gap */
.mag-cardgrid .mag-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- Warning section ---------- */
.warning-section { padding-top: clamp(3.5rem, 8vw, 6rem); }
.warning-panel {
    background: var(--sindoor-tint);
    border: 2px dashed var(--sindoor);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 4vw, 2.5rem);
}
.warning-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.warning-roundel {
    display: inline-flex; align-items: center; justify-content: center;
    width: 50px; height: 50px; flex-shrink: 0;
    border-radius: 50%;
    color: #fff; background: var(--sindoor);
}
.warning-title { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 800; color: var(--sindoor-deep); }
.warning-lead { color: var(--ink); margin-bottom: 0.8rem; }
.warning-text { color: var(--ink-soft); }
.warning-tips { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; margin-top: 1.4rem; }
.warning-tip {
    display: inline-flex; align-items: center; gap: 0.45rem;
    background: var(--white);
    border: 1.5px solid var(--sindoor);
    color: var(--ink); font-size: 0.88rem; font-weight: 600;
    padding: 0.45rem 0.9rem; border-radius: 999px;
}
.warning-tip svg { color: var(--sindoor); }

/* ---------- Static page hero ---------- */
.page-hero {
    background-image: url('/assets/images/ai/hero-pattern.webp');
    background-size: cover; background-position: center;
    position: relative;
    border-bottom: 1.5px solid var(--sand);
}
.page-hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(250,245,235,0.92), rgba(250,245,235,0.86));
}
.page-hero-inner { position: relative; padding-block: clamp(2.8rem, 6vw, 4.5rem); }
.page-hero-title {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 800; letter-spacing: -0.02em; line-height: 1.12;
    margin-top: 1rem;
}
.static-layout { padding-block: clamp(2.5rem, 6vw, 4rem) 0; }

/* ---------- Related strip ---------- */
.related-section { padding-top: clamp(3.5rem, 8vw, 6rem); }

/* ---------- Sticky download bar (detail) ---------- */
.dl-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--ink);
    transform: translateY(110%);
    transition: transform 280ms var(--ease);
    padding-bottom: env(safe-area-inset-bottom);
}
.dl-bar.is-visible { transform: translateY(0); }
.dl-bar-inner {
    display: flex; align-items: center; gap: 1rem;
    padding-block: 0.7rem;
}
.dl-bar img { width: 44px; height: 44px; border-radius: 10px; }
.dl-bar-info { display: grid; line-height: 1.3; min-width: 0; margin-right: auto; }
.dl-bar-name { color: #fff; font-family: var(--font-display); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-bar-bonus { color: #C9CDD6; font-size: 0.8rem; }
.dl-bar-bonus .mono { color: var(--sindoor-bright); font-size: 0.8rem; }
.dl-bar .btn { padding: 0.6rem 1.3rem; font-size: 0.95rem; box-shadow: none; }

/* ---------- Pre-footer CTA + Footer ---------- */
.prefooter { margin-top: clamp(3.5rem, 8vw, 6rem); background: var(--sindoor); }
.prefooter-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    padding-block: 2.2rem;
}
.prefooter-title {
    color: #fff; font-size: clamp(1.35rem, 3vw, 1.9rem);
    font-weight: 800; letter-spacing: -0.015em;
}
.prefooter-sub { color: rgba(255,255,255,0.85); margin-top: 0.3rem; font-size: 0.95rem; }
.btn-paper { background: var(--paper); color: var(--ink); box-shadow: 4px 4px 0 rgba(0,0,0,0.18); }
.btn-paper:hover { background: #fff; transform: translateY(-1px); }
.btn-paper:active { transform: translate(2px,2px); box-shadow: none; }

.site-footer { background: var(--ink); color: #B8BEC9; }
.footer-top {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 5vw, 4rem);
    padding-block: 3.2rem 2.4rem;
}
.footer-brand-row { display: flex; align-items: center; gap: 1.1rem; }
.footer-brand-row img {
    width: 72px; height: 72px; border-radius: 18px;
    border: 2px solid rgba(255,255,255,0.15);
}
.footer-brand-text { display: grid; line-height: 1.2; }
.footer-brand-name {
    font-family: var(--font-display); font-size: 1.9rem; font-weight: 800;
    letter-spacing: -0.02em; color: #fff;
}
.footer-brand-name .brand-accent { color: var(--sindoor-bright); }
.footer-brand-tag { font-size: 0.8rem; color: #8A919E; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-tagline { margin-top: 1.1rem; font-size: 0.94rem; color: #9BA3B0; }
.footer-18 {
    display: inline-flex; align-items: center; gap: 0.55rem;
    margin-top: 1.2rem;
    border: 1.5px solid var(--sindoor-bright); color: var(--sindoor-bright);
    border-radius: 999px; padding: 0.4rem 0.95rem;
    font-weight: 600; font-size: 0.85rem;
}
.footer-cols { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 2rem; }
.footer-title {
    font-family: var(--font-mono);
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
    color: #8A919E; margin-bottom: 1rem;
}
.footer-cols ul { list-style: none; padding: 0; display: grid; gap: 0.55rem; }
.footer-cols a { color: #C9CDD6; font-size: 0.95rem; transition: color 180ms var(--ease); }
.footer-cols a:hover { color: var(--sindoor-bright); }
.footer-note { font-size: 0.88rem; color: #9BA3B0; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-block: 1.3rem;
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
    font-size: 0.82rem; color: #8A919E;
}

/* ---------- Scroll to top ---------- */
.scroll-top {
    position: fixed; right: 1.25rem; bottom: 5.5rem; z-index: 89;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: var(--white); color: var(--ink);
    border: 1.5px solid var(--ink); border-radius: 50%;
    box-shadow: var(--hard-shadow);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 220ms;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--ink); color: var(--paper); }
.scroll-top:active { transform: translate(2px, 2px); box-shadow: none; }
body:not(.has-dlbar) .scroll-top { bottom: 1.25rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(10px); }
.reveal.is-visible {
    opacity: 1; transform: translateY(0);
    transition: opacity 380ms var(--ease), transform 380ms var(--ease);
}
.no-observer .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
    .container { padding-inline: 2rem; }
    .apk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
}
@media (min-width: 1024px) {
    .apk-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
    .rank-board { grid-template-columns: 1fr; padding: 0.4rem 1.2rem; }
    .info-duo { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .mag-cardgrid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .topline .topline-right { display: none; }
    .nav-toggle { display: flex; }
    :root { --bar-h: 76px; }
    .brand img { width: 48px; height: 48px; }
    .brand-name { font-size: 1.35rem; }
    .site-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--white);
        border-bottom: 2px solid var(--ink);
        box-shadow: var(--shadow-deep);
        padding: 0.8rem 1.25rem 1.2rem;
        transform: translateY(-6px); opacity: 0; visibility: hidden;
        transition: transform 220ms var(--ease), opacity 220ms var(--ease), visibility 220ms;
    }
    .site-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0.1rem; }
    .nav-link { padding: 0.8rem 0.85rem; font-size: 1.05rem; border-radius: 10px; }
    .nav-sep { display: none; }
    .nav-cta { margin-top: 0.7rem; justify-content: center; padding: 0.85rem; }

    .hero { background-position: center; }
    .hero::before { background: linear-gradient(180deg, rgba(250,245,235,0.96) 0%, rgba(250,245,235,0.9) 70%, rgba(250,245,235,0.65) 100%); }
    .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
    .hero-stat { padding: 0.75rem 0.9rem; }
    .hero-stat-num { font-size: 1.15rem; }

    .trust-inner { grid-template-columns: 1fr 1fr; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 0.8rem; }

    .strip { grid-auto-columns: 200px; }

    .rank-row { grid-template-columns: auto 48px minmax(0, 1fr) auto; }
    .rank-row img { width: 48px; height: 48px; }
    .rank-bonus { display: none; }

    .ticket-main { grid-template-columns: 1fr; justify-items: start; gap: 1rem; padding: 1.3rem 1.2rem; }
    .ticket-action { justify-items: stretch; width: 100%; }
    .ticket-specs { grid-template-columns: 1fr 1fr; }
    .spec:nth-child(3) { border-left: 0; }
    .spec:nth-child(n+3) { border-top: 1.5px solid var(--sand); }

    .mag-zig { grid-template-columns: 1fr; }
    .mag-zig.flip .mag-zig-media { order: 0; }

    .prefooter-inner { flex-direction: column; align-items: flex-start; }
    .footer-cols { grid-template-columns: 1fr; gap: 1.6rem; }

    .dl-bar-bonus { display: none; }
}

@media (max-width: 400px) {
    .apk-grid { gap: 0.75rem; }
    .trust-inner { grid-template-columns: 1fr; gap: 0.9rem; }
    .hero-stats { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .dl-bar { transition: none; }
}
