/* 📲 App install + 🔔 browser notifications (assets/js/pwa.js). Everything stays hidden until the browser can install / notify. */

/* ---------- 1. slim strip under the header (phones + tablets) ---------- */
.app-strip { background: linear-gradient(90deg, #10243B 0%, #1B3A5C 100%); color: #fff; overflow: hidden; animation: asIn .35s var(--ease, ease) both; }
.app-strip.out { animation: asOut .25s ease both; }
@keyframes asIn { from { max-height: 0; opacity: 0; } to { max-height: 90px; opacity: 1; } }
@keyframes asOut { from { max-height: 90px; opacity: 1; } to { max-height: 0; opacity: 0; } }
.app-strip [hidden], .push-ask [hidden], .app-sheet [hidden], .appx [hidden], .nav-app [hidden], .hdr-app[hidden], li.nav-app[hidden] { display: none !important; }
.app-strip .as-in, .app-strip .as-snooze { display: flex; align-items: center; gap: 8px; min-height: 54px; padding-top: 7px; padding-bottom: 7px; }
.app-strip .as-ico { width: 34px; height: 34px; border-radius: 9px; flex: none; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.app-strip .as-txt { flex: 1; min-width: 0; line-height: 1.25; }
.app-strip .as-txt b { display: block; font-size: .86rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-strip .as-txt small { display: block; font-size: .72rem; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-strip .as-go { flex: none; border: 0; border-radius: 999px; background: #F4C430; color: #10243B; font: inherit; font-weight: 800; font-size: .85rem; padding: 8px 14px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.app-strip .as-go:active { transform: scale(.97); }
.app-strip .as-x, .app-strip .as-back { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: .95rem; cursor: pointer; }
.app-strip .as-snooze span { flex: 1; font-size: .8rem; line-height: 1.3; }
.app-strip .as-snooze button[data-snooze-days] { flex: none; border: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff; border-radius: 999px; font: inherit; font-size: .78rem; font-weight: 700; padding: 6px 11px; cursor: pointer; }
.app-strip .as-snooze button[data-snooze-days]:hover { background: rgba(255,255,255,.14); }
@media (min-width: 1280px) { .app-strip { display: none !important; } }
@media (max-width: 380px) { .app-strip .as-txt small { display: none; } .app-strip .as-snooze span { display: none; } }

/* ---------- 2. mobile menu: fixed footer ---------- */
.nav-app { display: none; }
@media (max-width: 1279px) {
  .nav-links > li.nav-app:not([hidden]) { display: block; position: sticky; bottom: 0; margin-top: auto; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: #fff; z-index: 2; box-shadow: 0 -10px 14px -10px rgba(16,36,59,.22); border-bottom: 0 !important; }
  .nav-links > li.nav-app:not([hidden])::after { content: ""; position: absolute; left: -16px; right: -16px; top: 100%; height: 60px; background: #fff; }
  .nav-app .na-in { display: flex; gap: 8px; }
  .nav-app .na-btn { flex: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 7px; align-items: center; text-align: left; border: 0; border-radius: 12px; padding: 8px 10px; font: inherit; font-weight: 800; font-size: .84rem; line-height: 1.25; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-app .na-btn > span { grid-row: span 2; font-size: 1.25rem; line-height: 1; }
  .nav-app .na-btn small { font-size: .68rem; font-weight: 600; opacity: .8; }
  @media (max-width: 380px) { .nav-app .na-btn { padding: 8px; font-size: .8rem; column-gap: 5px; } }
  @media (max-width: 340px) { .nav-app .na-btn { grid-template-columns: minmax(0, 1fr); } .nav-app .na-btn > span { display: none; } }
  .nav-app .na-install { background: var(--saffron, #C44619); color: #fff; }
  .nav-app .na-push { background: #EEF3F8; color: #10243B; }
  .nav-app .na-push.is-on { background: #E8F5EC; color: #1B5E32; }
}

/* ---------- 3. desktop navbar: animated app icon ---------- */
.hdr-app { display: none; }
@media (min-width: 1280px) {
  .hdr-app:not([hidden]) { display: grid; place-items: center; position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line, #E6E1D8); background: #fff; color: var(--navy, #10243B); cursor: pointer; flex: none; transition: background .2s, color .2s, border-color .2s; }
  .hdr-app:hover { background: var(--navy, #10243B); color: #fff; border-color: var(--navy, #10243B); }
  .hdr-app svg { animation: haBob 4s ease-in-out 1.2s infinite; }
  .hdr-app .ha-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--saffron, #C44619); opacity: 0; animation: haPulse 2.6s ease-out .8s 4; pointer-events: none; }
  .hdr-app .ha-tip { position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -4px); background: var(--navy, #10243B); color: #fff; font-size: .74rem; font-weight: 700; white-space: nowrap; padding: 5px 9px; border-radius: 7px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
  .hdr-app:hover .ha-tip, .hdr-app:focus-visible .ha-tip { opacity: 1; transform: translate(-50%, 0); }
}
/* the menu is already full at 1280–1535px: only while the icon shows, menu spacing shrinks a little so everything stays on one line */
@media (min-width: 1280px) and (max-width: 1535px) {
  html.app-can-install .site-header .container.nav { gap: 6px; }
  html.app-can-install .hdr-app:not([hidden]) { width: 36px; height: 36px; }
  html.app-can-install .hdr-account { margin-left: 0; }
  html.app-can-install .nav-links > li > a:not(.cta-link) { padding-left: 6px !important; padding-right: 6px !important; }
  html.app-can-install .nav-links > li > a:not(.cta-link)::after { left: 6px; right: 6px; }
}
@media (min-width: 1280px) and (max-width: 1439px) {
  html.app-can-install .nav-links > li > a:not(.cta-link) { padding-left: 4px !important; padding-right: 4px !important; }
  html.app-can-install .nav-links > li > a:not(.cta-link)::after { left: 4px; right: 4px; }
}
@media (min-width: 1280px) and (max-width: 1365px) {
  html.app-can-install .site-header .container.nav { gap: 4px; }
  html.app-can-install .hdr-app:not([hidden]) { width: 32px; height: 32px; }
  html.app-can-install .nav-links > li > a:not(.cta-link) { padding-left: 3px !important; padding-right: 3px !important; }
  html.app-can-install .nav-links > li > a:not(.cta-link)::after { left: 3px; right: 3px; }
  html.app-can-install .nav-links .cta-link { padding-left: 8px !important; padding-right: 8px !important; }
  html.app-can-install .header-tools .lang-switch button { padding: 6px 6px; }
}
@keyframes haPulse { 0% { transform: scale(.85); opacity: .9; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
@keyframes haBob { 0%, 86%, 100% { transform: translateY(0); } 90% { transform: translateY(-3px); } 94% { transform: translateY(1px); } }

/* ---------- 4. “allow notifications?” card — looks like a phone / Windows notification ---------- */
.push-ask { position: fixed; z-index: 1100; top: 84px; right: 18px; width: min(370px, calc(100vw - 20px)); background: rgba(255,255,255,.98); color: #1d2733; border-radius: 18px; border: 1px solid rgba(16,36,59,.1);
  box-shadow: 0 18px 46px rgba(16,36,59,.28), 0 2px 6px rgba(16,36,59,.08); padding: 12px 14px 12px; transform: translateY(-14px); opacity: 0; transition: transform .35s var(--ease, ease), opacity .3s; font-size: .92rem; }
.push-ask.in { transform: none; opacity: 1; }
.push-ask .pa-top { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: #5b6573; }
.push-ask .pa-top img { width: 20px; height: 20px; border-radius: 5px; }
.push-ask .pa-top b { color: #1d2733; font-weight: 700; }
.push-ask .pa-x { margin-left: auto; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #F1F3F6; color: #5b6573; cursor: pointer; font-size: .8rem; }
.push-ask .pa-body { padding: 8px 2px 10px; line-height: 1.45; }
.push-ask .pa-body b { display: block; font-size: .98rem; color: #10243B; }
.push-ask .pa-body p { margin: 3px 0 0; color: #4a5561; font-size: .86rem; }
.push-ask .pa-act { display: flex; gap: 8px; }
.push-ask .pa-act button, .push-ask .pa-snz button { flex: 1; border: 0; border-radius: 11px; font: inherit; font-weight: 800; font-size: .88rem; padding: 10px 8px; cursor: pointer; }
.push-ask .pa-yes { background: var(--saffron, #C44619); color: #fff; }
.push-ask .pa-later { background: #EEF1F5; color: #10243B; }
.push-ask .pa-snz { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.push-ask .pa-snz span { flex-basis: 100%; font-size: .8rem; color: #5b6573; }
.push-ask .pa-snz button { background: #EEF1F5; color: #10243B; font-size: .82rem; padding: 8px 6px; }
@media (max-width: 1279px) { .push-ask { top: 78px; left: 10px; right: 10px; width: auto; margin: 0 auto; max-width: 440px; } }

/* ---------- 5. bottom sheet (iPhone steps, alert topics, help) ---------- */
.app-sheet { position: fixed; inset: 0; z-index: 3600; background: rgba(10,22,38,.45); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .25s; }
.app-sheet.in { opacity: 1; }
.app-sheet .as-panel { position: relative; width: min(520px, 100%); max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 22px 22px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); transform: translateY(30px); transition: transform .3s var(--ease, ease); }
.app-sheet.in .as-panel { transform: none; }
@media (min-width: 700px) { .app-sheet { align-items: center; } .app-sheet .as-panel { border-radius: 20px; } }
.app-sheet h3 { margin: 0 34px 8px 0; font-size: 1.15rem; color: #10243B; line-height: 1.35; }
.app-sheet .as-lead { margin: 0 0 12px; color: #4a5561; line-height: 1.55; }
.app-sheet .as-small { margin: 10px 0 0; font-size: .82rem; color: #6b7480; }
.app-sheet .as-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #F1F3F6; cursor: pointer; }
.app-sheet .as-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.app-sheet .as-steps li { counter-increment: s; position: relative; padding: 10px 10px 10px 46px; margin-bottom: 8px; background: #F7F8FA; border-radius: 12px; line-height: 1.55; }
.app-sheet .as-steps li::before { content: counter(s); position: absolute; left: 10px; top: 9px; width: 26px; height: 26px; border-radius: 50%; background: var(--saffron, #C44619); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.app-sheet .as-ico { display: inline-grid; place-items: center; vertical-align: -5px; width: 26px; height: 26px; border-radius: 7px; background: #fff; border: 1px solid #DDE2E8; color: #1a73e8; }
.app-sheet .as-topics { display: grid; gap: 8px; margin-bottom: 14px; }
.app-sheet .as-topics label { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #E3E7EC; border-radius: 12px; cursor: pointer; font-weight: 600; }
.app-sheet .as-topics input { width: 20px; height: 20px; accent-color: var(--saffron, #C44619); }
.app-sheet .as-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.app-sheet .as-main, .app-sheet .as-off { flex: 1; min-width: 140px; border: 0; border-radius: 12px; font: inherit; font-weight: 800; font-size: .92rem; padding: 12px 10px; cursor: pointer; white-space: nowrap; }
.app-sheet .as-main { background: var(--saffron, #C44619); color: #fff; }
.app-sheet .as-off { background: #F3F4F6; color: #8a1f11; }
.app-sheet .as-reload { color: #10243B; flex: 0 0 auto; min-width: 110px; }

/* ---------- 6. small toast ---------- */
.app-toast { position: fixed; z-index: 3700; left: 50%; bottom: 96px; transform: translate(-50%, 16px); width: max-content; max-width: min(92vw, 460px); background: #10243B; color: #fff; padding: 11px 16px; border-radius: 12px; font-size: .88rem; line-height: 1.45; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; transition: opacity .25s, transform .25s; text-align: center; }
.app-toast.in { opacity: 1; transform: translate(-50%, 0); }
.app-sheet ~ .app-toast { bottom: auto; top: 16px; }   /* a sheet is open: the message shows above it */

/* ---------- 7. home page section ---------- */
.appx { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 34px; align-items: center; background: linear-gradient(135deg, #10243B 0%, #183A5E 60%, #1F4B73 100%); color: #fff; border-radius: 26px; padding: 38px 40px; position: relative; overflow: hidden; }
.appx::before { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -140px; background: radial-gradient(circle, rgba(244,196,48,.22), transparent 65%); pointer-events: none; }
.appx.no-phone { grid-template-columns: 1fr; }
.appx .eyebrow { color: #F4C430; }
.appx .section-title { color: #fff; margin: 6px 0 10px; text-align: left; }
.appx .section-title .accent { color: #F4C430; }
.appx-sub { color: rgba(255,255,255,.86); line-height: 1.65; margin: 0 0 18px; max-width: 60ch; }
.appx-pts { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.appx-pts li { display: flex; gap: 10px; align-items: flex-start; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 11px 12px; }
.appx-pts .ap-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 1.1rem; }
.appx-pts b { display: block; font-size: .92rem; line-height: 1.35; }
.appx-pts small { display: block; font-size: .78rem; opacity: .75; margin-top: 2px; line-height: 1.35; }
.appx-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.appx-btns .btn { flex-direction: column; gap: 1px; padding: 10px 24px; font-size: .98rem; line-height: 1.25; }
.appx-btns .btn small { font-size: .74rem; font-weight: 600; opacity: .85; letter-spacing: .01em; }
.appx .appx-push { background: #fff; color: #10243B; border-color: #fff; }
.appx .appx-push.is-on { background: #E8F5EC; color: #1B5E32; border-color: #E8F5EC; }
.appx-note { display: none; margin: 14px 0 0; font-size: .86rem; color: rgba(255,255,255,.82); line-height: 1.55; }
.appx-note small { display: block; opacity: .75; }
html.app-standalone .appx-n-app, html.app-no-install .appx-n-other { display: block; }
/* phone picture */
.appx-phone { display: flex; justify-content: center; }
.ph-frame { position: relative; width: 236px; height: 470px; border-radius: 38px; background: linear-gradient(160deg, #F7D9A8, #E9A867 45%, #C8643A); border: 9px solid #0c1622; box-shadow: 0 30px 60px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.1); overflow: hidden; transform: rotate(-3deg); }
.ph-notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 82px; height: 20px; border-radius: 12px; background: #0c1622; }
.ph-time { position: absolute; top: 34px; left: 0; right: 0; text-align: center; color: #fff; font: 700 2.1rem/1 Inter, system-ui, sans-serif; text-shadow: 0 2px 8px rgba(0,0,0,.2); }
.ph-noti { position: absolute; top: 86px; left: 9px; right: 9px; background: rgba(255,255,255,.93); border-radius: 16px; padding: 9px 10px; color: #1d2733; box-shadow: 0 8px 20px rgba(0,0,0,.18); animation: phNoti 6s ease-in-out infinite; }
.ph-noti .pn-top { display: flex; align-items: center; gap: 5px; font-size: .66rem; color: #5b6573; }
.ph-noti .pn-top img { width: 16px; height: 16px; border-radius: 4px; }
.ph-noti .pn-top b { color: #1d2733; }
.ph-noti .pn-t { display: block; font-size: .74rem; line-height: 1.35; margin: 4px 0 2px; color: #10243B; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ph-noti .pn-b { display: block; font-size: .64rem; color: #6b7480; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes phNoti { 0%, 8% { transform: translateY(-120%); opacity: 0; } 16%, 80% { transform: none; opacity: 1; } 90%, 100% { transform: translateY(-120%); opacity: 0; } }
.ph-grid { position: absolute; left: 16px; right: 16px; bottom: 82px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 10px; }
.ph-app { aspect-ratio: 1; border-radius: 12px; background: rgba(255,255,255,.35); }
.ph-app.ph-me { background: none; position: relative; aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ph-app.ph-me img { width: 100%; aspect-ratio: 1; height: auto; border-radius: 12px; background: #fff; box-shadow: 0 0 0 3px #F4C430, 0 6px 14px rgba(0,0,0,.25); animation: phMe 2.4s ease-in-out infinite; }
.ph-app.ph-me small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: .55rem; color: #fff; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.4); white-space: nowrap; }
@keyframes phMe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.ph-dock { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 54px; border-radius: 18px; background: rgba(255,255,255,.3); display: flex; align-items: center; justify-content: space-around; padding: 0 8px; }
.ph-dock span { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.55); }
@media (max-width: 860px) {
  .appx { grid-template-columns: 1fr; padding: 26px 18px 30px; border-radius: 20px; gap: 22px; }
  .appx-pts { grid-template-columns: 1fr; }
  .appx-btns .btn { flex: 1 1 100%; justify-content: center; font-size: .95rem; padding: 10px 14px; }
  .appx-pts li { padding: 9px 11px; }
  .ph-frame { width: 184px; height: 340px; border-width: 8px; border-radius: 32px; }
  .ph-time { top: 30px; font-size: 1.6rem; }
  .ph-noti { top: 74px; left: 7px; right: 7px; padding: 8px 9px; }
  .ph-grid { left: 12px; right: 12px; bottom: 64px; gap: 9px 8px; }
  .ph-dock { left: 9px; right: 9px; bottom: 9px; height: 46px; border-radius: 15px; }
  .ph-dock span { width: 32px; height: 32px; border-radius: 9px; }
  .ph-app.ph-me small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .app-strip, .hdr-app svg, .hdr-app .ha-ring, .ph-noti, .ph-app.ph-me img { animation: none !important; }
  .ph-noti { opacity: 1; }
}
html.no-anim .ph-noti, html.no-anim .ph-app.ph-me img, html.no-anim .hdr-app svg, html.no-anim .hdr-app .ha-ring { animation: none !important; }
