/**
 * Sitting Out design system v2 — semantic foundations for FULL real-WordPress
 * dual appearance. Build is NOT for production until route-level migrations,
 * interactive browser QA and approved artwork are complete.
 *
 * A single #00E5FF signature accent in BOTH appearances.
 */
:root,
:root[data-so-theme="dark"] {
  --so-bg: #070a0f;
  --so-bg-alt: #0a1119;
  --so-surface: #0d121a;
  --so-surface-raised: #141b26;
  --so-text: #f5f7fa;
  --so-text-soft: #b1bdc9;
  --so-text-quiet: #8795a5;
  --so-stroke: rgba(156,190,207,.21);
  --so-stroke-focus: #00e5ff;
  --so-brand-cyan: #00e5ff;
  --so-on-cyan: #061117;
  --so-shadow-card: 0 12px 42px rgba(0,0,0,.28);
  --so-field-bg: #0b1722;
  --so-link-ink: #00e5ff;
  --void: var(--so-bg);
  --surface: var(--so-surface);
  --text: var(--so-text);
  --muted: var(--so-text-soft);
  --muted2: #bac7d1;
  --line: var(--so-stroke);
  --line2: rgba(160,195,217,.35);
  --cyan: var(--so-brand-cyan);
  color-scheme: dark;
}
:root[data-so-theme="light"] {
  --so-bg: #f7f9fb;
  --so-bg-alt: #eef3f6;
  --so-surface: #fff;
  --so-surface-raised: #fff;
  --so-text: #141a22;
  --so-text-soft: #505d6a;
  --so-text-quiet: #5e6b77;
  --so-stroke: #dbe3e9;
  --so-stroke-focus: #117b90;
  --so-brand-cyan: #00e5ff;
  --so-on-cyan: #061117;
  --so-shadow-card: 0 8px 28px rgba(12,31,45,.08);
  --so-field-bg: #fff;
  --so-link-ink: #144b58;
  --void: var(--so-bg);
  --surface: var(--so-surface);
  --text: var(--so-text);
  --muted: var(--so-text-soft);
  --muted2: #51616e;
  --line: var(--so-stroke);
  --line2: #c3d4df;
  --cyan: var(--so-brand-cyan);
  color-scheme: light;
}
:root[data-so-theme] {
  background: var(--so-bg);
  color: var(--so-text);
}
:root[data-so-theme] .so-brand__mode--light {display:none}
:root[data-so-theme="light"] .so-brand__mode--dark {display:none}
:root[data-so-theme="light"] .so-brand__mode--light {display:contents}
.so-appearance-switch {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 38px;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid var(--so-stroke);
  background:var(--so-surface);
  border-radius:50%;
  color:var(--so-brand-cyan);
  cursor:pointer;
  transition:border-color .18s ease,background-color .18s ease;
}
.so-appearance-switch[hidden] {display:none!important}
.so-appearance-switch:hover {border-color:var(--so-brand-cyan);background:var(--so-bg-alt)}
.so-appearance-switch__icon {
  width:19px;height:19px;
  stroke:currentColor;stroke-width:1.8;
  fill:none;stroke-linejoin:round;stroke-linecap:round;
}
.so-appearance-switch__icon--moon {display:none}
:root[data-so-theme="light"] .so-appearance-switch {color:#144b58}
:root[data-so-theme="light"] .so-appearance-switch__icon--sun {display:none}
:root[data-so-theme="light"] .so-appearance-switch__icon--moon {display:block}
:root[data-so-theme] :is(a,button,input,textarea,select,[tabindex]):focus-visible {
  outline:3px solid var(--so-stroke-focus);outline-offset:3px;
}
/* Minimum shared light-mode shell overrides. Individual route conversions
   must supersede literal legacy colours, and must pass visual QA before merge. */
:root[data-so-theme="light"] body {background:var(--so-bg);color:var(--so-text)}
:root[data-so-theme="light"] .so-header {
  background:rgba(255,255,255,.96);
  color:var(--so-text);
  border-bottom:1px solid var(--so-stroke);
}
:root[data-so-theme="light"] .so-header :is(.so-nav a,.so-link) {color:var(--so-text)}
:root[data-so-theme="light"] .so-btn--primary {
  background:var(--so-brand-cyan);color:var(--so-on-cyan);
}
:root[data-so-theme="light"] .so-footer {
  background:#f1f4f6;color:var(--so-text);
  border-top:1px solid var(--so-stroke);
}
:root[data-so-theme="light"] .so-footer :is(a,button,strong,p,span) {color:var(--so-text-soft)}
:root[data-so-theme="light"] .so-footer__nav strong {color:var(--so-text)}
@media(max-width:680px) {
  .so-appearance-switch {flex-basis:36px;width:36px;height:36px}
}
@media(prefers-reduced-motion:reduce) {
  .so-appearance-switch *, :root[data-so-theme] .so-brand__mode {
    animation:none!important;transition:none!important;
  }
}

/* Authenticated 390px Chromium QA: four usable header controls plus the
   approved logo exceeded the viewport by 8px. Recover space from margins
   and gaps, NOT from button hit targets or by clipping accessible actions. */
@media(max-width:480px) {
  .so-header .so-header__inner {
    width:calc(100% - 20px);
    gap:6px;
  }
  .so-header__actions {
    gap:4px;
    margin-left:auto;
    min-width:0;
  }
}

/* The approved light lockup PNG has an opaque white canvas. On the
   off-white footer that appears as a stray rectangular badge; multiply
   lets white resolve to the underlying neutral surface while retaining
   the dark ink and cyan brand symbol. No fabricated logo asset. */
:root[data-so-theme="light"] .so-brand__mode--light .so-brand__image {
  mix-blend-mode:multiply;
}

/* At 320px the inherited !important desktop lockup width (184px) crowds
   four genuine member controls off-screen. Switch to the approved A1
   symbol only at the smallest mobile width, retaining 40px controls and
   the accessible "Sitting Out home" link; do not crop the wordmark. */
@media(max-width:350px) {
  .so-header .so-brand {
    flex:0 0 40px;
    width:40px;
    min-width:40px;
  }
  .so-header .so-brand__mode {
    position:relative;
    width:40px;
    height:40px;
    background:url('../brand/sitting-out-symbol-a1-transparent-2048.png') center/34px 34px no-repeat;
  }
  .so-header .so-brand__mode .so-brand__image {
    display:none!important;
  }
}

/* The normal light-mode wrapper uses display:contents; the symbol needs
   a real box so its local approved image background actually paints. */
@media(max-width:350px) {
  :root[data-so-theme="light"] .so-header .so-brand__mode--light,
  :root[data-so-theme="dark"] .so-header .so-brand__mode--dark {
    display:block;
  }
}
