/* SendHaven shared shell: header with mega menu, footer, page imagery and blog furniture.
   Loaded on every page (after Tailwind on legacy pages, after home.css on the homepage).
   Palette comes from the logo: navy #002c54, teal #01b3b2. */
:root {
  --sh-bg: #03152b;
  --sh-bg-2: #051d38;
  --sh-ink: #010f1f;
  --sh-panel: #072240;
  --sh-line: rgba(147, 166, 190, 0.16);
  --sh-line-2: rgba(147, 166, 190, 0.28);
  --sh-text: #f1f5f9;
  --sh-soft: #cbd5e1;
  --sh-muted: #93a6be;
  --sh-teal: #01b3b2;
  --sh-teal-2: #19c9c4;
  --sh-mint: #5fe3dc;
  --sh-navy: #002c54;
  --sh-display: 'Bricolage Grotesque', Inter, system-ui, sans-serif;
  --sh-mono: 'JetBrains Mono', ui-monospace, monospace;
  --sh-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sh-header: 76px;
}

/* Display face for headings across legacy pages, so every page shares one typographic voice. */
body h1, body h2, body h3 { font-family: var(--sh-display); letter-spacing: -0.025em; }
body { background-color: var(--sh-bg); }
html { scroll-padding-top: calc(var(--sh-header) + 16px); }
.sh-skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--sh-teal); color: var(--sh-navy); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.sh-skip:focus, .sh-skip:hover { left: 8px; color: var(--sh-navy); }

