/* Shared styles for the Excel Explorer site (homepage, edition pages). */
:root {
  --bg: #ffffff; --text: #1f2328; --muted: #555b66; --soft: #7a808a; --line: #e6e8ec;
  --field: #f7f9fb; --accent: #2f80e4; --accent-dark: #1f6fd1; --ok: #1f8a5b; --err: #c0392b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
[hidden] { display: none !important; }

/* Header */
.site-header .wrap { display: flex; align-items: center; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 600; }
.brand img { width: 28px; height: 28px; border-radius: 50%; }

/* Signup box */
.join { display: flex; width: 100%; max-width: 380px; margin: 0 auto; border: 2px solid var(--accent); border-radius: 6px; overflow: hidden; background: var(--field); }
.join input[type=email] { flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 10px; font: inherit; font-size: .98rem; color: var(--text); outline: none; }
.join button { border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 700; padding: 0 16px; cursor: pointer; }
.join button:hover { background: var(--accent-dark); }
.join button:disabled { opacity: .7; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.msg { min-height: 1.3em; margin: 10px 0 0; font-size: .92rem; }
.msg.ok { color: var(--ok); font-weight: 600; } .msg.err { color: var(--err); }

.date { color: var(--accent); font-size: .74rem; font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; background: #fff; }
.site-footer .top { display: grid; grid-template-columns: 1.6fr 0.7fr 1.3fr; gap: 40px; padding-top: 44px; padding-bottom: 22px; align-items: start; }
.f-brand { display: flex; align-items: center; gap: 10px; font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 1.05rem; margin-bottom: 14px; }
.f-brand img { width: 36px; height: 36px; border-radius: 50%; }
.f-tag { color: var(--muted); font-size: .92rem; line-height: 1.55; max-width: 340px; margin: 0; }
.f-cols { display: grid; grid-template-columns: 1fr; gap: 24px; }
.f-cols h4 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .92rem; margin: 2px 0 12px; }
.f-cols a { display: block; color: var(--muted); font-size: .92rem; line-height: 1.4; margin-bottom: 10px; }
.f-cols a:hover { color: var(--accent-dark); }
.f-join p.f-label { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .92rem; margin: 2px 0 12px; }
.f-join .join { margin: 0; max-width: none; }
.f-social { display: flex; gap: 10px; margin-top: 16px; }
.f-social a { width: 36px; height: 36px; border-radius: 50%; background: var(--field); border: 1px solid var(--line);
              display: grid; place-items: center; color: var(--text); }
.f-social a:hover { border-color: var(--soft); }
.f-social svg { width: 15px; height: 15px; }
.site-footer .bottom { border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 22px; display: flex; align-items: center;
                       gap: 10px; flex-wrap: wrap; color: var(--soft); font-size: .82rem; }
.site-footer .bottom .rss { width: 26px; height: 26px; border-radius: 50%; background: var(--field); border: 1px solid var(--line);
                            display: inline-grid; place-items: center; color: var(--text); }
.site-footer .bottom .rss:hover { border-color: var(--soft); }
.site-footer .bottom .rss svg { width: 12px; height: 12px; }
.site-footer .bottom .right { margin-left: auto; }
.site-footer .bottom a:hover { color: var(--text); }
@media (max-width: 820px) { .site-footer .top { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Motion (subtle; disabled for reduced-motion users) ---------- */
@keyframes ee-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ee-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes ee-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes ee-pop { 0% { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }

/* Hero entrance: children rise one after another */
.enter > * { animation: ee-rise .6s cubic-bezier(.2,.7,.2,1) both; }
.enter > *:nth-child(2) { animation-delay: .08s; } .enter > *:nth-child(3) { animation-delay: .16s; }
.enter > *:nth-child(4) { animation-delay: .24s; } .enter > *:nth-child(5) { animation-delay: .32s; }

/* Reveal on scroll (site.js adds .in) */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }

/* Sticky header: hairline + soft frosted background once scrolled */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.86); -webkit-backdrop-filter: saturate(160%) blur(8px);
               backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 2px 10px rgba(17,24,39,.04); }

/* Skeleton placeholders while content loads */
.skel { background: linear-gradient(90deg, #f1f3f5 0, #e8ebef 50%, #f1f3f5 100%); background-size: 800px 100%;
        animation: ee-shimmer 1.3s linear infinite; border-radius: 4px; }

/* Signup feedback */
.join.shake { animation: ee-shake .38s ease; border-color: var(--err); }
.msg.ok .tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff;
                margin-right: 8px; vertical-align: -6px; animation: ee-pop .45s cubic-bezier(.2,.7,.2,1) both; }
.msg.ok .tick svg { width: 13px; height: 13px; }

/* Reading progress (edition pages) */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
            background: var(--accent); z-index: 60; transition: transform .1s linear; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
         background: #1f2328; color: #fff; font-size: .88rem; padding: 9px 16px; border-radius: 8px; z-index: 70;
         transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
