/* RankSite Builder – front-end styles */
:root {
  --primary: #1d4ed8;
  --accent: #f59e0b;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --heading-font: inherit;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .12);
  --green: #16a34a;
  --red: #dc2626;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; font-size: 17px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--heading-font); line-height: 1.25; color: #0f172a; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin: .3em 0 .5em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.25rem; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.skip-link { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 10px; }

/* Admin bar */
.admin-bar { background: #0f172a; color: #cbd5e1; font-size: 13px; padding: 6px 20px; }
.admin-bar a { color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #0f172a; font-weight: 800; font-size: 1.2rem; }
.logo img { max-height: 44px; width: auto; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #000)); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.site-nav { display: flex; gap: 26px; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #0f172a; margin: 5px 0; border-radius: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; font-family: inherit; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-cta { background: var(--accent); border-color: var(--accent); color: #111827; }
.btn-cta:hover { filter: brightness(1.05); }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; width: 100%; }
.btn-sm { padding: 7px 12px; font-size: .85rem; background: var(--primary); color: #fff; border-color: var(--primary); }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 50% -10%, color-mix(in srgb, var(--primary) 12%, #fff), #fff 70%); padding: 48px 0 24px; text-align: center; }
.eyebrow { color: var(--primary); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.hero-intro { color: #334155; font-size: 1.08rem; text-align: left; }
.hero-intro p:first-child { margin-top: 0; }
.quick-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.quick-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); background: #fff; border-radius: 12px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .15s; text-align: left; }
.quick-pick:hover { transform: translateY(-2px); }
.qp-rank { font-weight: 800; color: var(--primary); font-size: .85rem; }
.qp-name { font-weight: 800; font-size: 1.05rem; }
.qp-badge { color: var(--muted); font-size: .85rem; }

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { margin-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.link-more { font-weight: 700; text-decoration: none; }
.disclosure { font-size: .82rem; color: var(--muted); background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 22px; }
.rankings { padding-top: 24px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* Listings */
.listing { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; scroll-margin-top: 90px; }
.listing-logo { width: 96px; height: 64px; object-fit: contain; flex-shrink: 0; }
.logo-fallback { display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 10%, #fff); color: var(--primary); font-weight: 800; font-size: 1.6rem; border-radius: 12px; }
.listing-name { margin: 0 0 4px; font-size: 1.3rem; }
.best-for { margin: 0 0 6px; color: var(--muted); font-size: .92rem; }
.best-for strong { color: var(--text); }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); padding: 3px 8px; border-radius: 999px; vertical-align: middle; }
.listing-row { display: grid; grid-template-columns: 44px 96px 1fr 110px 190px; align-items: center; gap: 20px; padding: 22px 24px; }
.rank-badge { width: 40px; height: 40px; border-radius: 50%; background: #0f172a; color: #fff; font-weight: 800; display: grid; place-items: center; }
.listing-info .short { margin: 0; color: #334155; font-size: .95rem; }
.listing-rating { text-align: center; }
.rating-num { display: block; font-size: 1.6rem; font-weight: 800; color: #0f172a; line-height: 1; margin-bottom: 4px; }
.listing-cta { display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: center; }
.price { color: var(--muted); font-size: .85rem; margin: 6px 0 0; text-align: center; }

.stars { position: relative; display: inline-block; width: 90px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23e2e8f0' d='M10 1.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8L10 14.9l-5.2 2.7 1-5.8L1.5 7.7l5.9-.9z'/%3E%3C/svg%3E") repeat-x; background-size: 18px 18px; }
.stars-fill { position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23f59e0b' d='M10 1.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8L10 14.9l-5.2 2.7 1-5.8L1.5 7.7l5.9-.9z'/%3E%3C/svg%3E") repeat-x; background-size: 18px 18px; }

/* #1 listing */
.listing-top { border: 2px solid var(--accent); box-shadow: var(--shadow-lg); position: relative; margin-bottom: 26px; }
.top-ribbon { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #fff)); color: #111827; font-weight: 800; padding: 10px 24px; font-size: .95rem; letter-spacing: .02em; }
.top-grid { display: grid; grid-template-columns: 250px 1fr; gap: 32px; padding: 28px; }
.top-aside { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; border-right: 1px solid var(--line); padding-right: 28px; }
.logo-lg { width: 180px; height: 100px; }
.rating-big .rating-num { font-size: 2.4rem; }
.top-main .listing-name { font-size: 1.7rem; }
.rank-num { color: var(--accent); }
.lead { font-size: 1.08rem; color: #334155; margin: 6px 0 14px; }
.features { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.features li { display: flex; justify-content: space-between; gap: 10px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: .9rem; }
.features span { color: var(--muted); }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0; }
.pros-cons h4 { margin: 0 0 6px; font-size: .95rem; }
.pros-cons ul { list-style: none; padding: 0; margin: 0; }
.pros-cons li { padding-left: 26px; position: relative; margin: 6px 0; font-size: .94rem; }
.pros li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: #dcfce7; color: var(--green); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.cons li::before { content: "✕"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: #fee2e2; color: var(--red); font-size: 11px; font-weight: 800; display: grid; place-items: center; }

details.review { border-top: 1px solid var(--line); }
details.review summary { cursor: pointer; padding: 14px 24px; font-weight: 700; color: var(--primary); list-style: none; }
details.review summary::-webkit-details-marker { display: none; }
details.review summary::after { content: " ▾"; }
details.review[open] summary::after { content: " ▴"; }
.review-body { padding: 0 24px 16px; }
.review-cta { padding: 0 24px 22px; }

/* Comparison table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.2em 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: #0f172a; color: #fff; font-weight: 700; }
thead th:first-child { border-top-left-radius: 10px; }
thead th:last-child { border-top-right-radius: 10px; }
tbody tr:nth-child(even) { background: var(--bg-alt); }
.compare { background: #fff; box-shadow: var(--shadow); border-radius: 10px; }
.compare td { vertical-align: middle; }
.row-top { background: color-mix(in srgb, var(--accent) 12%, #fff) !important; }

/* Prose */
.prose { font-size: 1.06rem; }
.prose h2 { margin: 1.8em 0 .6em; }
.prose h3 { margin: 1.5em 0 .5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.prose blockquote { border-left: 4px solid var(--primary); margin: 1.5em 0; padding: .5em 1.2em; background: var(--bg-alt); border-radius: 0 10px 10px 0; }
.key-takeaways { background: color-mix(in srgb, var(--primary) 7%, #fff); border: 1px solid color-mix(in srgb, var(--primary) 25%, #fff); border-radius: var(--radius); padding: 18px 22px; margin: 1.5em 0; }
.key-takeaways h3 { margin-top: 0; font-size: 1.1rem; }
.key-takeaways ul { margin-bottom: 0; }
.callout { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 14px 18px; margin: 1.4em 0; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none; position: relative; padding-right: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--primary); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 16px; margin: 0; color: #334155; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-alt); display: block; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.post-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.post-card h3 a { color: #0f172a; text-decoration: none; }
.post-card h3 a:hover { color: var(--primary); }
.post-card p { margin: 0 0 10px; color: #475569; font-size: .95rem; }
.post-card .meta { margin-top: auto; color: var(--muted); font-size: .82rem; }

/* Page head / breadcrumbs */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 36px 0 28px; }
.page-head h1 { margin-bottom: .2em; }
.page-head .sub { color: var(--muted); margin: 0; }
.breadcrumbs { font-size: .85rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }

/* Article */
.preview-banner { background: #fef3c7; color: #92400e; text-align: center; padding: 10px; font-weight: 600; font-size: .9rem; }
.article-head { padding: 36px 0 10px; }
.article-head .narrow { max-width: 1140px; }
.article-meta { color: var(--muted); font-size: .92rem; }
.article-meta a { color: var(--text); font-weight: 600; }
.featured-image { margin: 0 0 24px; }
.featured-image img { border-radius: var(--radius); width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.featured-image figcaption { font-size: .8rem; color: var(--muted); margin-top: 8px; text-align: right; }
.featured-image figcaption a { color: var(--muted); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; max-width: 1140px; padding-bottom: 50px; }
.article-sidebar .sticky { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 20px; }
.toc { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fff; }
.toc h4 { margin: 0 0 8px; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 18px; font-size: .9rem; }
.toc li { margin: 6px 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover, .toc a.active { color: var(--primary); font-weight: 600; }
.toc-mobile { display: none; margin-bottom: 20px; }
.toc-mobile summary { font-weight: 700; cursor: pointer; }
.side-picks { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.side-picks h4 { margin: 0 0 8px; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.side-pick { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; }
.side-pick:last-child { border-bottom: 0; }
.side-pick span { color: var(--primary); }
.side-pick em { margin-left: auto; font-style: normal; color: var(--muted); font-weight: 500; }
.article-faq { margin-top: 40px; }
.top-pick-box { border: 2px solid var(--accent); border-radius: var(--radius); margin: 40px 0; overflow: hidden; }
.tpb-label { background: var(--accent); font-weight: 800; padding: 8px 18px; color: #111827; }
.tpb-inner { display: flex; align-items: center; gap: 18px; padding: 18px; flex-wrap: wrap; }
.tpb-inner img { width: 90px; height: 60px; object-fit: contain; }
.tpb-inner > div { flex: 1; min-width: 200px; }
.tpb-inner p { margin: 4px 0 0; font-size: .95rem; color: #475569; }
.tpb-name { font-size: 1.2rem; display: block; }
.tpb-more { margin: 0; padding: 0 18px 16px; font-size: .9rem; }
.author-box { display: flex; gap: 16px; align-items: flex-start; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.author-box p { margin: 4px 0 0; color: #475569; font-size: .95rem; }
.author-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; flex-shrink: 0; }

/* Ads */
.ad-slot { text-align: center; margin: 20px auto; overflow: hidden; }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Forms */
.contact-form { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
.contact-form input, .contact-form textarea { font: inherit; padding: 11px 14px; border: 1px solid #cbd5e1; border-radius: 10px; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: 10px; margin: 20px 0; }
.notice-success { background: #dcfce7; color: #166534; }
.notice-error { background: #fee2e2; color: #991b1b; }

/* Footer */
.site-footer { background: #0f172a; color: #94a3b8; padding: 56px 0 24px; font-size: .95rem; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 8px 0; }
.logo-footer { color: #fff; }
.social { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 40px; padding-top: 20px; font-size: .85rem; }
.footer-bottom p { margin: 6px 0; }

/* Responsive */
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
  .toc-mobile { display: block; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .listing-row { grid-template-columns: 40px 80px 1fr; }
  .listing-rating { grid-column: 2 / 3; text-align: left; }
  .listing-cta { grid-column: 3 / 4; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 20px; border-top: 1px solid var(--line); }
  .quick-picks { grid-template-columns: 1fr; }
  .top-grid { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .top-aside { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .pros-cons, .form-row { grid-template-columns: 1fr; }
  .listing-row { grid-template-columns: 36px 1fr; gap: 12px; padding: 18px; }
  .listing-row .listing-logo { grid-column: 2; width: 80px; height: 50px; }
  .listing-info, .listing-rating, .listing-cta { grid-column: 1 / -1; }
  .listing-rating { display: flex; align-items: center; gap: 10px; }
  .listing-rating .rating-num { font-size: 1.2rem; margin: 0; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 40px 0; }
}
