/* =====================================================
   CW — Core Variables
   ===================================================== */

:root {
  --cb-bg: #f4f0f8;
  --cb-surface: #ffffff;
  --cb-border: rgba(129,92,114,0.25);
  --cb-text: #2C3E50;
  --cb-muted: rgba(44,62,80,0.7);
  --cb-accent: #815C72;
  --cb-accent-hover: #6F4F61;
  --cb-radius: 22px;
}

/* =====================================================
   Base
   ===================================================== */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cb-bg);
  color: var(--cb-text);
}

/* =====================================================
   Header (quiet, editorial)
   ===================================================== */

.sf-header {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 20px 4px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.sf-header-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sf-brand {
  font-size: 60px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cb-accent);
  line-height: 1.1;
margin: 0;
}

.sf-tagline {
  margin-top: 4px;
  font-size: 22px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cb-muted);
}

.sf-how-btn {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--cb-accent);
  border: 1px solid rgba(129,92,114,0.25);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sf-how-btn:hover {
  background: rgba(129,92,114,0.08);
  border-color: rgba(129,92,114,0.45);
}

/* =====================================================
   Hero
   ===================================================== */

.cb-hero {
  padding: clamp(18px, 4vw, 44px);
  margin-top: 6px;
}

.cb-hero__card {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px);
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: 32px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.08);
  display: grid;
  gap: 26px;
}

@media (min-width: 900px) {
  .cb-hero__card {
    grid-template-columns: 1.05fr 0.95fr;
  }
  .cb-hero__body {
    border-left: 1px solid var(--cb-border);
    padding-left: 24px;
  }
}

.cb-hero__kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cb-muted);
  margin-bottom: 12px;
}

.cb-hero__title {
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.1;
  margin-bottom: 12px;
}

.cb-hero__titleAccent {
  color: var(--cb-accent);
}

.cb-hero__lead {
  font-size: 16px;
  line-height: 1.65;
  max-width: 65ch;
  color: var(--cb-muted);
  margin-bottom: 20px;
}

.cb-hero__body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--cb-muted);
}

/* =====================================================
   Search
   ===================================================== */

.sf-search {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(129,92,114,0.05);
  border: 1px solid var(--cb-border);
  max-width: 420px;
  margin-top: 18px;
}

.sf-search-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.sf-search-sub {
  font-size: 13px;
  color: var(--cb-muted);
  margin-bottom: 10px;
}

#sfQuery {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--cb-border);
  margin-bottom: 10px;
}

#sfSearchBtn {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(180deg, var(--cb-accent), var(--cb-accent-hover));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* =====================================================
   Results Grid
   ===================================================== */

.snarr-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 12px;
}

@media (max-width: 900px) {
  .snarr-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .snarr-results-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   Popup — How this works
   ===================================================== */

.sf-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.sf-popup-card {
  background: #ffffff;
  padding: 28px;
  border-radius: 18px;
  max-width: 420px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.sf-popup-card h3 {
  margin-top: 0;
}

.sf-popup-card ul {
  padding-left: 18px;
}

.sf-popup-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}
/* =====================================================
   Footer
   ===================================================== */

.sf-footer {
  margin-top: 80px;
  padding: 22px 18px;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: #FAF8F6;
  font-size: 13px;
  color: #555;
}

.sf-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sf-footer a {
  color: #815C72;
  text-decoration: none;
  font-weight: 600;
}

.sf-footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Policy overlay */

#sf-policy-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.sf-policy-modal {
  background: #FAF8F6;
  border-radius: 18px;
  padding: 28px 26px;
  max-width: 540px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  position: relative;
}

.sf-policy-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

.sf-policy-content {
  display: none;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}
/* =====================================================
   Editorial (AI guidance)
   ===================================================== */

.sf-editorial {
  max-width: 640px;
  margin: 28px auto 36px;
  padding: 18px 22px;
  background: rgba(0,0,0,0.02);
  border-left: 3px solid rgba(0,0,0,0.12);
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--cb-text);
}

.sf-editorial p {
  margin: 0 0 14px 0;
}

.sf-editorial p:last-child {
  margin-bottom: 0;
}
/* =========================
   PWA INSTALL BOX (CW)
========================= */
.sf-install-box{
  margin-top:14px;
  padding:16px 18px;
  border-radius:16px;
  background:linear-gradient(180deg,#faf7fb,#fff);
  border:1px solid rgba(129,92,114,0.25);
  box-shadow:0 8px 20px rgba(0,0,0,.05);
  max-width:420px;
}

.sf-install-title{
  font-size:13px;
  font-weight:600;
  margin:0 0 4px 0;
}

.sf-install-sub{
  font-size:12px;
  line-height:1.6;
  opacity:.75;
  margin-bottom:10px;
}

.sf-install-btn{
  width:100%;
  padding:12px 22px;
  border-radius:999px;
  border:1px solid rgba(129,92,114,0.25);
  background:#fff;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  text-align:center;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow:0 4px 10px rgba(0,0,0,.08);
}

.sf-install-btn:hover{
  background:rgba(129,92,114,.08);
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(0,0,0,.14);
}
/* =========================
   iOS INSTALL HINT
========================= */
.sf-ios-hint{
  margin-top:10px;
  font-size:12px;
  line-height:1.5;
  color: var(--cb-muted);
  opacity: 0.9;
}

.sf-ios-hint strong{
  color: var(--cb-text);
}