/* ------------------------------------------------------------------ header */
.sh-header { position: fixed; inset: 0 0 auto; z-index: 70; height: var(--sh-header); background: rgba(3, 21, 43, 0.82); border-bottom: 1px solid var(--sh-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background 0.3s; }
.sh-header.is-top { background: rgba(3, 21, 43, 0.55); }
.sh-header.is-open { background: var(--sh-bg); }
.sh-header-inner { width: min(100% - 40px, 1280px); margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 28px; }
.sh-logo { display: inline-flex; flex: none; }
.sh-logo img { height: 42px; width: auto; display: block; }
.sh-header-inner > nav { margin: 0 auto 0 12px; }
.sh-nav { display: flex; align-items: center; gap: 4px; margin: 0; list-style: none; padding: 0; }
.sh-nav > li { position: static; }
.sh-nav-link { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 10px; color: var(--sh-soft); font: 500 15px/1 Inter, sans-serif; text-decoration: none; background: none; border: 0; cursor: pointer; transition: color 0.2s, background 0.2s; }
.sh-nav-link:hover, .sh-nav-link[aria-expanded="true"], .sh-nav-link[aria-current="page"] { color: #fff; background: rgba(147, 166, 190, 0.1); }
.sh-nav-link svg { width: 14px; height: 14px; transition: transform 0.25s var(--sh-ease); }
.sh-nav-link[aria-expanded="true"] svg { transform: rotate(180deg); }
.sh-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.sh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font: 700 14.5px/1 Inter, sans-serif; text-decoration: none; white-space: nowrap; transition: background 0.2s, color 0.2s, border-color 0.2s; border: 1px solid transparent; }
.sh-btn-primary { background: linear-gradient(135deg, #7debe4, #19c9c4 50%, #01b3b2); color: var(--sh-navy); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.7); }
.sh-btn-primary:hover { color: var(--sh-navy); filter: brightness(1.05); }
.sh-btn-ghost { border-color: var(--sh-line-2); color: var(--sh-soft); }
.sh-btn-ghost:hover { border-color: var(--sh-teal); color: #fff; }
.sh-btn svg { width: 16px; height: 16px; }
.sh-burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--sh-line-2); background: none; color: #fff; cursor: pointer; align-items: center; justify-content: center; }
.sh-burger svg { width: 20px; height: 20px; }

/* mega panels */
.sh-mega { position: absolute; left: 0; right: 0; top: var(--sh-header); background: var(--sh-bg); border-bottom: 1px solid var(--sh-line); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 0.22s, transform 0.22s var(--sh-ease), visibility 0.22s; }
.sh-mega.is-open { opacity: 1; visibility: visible; transform: none; }
.sh-mega-inner { width: min(100% - 40px, 1280px); margin: 0 auto; padding: 28px 0 32px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
.sh-mega-label { font: 600 11px/1 var(--sh-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--sh-muted); margin: 0 0 14px; }
.sh-mega-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; list-style: none; margin: 0; padding: 0; }
.sh-mega-item { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 12px; border-radius: 14px; text-decoration: none; transition: background 0.2s; }
.sh-mega-item:hover { background: rgba(147, 166, 190, 0.08); }
.sh-mega-item .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(1, 179, 178, 0.12); color: var(--sh-mint); border: 1px solid rgba(95, 227, 220, 0.22); }
.sh-mega-item .ico svg { width: 19px; height: 19px; }
.sh-mega-item strong { display: block; color: #fff; font: 600 15px/1.3 Inter, sans-serif; }
.sh-mega-item span { display: block; color: var(--sh-muted); font-size: 13.5px; line-height: 1.45; margin-top: 3px; }
.sh-mega-feature { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--sh-line); background: var(--sh-panel); display: flex; flex-direction: column; text-decoration: none; }
.sh-mega-feature img { width: 100%; height: 170px; object-fit: cover; display: block; }
.sh-mega-feature .body { padding: 16px 18px 18px; }
.sh-mega-feature strong { display: block; color: #fff; font: 700 17px/1.25 var(--sh-display); letter-spacing: -0.015em; }
.sh-mega-feature p { color: var(--sh-muted); font-size: 13.5px; margin: 6px 0 0; line-height: 1.5; }
.sh-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font: 600 11px/1 var(--sh-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--sh-mint); background: rgba(1, 179, 178, 0.12); border: 1px solid rgba(95, 227, 220, 0.25); }
.sh-mega-feature .sh-pill { position: absolute; top: 12px; left: 12px; background: rgba(3, 21, 43, 0.85); }

/* resources panel: blog slider */
.sh-slider { position: relative; }
.sh-slider-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.sh-slider-track::-webkit-scrollbar { display: none; }
.sh-post { scroll-snap-align: start; border-radius: 16px; overflow: hidden; border: 1px solid var(--sh-line); background: var(--sh-panel); text-decoration: none; display: flex; flex-direction: column; transition: border-color 0.2s, transform 0.3s var(--sh-ease); }
.sh-post:hover { border-color: rgba(95, 227, 220, 0.45); transform: translateY(-2px); }
.sh-post img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.sh-post .body { padding: 12px 14px 14px; }
.sh-post .meta { display: flex; gap: 8px; align-items: center; color: var(--sh-muted); font: 500 11.5px/1 var(--sh-mono); letter-spacing: 0.04em; }
.sh-post .meta b { color: var(--sh-mint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.sh-post strong { display: block; color: #fff; font: 600 14.5px/1.35 Inter, sans-serif; margin-top: 8px; }
.sh-slider-nav { display: flex; gap: 8px; }
.sh-slider-nav button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--sh-line-2); background: none; color: #fff; cursor: pointer; display: grid; place-items: center; }
.sh-slider-nav button:hover { border-color: var(--sh-teal); }
.sh-slider-nav svg { width: 16px; height: 16px; }
.sh-mega-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sh-mega-head .sh-mega-label { margin: 0; }
.sh-mega-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }

/* mobile drawer */
.sh-drawer { display: none; }
@media (max-width: 1040px) {
  .sh-nav, .sh-actions .sh-btn-ghost { display: none; }
  .sh-burger { display: inline-flex; }
  .sh-actions { margin-left: auto; }
  .sh-mega { display: none; }
  .sh-drawer { display: block; position: fixed; inset: var(--sh-header) 0 0; z-index: 69; background: var(--sh-bg); overflow-y: auto; padding: 8px 20px 40px; transform: translateX(100%); transition: transform 0.3s var(--sh-ease); }
  .sh-drawer.is-open { transform: none; }
  .sh-drawer details { border-bottom: 1px solid var(--sh-line); }
  .sh-drawer summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 18px 2px; color: #fff; font: 600 18px/1 var(--sh-display); cursor: pointer; }
  .sh-drawer summary::-webkit-details-marker { display: none; }
  .sh-drawer summary::after { content: '+'; color: var(--sh-mint); font: 400 24px/1 Inter, sans-serif; }
  .sh-drawer details[open] summary::after { content: '−'; }
  .sh-drawer .sh-mega-grid { grid-template-columns: 1fr; padding-bottom: 12px; }
  .sh-drawer > a.sh-drawer-link { display: block; padding: 18px 2px; border-bottom: 1px solid var(--sh-line); color: #fff; font: 600 18px/1 var(--sh-display); text-decoration: none; }
  .sh-drawer .sh-btn { width: 100%; margin-top: 22px; height: 52px; }
}
@media (max-width: 520px) { .sh-actions .sh-btn-primary { display: none; } .sh-logo img { height: 36px; } }

/* ------------------------------------------------------------------ page imagery */
.sh-shot { width: min(100% - 32px, 1180px); margin: 0 auto; padding: 8px 0 24px; }
.sh-shot figure { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--sh-line); box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.9); }
.sh-shot img { width: 100%; height: auto; display: block; aspect-ratio: 21 / 9; object-fit: cover; }
.sh-feature-img { width: min(100% - 32px, 1180px); margin: 0 auto 8px; padding-top: 36px; }
.sh-feature-img figure { margin: 0; }
.sh-feature-img img { width: 100%; height: auto; display: block; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 22px; border: 1px solid var(--sh-line); }
.sh-feature-img figcaption { color: var(--sh-muted); font-size: 13px; margin-top: 10px; }

/* blog index grid */
.sh-blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.sh-blog-grid .sh-post { transform: none; }
.sh-blog-grid .sh-post strong { font: 700 19px/1.3 var(--sh-display); letter-spacing: -0.015em; margin-top: 10px; }
.sh-blog-grid .sh-post p { color: var(--sh-muted); font-size: 14.5px; line-height: 1.6; margin: 8px 0 0; }
.sh-blog-grid .sh-post .body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.sh-blog-grid .sh-post .more { margin-top: auto; padding-top: 16px; color: var(--sh-mint); font: 600 14px/1 Inter, sans-serif; }
.sh-blog-grid .sh-post.lead { grid-column: span 2; display: grid; grid-template-columns: 1.2fr 1fr; }
.sh-blog-grid .sh-post.lead img { aspect-ratio: auto; height: 100%; }
.sh-blog-grid .sh-post.lead strong { font-size: 26px; }
@media (max-width: 1000px) { .sh-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sh-blog-grid { grid-template-columns: 1fr; } .sh-blog-grid .sh-post.lead { grid-column: auto; grid-template-columns: 1fr; } .sh-blog-grid .sh-post.lead img { aspect-ratio: 16 / 9; } }

/* related posts at the end of an article */
.sh-related { width: min(100% - 32px, 1180px); margin: 0 auto; padding: 56px 0 72px; border-top: 1px solid var(--sh-line); }
.sh-related h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); margin: 0 0 22px; }

