/*
Theme Name: SwiftRummy
Theme URI: https://swiftrummy.example/
Author: SwiftRummy
Description: A lightweight app directory theme inspired by the information architecture of XYZ Rummy. Includes a sortable App custom post type and CSV import tools.
Version: 1.2.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: swiftrummy
*/

:root {
    --sr-ink: #18213b;
    --sr-muted: #66708c;
    --sr-soft: #f5f7fb;
    --sr-line: #e5e9f2;
    --sr-brand: #5b4df6;
    --sr-brand-dark: #3d35bd;
    --sr-orange: #ff8a36;
    --sr-success: #1c9a65;
    --sr-radius: 18px;
    --sr-shadow: 0 16px 45px rgba(40, 48, 93, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--sr-ink);
    background: #f8f9fd;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.sr-container { width: min(1160px, calc(100% - 36px)); margin: 0 auto; }
.sr-site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.91); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(229,233,242,.85); }
.sr-header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.sr-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.08rem; font-weight: 800; letter-spacing: -.02em; }
.sr-brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 13px; color: #fff; background: linear-gradient(145deg, var(--sr-brand), #8d7dff); box-shadow: 0 8px 18px rgba(91,77,246,.28); font-weight: 900; }
.sr-brand small { display: block; color: var(--sr-muted); font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sr-nav { display: flex; align-items: center; gap: 22px; font-size: .92rem; font-weight: 600; }
.sr-nav ul { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; }
.sr-nav li { margin: 0; }
.sr-nav a { color: #555f7b; }
.sr-nav a:hover, .sr-nav .current-menu-item > a { color: var(--sr-brand); }
.sr-nav-cta { padding: 9px 15px; border-radius: 999px; color: #fff !important; background: var(--sr-ink); }
.sr-menu-toggle { display: none; border: 0; background: transparent; color: var(--sr-ink); font-size: 1.5rem; }

.sr-hero { position: relative; overflow: hidden; padding: 88px 0 62px; background: radial-gradient(circle at 88% 8%, rgba(143,127,255,.22), transparent 33%), linear-gradient(135deg, #f6f3ff 0%, #fff 55%, #fff6ed 100%); }
.sr-hero:after { content: ""; position: absolute; right: -150px; bottom: -200px; width: 460px; height: 460px; border: 1px solid rgba(91,77,246,.12); border-radius: 50%; box-shadow: 0 0 0 45px rgba(91,77,246,.035), 0 0 0 90px rgba(91,77,246,.025); pointer-events: none; }
.sr-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 52px; }
.sr-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--sr-brand); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sr-kicker:before { content: ""; width: 26px; height: 2px; background: var(--sr-orange); }
.sr-hero h1 { max-width: 680px; margin: 16px 0 16px; font-size: clamp(2.4rem, 5vw, 4.65rem); line-height: 1.04; letter-spacing: -.055em; }
.sr-hero h1 em { color: var(--sr-brand); font-style: normal; }
.sr-hero-copy { max-width: 620px; color: var(--sr-muted); font-size: 1.04rem; }
.sr-hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 28px; }
.sr-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px; font-size: .9rem; font-weight: 750; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.sr-button:hover { transform: translateY(-2px); }
.sr-button-primary { color: #fff; background: var(--sr-brand); box-shadow: 0 12px 25px rgba(91,77,246,.25); }
.sr-button-primary:hover { background: var(--sr-brand-dark); }
.sr-button-ghost { color: var(--sr-ink); background: #fff; border-color: var(--sr-line); }
.sr-trust { display: flex; flex-wrap: wrap; gap: 16px 24px; margin-top: 28px; color: var(--sr-muted); font-size: .83rem; }
.sr-trust span:before { content: "✓"; display: inline-grid; place-items: center; width: 19px; height: 19px; margin-right: 6px; border-radius: 50%; color: var(--sr-success); background: #e7f7ef; font-size: .72rem; font-weight: 800; }
.sr-hero-art { position: relative; min-height: 340px; }
.sr-device { position: absolute; right: 8%; top: 0; width: 238px; height: 368px; padding: 14px; border: 7px solid #232a4b; border-radius: 34px; background: linear-gradient(160deg, #776bff, #27295c); box-shadow: 20px 24px 50px rgba(38,40,89,.28); transform: rotate(6deg); }
.sr-device-screen { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 17px; border-radius: 20px; background: linear-gradient(160deg, #fff, #f1efff); }
.sr-device-top { display: flex; justify-content: space-between; color: var(--sr-muted); font-size: .64rem; }
.sr-device-logo { display: grid; place-items: center; width: 72px; height: 72px; margin: 10px auto 0; border-radius: 22px; color: #fff; background: linear-gradient(145deg, #ff9f42, #e6524f); font-weight: 900; font-size: 1.35rem; box-shadow: 0 10px 20px rgba(229,82,79,.24); }
.sr-device-lines { display: grid; gap: 8px; }
.sr-device-lines span { display: block; height: 9px; border-radius: 99px; background: #d9d8f7; }
.sr-device-lines span:nth-child(2) { width: 72%; background: #bcb6ff; }
.sr-device-button { height: 34px; border-radius: 10px; background: var(--sr-brand); }
.sr-orbit { position: absolute; right: 0; bottom: 12px; display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; color: var(--sr-brand); background: #fff; box-shadow: var(--sr-shadow); font-size: .78rem; font-weight: 800; text-align: center; }

.sr-section { padding: 76px 0; }
.sr-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.sr-section-head h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -.04em; }
.sr-section-head p { max-width: 510px; margin: 7px 0 0; color: var(--sr-muted); font-size: .92rem; }
.sr-tabs { display: inline-flex; gap: 5px; padding: 5px; border: 1px solid var(--sr-line); border-radius: 13px; background: #fff; }
.sr-tabs a { padding: 8px 13px; border-radius: 9px; color: var(--sr-muted); font-size: .8rem; font-weight: 750; }
.sr-tabs a.active, .sr-tabs a:hover { color: var(--sr-brand); background: #f0eeff; }
.sr-app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sr-app-card { position: relative; display: flex; flex-direction: column; min-height: 410px; padding: 22px; border: 1px solid #dfe4f0; border-radius: 17px; background: #fff; box-shadow: 0 4px 14px rgba(42,53,95,.025); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.sr-app-card:hover { border-color: #cfcaff; box-shadow: var(--sr-shadow); transform: translateY(-5px); }
.sr-app-card-number { position: absolute; top: 20px; right: 22px; color: #c4c9d8; font-size: .78rem; font-weight: 800; }
.sr-app-top { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 18px; padding-right: 28px; }
.sr-app-icon { display: grid; place-items: center; flex: 0 0 54px; width: 54px; height: 54px; overflow: hidden; border-radius: 16px; color: #fff; background: linear-gradient(145deg, var(--sr-brand), #8f80ff); font-size: 1.2rem; font-weight: 900; box-shadow: 0 8px 16px rgba(91,77,246,.2); }
.sr-app-icon img { width: 100%; height: 100%; object-fit: cover; }
.sr-app-card h3 { display: -webkit-box; overflow: hidden; margin: 1px 0 0; font-size: 1.08rem; line-height: 1.45; letter-spacing: -.025em; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.sr-app-card h3 a:hover { color: var(--sr-brand); }
.sr-app-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 18px; }
.sr-app-meta div { padding: 9px 11px; border-radius: 10px; background: var(--sr-soft); }
.sr-app-meta small { display: block; margin-bottom: 2px; color: var(--sr-muted); font-size: .65rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.sr-app-meta strong { display: -webkit-box; overflow: hidden; font-size: .88rem; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.sr-app-excerpt { display: -webkit-box; flex: 1; overflow: hidden; margin: 0 0 18px; color: var(--sr-muted); font-size: .84rem; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.sr-card-link { display: inline-flex; align-items: center; gap: 6px; color: var(--sr-brand); font-size: .82rem; font-weight: 800; }
.sr-card-link:after { content: "→"; transition: transform .2s ease; }
.sr-card-link:hover:after { transform: translateX(3px); }
.sr-empty { padding: 38px 24px; border: 1px dashed #cbd1e0; border-radius: var(--sr-radius); color: var(--sr-muted); text-align: center; }

.sr-entry-content { color: #4e5b7a; font-size: .96rem; line-height: 1.85; overflow-wrap: anywhere; }
.sr-entry-content h2, .sr-entry-content h3, .sr-entry-content h4 { margin: 1.8em 0 .65em; color: var(--sr-ink); line-height: 1.3; }
.sr-entry-content h2 { font-size: 1.55rem; }
.sr-entry-content h3 { font-size: 1.2rem; }
.sr-entry-content p { margin: 0 0 1em; }
.sr-entry-content ul, .sr-entry-content ol { margin: 0 0 1.15em; padding-left: 1.35em; }
.sr-entry-content img { display: block; width: auto; max-width: 100%; height: auto; margin: 1.2em auto; border-radius: 14px; }
.sr-entry-content figure { margin: 1.2em 0; }
.sr-entry-content table { width: 100%; margin: 1.2em 0; border-collapse: collapse; font-size: .88rem; }
.sr-entry-content th, .sr-entry-content td { padding: 10px 12px; border: 1px solid var(--sr-line); text-align: left; }
.sr-entry-content th { color: var(--sr-ink); background: var(--sr-soft); }
.sr-entry-content a { color: var(--sr-brand); text-decoration: underline; text-underline-offset: 2px; }

.sr-info-band { padding: 26px 0; color: #fff; background: var(--sr-ink); }
.sr-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sr-info-item { display: flex; align-items: center; gap: 13px; }
.sr-info-icon { display: grid; place-items: center; flex: 0 0 39px; width: 39px; height: 39px; border-radius: 12px; color: #fff; background: rgba(255,255,255,.12); }
.sr-info-item strong { display: block; font-size: 1.04rem; }
.sr-info-item span { color: #aeb7d4; font-size: .76rem; }
.sr-article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sr-article-card { overflow: hidden; border: 1px solid var(--sr-line); border-radius: var(--sr-radius); background: #fff; }
.sr-article-card-body { padding: 19px; }
.sr-article-card h3 { margin: 0 0 9px; font-size: 1.02rem; line-height: 1.35; }
.sr-article-card p { margin: 0 0 14px; color: var(--sr-muted); font-size: .82rem; }
.sr-article-label { display: inline-block; margin-bottom: 12px; color: var(--sr-brand); font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }

.sr-page-hero { padding: 58px 0 38px; background: linear-gradient(135deg, #f6f3ff, #fff); }
.sr-page-hero h1 { margin: 0 0 7px; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.05em; }
.sr-breadcrumb { color: var(--sr-muted); font-size: .8rem; }
.sr-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 38px; }
.sr-content-card { padding: clamp(24px, 5vw, 50px); border: 1px solid var(--sr-line); border-radius: var(--sr-radius); background: #fff; }
.sr-content-card h2, .sr-content-card h3 { letter-spacing: -.03em; }
.sr-content-card p, .sr-content-card li { color: #525d79; }
.sr-sidebar-card { padding: 23px; border: 1px solid var(--sr-line); border-radius: var(--sr-radius); background: #fff; }
.sr-sidebar-card h3 { margin: 0 0 15px; font-size: 1rem; }
.sr-sidebar-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sr-sidebar-list a { display: flex; align-items: center; gap: 10px; color: #505b77; font-size: .82rem; font-weight: 650; }
.sr-sidebar-list a:hover { color: var(--sr-brand); }
.sr-sidebar-list .sr-app-icon { flex-basis: 34px; width: 34px; height: 34px; border-radius: 10px; font-size: .75rem; }
.sr-app-single-head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.sr-app-single-head .sr-app-icon { flex-basis: 84px; width: 84px; height: 84px; border-radius: 23px; font-size: 1.8rem; }
.sr-app-single-head h1 { margin: 0 0 5px; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.05em; }
.sr-app-single-head p { margin: 0; color: var(--sr-muted); }
.sr-detail-table { width: 100%; margin: 25px 0; border-collapse: collapse; font-size: .88rem; }
.sr-detail-table th, .sr-detail-table td { padding: 11px 0; border-bottom: 1px solid var(--sr-line); text-align: left; }
.sr-detail-table th { width: 40%; color: var(--sr-muted); font-weight: 600; }
.sr-disclaimer { margin-top: 32px; padding: 14px 16px; border-left: 3px solid var(--sr-orange); border-radius: 8px; color: var(--sr-muted); background: #fff8f2; font-size: .79rem; }
.sr-site-footer { margin-top: 50px; padding: 46px 0 24px; color: #b2bad2; background: #12172d; }
.sr-footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 35px; }
.sr-site-footer .sr-brand { color: #fff; }
.sr-site-footer p { max-width: 350px; font-size: .8rem; }
.sr-site-footer h3 { margin: 0 0 12px; color: #fff; font-size: .86rem; }
.sr-site-footer ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; font-size: .8rem; }
.sr-site-footer .menu { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; font-size: .8rem; }
.sr-site-footer a:hover { color: #fff; }
.sr-footer-bottom { display: flex; justify-content: space-between; gap: 15px; margin-top: 35px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.11); font-size: .73rem; }
.sr-pagination { display: flex; justify-content: center; gap: 7px; margin-top: 30px; }
.sr-pagination .page-numbers { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid var(--sr-line); border-radius: 10px; color: var(--sr-muted); background: #fff; font-size: .8rem; }
.sr-pagination .current, .sr-pagination .page-numbers:hover { color: #fff; border-color: var(--sr-brand); background: var(--sr-brand); }

@media (max-width: 880px) {
    .sr-hero-grid, .sr-content-layout { grid-template-columns: 1fr; }
    .sr-hero { padding-top: 60px; }
    .sr-hero-art { min-height: 290px; max-width: 450px; }
    .sr-app-grid, .sr-article-grid { grid-template-columns: repeat(2, 1fr); }
    .sr-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
    .sr-container { width: min(100% - 28px, 1160px); }
    .sr-header-inner { min-height: 65px; }
    .sr-menu-toggle { display: block; }
    .sr-nav { position: absolute; top: 65px; left: 0; right: 0; display: none; padding: 14px; border-bottom: 1px solid var(--sr-line); background: #fff; box-shadow: 0 12px 25px rgba(20,30,70,.08); }
    .sr-nav.is-open { display: grid; }
    .sr-app-grid, .sr-article-grid, .sr-info-grid, .sr-footer-grid { grid-template-columns: 1fr; }
    .sr-section { padding: 54px 0; }
    .sr-section-head { display: block; }
    .sr-tabs { margin-top: 18px; }
    .sr-device { right: 12%; transform: scale(.83) rotate(6deg); transform-origin: top right; }
    .sr-orbit { right: -2px; bottom: 0; transform: scale(.82); }
    .sr-footer-bottom { display: block; }
    .sr-footer-bottom span { display: block; margin-top: 7px; }
}
