/* Sidebar shell + masthead banner */

.skip-jump {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: #2563eb;
  color: #fff;
  border-radius: 0.25rem;
  font-weight: 600;
  text-decoration: none;
  font-family: Inter, system-ui, sans-serif;
}
.skip-jump:focus { top: 0.5rem; }

.doc-flow-wrap {
  display: flex;
  min-height: 100vh;
  background: #060a14;
}

/* ── Sidebar ── */
.side-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 15.5rem;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0b1120;
  border-right: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[dir="rtl"] .side-panel {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.35);
}

.mark-cluster {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.25rem 1.125rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  transition: background 0.2s ease;
}
.mark-cluster:hover { background: rgba(59, 130, 246, 0.06); }

.mark-icon {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.45));
}

.mark-name {
  font-family: "JetBrains Mono", "Inter", monospace;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f1f5f9;
}

.side-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.side-link {
  position: relative;
  display: block;
  padding: 0.625rem 0.875rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 0.375rem;
  border-left: 2px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, text-shadow 0.2s ease;
}

html[dir="rtl"] .side-link {
  border-left: none;
  border-right: 2px solid transparent;
}

.side-link::after {
  content: "";
  position: absolute;
  bottom: 0.35rem;
  left: 0.875rem;
  width: 0;
  height: 1px;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  transition: width 0.3s ease;
}

html[dir="rtl"] .side-link::after {
  left: auto;
  right: 0.875rem;
}

.side-link:hover {
  color: #e2e8f0;
  background: rgba(59, 130, 246, 0.08);
}
.side-link:hover::after { width: 2rem; }

.side-link--on {
  color: #7dd3fc;
  background: rgba(59, 130, 246, 0.12);
  border-left-color: #3b82f6;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

html[dir="rtl"] .side-link--on {
  border-left-color: transparent;
  border-right-color: #3b82f6;
}

.side-foot {
  padding: 1rem 0.75rem 1.25rem;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.side-acquire {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff !important;
  text-decoration: none !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 0.375rem;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.side-acquire:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.55);
}
.side-acquire svg { width: 1rem; height: 1rem; flex-shrink: 0; }

/* ── Work area ── */
.canvas-stage {
  flex: 1;
  margin-left: 15.5rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

html[dir="rtl"] .canvas-stage {
  margin-left: 0;
  margin-right: 15.5rem;
}

.head-band {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: #0b1120;
  border-bottom: 1px solid rgba(59, 130, 246, 0.12);
}

.mark-cluster--band {
  padding: 0;
  border: none;
}
.mark-cluster--band:hover { background: transparent; }
.mark-cluster--band .mark-icon { width: 2rem; height: 2rem; }
.mark-cluster--band .mark-name { font-size: 1rem; }

.head-band__tag {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.head-band__tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

html[dir="rtl"] .head-band__tag {
  margin-left: 0;
  margin-right: 0;
}

html[dir="rtl"] .head-band__tools {
  margin-left: 0;
  margin-right: auto;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  color: #cbd5e1;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.menu-toggle:hover { color: #fff; background: rgba(59, 130, 246, 0.2); }

.content-well {
  flex: 1;
}

/* Mobile */
@media (max-width: 1023px) {
  .side-panel {
    transform: translateX(-100%);
  }
  html[dir="rtl"] .side-panel {
    transform: translateX(100%);
  }
  .side-panel.is-open {
    transform: translateX(0);
  }
  .canvas-stage {
    margin-left: 0;
    margin-right: 0;
  }
  .menu-toggle { display: flex; }
  .mark-cluster--side { display: none; }
}

@media (min-width: 1024px) {
  .mark-cluster--band { display: none; }
}

/* FAB */
#float-acquire {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 9999px;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#float-acquire:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 32px rgba(59, 130, 246, 0.65);
}
#float-acquire svg { width: 1.125rem; height: 1.125rem; }

html[dir="rtl"] #float-acquire {
  right: auto;
  left: 1.5rem;
}