/* ------------------------------------------------------------------ footer */
.sh-footer { background: var(--sh-ink); border-top: 1px solid var(--sh-line); padding: 72px 0 28px; color: var(--sh-muted); }
.sh-footer-inner { width: min(100% - 40px, 1280px); margin: 0 auto; }
.sh-footer-top { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 32px; }
.sh-footer-brand p { font-size: 14.5px; line-height: 1.6; margin: 16px 0 0; max-width: 34ch; }
.sh-footer-brand .sh-btn { margin-top: 20px; }
.sh-footer h2 { font: 600 11.5px/1 var(--sh-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--sh-mint); margin: 0 0 16px; }
.sh-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sh-footer a { color: var(--sh-muted); text-decoration: none; font-size: 14.5px; }
.sh-footer a:hover { color: #fff; }
.sh-footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 54px; padding-top: 24px; border-top: 1px solid var(--sh-line); font-size: 13px; }
.sh-pay { display: flex; align-items: center; gap: 8px; }
.sh-pay span { height: 28px; min-width: 28px; padding: 0 9px; border-radius: 8px; display: inline-grid; place-items: center; color: #fff; font: 800 13px/1 var(--sh-display); }
.sh-pay .stripe { background: #635bff; }
.sh-pay .usdt { background: #26a17b; border-radius: 50%; padding: 0; }
.sh-pay .btc { background: #f7931a; border-radius: 50%; padding: 0; }
.sh-pay .eth { background: #4b63d0; border-radius: 50%; padding: 0; }
@media (max-width: 1000px) { .sh-footer-top { grid-template-columns: 1fr 1fr 1fr; } .sh-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 600px) { .sh-footer-top { grid-template-columns: 1fr 1fr; } }

/* hidden stubs for legacy inline scripts that still reference the old menu */
#menuBtn, #mobileMenu { display: none !important; }
@media (prefers-reduced-motion: reduce) { .sh-mega, .sh-drawer, .sh-post { transition: none; } }
.sh-post .meta { white-space: nowrap; overflow: hidden; }
.sh-slider .sh-post strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sh-footer a.sh-btn-primary, .sh-footer a.sh-btn-primary:hover { color: var(--sh-navy); }

/* mobile safety for legacy layouts: grid children may shrink, long words wrap, no sideways scroll */
main .grid > *, main .flex > * { min-width: 0; }
main h1, main h2, main h3, main p, main li, main td { overflow-wrap: break-word; }
main { overflow-x: clip; }
main table { display: block; max-width: 100%; overflow-x: auto; }

/* quieter legacy decoration: no glow blobs, neutral shadows, plain category labels */
.glow-green, .glow-green-sm { display: none !important; }
[class*="shadow-emerald-"] { --tw-shadow-color: rgba(0, 0, 0, 0.45) !important; --tw-shadow: var(--tw-shadow-colored) !important; }
.sh-label { display: block; margin: 0 0 14px; color: var(--sh-mint); font: 600 12.5px/1 var(--sh-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.sh-inline-img { margin: 36px 0; }
.sh-inline-img img { width: 100%; height: auto; display: block; border-radius: 18px; border: 1px solid var(--sh-line); aspect-ratio: 3 / 2; object-fit: cover; }
.sh-inline-img figcaption { color: var(--sh-muted); font-size: 13.5px; margin-top: 10px; }

/* links inside running text are underlined, not only coloured (WCAG link-in-text-block) */
main p a:not(.sh-btn):not([class*="bg-"]), main li a:not([class*="bg-"]), main td a, main span > a, .prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sh-was { color: #93a6be !important; }
