/* ###############################################################
   🐢 TRTL UX — Turtle Left Rail (TA Edition)
   Mirrors TOC behavior: collapsed → hover expands.
   ############################################################### */

#t-leftrail {
  position: fixed;
  top: 72px; /* under TA topbar */
  bottom: 0;
  left: 0;

  width: 72px;
  max-width: 72px;

  background: var(--t-bg, #ffffff);
  border-right: 1px solid rgba(0,0,0,.08);

  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  transition:
    width .20s cubic-bezier(0.2,0,0,1),
    max-width .20s cubic-bezier(0.2,0,0,1);

  z-index: 50;
}

/* Expanded */
#t-leftrail.open {
  width: 240px;
  max-width: 240px;
  box-shadow: 2px 0 8px rgba(0,0,0,.12);
}

/* Dark mode */
html[data-theme="dark"] #t-leftrail {
  background: #111315;
  border-right: 1px solid rgba(255,255,255,.08);
}

/* Menu list */
.tl-menu {
  margin: 0;
  padding: 12px 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Menu item */
.tl-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
}

.tl-item a {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

/* Hover */
.tl-item:hover {
  background: rgba(0,0,0,.06);
}
html[data-theme="dark"] .tl-item:hover {
  background: rgba(255,255,255,.08);
}

/* Brand (turtle icon large) */
.tl-brand {
  justify-content: center;
  margin-bottom: 8px;
}

/* Collapsed: hide labels */
.tl-label {
  opacity: 0;
  pointer-events: none;
  max-width: 0;
  transform: translateX(-6px);
  transition: all .18s cubic-bezier(0.2,0,0,1);
}

/* Expanded: show labels */
#t-leftrail.open .tl-label {
  opacity: 1;
  pointer-events: auto;
  max-width: 160px;
  transform: translateX(0);
}

/* ###############################################################
   Turtle Glyphs v1.0.0 for Left Rail Icons
   Tailored icon silhouettes (box shadow + border radius technique)
   ############################################################### */

.ticon {
  width: 26px;
  height: 26px;
  display: inline-block;
}

/* Turtle Home Glyph */
.ticon-turtle {
  background: #1a8f3d;
  border-radius: 6px;
  box-shadow:
    inset 0 -3px 0 #0e7a31,
    inset 3px 0 0 #43d675;
}

/* Home */
.ticon-home {
  background: #22a645;
  border-radius: 4px;
  box-shadow:
    inset 0 -3px 0 #0e7a31;
}

/* Person */
.ticon-person {
  background: #22a645;
  border-radius: 50%;
  box-shadow:
    inset 0 -6px 0 #0e7a31;
}

/* Privacy */
.ticon-privacy {
  background: #1b73e8;
  border-radius: 4px 4px 2px 2px;
  box-shadow:
    inset 0 -3px 0 #155fc4;
}

/* Shield */
.ticon-shield {
  background: #0e7a31;
  border-radius: 6px;
  box-shadow:
    inset 0 -5px 0 #1a8f3d;
}

/* People */
.ticon-people {
  background: #43d675;
  border-radius: 50%;
  position: relative;
}
.ticon-people::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 3px;
  right: 3px;
  height: 8px;
  background: #1a8f3d;
  border-radius: 4px;
}

/* Wallet */
.ticon-wallet {
  background: #d07a2a;
  border-radius: 4px;
  box-shadow:
    inset 0 -3px 0 #b8651e;
}

/* ============================================
   TMVP SHIFT LOGIC FOR TA
   Mirrors TOC behavior but targets TA wrappers
   ============================================ */

/* Default collapsed state (rail = 72px) */
.ta-page,
.ta-main {
  margin-left: 72px;
  transition: margin-left .2s cubic-bezier(0.2, 0, 0, 1);
}

/* When rail expands to 240px */
#t-left-rail.open ~ .ta-page,
#t-left-rail.open ~ .ta-main {
  margin-left: 240px;
}

/* ===========================================
   🐢 TA Shell Movement (TMVP Shift Logic)
   =========================================== */

/* collapsed baseline */
#t-leftrail ~ .ta-page {
    margin-left: 72px; /* collapsed width */
    transition: margin-left .22s ease;
}

/* expanded rail pushes the TMVP shell */
#t-leftrail[aria-expanded="true"] ~ .ta-page {
    margin-left: 260px; /* expanded width */
}