/* salute.nw — THEME
 *
 * Every variable here has a twin in badge-theme.css, ladder-theme.css and
 * pulse-theme.css under the SAME name, so one structural stylesheet serves
 * every gate and each looks like itself.
 *
 * Salute differs in one way: it does not fix its colours. A veteran's page
 * carries the colours of the service they served in, so these map onto the
 * --sal-* variables that salute-themes.css sets per branch. Change the branch
 * and the whole gate recolours - the shared chrome included. That file stays
 * salute's own; nothing else on the platform needs a service palette.
 *
 * Structure lives in /shared/memorial/memorial-core.css, loaded first.
 */
:root {
  --mem-topbar-h:104px; --mem-topbar-row-h:56px; --mem-topbar-search-h:48px;

  /* Bridged to the active branch palette */
  --mem-bg:       var(--sal-bg,       #09090d);
  --mem-surface:  var(--sal-surface,  #111318);
  --mem-surface2: var(--sal-surface2, #191c24);
  --mem-border:   var(--sal-border,   #2a2d38);
  --mem-gold:     var(--sal-gold,     #c9a227);
  --mem-t1:       var(--sal-t1,       #f2ede6);
  --mem-t2:       var(--sal-t2,       #a99d8d);
  --mem-t3:       var(--sal-t3,       #7d7266);
  --mem-feat-c:   var(--sal-gold,     #c9a227);

  --mem-shadow:0 4px 24px rgba(0,0,0,0.6);
  --mem-pill-bg:rgba(201,162,39,0.08);
  --mem-max-w:1440px; --mem-radius:4px; --mem-radius-lg:8px; --mem-trans:200ms ease;

  --mem-black:#000; --mem-white:#fff;

  /* Vigil wall */
  --mem-wall-bg:#0a0a0a;
  --mem-wall-bd1:#1a1a1a; --mem-wall-bd2:#2a2a2a;
  --mem-wall-bd3:#333; --mem-wall-bd4:#444; --mem-wall-bd5:#555;
  --mem-wall-dark:#111;
  --mem-wall-text:#b8a870; --mem-wall-text-hi:#c8b870;
  --mem-wall-gold:#8B6914; --mem-wall-gold-hi:#FFD700;
  --mem-wall-surface:#1a1400; --mem-wall-surface2:#2a2000;

  --mem-footer-bg:      var(--sal-surface,  #111318);
  --mem-footer-t1:      var(--sal-t1,       #f2ede6);
  --mem-footer-t2:      var(--sal-t2,       #a99d8d);
  --mem-footer-t3:      var(--sal-t3,       #7d7266);
  --mem-gold-dim:       var(--sal-gold,     #c9a227);
  --mem-hero-bg:        var(--sal-bg,       #09090d);
  --mem-stats-bg:       var(--sal-surface,  #111318);
  --mem-pillar-bg:      var(--sal-surface2, #191c24);
  --mem-scope-bg:       var(--sal-surface2, #191c24);
  --mem-founding-bg:    var(--sal-surface,  #111318);
  --mem-founding-bg2:   var(--sal-surface2, #191c24);
  --mem-legacy-bg:      var(--sal-surface,  #111318);
  --mem-coming-bg:      var(--sal-surface2, #191c24);
  --mem-pill-bd:        var(--sal-border,   #2a2d38);
  --mem-blue:#1a3870;
}

/* The branch selector, salute's one addition to the shared control cluster. */
.sal-branch-selector{position:relative;display:inline-flex}
.sal-branch-icon{width:20px;height:20px;display:block}
.sal-branch-dropdown{position:absolute;top:calc(100% + .4rem);right:0;min-width:220px;
  background:var(--mem-surface);border:1px solid var(--mem-border);border-radius:var(--mem-radius);
  box-shadow:var(--mem-shadow);padding:.7rem;display:none;z-index:300}
.sal-branch-selector.open .sal-branch-dropdown{display:block}
.sal-branch-dropdown-title{font-size:.62rem;letter-spacing:.14em;text-transform:uppercase;
  color:var(--mem-gold);font-weight:700;margin-bottom:.5rem}
.sal-branch-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem}

/* The shared search panel sits at z-index 120, below salute's own topbar and
   branch dropdown, so results rendered behind the record. Raised above them. */
.mem-hsearch-panel{z-index:400;background:var(--sal-surface,#111318);opacity:1}
/* --mem-topbar-bg was never defined in this bridge, so the panel's background
   resolved to nothing and the record showed straight through the results. */
:root{--mem-topbar-bg:var(--sal-surface,#111318)}

/* Content padding. Salute's views carry sal-* classes whose page padding lived
   in the layout rules that were neutralised when it moved to the shared layout;
   memorial-core gives .mem-main flex sizing but no padding of its own. */
.mem-main{padding:1.75rem 2rem 2.5rem}
@media (max-width:900px){ .mem-main{padding:1.25rem 1rem 2rem} }
