/* Wols CA / SA Mundus — Site-wide 16K Blue-Green Background & Tactile Depth Theme */
:root {
  --bg: #030a18;
  --card: rgba(5, 16, 32, 0.88);
  --border: #254d7d;
  --accent: #ffcc00;
  --blue: #5b78a8;
  --blue-dark: #3b5582;
  --text: #f0f4f8;
  --muted: #a3b4c6;
}

body {
  background: #041626 url('docs/bg-16k-blue-green.webp?v=20261120c') center center / 125% 125% no-repeat fixed !important;
  color: var(--text);
  display: flex;
  min-height: 100vh;
  flex-direction: row !important;
}
header { display: none !important; }

/* Main cards: sunken 2px diagonally, popping up 2px in the opposite diagonal on hover/focus */
.card {
  background: var(--card) !important;
  border-color: var(--border) !important;
  transform: translate(2px, 2px);
  box-shadow: inset 3px 3px 9px rgba(0, 0, 0, 0.78), inset -1px -1px 0 rgba(147, 197, 253, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover,
.card:focus,
.card:focus-within {
  transform: translate(-2px, -2px);
  border-color: #5b9bd5 !important;
  box-shadow: 5px 5px 16px rgba(0, 0, 0, 0.82), -1px -1px 0 rgba(147, 197, 253, 0.34);
  outline: none;
}

/* Internal blocks: popped out */
.sub-card,
.step-item,
.timeline-row,
.inspector,
.svg-box,
.viewer-toolbar {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.68), -1px -1px 0 rgba(147, 197, 253, 0.2);
}

/* Buttons: popped up */
.btn,
.btn-mode,
.btn-flow {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.68), -1px -1px 0 rgba(255, 255, 255, 0.22);
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.btn:hover,
.btn-mode:hover,
.btn-flow:hover {
  transform: translate(-3px, -3px);
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.8), -1px -1px 0 rgba(255, 255, 255, 0.28);
}
.btn:active,
.btn-mode:active,
.btn-flow:active {
  transform: translate(1px, 1px);
  box-shadow: inset 1px 1px 4px rgba(0, 0, 0, 0.65);
}
.btn:disabled {
  transform: none;
  box-shadow: none;
}

/* Single-source Left Sidebar (identical across all pages) */
.app-sidebar {
  width: 290px !important;
  background: #0a1d37 !important;
  border-right: 2px solid var(--accent) !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  height: calc(100vh + 2px) !important;
  overflow: hidden !important;
  z-index: 200 !important;
  padding: 20px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 20px rgba(0, 0, 0, 0.8), -1px -1px 0 rgba(147, 197, 253, 0.24);
}
.sb-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.sb-brand {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text) !important;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--accent);
}
.sb-brand img {
  width: 165px;
  height: auto;
  border-radius: 8px;
  border: none;
  margin-bottom: 6px;
}
.sb-brand span {
  background: var(--accent);
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  align-self: center !important;
  font-weight: 800;
}
.sb-slogan {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  font-style: italic;
  margin-top: 6px;
  line-height: 1.35;
  min-height: 2.7em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.45s ease;
}
.sb-section {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
  padding-left: 8px;
  margin-top: 10px;
}
.sb-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 7px 10px;
  display: block;
  border-radius: 6px;
  line-height: 1.3;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sb-link:hover,
.sb-link.active {
  color: var(--accent) !important;
  background: rgba(255, 204, 0, 0.12) !important;
  font-weight: 700;
}
.sb-link.active {
  border-left-color: var(--accent) !important;
}
.sb-theme-group {
  margin-bottom: 4px;
}
.sb-theme-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(37, 77, 125, 0.65);
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.81rem;
  font-weight: 700;
  text-align: left;
  padding: 7px 10px;
  cursor: pointer;
  line-height: 1.25;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sb-theme-btn:hover,
.sb-theme-btn.open {
  color: var(--accent);
  background: rgba(255, 204, 0, 0.10);
  border-color: rgba(255, 204, 0, 0.45);
}
.sb-theme-btn.open {
  border-left-color: var(--accent);
}
.sb-theme-chevron {
  font-size: 0.68rem;
  flex-shrink: 0;
  transition: transform 0.18s ease;
  opacity: 0.85;
}
.sb-theme-btn.open .sb-theme-chevron {
  transform: rotate(90deg);
  opacity: 1;
}
.sb-theme-panel {
  padding: 4px 0 4px 8px;
  margin: 2px 0 4px 6px;
  border-left: 1px solid rgba(255, 204, 0, 0.28);
}
.sb-theme-panel[hidden] {
  display: none;
}
.sb-theme-panel .sb-link {
  font-size: 0.81rem;
  padding: 5px 8px;
}
.sb-cta {
  flex-shrink: 0;
  margin-top: 0 !important;
  background: var(--accent) !important;
  color: #000 !important;
  text-align: center;
  font-weight: 800;
  padding: 11px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.88rem;
  display: block;
}
.sb-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  background: var(--accent);
  color: #000;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}
.app-main,
.main-wrapper {
  margin-left: 290px !important;
  flex: 1;
  min-width: 0;
  position: relative;
  padding-bottom: 84px;
}
@media (max-width: 980px) {
  .app-sidebar {
    height: 100vh !important;
    overflow-y: auto !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s ease;
    box-shadow: none;
  }
  .sb-scroll {
    overflow-y: visible;
  }
  .app-sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 6px 0 20px rgba(0, 0, 0, 0.8);
  }
  .app-main,
  .main-wrapper {
    margin-left: 0 !important;
    padding-top: 40px;
  }
  .sb-toggle {
    display: block !important;
  }
}

