/* Grok's Claws · bare overlay shell
 * Start (top-left) · DETAILS + DESK left rail · Kate whole-site minimap right
 * Sites only fill #app; framework owns chrome.
 */
:root {
  --claws-rail: 40px;
  --claws-fly-w: min(300px, 86vw);
  --claws-minimap-w: 72px; /* double-width Kate minimap */
  --claws-top: 52px;
  --claws-foot: 28px;
}

/* Hide native page bar · minimap is the scroll UI */
html.claws-shell,
html.claws-shell body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg, #0c0c0e);
  color: var(--text, #ececf1);
  font-family: var(--font, system-ui, sans-serif);
  box-sizing: border-box;
}
html.claws-shell *,
html.claws-shell *::before,
html.claws-shell *::after {
  box-sizing: border-box;
}

body.claws-fly-ready,
body.h7-start-ready,
body.claws-rail-ready,
body.claws-shell-ready {
  --start-gutter: var(--claws-rail);
  padding-left: var(--claws-rail) !important;
  padding-right: var(--claws-minimap-w) !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}

/* Site surface · scrolls under chrome */
#app.claws-site,
body.claws-shell-ready #app {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 16px 18px 40px;
  max-width: none;
  /* hide native scrollbar; Kate minimap owns the right edge */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body.claws-shell-ready #app::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* Push site when flyouts open */
body.claws-shell-ready #app {
  transition: padding-left 0.42s cubic-bezier(0.45, 0.05, 0.25, 1);
}
body.claws-details-open #app {
  padding-left: calc(var(--claws-fly-w) + 8px) !important;
}
body.claws-dash-open:not(.claws-details-open) #app {
  padding-left: calc(var(--claws-fly-w) + 8px) !important;
}
body.claws-details-open.claws-dash-open #app {
  padding-left: calc(var(--claws-fly-w) + var(--claws-fly-w) + 8px) !important;
}

/* LEFT RAIL · DETAILS + DESK · align under Start claw */
.claws-rail-tab,
#btn-details-show.details-show-tab,
#btn-dashpin-toggle.dashpin-tab {
  position: fixed !important;
  left: 4px !important;
  right: auto !important;
  bottom: auto !important;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  appearance: none;
  border: 1px solid #1e2428;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, #12121a, #0a0c0b);
  font: 800 11px/1 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 6px;
  margin: 0;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  cursor: pointer;
  display: block !important;
  z-index: 100036 !important;
  box-shadow: none !important;
  transform: none !important;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  color: #8a9298;
}
#btn-details-show.details-show-tab {
  top: 56px !important;
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.35);
}
#btn-details-show.details-show-tab.is-open {
  color: #05f2a0;
  border-color: rgba(5, 242, 160, 0.45);
  background: #0c2018;
}
#btn-details-show.details-show-tab:hover {
  color: #e8e4df;
  border-color: #2a2a36;
  background: #16161e;
}
#btn-dashpin-toggle.dashpin-tab {
  top: 168px !important;
  color: #05f2a0;
  border-color: rgba(5, 242, 160, 0.4);
}
#btn-dashpin-toggle.dashpin-tab.is-open,
#btn-dashpin-toggle.dashpin-tab.on {
  color: #05f2a0;
  background: #0c2018;
  border-color: rgba(5, 242, 160, 0.5);
}
#btn-dashpin-toggle.dashpin-tab:hover {
  color: #e8e4df;
  border-color: rgba(5, 242, 160, 0.55);
  background: #16161e;
}

/* Flyout panes · FULLY hidden when closed · no left peek / ghost content */
.claws-flyout-pane,
#details-pane.details-pane,
#dashpin.dashpin {
  position: fixed !important;
  top: var(--claws-top) !important;
  left: var(--claws-rail) !important;
  bottom: var(--claws-foot) !important;
  width: var(--claws-fly-w) !important;
  max-width: 92vw;
  z-index: 100022 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  border-right: 1px solid var(--border, #2c2c36);
  background: #0e0e12;
  box-shadow: none;
  /* off-stage completely · no peek strip */
  transform: translate3d(calc(-100% - var(--claws-rail) - 24px), 0, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.28s cubic-bezier(0.45, 0.05, 0.25, 1),
    opacity 0.2s ease,
    visibility 0.2s;
  overflow: hidden;
}
body.claws-details-open #details-pane.details-pane {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 100024 !important;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
}
body.claws-dash-open #dashpin.dashpin {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 100023 !important;
  border: 1px solid #05f2a0;
  box-shadow: 0 0 28px rgba(5, 242, 160, 0.22), 8px 0 32px rgba(0, 0, 0, 0.45);
}
body.claws-details-open.claws-dash-open #dashpin.dashpin {
  left: calc(var(--claws-rail) + var(--claws-fly-w)) !important;
}

