:root {
  --ink: #0b1220;
  --muted: #5b6472;
  --line: #e7eaf0;
  --bg: #ffffff;
  --soft: #f7f8fa;
  --brand: #1a56db;
  --brand-ink: #12408f;
  --brand-soft: #eaf1fe;
  --accent: #e8590c;
  --accent-ink: #c2410c;
  --field-bg: #f8fafc;
  --danger: #c0362c;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.05);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line);
}
.nav .container { display: flex; align-items: center; gap: 14px; height: 62px; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: -.02em; margin-right: 4px; }
.brand span { color: var(--brand); }
.nav .spacer { flex: 1; }
/* Full menu wrapper: primary links on the left, auth/CTA cluster on the right.
   Collapses into a hamburger dropdown on small screens. */
.navmenu { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.navmenu-auth { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-badge { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Grouped primary nav links with a subtle boundary so each is a clear target */
.navlinks { display: flex; align-items: center; gap: 2px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.nav a.navlink { color: var(--ink); font-size: 14px; font-weight: 500; padding: 7px 13px; border-radius: 999px; transition: background .15s, color .15s; }
.nav a.navlink:hover { background: #fff; color: var(--brand); text-decoration: none; }
/* Quick-access header chips (Saved, My plan) and the account menu trigger.
   Deliberately quiet so the primary blue is reserved for real conversion CTAs. */
.nav-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 7px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.nav-chip:hover { background: var(--soft); border-color: #d8deea; text-decoration: none; color: var(--ink); }
.nav-chip-count {
  min-width: 20px; text-align: center; font-size: 12px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--muted); border: 1px solid var(--line);
}
.nav-chip-saved { color: #b4234d; border-color: #f3cbd8; }
.nav-chip-saved:hover { background: #fdeef2; border-color: #eaa9c0; color: #9f1743; }
.nav-chip-saved .nav-chip-icon { font-size: 14px; line-height: 1; }
.nav-chip-saved .nav-chip-count { background: #fdeef2; color: #9f1743; border-color: #f3cbd8; }
/* Account menu */
.nav-account { position: relative; }
.nav-chip-account { max-width: 190px; }
.nav-chip-account .nav-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-avatar {
  width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 11px; font-weight: 700;
}
.nav-caret { font-size: 10px; color: var(--muted); }
.nav-account-pop {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 268px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px;
  box-shadow: 0 14px 34px rgba(16,24,40,.16);
}
.nav-account.open .nav-account-pop { display: block; }
.nav-account-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.nav-account-name { font-weight: 700; font-size: 14px; }
.nav-account-role { font-size: 12px; color: var(--muted); }
.nav-account-links { display: grid; gap: 2px; }
.nav-account-links a { display: block; padding: 8px 10px; border-radius: 9px; color: var(--ink); }
.nav-account-links a:hover { background: var(--brand-soft); text-decoration: none; }
.nav-account-links a b { display: block; font-size: 13.5px; font-weight: 600; }
.nav-account-links a span { display: block; font-size: 12px; color: var(--muted); }
.nav-account-signout {
  display: block; margin-top: 6px; padding: 9px 10px; border-top: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--danger);
}
.nav-account-signout:hover { text-decoration: none; background: #fdecea; border-radius: 0 0 9px 9px; }
/* Persona action links (My hoardings, My campaigns, Admin) look like real buttons */
.nav a.navlink.action { background: var(--brand); color: #fff; font-weight: 600; padding: 8px 14px; border-radius: 9px; }
.nav a.navlink.action:hover { background: var(--brand-ink); color: #fff; }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 38px; margin-left: auto; padding: 0 9px; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  transition: .15s; text-decoration: none;
}
.btn:hover { border-color: #cdd3de; text-decoration: none; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-ink); }
/* Secondary buttons use a visible blue tint so they stand out on white. */
.btn:not(.primary):not(.danger):not(.accent) { background: var(--brand-soft); border-color: #cdddfb; color: var(--brand-ink); }
.btn:not(.primary):not(.danger):not(.accent):hover { background: #dbe7fd; border-color: var(--brand); }
/* Accent = primary selling CTA ("Get a free plan"). Warm, high-contrast. */
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.lg { padding: 13px 24px; font-size: 16px; border-radius: 11px; }
.btn.block { display: block; width: 100%; }
.btn.danger { background: #fdecea; color: var(--danger); border-color: #f3c9c4; }
.btn.danger:hover { background: #f9d9d5; border-color: var(--danger); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; }
.btn.wishlist-btn { background: #fdecef !important; color: #b4234d !important; border-color: #f6c8d8 !important; }
.btn.wishlist-btn:hover { background: #fbdde6 !important; color: #9f1743 !important; border-color: #efaac1 !important; }
.btn.wishlist-btn.is-on { background: #f9d0de !important; color: #8f1239 !important; border-color: #e989a8 !important; }

/* Hero */
.hero {
  padding: 88px 0 56px; position: relative; color: #fff; overflow: hidden;
  background:
    linear-gradient(120deg, rgba(9,20,48,.90), rgba(26,86,219,.78)),
    radial-gradient(1200px 500px at 80% -10%, rgba(255,255,255,.18), transparent 60%),
    #0b1430;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .16;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.22) 0 1px, transparent 1px 84px);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 46px; line-height: 1.06; letter-spacing: -.03em; margin: 0 0 16px; max-width: 760px; color:#fff; }
.hero p.sub { font-size: 19px; color: rgba(255,255,255,.86); max-width: 640px; margin: 0 0 26px; }
.hero .cta-row { display:flex; gap:12px; flex-wrap:wrap; margin-top: 18px; }
.hero .trust { margin-top: 26px; display:flex; gap:26px; flex-wrap:wrap; color: rgba(255,255,255,.8); font-size: 14px; }
.hero .trust b { color:#fff; font-size: 20px; display:block; }
.hero .btn { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.08); color:#fff; }
.hero .btn:hover { background: rgba(255,255,255,.16); border-color:#fff; }
.hero .btn.primary { background:#fff; color: var(--brand-ink); border-color:#fff; }
.hero .btn.primary:hover { background:#eef2fb; }
.hero .searchbar input, .hero .searchbar select { color: var(--ink); }

/* Media type strip */
.mediatypes { display:grid; grid-template-columns: repeat(7,1fr); gap: 12px; margin-top: 22px; }
.mediatype { border:1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align:center; background:#fff; text-decoration:none; color:inherit; display:block; transition: box-shadow .15s, transform .15s; }
.mediatype:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.mediatype img { width:100%; height:78px; object-fit:cover; border-radius: 8px; display:block; }
.mediatype .ic { font-size: 24px; }
.mediatype b { display:block; margin-top: 8px; font-size: 14px; }
.mediatype span { font-size: 12px; color: var(--muted); display:block; margin-top:2px; }

/* Value props */
.props { display:grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 22px; }
.prop { padding: 20px; border:1px solid var(--line); border-radius: var(--radius); background:#fff; }
.prop h3 { margin: 4px 0 6px; font-size: 17px; }

/* Testimonials */
.quotes { display:grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 22px; }
.quote { padding: 20px; border:1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.quote p { margin: 0 0 12px; font-size: 15px; }
.quote .who { font-size: 13px; color: var(--muted); }
.quote .who b { color: var(--ink); }

/* Coverage tags */
.tags { display:flex; flex-wrap:wrap; gap: 8px; margin-top: 18px; }
.tag { border:1px solid var(--line); background:#fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 500; }

/* Blog */
.blogfeature { display:grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 22px; }
.postcard { border:1px solid var(--line); border-radius: var(--radius); overflow:hidden; background:#fff; box-shadow: var(--shadow); display:flex; flex-direction:column; transition:.15s; }
.postcard:hover { transform: translateY(-2px); border-color:#d7dce4; }
.postcard img { width:100%; height:170px; object-fit:cover; background: var(--soft); }
.postcard .body { padding: 16px; display:flex; flex-direction:column; gap:6px; }
.postcard .tagline { font-size:12px; color: var(--brand); font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.postcard h3 { margin:0; font-size:17px; letter-spacing:-.01em; }
.postcard .excerpt { font-size:14px; color: var(--muted); }
.postcard .meta { font-size:12px; color: var(--muted); margin-top: 4px; }

/* Article */
.article { max-width: 760px; margin: 0 auto; }
.article .cover { width:100%; height: 320px; object-fit: cover; border-radius: var(--radius); border:1px solid var(--line); margin: 6px 0 22px; }
.article h1 { font-size: 34px; line-height: 1.14; letter-spacing:-.02em; margin: 0 0 10px; }
.article .byline { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.article h2 { font-size: 22px; margin: 30px 0 10px; letter-spacing:-.01em; }
.article p, .article li { font-size: 16.5px; line-height: 1.7; color: #26303f; }
.article ul, .article ol { padding-left: 22px; }
.article .lead { font-size: 18px; color: #26303f; }
.article .callout { background: var(--soft); border:1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; padding: 14px 16px; margin: 20px 0; }
.article .backlink { display:inline-block; margin-bottom: 18px; font-size: 14px; }
.article .cta { margin-top: 30px; padding: 20px; border:1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

/* Search box */
.searchbar {
  display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px; box-shadow: var(--shadow); max-width: 760px;
}
.searchbar input, .searchbar select, .field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; font-size: 14px; width: 100%; background: var(--field-bg);
}
.field input:focus, .field select:focus, .field textarea:focus, .searchbar input:focus {
  outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}
.field textarea { resize: vertical; font-family: inherit; }
.field input[type="file"] { padding: 8px; background: var(--field-bg); cursor: pointer; }
.photo-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo-preview:empty { display: none; }
.pv { position: relative; width: 92px; height: 92px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.pv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; line-height: 20px; padding: 0;
  border: none; border-radius: 50%; background: rgba(15, 23, 42, 0.78); color: #fff; font-size: 15px; cursor: pointer; }
.pv-x:hover { background: #b91c1c; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
/* keep hero search text on a white field for contrast */
.hero .searchbar input, .hero .searchbar select { background: #fff; }

/* Grid / cards */
.section { padding: 40px 0; }
.section h2 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff;
  box-shadow: var(--shadow); transition: .15s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); border-color: #d7dce4; }
.card img { width: 100%; height: 170px; object-fit: cover; display: block; background: var(--soft); }
.card .body { padding: 14px; }
.card h3 { font-size: 16px; margin: 0 0 4px; letter-spacing: -.01em; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.badge.green { background: #e7f6ec; color: #197a3e; border-color: #c9ead4; }
.badge.amber { background: #fdf3e2; color: #a5680a; border-color: #f3e0bd; }
.price { font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { font-size: 13px; color: var(--muted); }

.how { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; margin-top: 22px; }
.how .step { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.how .step .num { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color:#fff; display:grid; place-items:center; font-weight:700; margin-bottom: 10px; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; box-shadow: var(--shadow); }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: 14px; }
.kv div.k { color: var(--muted); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 18px 0 0; }
.timeline li { position: relative; padding: 0 0 22px 26px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before { content:""; position:absolute; left:-7px; top:2px; width:12px; height:12px; border-radius:50%; background: var(--brand); }
.timeline .t { font-weight: 600; text-transform: capitalize; }
.timeline img { max-width: 220px; border-radius: 8px; margin-top: 8px; border:1px solid var(--line); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.tbl th { color: var(--muted); font-weight: 600; }

.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0; color: var(--muted); font-size: 14px; }

.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background:#fff; }
.faq summary { cursor: pointer; font-weight: 600; }

/* Chatbot */
#chatFab { position: fixed; right: 20px; bottom: 20px; z-index: 60; border-radius: 999px; padding: 12px 18px; box-shadow: var(--shadow); }
#chatPanel { position: fixed; right: 20px; bottom: 78px; width: 340px; max-width: calc(100vw - 40px); height: 460px; max-height: calc(100vh - 120px);
  background:#fff; border:1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display:none; flex-direction: column; z-index: 60; overflow: hidden; }
#chatPanel.open { display: flex; }
#chatPanel header { padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
#chatLog { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 8px 11px; border-radius: 10px; font-size: 14px; max-width: 85%; }
.msg.bot { background: var(--soft); align-self: flex-start; }
.msg.me { background: var(--brand); color:#fff; align-self: flex-end; }
#chatForm { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
#chatForm input { flex: 1; border:1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
#chatForm input:disabled { background: var(--soft); }
.msg.bot p { margin: 0 0 6px; }
.msg.bot p:last-child { margin-bottom: 0; }
.msg.bot ul { margin: 4px 0 4px; padding-left: 18px; }
.msg.bot li { margin: 2px 0; }
.msg.bot strong { font-weight: 700; }
.msg.typing { display: inline-flex; align-items: center; gap: 4px; color: var(--muted, #6b7280); }
.msg.typing i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .35; animation: chatDot 1.2s infinite ease-in-out; }
.msg.typing i:nth-child(3) { animation-delay: .2s; }
.msg.typing i:nth-child(4) { animation-delay: .4s; }
@keyframes chatDot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: .9; transform: translateY(-3px); } }

.notice { background: #fff8e6; border: 1px solid #f3e0bd; color: #8a5a06; padding: 10px 12px; border-radius: 10px; font-size: 13px; }

/* Global API loading bar (shown by js/api.js during any backend request). */
/* Contextual loaders: an in-box spinner for grids/lists/detail panels, and a
   button busy state. No page-wide bar | feedback shows where the call was made. */
.loading-inline { color: var(--muted, #6b7280); font-size: 14px; padding: 16px; display: flex; align-items: center; gap: 8px; }
.loading-inline::before { content: ''; width: 14px; height: 14px; border: 2px solid var(--line, #e5e7eb); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.btn.is-busy { position: relative; opacity: .85; cursor: progress; }
.btn-spin { display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.secondary .btn-spin, .btn.ghost .btn-spin { border-color: var(--line, #e5e7eb); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile */
@media (max-width: 1024px) {
  /* Collapse the full nav into a hamburger dropdown before the row gets crowded
     (especially when logged in, where persona action buttons + badge are shown). */
  .nav .container { position: relative; flex-wrap: wrap; }
  .nav-toggle { display: flex; }
  .navmenu { display: none; }
  .navmenu.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 10px;
    position: absolute; top: 60px; left: 12px; right: 12px; z-index: 40;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px;
    box-shadow: 0 12px 28px rgba(16,24,40,.14);
  }
  .navmenu.open .navlinks { flex-direction: column; align-items: stretch; background: transparent; border: none; padding: 0; gap: 2px; }
  .navmenu.open .navlink { padding: 11px 14px; border-radius: 9px; font-size: 15px; }
  .navmenu.open .navmenu-auth { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
  .navmenu.open .navmenu-auth .btn, .navmenu.open .navmenu-auth .navlink.action { width: 100%; text-align: center; justify-content: center; }
  .navmenu.open .nav-badge { text-align: center; max-width: none; }
  /* On mobile the account menu is already inside a dropdown, so show it inline
     instead of nesting a second floating popover. */
  .navmenu.open .nav-chip { width: 100%; justify-content: space-between; }
  .navmenu.open .nav-chip-account { max-width: none; }
  .navmenu.open .nav-account-pop {
    display: block; position: static; width: auto; box-shadow: none;
    border: none; padding: 4px 0 0; margin-top: 4px;
  }
  .navmenu.open .nav-caret { display: none; }
}
@media (max-width: 860px) {
  .grid, .how, .stats, .props, .quotes, .blogfeature { grid-template-columns: 1fr 1fr; }
  .mediatypes { grid-template-columns: repeat(3,1fr); }
  .searchbar { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .kv { grid-template-columns: 1fr; }
  .article .cover { height: 220px; }
  .article h1 { font-size: 27px; }
}
@media (max-width: 520px) {
  .grid, .how, .stats, .props, .quotes, .blogfeature { grid-template-columns: 1fr; }
  .mediatypes { grid-template-columns: repeat(2,1fr); }
  .nav .container > .badge { display: none; }
  .nav a.navlink.action { padding: 7px 11px; font-size: 13px; }
}
/* ------- Section headings with explainer ------- */
.sec-head { margin: 6px 0 14px; }
.sec-head h2, .sec-head h3, .sec-head h4 { margin: 0 0 4px; }
.sec-head p { margin: 0; max-width: 720px; }
.sec-head.sm { margin-top: 20px; }
.muted.sm, .sm { font-size: 12.5px; }

/* ------- Info icon + tooltip ------- */
.info {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink); border: 1px solid #cdddfb;
  font-size: 11px; font-weight: 700; font-style: normal; cursor: help; position: relative; vertical-align: middle;
}
.info::after {
  content: attr(data-tip); position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%);
  background: #0b1220; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px; font-weight: 400;
  line-height: 1.4; width: max-content; max-width: 240px; text-align: left; opacity: 0; pointer-events: none;
  transition: .15s; z-index: 50;
}
.info:hover::after, .info:focus::after { opacity: 1; }

/* ------- Badges (larger + more colours) ------- */
.badge.lg { font-size: 13px; padding: 5px 12px; }
.badge.red { background: #fdecea; color: var(--danger); border-color: #f3c9c4; }
.badge.subtle { background: var(--soft); color: var(--muted); }

/* ------- Chips (niches, tags) ------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { display: inline-block; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-ink); border: 1px solid #d5e2fb; }
.chip.subtle { background: var(--soft); color: var(--muted); border-color: var(--line); }
.chip.clickable { cursor: pointer; }
.chip.clickable:hover { background: #dbe7fd; }

/* ------- Card extras ------- */
.card .metrics { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin: 8px 0 2px; }
.card .price { margin-top: 8px; }
.card.static { cursor: default; }
.card.static:hover { transform: none; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.plan-item-actions { margin: 10px 0 2px; display: flex; justify-content: flex-end; }

/* ------- Search panel ------- */
.search-panel { margin-top: 14px; }
.search-panel .searchbar { max-width: none; grid-template-columns: 1fr auto auto; }
.mode-switch { display: inline-flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.search-input { font-size: 15px; }
.route-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 6px; }
.route-actions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* Location autocomplete dropdown */
.ac-wrap { position: relative; }
.ac-list { display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.ac-item { display: block; width: 100%; text-align: left; padding: 10px 12px; font-size: 14px; background: #fff; border: none; cursor: pointer; }
.ac-item:hover { background: var(--brand-soft); color: var(--brand-ink); }
.active-loc { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.chip.solid { background: var(--brand); color: #fff; border-color: var(--brand); }
.radius-inline { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.radius-inline input[type="range"] { width: 160px; accent-color: var(--brand); }
/* Pagination */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 22px; }
.pager .btn.sm { min-width: 38px; }
.pager .btn[disabled] { opacity: .45; cursor: not-allowed; }
/* Contact section */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.contact-lines { margin-top: 18px; display: grid; gap: 14px; font-size: 14px; }
.contact-lines b { color: var(--ink); }
.notice.ok { background: #e7f6ec; color: #197a3e; border-color: #c9ead4; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.filters-more { margin-top: 12px; }
.filters-more summary { cursor: pointer; font-weight: 600; color: var(--brand-ink); font-size: 14px; margin-bottom: 8px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 6px; }
#count { display: inline-block; margin-top: 10px; color: var(--muted); font-size: 14px; }
.route-summary { margin-top: 12px; border: 1px solid #d5e2fb; background: var(--brand-soft); border-radius: 10px; padding: 12px; }
.route-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.route-summary-grid b { display: block; font-size: 16px; color: var(--brand-ink); }
.route-summary-grid span { color: var(--muted); font-size: 12px; }
.route-summary-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.route-item { position: relative; }
.route-index {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  background: rgba(11, 18, 32, .82);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
}

/* ------- Forms ------- */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form-grid .span-all { grid-column: 1 / -1; }
.check-inline { display: block; font-size: 14px; margin: 12px 0; }
.check-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 12px; }
.check { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; background: var(--field-bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.check input { accent-color: var(--brand); }
.form-actions { display: flex; gap: 10px; margin-top: 14px; }

/* ------- Carousel / gallery ------- */
.carousel { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.carousel img { width: 100%; height: 380px; object-fit: cover; display: block; cursor: zoom-in; }
.car-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(11,18,32,.55); color: #fff; font-size: 24px; cursor: pointer; display: grid; place-items: center; }
.car-nav:hover { background: rgba(11,18,32,.8); }
.car-nav.prev { left: 10px; } .car-nav.next { right: 10px; }
.car-full { position: absolute; right: 10px; bottom: 10px; border: none; background: rgba(11,18,32,.6); color: #fff;
  padding: 7px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.car-count { position: absolute; left: 12px; bottom: 12px; background: rgba(11,18,32,.6); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs img { width: 84px; height: 60px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; flex: 0 0 auto; background: var(--soft); }
.thumbs img.on { border-color: var(--brand); }

/* ------- Lightbox ------- */
.lightbox { position: fixed; inset: 0; background: rgba(6,10,20,.92); z-index: 90; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; }
.lb-close { position: absolute; top: 18px; right: 24px; background: none; border: none; color: #fff; font-size: 36px; cursor: pointer; line-height: 1; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.14); border: none; color: #fff;
  width: 54px; height: 54px; border-radius: 50%; font-size: 30px; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-nav.prev { left: 3vw; } .lb-nav.next { right: 3vw; }

/* ------- Detail page ------- */
.detail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-head h2 { margin: 0; }
.detail-head .spacer { flex: 1; }
.detailgrid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }

/* ------- Tabs ------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 22px 0 20px; flex-wrap: wrap; }
.tab { border: none; background: none; padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; }
.tab.on { color: var(--brand-ink); border-bottom-color: var(--brand); }
.tab-count { display: inline-block; background: var(--soft); border-radius: 999px; padding: 0 7px; font-size: 12px; margin-left: 4px; }

/* ------- Admin review cards ------- */
.review-card { display: grid; grid-template-columns: 260px 1fr; gap: 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); padding: 14px; margin-bottom: 16px; }
.review-media { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; }
.review-media img { width: 100%; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.review-body h3 { margin: 0; }
.kv.compact { grid-template-columns: 130px 1fr; gap: 4px 12px; font-size: 13px; }
.ai-box { background: var(--brand-soft); border: 1px solid #d5e2fb; border-radius: 10px; padding: 10px 12px; margin: 12px 0; font-size: 13px; }

/* ------- Tables ------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { color: var(--muted); font-weight: 600; background: var(--soft); }
.table tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 6px; }

@media (max-width: 860px) {
  .detailgrid { grid-template-columns: 1fr; }
  .route-grid { grid-template-columns: 1fr 1fr; }
  .route-summary-grid { grid-template-columns: 1fr 1fr; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .check-grid { grid-template-columns: 1fr 1fr; }
  .review-card { grid-template-columns: 1fr; }
  .search-panel .searchbar { grid-template-columns: 1fr; }
  .carousel img { height: 260px; }
}
@media (max-width: 520px) {
  .mode-switch { width: 100%; }
  .mode-switch .chip { text-align: center; width: 100%; }
  .route-grid { grid-template-columns: 1fr; }
  .route-summary-grid { grid-template-columns: 1fr; }
  .filter-grid, .form-grid, .check-grid { grid-template-columns: 1fr; }
}

/* FAQ page groups */
.faq-group { margin: 26px 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.faq details { border-bottom: 1px solid var(--line); }

/* ---- "Get a free plan" selling CTA: nav button, hero CTA, FAB and modal ---- */
.nav a.cta-nav { background: var(--accent); color: #fff; font-weight: 700; padding: 8px 14px; border-radius: 9px; }
.nav a.cta-nav:hover { background: var(--accent-ink); color: #fff; text-decoration: none; }

.hero-cta { margin-top: 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-cta-note { color: rgba(255,255,255,.9); font-size: 13px; max-width: 340px; }

#planFab {
  position: fixed; left: 20px; bottom: 20px; z-index: 60;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  border-radius: 999px; padding: 12px 18px; font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 8px;
}
#planFab:hover { background: var(--accent-ink); }
#planFab .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; background: rgba(11,18,32,.55); padding: 16px; }
.modal.open { display: flex; }
.modal-card { background: #fff; border-radius: 14px; width: 100%; max-width: 440px; padding: 22px; position: relative; box-shadow: 0 20px 60px rgba(16,24,40,.25); max-height: 92vh; overflow-y: auto; }
.modal-card h3 { margin: 0 0 2px; }
.modal-card input, .modal-card textarea { width: 100%; margin: 6px 0; }
.modal-card .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modal-close { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--ink); }
@media (max-width: 520px) {
  .modal-card .two { grid-template-columns: 1fr; }
  #planFab { left: 12px; bottom: 12px; padding: 10px 14px; }
}


/* Info tooltip ("i" icon) for inventory detail properties */
.tip, .tip-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  position: relative;
  user-select: none;
}
.tip-inline { cursor: default; }
.tip:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 240px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease;
  z-index: 40;
  pointer-events: none;
}
.tip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease;
  z-index: 40;
}
.tip:hover::after, .tip:focus::after,
.tip:hover::before, .tip:focus::before {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 520px) {
  .tip::after { max-width: 200px; }
}