/* Bottom statement bar tag: popped 2px down */
.statement-bar-tag {
  display: inline-block;
  transform: translate(2px, 2px);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.75), inset -1px -1px 0 rgba(255, 204, 0, 0.25);
}

/* Browser & Device Security Check button pinned above Zoom Controls */
.sb-sec-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #0b2447 0%, #0a332b 100%);
  color: #e0f2fe !important;
  border: 1px solid #38bdf8;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.55), -1px -1px 0 rgba(56, 189, 248, 0.2);
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.sb-sec-btn:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.72);
}

/* Site-wide Zoom Controls (+ / - with cookie persistence) inside left sidebar */
.wols-zoom-slot {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 4px;
}
.wols-zoom-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  background: rgba(5, 18, 36, 0.94);
  border: 1px solid #254d7d;
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.7), -1px -1px 0 rgba(147, 197, 253, 0.16);
}
.wols-zoom-btn {
  background: #081930;
  color: #ffcc00;
  border: 1px solid #254d7d;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.65), -1px -1px 0 rgba(147, 197, 253, 0.18);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.wols-zoom-btn:hover:not(:disabled) {
  border-color: #ffcc00;
  background: #ffcc00;
  color: #000;
  transform: translate(-2px, -2px);
}
.wols-zoom-btn:active:not(:disabled) {
  transform: translate(1px, 1px);
}
.wols-zoom-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.wols-zoom-level {
  background: transparent;
  border: none;
  color: #f0f4f8;
  font-size: 0.78rem;
  font-weight: 700;
  min-width: 46px;
  text-align: center;
  cursor: pointer;
  padding: 4px 4px;
  border-radius: 5px;
}
.wols-zoom-level:hover {
  color: #ffcc00;
  background: rgba(255, 204, 0, 0.08);
}

/* Main content wrapper positioning & bottom clearance for fixed statement bar */
.app-main,
.main-wrapper {
  position: relative;
  padding-bottom: 84px;
}

/* Upper-right brand seal + rotating one-liner */
.page-top-brand {
  position: absolute;
  top: 24px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 90;
  max-width: calc(100% - 460px);
}
.page-top-slogan {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  font-style: italic;
  text-align: right;
  line-height: 1.3;
  transition: opacity 0.45s ease;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}
.page-top-icon {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  object-fit: cover;
  background: #0b192c;
  flex-shrink: 0;
}
.hero-header {
  padding-right: 360px;
}

/* Always-visible fixed bottom SA Mundus / Wols CA statement bar */
.statement-bar {
  position: fixed;
  bottom: 0;
  left: 290px;
  right: 0;
  z-index: 150;
  background: linear-gradient(90deg, #04241f 0%, #051a2e 50%, #041126 100%);
  border-top: 1px solid #254d7d;
  border-bottom: 2px solid var(--accent);
  padding: 6px 18px;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.65);
}
.statement-bar-layout {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.statement-bar-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.statement-bar-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--muted);
}
.statement-bar-tag {
  background: rgba(255, 204, 0, 0.14);
  color: var(--accent);
  border: 1px solid rgba(255, 204, 0, 0.45);
  border-radius: 99px;
  padding: 1px 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.statement-bar-quote {
  color: #f0f4f8;
  font-size: clamp(0.7rem, 0.95vw, 0.84rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin: 0;
}

@media (max-width: 1120px) {
  .hero-header { padding-right: 260px; }
  .page-top-slogan { max-width: 180px; font-size: 0.82rem; }
}
@media (max-width: 980px) {
  .statement-bar { left: 0; }
  .page-top-brand { top: 14px; right: 16px; gap: 10px; max-width: calc(100% - 110px); }
  .page-top-icon { width: 60px; height: 60px; }
  .page-top-slogan { font-size: 0.76rem; max-width: 170px; }
  .hero-header { padding-right: 0; padding-top: 56px; }
}
@media (max-width: 1280px), (max-height: 720px) {
  .statement-bar { padding: 4px 12px; }
  .statement-bar-layout { gap: 8px; }
  .statement-bar-meta { font-size: 0.68rem; gap: 5px; }
  .statement-bar-tag { font-size: 0.62rem; padding: 1px 5px; }
  .statement-bar-quote { font-size: 0.7rem; line-height: 1.2; white-space: normal; }
  .app-main, .main-wrapper { padding-bottom: 54px; }
}

@media print {
  body {
    background: #fff !important;
    background-image: none !important;
  }
  .app-sidebar,
  .sb-toggle,
  .wols-zoom-ctrl,
  .statement-bar,
  .page-top-brand {
    display: none !important;
  }
  .app-main,
  .main-wrapper {
    margin-left: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* Lego Block Cornerstone Cards (Our DNA) */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 22px;
  margin-top: 32px;
}
@media (max-width: 820px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
.lego-block {
  --brick-color: var(--accent);
  position: relative;
  margin-top: 14px;
  border-top: 4px solid var(--brick-color) !important;
  border-left: 4px solid var(--brick-color) !important;
  border-radius: 4px 10px 10px 10px !important;
  padding-top: 26px !important;
}
.lego-studs {
  position: absolute;
  top: -15px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
.lego-stud {
  flex: 1 1 0;
  max-width: 34px;
  min-width: 10px;
  height: 11px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.38) 0%, var(--brick-color) 42%, rgba(0,0,0,0.28) 100%);
  border: 1px solid var(--brick-color);
  border-bottom: none;
  box-shadow: inset 0 2px 2px rgba(255,255,255,0.35), 2px -1px 4px rgba(0,0,0,0.45);
}
.lego-block-wide .lego-studs {
  gap: 12px;
}
.lego-block-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #030a18;
  background: var(--brick-color);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
  align-self: flex-start;
}
