:root {
  --primary: #0f62fe;
  --primary-dark: #0043ce;
  --emerald: #059669;
  --emerald-bg: #ecfdf5;
  --amber-bg: #fffbeb;
  --amber-border: #f59e0b;
  --rose-bg: #fff1f2;
  --rose-border: #fb7185;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.68;
  font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.topbar { background: #0f172a; color: #cbd5e1; font-size: 12px; padding: 7px 0; }
.topbar .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.topbar a { color: #cbd5e1; }
.topbar a:hover { color: #ffffff; }

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 62px; gap: 16px; flex-wrap: wrap; padding: 8px 0;
}
.brand-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 19px; color: #0f172a; text-decoration: none !important;
}
.brand-badge {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, #0f62fe, #06b6d4);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.main-nav a {
  display: inline-block; padding: 7px 13px; border-radius: 8px;
  color: #1e293b; font-weight: 600; font-size: 14px; text-decoration: none;
}
.main-nav a:hover, .main-nav a.active { background: #eff6ff; color: var(--primary); }

.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff; padding: 34px 0 30px; margin-bottom: 24px;
}
.hero h1 { margin: 0 0 8px 0; font-size: 26px; line-height: 1.3; }
.hero h2 { margin: 0; font-size: 15px; font-weight: 400; color: #cbd5e1; max-width: 780px; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.trust-pill {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18);
  color: #f8fafc; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
}

.section-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 14px; }
.section-head h2, .section-head h3 { margin: 0; font-size: 19px; color: #0f172a; }
.breadcrumb { font-size: 13px; color: var(--muted); margin: 16px 0; }
.breadcrumb a { color: var(--muted); }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 14px; }
.app-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: flex; gap: 13px; align-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none !important; color: inherit; position: relative;
}
.app-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07); border-color: #cbd5e1; }
.app-card.featured { border: 2px solid #10b981; background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%); }
.pin-tag {
  position: absolute; top: -9px; right: 12px;
  background: #059699; background: #059669; color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
}
.app-icon {
  width: 58px; height: 58px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 19px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.app-meta { min-width: 0; flex: 1; }
.app-title { font-weight: 700; font-size: 15px; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.app-dev { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
.app-badges { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 11px; }
.ver-pill { background: #f1f5f9; color: #334155; padding: 2px 7px; border-radius: 5px; font-weight: 600; }
.safe-pill { background: var(--emerald-bg); color: var(--emerald); padding: 2px 7px; border-radius: 5px; font-weight: 700; }
.star-txt { color: #d97706; font-weight: 700; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; margin-bottom: 36px; }
@media (max-width: 860px) { .content-layout { grid-template-columns: 1fr; } }
.article-box, .sidebar-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.sidebar-box { padding: 18px; height: fit-content; }
.sidebar-box h3 { margin: 0 0 12px 0; font-size: 16px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }

.detail-head {
  display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap;
  padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
}
.detail-icon {
  width: 82px; height: 82px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: 800; flex-shrink: 0;
}
.detail-head h1 { margin: 0 0 6px 0; font-size: 23px; line-height: 1.3; }

.spec-table, .rank-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.spec-table th, .spec-table td, .rank-table th, .rank-table td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.spec-table th { width: 34%; background: #f8fafc; color: #334155; font-weight: 600; }
.rank-table th { background: #0f172a; color: #fff; font-weight: 600; }
.rank-table tr:nth-child(even) { background: #f8fafc; }

.cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--emerald); color: #ffffff !important; font-weight: 700; font-size: 15px;
  padding: 12px 22px; border-radius: 10px; text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25); margin: 6px 8px 6px 0;
}
.cta-btn:hover { background: #047857; }
.cta-btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: #ffffff; color: #0f172a !important; border: 1.5px solid #cbd5e1;
  font-weight: 700; font-size: 14px; padding: 11px 18px; border-radius: 10px; text-decoration: none !important;
}
.cta-btn-secondary:hover { background: #f8fafc; border-color: #94a3b8; }

.alt-callout {
  background: var(--amber-bg); border: 1.5px solid var(--amber-border);
  border-radius: 12px; padding: 16px 18px; margin: 18px 0;
}
.alt-callout h4 { margin: 0 0 6px 0; color: #92400e; font-size: 16px; }
.alt-callout p { margin: 0 0 10px 0; font-size: 14px; color: #78350f; }

.silo-box {
  background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 12px;
  padding: 16px 18px; margin: 22px 0;
}
.silo-box h3 { margin: 0 0 10px 0; font-size: 16px; color: #0f172a; }
.silo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.silo-link-card {
  background: #ffffff; border: 1px solid var(--border); border-radius: 9px;
  padding: 11px 13px; display: block; text-decoration: none !important;
}
.silo-link-card:hover { border-color: var(--primary); background: #eff6ff; }
.silo-link-card strong { display: block; color: #0f172a; font-size: 14px; margin-bottom: 3px; }
.silo-link-card span { font-size: 12px; color: var(--muted); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.blog-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; justify-content: space-between;
}
.blog-card h3 { margin: 6px 0 8px; font-size: 17px; line-height: 1.4; }
.blog-card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.meta-date { font-size: 12px; color: #64748b; font-weight: 700; letter-spacing: 0.02em; }

details.faq-item {
  border: 1px solid var(--border); border-radius: 8px; padding: 11px 14px;
  margin-bottom: 10px; background: #f8fafc;
}
details.faq-item summary { font-weight: 700; cursor: pointer; color: #0f172a; }
details.faq-item p { margin: 8px 0 0 0; color: var(--muted); font-size: 14px; }

.site-footer { background: #0f172a; color: #94a3b8; padding: 32px 0; margin-top: 40px; font-size: 13px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.site-footer ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.site-footer a { color: #cbd5e1; }

/* —— Mobile: soften topbar → header only (≤768px) —— */
@media (max-width: 768px) {
  .topbar {
    padding: 6px 0 !important;
    line-height: 1.3;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  }
  .topbar .container {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .topbar .container > span {
    display: block;
    font-size: 11px;
    line-height: 1.35;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .topbar ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 0 2px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar ul::-webkit-scrollbar { display: none; height: 0; }
  .topbar li {
    flex: 0 0 auto !important;
    display: list-item;
  }
  .topbar a {
    display: inline-block;
    white-space: nowrap !important;
    font-size: 11.5px;
    line-height: 1.2;
    padding: 4px 0;
    color: #94a3b8;
  }

  .site-header {
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05), 0 8px 16px rgba(15, 23, 42, 0.05);
  }
  .header-inner {
    padding: 10px 0 11px;
    min-height: 0;
    gap: 10px;
  }
  /* align logo with topbar text */
  .site-header > .container,
  .header-inner.container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .brand-logo { gap: 9px; }
}
