/* WARCHIEF RAVEN R01.HF11 — continuous deep branch connectors + one reply composer.
   Scoped: thread-only. The existing site, profile, feed and modal controls are untouched. */

/* A branch remains visually connected even after indentation reaches its cap. */
.rt-v2 .rt-childgroup.rt-childgroup-capped{
  display:flex;margin-left:-18px;padding:8px 0 4px 16px;
  border-left:2px solid #117da4;min-width:0;gap:9px;
}
.rt-v2 .rt-childgroup.rt-childgroup-capped:before{display:block;background:linear-gradient(#13ceff29,#13ceff08)}
.rt-v2 .rt-childgroup.rt-childgroup-capped>.rt-tree-node:before{
  display:block;left:-16px;top:30px;width:15px;height:19px;
  border-left:2px solid #107ba6;border-bottom:2px solid #1ac5ed;
  transform:translateY(-16px)
}
.rt-v2 .rt-childgroup.rt-childgroup-capped>.rt-tree-node:after{
  display:block;left:-20px;top:27px;width:8px;height:8px;
  background:#23d4f9;box-shadow:0 0 8px #09c9f688
}
.rt-v2 .rt-depth-capped>.rt-node-card{border-left:1px solid #23627f}
.rt-v2 .rt-depth-label{display:inline-flex;align-items:center;gap:5px;margin:0 0 6px;
 color:#69bedc;font-size:10px;font-weight:650;letter-spacing:.03em}
.rt-v2 .rt-depth-label svg{flex:none;color:#19c8f5}

/* The original post and nested replies use ONE targeted editor, opened only by Reply. */
.rt-v2 .rt-conversation{padding-bottom:45px}
.rt-v2 .rt-conversation:has(.rt-single-compose){padding-bottom:190px}
.rt-v2 .rt-single-compose{
  position:fixed;z-index:24;
  left:calc(max(0px,(100vw - 1900px)/2) + 287px);
  right:calc(max(0px,(100vw - 1900px)/2) + 392px);
  bottom:calc(12px + var(--rt-keyboard-lift,0px));
  display:flex;align-items:flex-start;gap:12px;
  padding:12px 14px;border:1px solid #17acd5;border-radius:15px;
  background:linear-gradient(120deg,#061b2aee,#082c41fa);
  backdrop-filter:blur(14px);box-shadow:0 18px 50px #000d,0 0 28px #08bff229;
  max-height:min(320px,calc(100dvh - 90px));overflow:auto;
}
.rt-v2 .rt-single-compose>.avatar{flex:none;width:43px;height:43px;margin-top:3px;
 border:1px solid #348aaa;border-radius:50%;object-fit:cover}
.rt-v2 .rt-single-body{flex:1;min-width:0}
.rt-v2 .rt-single-heading{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.rt-v2 .rt-single-heading>div{display:flex;align-items:baseline;gap:5px 9px;flex-wrap:wrap;min-width:0}
.rt-v2 .rt-single-eyebrow{display:inline-flex;align-items:center;gap:5px;text-transform:uppercase;
 letter-spacing:.095em;font-size:9px;color:#40d4f8;font-weight:750}
.rt-v2 .rt-single-heading strong{font-size:13px;color:#f2f9ff}
.rt-v2 .rt-single-heading small{font-size:11px;color:#86a9bf}
.rt-v2 .rt-single-close{width:28px;height:28px;flex:none;display:grid;place-items:center;
 color:#91b7c9;border:1px solid #28556c;border-radius:8px;background:#071d2b}
.rt-v2 .rt-single-close:hover,.rt-v2 .rt-single-close:focus-visible{color:#fff;border-color:#27c7f1;background:#113b50}
.rt-v2 .rt-single-excerpt{font-size:11px;line-height:1.35;color:#98b8c8;max-width:95%;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:4px 0 0}
.rt-v2 .rt-single-compose .rt-reply-form{display:flex;flex-wrap:nowrap;align-items:flex-end;gap:9px;margin-top:8px}
.rt-v2 .rt-single-compose .rt-reply-form textarea{flex:1;min-width:0;width:100%;max-height:130px;resize:vertical;
 border:1px solid #29627d;border-radius:10px;background:#041524;color:#effaff;
 font:inherit;font-size:14px;line-height:1.4;padding:10px 12px;outline:none;min-height:45px}
.rt-v2 .rt-single-compose .rt-reply-form textarea:focus{border-color:#12c9f7;box-shadow:0 0 0 2px #13bff725}
.rt-v2 .rt-single-compose .primary-button{min-width:88px;height:44px;font-size:12px;font-weight:800;white-space:nowrap}
.rt-v2 .rt-visually-hidden{position:absolute;clip-path:inset(50%);height:1px;width:1px;overflow:hidden;white-space:nowrap}
.rt-v2 .rt-single-compose button:focus-visible{outline:2px solid #38d7ff;outline-offset:2px}

@media(max-width:1290px){.rt-v2 .rt-single-compose{left:248px;right:332px}}
@media(max-width:1050px){.rt-v2 .rt-single-compose{left:100px;right:319px}}
@media(max-width:850px){.rt-v2 .rt-single-compose{left:90px;right:16px}}
@media(max-width:590px){
  /* Two indentation steps on mobile, then one repeating rail with a joint for each child. */
  .rt-v2 .rt-tree-node[data-depth="2"]>.rt-childgroup,
  .rt-v2 .rt-childgroup.rt-childgroup-capped{
    margin-left:-12px;padding:7px 0 4px 11px;border-left:1px solid #1080ac;
    gap:7px;display:flex;min-width:0
  }
  .rt-v2 .rt-tree-node[data-depth="2"]>.rt-childgroup:before,
  .rt-v2 .rt-childgroup.rt-childgroup-capped:before{display:block}
  .rt-v2 .rt-tree-node[data-depth="2"]>.rt-childgroup>.rt-tree-node:before,
  .rt-v2 .rt-childgroup.rt-childgroup-capped>.rt-tree-node:before{
    display:block;left:-12px;top:21px;width:11px;height:13px;
    transform:translateY(-7px);border-width:1px
  }
  .rt-v2 .rt-tree-node[data-depth="2"]>.rt-childgroup>.rt-tree-node:after,
  .rt-v2 .rt-childgroup.rt-childgroup-capped>.rt-tree-node:after{
    display:block;left:-15px;top:17px;width:6px;height:6px
  }
  .rt-v2 .rt-depth-label{font-size:9px}
  .rt-v2 .rt-conversation{padding-bottom:94px}
  .rt-v2 .rt-conversation:has(.rt-single-compose){padding-bottom:225px}
  .rt-v2 .rt-single-compose{left:8px;right:8px;
    bottom:calc(68px + var(--rt-keyboard-lift,0px));gap:9px;
    padding:10px;border-radius:13px;max-height:min(280px,calc(100dvh - 120px))}
  .rt-v2 .rt-single-compose>.avatar{width:31px;height:31px;margin-top:4px}
  .rt-v2 .rt-single-heading{align-items:center}
  .rt-v2 .rt-single-heading>div{gap:4px 7px}
  .rt-v2 .rt-single-heading strong{font-size:12px}
  .rt-v2 .rt-single-heading small{font-size:10px}
  .rt-v2 .rt-single-eyebrow{font-size:8px}
  .rt-v2 .rt-single-excerpt{max-width:100%;font-size:10px}
  .rt-v2 .rt-single-compose .rt-reply-form textarea{font-size:16px;min-height:44px;padding:9px}
  .rt-v2 .rt-single-compose .primary-button{min-width:70px;height:44px;padding:8px;font-size:12px}
  /* When the onscreen keyboard is active, the bottom nav is not useful. */
  body:has(.rt-single-compose:focus-within) .mobile-bottom-nav{visibility:hidden;pointer-events:none}
  body:has(.rt-single-compose:focus-within) .rt-single-compose{bottom:calc(8px + var(--rt-keyboard-lift,0px))}
}
@media(max-width:385px){
 .rt-v2 .rt-single-compose{left:5px;right:5px;gap:7px}
 .rt-v2 .rt-single-compose>.avatar{width:27px;height:27px}
 .rt-v2 .rt-single-compose .primary-button{min-width:58px;padding:7px}
}
@media(prefers-reduced-motion:reduce){.rt-v2 .rt-single-compose,.rt-v2 .rt-reply{transition:none}}