.claws-flyout-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 10px 12px;
}
.dashpin-head,
.details-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #2c2c36);
  flex-shrink: 0;
}
.dashpin-title,
.details-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #05f2a0;
}
.details-title { color: #c084fc; }
.details-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.details-btn,
.btn.ghost {
  appearance: none;
  border: 1px solid var(--border, #2c2c36);
  background: transparent;
  color: var(--muted, #8b8b9a);
  font: 700 10px system-ui;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.details-btn:hover,
.btn.ghost:hover {
  color: var(--text, #ececf1);
  border-color: #3a3a48;
}

/* DESK icons grid · uncrowded · 3-col · EZZIE thrift */
.dashpin-icons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 8px;
  padding: 8px 4px 14px;
}
.dashpin-icons .proj {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--surface, #18181d);
  color: var(--text, #ececf1);
  text-decoration: none;
  cursor: pointer;
  min-height: 78px;
  position: relative;
}
.dashpin-icons .proj:hover {
  border-color: var(--grin-edge, rgba(0, 255, 163, 0.45));
  background: #141820;
  color: var(--grin, #00ffa3);
}
.dashpin-icons .proj.on {
  border-color: rgba(5, 242, 160, 0.5);
  box-shadow: 0 0 12px rgba(5, 242, 160, 0.2);
}
.dashpin-icons .proj .ic {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}
.dashpin-icons .proj .glyph {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 14px system-ui;
  color: var(--grin, #00ffa3);
  background: #0a0c0b;
  border: 1px solid #1e2428;
  border-radius: 8px;
}
.dashpin-icons .proj .lab {
  font: 700 10px system-ui;
  letter-spacing: 0.04em;
  text-align: center;
  color: inherit;
}
.dashpin-icons .proj .tip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: #0a0c0b;
  border: 1px solid #05f2a0;
  border-radius: 8px;
  padding: 6px 8px;
  white-space: nowrap;
  z-index: 5;
  pointer-events: none;
}
.dashpin-icons .proj:hover .tip { display: block; }
.dashpin-icons .proj .tip b {
  display: block;
  font: 700 11px system-ui;
  color: #05f2a0;
}
.dashpin-icons .proj .tip-s {
  font: 10px system-ui;
  color: #8a9298;
}
.dashpin-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.dashpin-list:empty { display: none; }
#details-body,
#details-pane .details-content {
  font: 13px/1.45 system-ui;
  color: #c8c8d4;
}
#details-body h3,
.details-content h3 {
  margin: 0 0 8px;
  font: 800 11px system-ui;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c084fc;
}
#details-body p,
.details-content p {
  margin: 0 0 10px;
}
.claws-handshake-line {
  font: 10px/1.35 var(--mono, ui-monospace, monospace);
  color: var(--dim, #5c5c6a);
  padding: 8px 4px 4px;
  border-top: 1px solid var(--border, #2c2c36);
  margin-top: 8px;
}

/* RIGHT · Kate whole-site minimap · double width · content map */
#claws-minimap {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--claws-minimap-w);
  z-index: 100040;
  background: linear-gradient(180deg, #0c0e0d 0%, #080a09 100%);
  border-left: 1px solid #1e2428;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  overflow: hidden;
}
#claws-minimap .mm-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  pointer-events: none;
}
#claws-minimap .mm-thumb {
  position: absolute;
  left: 3px;
  right: 3px;
  top: 0;
  height: 64px;
  min-height: 22px;
  border: 1px solid #05f2a0;
  background: rgba(5, 242, 160, 0.12);
  border-radius: 3px;
  box-sizing: border-box;
  pointer-events: none;
  will-change: top, height;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(5, 242, 160, 0.15);
}
#claws-minimap .mm-label {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font: 700 9px/1 system-ui;
  letter-spacing: 0.08em;
  color: rgba(5, 242, 160, 0.65);
  pointer-events: none;
  z-index: 3;
  opacity: 0.85;
}

/* site brand strip inside #app (optional) */
.claws-site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #2c2c36);
}
.claws-site-head h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}
.claws-site-head .hot { color: #ff6b35; }
.claws-site-head .sub {
  color: var(--muted, #8b8b9a);
  font-size: 13px;
  margin: 0;
  flex: 1 1 200px;
}

/* site green / gray pin · brand mark toggle */
.brand .mark {
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s, border-color .15s;
}
.brand .mark.is-gray,
html.site-gray .brand .mark {
  background: #2a2a32 !important;
  border-color: #6a6a78 !important;
  color: #b0b0bc !important;
  box-shadow: none !important;
}
.brand .mark.is-green,
html.site-green .brand .mark {
  background: linear-gradient(145deg, #0c2018, #0a0c0b) !important;
  border-color: #00ffa3 !important;
  color: #00ffa3 !important;
  box-shadow: 0 0 14px rgba(0, 255, 163, 0.35) !important;
}
.site-green-line {
  font: 11px ui-monospace, monospace;
  color: #8b8b9a;
  padding: 8px 12px;
  margin: 0;
  border-top: 1px solid #2c2c36;
}
html.site-green .site-green-line { color: #00ffa3; }

/* desk icons · glyph always visible */
.dashpin-icons .proj {
  position: relative;
}
.dashpin-icons .proj .glyph {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 18px;
  border-radius: 10px;
  background: #18181d;
  border: 1px solid #2c2c36;
}
.dashpin-icons .proj .ic {
  display: none; /* prefer glyph on hub CSP */
}
.dashpin-icons .proj.on .glyph {
  border-color: #00ffa3;
  color: #00ffa3;
  box-shadow: 0 0 10px rgba(0,255,163,.2);
}
