/* ZBerry shared styles. Loaded last on every page: system fonts, flatter surfaces,
   cookie notice, accessibility panel. Edit here to change the look site-wide. */
:root {
  --zb-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --zb-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --zb-radius: 8px;
}
html { font-size: 100%; }
body, button, input, select, textarea { font-family: var(--zb-font) !important; }
code, pre, kbd, samp { font-family: var(--zb-mono) !important; }

/* flatter, quieter surfaces */
* { text-shadow: none !important; }
.navbar, .tos-overlay, [class*="card"], [class*="modal"], .notif-panel { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.navbar { background: rgba(8, 12, 22, 0.97) !important; }
.btn, .btn-outline, .promo-btn, .tos-btn, button, .account-link, .back-button, input, select, textarea { border-radius: var(--zb-radius) !important; }
[class*="card"], .why-item, .founder-card, .spec-card, .tos-modal { border-radius: 12px !important; box-shadow: none !important; }
[class*="card"]:hover, .service-card:hover { transform: none !important; }
.btn, .promo-btn { box-shadow: none !important; }
.btn:hover, .btn-outline:hover, .promo-btn:hover { transform: none !important; }
.logo img { filter: none !important; }
h1, h2, h3, .section-title { letter-spacing: 0 !important; }

/* keyboard focus is always visible */
:focus-visible { outline: 3px solid #ffd54a !important; outline-offset: 2px !important; }
.zb-skip { position: absolute; left: 8px; top: -60px; background: #ffd54a; color: #000; padding: 10px 14px; z-index: 100000; border-radius: 6px; font-weight: 600; text-decoration: none; }
.zb-skip:focus { top: 8px; }

/* cookie notice */
#zbCookie { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 640px; margin: 0 auto; background: #0e1622; color: #eef5ff; border: 1px solid #3a5560; border-radius: 12px; padding: 18px 20px; z-index: 99990; font-size: 14px; line-height: 1.5; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
#zbCookie h2 { font-size: 16px; margin: 0 0 6px; color: #fff; }
#zbCookie p { margin: 0 0 12px; color: #cfdde6; }
#zbCookie a { color: #6fe3cd; }
#zbCookie .zb-row { display: flex; gap: 10px; flex-wrap: wrap; }
#zbCookie button, .zb-btn { cursor: pointer; border: 1px solid #6fe3cd; background: #1f7a6b; color: #fff; padding: 9px 16px; font-size: 14px; font-weight: 600; }
#zbCookie button.zb-alt, .zb-btn.zb-alt { background: transparent; color: #6fe3cd; }

/* accessibility panel */
#zbA11yBtn { position: fixed; right: 14px; bottom: 14px; width: 46px; height: 46px; border-radius: 50% !important; border: 2px solid #fff; background: #12385a; color: #fff; font-size: 20px; cursor: pointer; z-index: 99980; display: flex; align-items: center; justify-content: center; padding: 0; }
#zbA11yPanel { position: fixed; right: 14px; bottom: 70px; width: min(320px, calc(100vw - 28px)); max-height: 80vh; overflow: auto; background: #0e1622; color: #eef5ff; border: 1px solid #3a5560; border-radius: 12px; padding: 16px; z-index: 99985; display: none; font-size: 14px; }
#zbA11yPanel.open { display: block; }
#zbA11yPanel h2 { font-size: 16px; margin: 0 0 10px; }
#zbA11yPanel label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #22303d; }
#zbA11yPanel .zb-size { display: flex; gap: 6px; align-items: center; }
#zbA11yPanel .zb-size button { width: 34px; height: 34px; border: 1px solid #6fe3cd; background: transparent; color: #6fe3cd; cursor: pointer; font-weight: 700; }
#zbA11yPanel .zb-reset { margin-top: 10px; width: 100%; }
@media (max-width: 480px) { #zbCookie { bottom: 72px; } }

/* accessibility modes (set on <html> by site.js) */
html.zb-contrast body { background: #000 !important; color: #fff !important; }
html.zb-contrast a { color: #8ff0ff !important; text-decoration: underline !important; }
html.zb-contrast [class*="card"], html.zb-contrast .navbar, html.zb-contrast .footer { background: #000 !important; border-color: #fff !important; }
html.zb-contrast p, html.zb-contrast li, html.zb-contrast span, html.zb-contrast h1, html.zb-contrast h2, html.zb-contrast h3, html.zb-contrast h4 { color: #fff !important; }
html.zb-links a { text-decoration: underline !important; text-underline-offset: 3px; }
html.zb-dyslexia body, html.zb-dyslexia button, html.zb-dyslexia input, html.zb-dyslexia select, html.zb-dyslexia textarea { font-family: "Comic Sans MS", "Trebuchet MS", Verdana, sans-serif !important; letter-spacing: .03em; word-spacing: .12em; }
html.zb-spacing body { line-height: 1.9 !important; letter-spacing: .02em; }
html.zb-spacing p, html.zb-spacing li { margin-bottom: .7em; }
html.zb-motion *, html.zb-motion *::before, html.zb-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------- shared top bar (same on every public page; source of truth is nav.js + this block) ---------- */
body .navbar { display: flex !important; flex-direction: row !important; flex-wrap: wrap; align-items: center !important; justify-content: flex-start !important; gap: 12px 32px !important; padding: 14px 0 !important; position: sticky; top: 0; z-index: 500; background: rgba(8, 12, 22, 0.97) !important; border-bottom: 1px solid rgba(72, 187, 150, 0.25) !important; }
body .navbar .logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: #c0f2e8; cursor: pointer; text-decoration: none; }
body .navbar .logo img { height: 30px; width: auto; }
body .navbar .nav-links { display: flex !important; gap: 22px; flex-wrap: wrap; align-items: center; font-weight: 500; }
body .navbar .nav-links a { text-decoration: none; color: #d9e9ff; font-size: 15px; }
body .navbar .nav-links a:hover, body .navbar .nav-links a[aria-current="page"] { color: #3fe0c0; }
body .navbar .nav-links a[aria-current="page"] { border-bottom: 2px solid #3fe0c0; padding-bottom: 2px; }
body .navbar .nav-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
body .navbar .account-link { background: rgba(63,224,192,0.15); padding: 6px 16px; display: inline-flex; align-items: center; gap: 8px; color: #d9e9ff; text-decoration: none; border-radius: 40px !important; }
body .navbar .account-link:hover { background: rgba(63,224,192,0.3); }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid #3fe0c0; }
.notif-wrap { position: relative; display: none; align-items: center; }
.notif-bell-btn { background: transparent; border: none; color: #d9e9ff; font-size: 19px; cursor: pointer; position: relative; padding: 6px; border-radius: 50% !important; display: inline-flex; }
.notif-bell-btn:hover { color: #3fe0c0; background: rgba(63,224,192,0.12); }
.notif-badge { position: absolute; top: -2px; right: -2px; background: #ff5f6d; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 5px; border-radius: 20px; min-width: 16px; text-align: center; display: none; }
.notif-badge.show { display: block; }
.notif-bell-btn.jiggle i { display: inline-block; animation: zb-jiggle .7s ease; }
@keyframes zb-jiggle { 0%,100% { transform: rotate(0) } 20% { transform: rotate(-14deg) } 40% { transform: rotate(12deg) } 60% { transform: rotate(-8deg) } 80% { transform: rotate(5deg) } }
.notif-panel { position: absolute; top: calc(100% + 12px); right: 0; width: min(340px, 92vw); max-height: 420px; overflow-y: auto; background: #0e1422; border: 1px solid rgba(72,187,150,.3); border-radius: 12px; z-index: 600; display: none; }
.notif-panel.open { display: block; }
.notif-panel-header { padding: 14px 16px; font-weight: 700; font-size: 14px; border-bottom: 1px solid rgba(63,224,192,.15); color: #c0f2e8; }
.notif-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.05); align-items: flex-start; }
.notif-item .notif-icon { width: 30px; height: 30px; border-radius: 50%; background: rgba(63,224,192,.15); color: #3fe0c0; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.notif-item .notif-content { flex: 1; min-width: 0; }
.notif-item .notif-title { font-weight: 600; font-size: 13.5px; color: #eef5ff; }
.notif-item .notif-body { font-size: 12.5px; color: #9fb4c4; margin-top: 2px; }
.notif-item .notif-time { font-size: 11px; color: #7f95a6; margin-top: 4px; }
.notif-dismiss { background: transparent; border: none; color: #8aa0b0; cursor: pointer; padding: 4px; }
.notif-empty { padding: 28px 16px; text-align: center; color: #8aa0b0; font-size: 13px; }

/* ---------- ZipZap polls ---------- */
.zzpoll { margin: 10px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.zzpoll-opt { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 10px 14px; background: #0f1a27; color: #e6eef5; border: 1px solid #2a3a48; cursor: pointer; font-size: 15px; }
.zzpoll-opt:hover:not(:disabled) { border-color: #3fe0c0; }
.zzpoll-opt:disabled { cursor: default; }
.zzpoll-opt.mine { border-color: #3fe0c0; }
.zzpoll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(63, 224, 192, 0.18); z-index: 0; }
.zzpoll-text, .zzpoll-pct { position: relative; z-index: 1; }
.zzpoll-pct { font-weight: 700; color: #9fe9d8; }
.zzpoll-meta { color: #8aa0b0; font-size: 13px; }
.zzpoll-link { background: none; border: none; color: #6fe3cd; cursor: pointer; padding: 0; font-size: inherit; text-decoration: underline; }
.zzpoll-compose { border: 1px solid #2a3a48; padding: 12px; margin-top: 10px; background: #0d1520; border-radius: 10px; }
.zzpoll-compose-head, .zzpoll-compose-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.zzpoll-compose input[type=text] { display: block; width: 100%; margin: 8px 0; padding: 9px 12px; background: #0a0f1c; color: #fff; border: 1px solid #2a3a48; }
.zzpoll-compose select { background: #0a0f1c; color: #fff; border: 1px solid #2a3a48; padding: 4px 8px; }

/* ---------- layout fixes ---------- */
/* wide tables scroll inside their own box instead of pushing the page sideways */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0 18px; }
.table-scroll table { margin: 0; min-width: 520px; }
img, video, canvas, svg { max-width: 100%; }

/* footer: brand left, links centre, copyright right; stacks cleanly on small screens */
.footer { align-items: center !important; }
.footer-links { flex: 1 1 auto; justify-content: center; row-gap: 8px; }
@media (max-width: 720px) {
  .footer { flex-direction: column; align-items: flex-start !important; }
  .footer-links { justify-content: flex-start; }
}

/* phone top bar: logo + account on one row, links on a scrollable second row */
@media (max-width: 640px) {
  body .navbar:has(.nav-links) { display: grid !important; grid-template-columns: 1fr auto; align-items: center !important; gap: 8px 12px !important; padding: 10px 0 !important; }
  body .navbar:has(.nav-links) .logo { grid-column: 1; }
  body .navbar:has(.nav-links) .nav-right { grid-column: 2; grid-row: 1; margin-left: 0; }
  body .navbar:has(.nav-links) .nav-links { grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding-bottom: 4px; scrollbar-width: none; }
  body .navbar:has(.nav-links) .nav-links::-webkit-scrollbar { display: none; }
  body .navbar:has(.nav-links) .nav-links a { white-space: nowrap; }
}

/* home promo cards: stack icon above text on phones */
@media (max-width: 640px) {
  .promo-flex { flex-direction: column; align-items: flex-start; gap: 16px; }
  .promo-icon { width: 84px; height: 84px; padding: 12px; border-radius: 28px !important; }
  .promo-content { width: 100%; }
  .promo-card { padding: 20px 18px; }
}

/* avatar in the top bar stays small and round */
.nav-avatar, body .navbar .account-link img { width: 34px !important; height: 34px !important; max-width: 34px !important; border-radius: 50% !important; object-fit: cover; display: block; }
body .navbar .account-link:has(.nav-avatar) { padding: 3px !important; border-radius: 50% !important; }
.notif-panel { display: none; }
.notif-panel.open { display: block; }
